gnupg/common
Werner Koch 1dfe71c62b
gpg: Support decryption of the new AEAD packet
* common/openpgpdefs.h (aead_algo_t): New.
(pkttype_t): Add PKT_ENCRYPTED_AEAD.
* g10/decrypt-data.c (struct decode_filter_context_s): Add fields for
AEAD.
(aead_set_nonce_and_ad): New.
(aead_checktag): New.
(decrypt_data): Support AEAD.
(aead_underflow): New.
(aead_decode_filter): New.
* g10/dek.h (DEK): Add field use_aead.  Turn use_mdc,
algo_info_printed, and symmetric into bit flags.
* g10/mainproc.c (struct mainproc_context): Add field
seen_pkt_encrypted_aead.
(release_list): Clear it.
(have_seen_pkt_encrypted_aead): New.
(symkey_decrypt_seskey): Support AEAD.
(proc_symkey_enc): Ditto.
(proc_encrypted): Ditto.
(proc_plaintext): Ditto.
* g10/misc.c (MY_GCRY_CIPHER_MODE_EAX): New.
(openpgp_aead_test_algo): New.
(openpgp_aead_algo_name): New.
(openpgp_aead_algo_info): New.
* g10/packet.h (PKT_symkey_enc): Add field use_aead.
(PKT_user_id): Add field flags.aead
(PKT_public_key): Ditto.
(PKT_encrypted): Add fields for AEAD.
* g10/parse-packet.c (parse): Handle PKT_ENCRYPTED_AEAD.
(parse_symkeyenc): Support AEAD.
(parse_encrypted): Ditto.
(dump_sig_subpkt): Dump AEAD preference packet.
(parse_encrypted_aead): New.
--

This patch allows to decrypt data encrypted using the new AEAD
mechanism as specified in rfc4880bis.  Although preferences are used
to enable this new mode, it is useful to have at least a decryption
option in case a user switches between GnuPG 2.2 and newer versions.

The new AEAD mechanism is much faster than the current CFB+MDC and
thus 2.2 will allow faster decryption of symmetric only decryption.

This patch is based on the current master (2.3) code base and includes
a few other patches.  In particular
commit 44be675b75
(gpg: More check for symmetric key encryption.)
is included.

Signed-off-by: Werner Koch <wk@gnupg.org>
2020-04-16 08:25:55 +02:00
..
ChangeLog-2011 Fix typos 2015-10-28 10:20:17 +01:00
ChangeLog-2011.include Spelling fixes in docs and comments. 2017-04-28 10:06:33 +09:00
ChangeLog.jnlib common: Remove JNLIB from boiler plate (jnlib merge). 2015-04-24 16:42:28 +02:00
Makefile.am common: Fix AWK portability. 2019-04-16 13:27:44 +09:00
README common: Update README. 2016-03-02 14:27:30 +01:00
agent-opt.c agent: New OPTION pretend-request-origin 2018-03-23 08:37:14 +01:00
all-tests.scm tests: Make it possible to run all tests using our infrastructure. 2017-05-11 18:12:37 +02:00
argparse.c Copyright notice updates et al. 2020-03-19 15:48:12 +01:00
argparse.h common: Allow abbreviations of standard options. 2017-07-18 18:08:25 +02:00
asshelp.c assuan: Fix exponential decay for first second. 2018-08-28 16:47:38 +02:00
asshelp.h common: Use new function to print status strings. 2018-02-14 12:21:44 +01:00
asshelp2.c common: Use new function to print status strings. 2018-02-14 12:21:44 +01:00
audit.c sm: Consider certificates w/o CRL DP as valid. 2020-03-27 21:20:13 +01:00
audit.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
b64dec.c g10, sm, dirmngr, common: Add comment for fall through. 2017-05-10 11:13:12 +09:00
b64enc.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
call-gpg.c Spelling fixes in docs and comments. 2017-04-28 10:06:33 +09:00
call-gpg.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
ccparray.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
ccparray.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
common-defs.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
compliance.c gpg: Tweak compliance checking for verification 2017-07-27 16:22:36 +02:00
compliance.h gpg,sm: Check compliance of the RNG. 2017-07-17 15:53:16 +02:00
convert.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
dotlock.c Spelling fixes in docs and comments. 2017-04-28 10:06:33 +09:00
dotlock.h Clarify text of LGPLv2+/GPLv2+ licensed files. 2017-02-24 13:48:28 +01:00
dynload.h Clarify text of LGPLv2+/GPLv2+ licensed files. 2017-02-24 13:48:28 +01:00
exaudit.awk Nuked almost all trailing white space. 2011-02-04 12:57:53 +01:00
exechelp-posix.c common: Fix gnupg_wait_processes. 2019-02-19 15:49:55 +09:00
exechelp-w32.c common,w32: Hide spawned processes by default 2018-05-02 14:07:39 +02:00
exechelp-w32ce.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
exechelp.h Spelling fixes in docs and comments. 2017-04-28 10:06:33 +09:00
exectool.c Spelling fixes in docs and comments. 2017-04-28 10:06:33 +09:00
exectool.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
exstatus.awk Nuked almost all trailing white space. 2011-02-04 12:57:53 +01:00
fwddecl.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
gc-opt-flags.h gpg: Add option --dirmngr-program. 2014-03-12 18:35:36 +01:00
get-passphrase.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
get-passphrase.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
gettime.c common: Accept the Z-suffix for yymmddThhmmssZ format. 2017-11-01 18:35:29 +01:00
gettime.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
gnupg.ico w32: Add icons and version information. 2013-05-07 21:35:48 +02:00
gpgrlhelp.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
helpfile.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
homedir.c gpgconf,w32: Print a warning for a suspicious homedir. 2020-01-17 14:28:13 +01:00
host2net.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
i18n.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
i18n.h Fix typos found using codespell. 2015-11-17 12:50:22 +01:00
init.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
init.h Spelling fixes in docs and comments. 2017-04-28 10:06:33 +09:00
iobuf.c build: Always use EXTERN_UNLESS_MAIN_MODULE pattern. 2020-02-10 16:37:34 +01:00
iobuf.h build: Always use EXTERN_UNLESS_MAIN_MODULE pattern. 2020-02-10 16:37:34 +01:00
isascii.c common: Change license of isascii.c to all-premissive, 2015-12-14 16:21:19 +01:00
keyserver.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
ksba-io-support.c sm: Remove left over debug output. 2020-02-17 11:38:23 +01:00
ksba-io-support.h common: Rename remaining symbols in ksba-io-support. 2017-02-16 17:21:05 +01:00
localename.c common: Fix warning for portability. 2017-03-07 10:42:46 +09:00
logging.c common: Also protect log_inc_errorcount against counter overflow. 2020-02-10 14:55:53 +01:00
logging.h kbx: Simplify by removing custom memory functions. 2017-12-22 12:55:46 +01:00
mapstrings.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
mbox-util.c common: New function to validate domain names. 2018-07-29 18:39:32 +02:00
mbox-util.h common: New function to validate domain names. 2018-07-29 18:39:32 +02:00
membuf.c Clean up word replication. 2017-02-21 13:11:46 -05:00
membuf.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
miscellaneous.c gpg: Fix "Too many open files" when using --multifile. 2018-05-02 19:03:07 +02:00
mischelp.c common: Use platform memory zeroing function for wipememory 2018-12-05 08:23:57 +01:00
mischelp.h common: Use platform memory zeroing function for wipememory 2018-12-05 08:23:57 +01:00
mkdir_p.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
mkdir_p.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
mkerrors Nuked almost all trailing white space. 2011-02-04 12:57:53 +01:00
mkerrtok Nuked almost all trailing white space. 2011-02-04 12:57:53 +01:00
mkstrtable.awk common: Fix AWK portability. 2019-04-16 13:27:44 +09:00
name-value.c common: Fix line break handling, finding a space. 2019-08-12 10:46:26 +09:00
name-value.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
openpgp-oid.c common: New helper functions for OpenPGP curve OIDs. 2019-01-29 20:17:29 +01:00
openpgpdefs.h gpg: Support decryption of the new AEAD packet 2020-04-16 08:25:55 +02:00
percent.c scd:p15: Fix decrypt followed by sign problem for D-Trust cards. 2020-04-15 15:31:56 +02:00
recsel.c Spelling fixes in docs and comments. 2017-04-28 10:06:33 +09:00
recsel.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
server-help.c common: New functions get_option_value and ascii_strupr. 2019-02-11 10:59:34 +01:00
server-help.h common: New functions get_option_value and ascii_strupr. 2019-02-11 10:59:34 +01:00
session-env.c Clean up word replication. 2017-02-21 13:11:46 -05:00
session-env.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
sexp-parse.h Clean up word replication. 2017-02-21 13:11:46 -05:00
sexputil.c common: New function to map hash algo names. 2020-04-15 15:43:00 +02:00
shareddefs.h agent: New OPTION pretend-request-origin 2018-03-23 08:37:14 +01:00
signal.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
simple-pwquery.c agent: Fix possible uninitalized use of CTX in simple_pwquery. 2018-10-24 20:30:17 +02:00
simple-pwquery.h Spelling fixes in docs and comments. 2017-04-28 10:06:33 +09:00
ssh-utils.c Fix use of strncpy, which is actually good to use memcpy. 2018-09-06 11:46:20 +09:00
ssh-utils.h common: Support different digest algorithms for ssh fingerprints. 2017-05-24 17:01:48 +02:00
status.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
status.h gpg,gpgsm: Emit status code ENCRYPTION_COMPLIANCE_MODE. 2017-06-23 12:01:20 +02:00
stringhelp.c common: New functions get_option_value and ascii_strupr. 2019-02-11 10:59:34 +01:00
stringhelp.h common: New functions get_option_value and ascii_strupr. 2019-02-11 10:59:34 +01:00
strlist.c Clarify text of LGPLv2+/GPLv2+ licensed files. 2017-02-24 13:48:28 +01:00
strlist.h Clarify text of LGPLv2+/GPLv2+ licensed files. 2017-02-24 13:48:28 +01:00
sysutils.c common: Fix gnupg_reopen_std. 2018-10-02 14:31:56 +09:00
sysutils.h common: New functions gnupg_daemon_rootdir and gnupg_chdir. 2017-07-25 12:43:37 +02:00
t-b64.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
t-ccparray.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
t-convert.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
t-dotlock.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
t-exechelp.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
t-exectool.c tests: Avoid skipping exectool tests. 2016-12-20 18:39:30 +01:00
t-gettime.c tests: Fix t-gettime for a time_t of 64 and a long of 32 bit. 2017-01-12 10:39:19 +01:00
t-helpfile.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
t-iobuf.c Replace use of variable-length-arrays. 2017-01-02 13:29:18 +01:00
t-mapstrings.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
t-mbox-util.c common: New function to validate domain names. 2018-07-29 18:39:32 +02:00
t-name-value.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
t-openpgp-oid.c common: New helper functions for OpenPGP curve OIDs. 2019-01-29 20:17:29 +01:00
t-percent.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
t-recsel.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
t-session-env.c Spelling fixes in docs and comments. 2017-04-28 10:06:33 +09:00
t-sexputil.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
t-ssh-utils.c common: Correctly render SHA256-based ssh fingerprints. 2017-05-24 17:07:13 +02:00
t-stringhelp.c common: New function split_fields_colon. 2017-07-17 15:53:16 +02:00
t-strlist.c Clarify text of LGPLv2+/GPLv2+ licensed files. 2017-02-24 13:48:28 +01:00
t-support.c Clarify text of LGPLv2+/GPLv2+ licensed files. 2017-02-24 13:48:28 +01:00
t-support.h Clarify text of LGPLv2+/GPLv2+ licensed files. 2017-02-24 13:48:28 +01:00
t-sysutils.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
t-timestuff.c Clarify text of LGPLv2+/GPLv2+ licensed files. 2017-02-24 13:48:28 +01:00
t-w32-reg.c Clarify text of LGPLv2+/GPLv2+ licensed files. 2017-02-24 13:48:28 +01:00
t-zb32.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
tlv.c Silence two -Wlogical-op warnings. 2017-01-05 20:43:40 +01:00
tlv.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
ttyio.c Clean up word replication. 2017-02-21 13:11:46 -05:00
ttyio.h common: Remove unused function tty_print_string. 2017-01-17 10:19:06 +01:00
types.h Clarify text of LGPLv2+/GPLv2+ licensed files. 2017-02-24 13:48:28 +01:00
userids.c gpg: Allow deletion of subkeys with --delete-[secret-]key. 2019-05-27 11:41:35 +02:00
userids.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
utf8conv.c Clarify text of LGPLv2+/GPLv2+ licensed files. 2017-02-24 13:48:28 +01:00
utf8conv.h Clarify text of LGPLv2+/GPLv2+ licensed files. 2017-02-24 13:48:28 +01:00
util.h common: New function to map hash algo names. 2020-04-15 15:43:00 +02:00
utilproto.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
w32-reg.c Clarify text of LGPLv2+/GPLv2+ licensed files. 2017-02-24 13:48:28 +01:00
w32help.h Clarify text of LGPLv2+/GPLv2+ licensed files. 2017-02-24 13:48:28 +01:00
w32info-rc.h.in Release 2.2.13 2019-02-12 16:30:31 +01:00
xasprintf.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
xreadline.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
yesno.c Clean up word replication. 2017-02-21 13:11:46 -05:00
zb32.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
zb32.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00

README

Common functionality used by all modules of GnuPG.