mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpg: Implement AEAD for SKESK packets.
* g10/packet.h (PKT_symkey_enc): Add field aead_algo. * g10/build-packet.c (do_symkey_enc): Support version 5 packets. * g10/parse-packet.c (parse_symkeyenc): Ditto. * g10/encrypt.c (encrypt_symmetric): Force using a random session key in AEAD mode. (encrypt_seskey): Add and support arg aead_algo. (write_symkey_enc): Ditto. (encrypt_simple): Adjust accordingly. (encrypt_filter): Ditto. * g10/gpgcompose.c (sk_esk): For now call encrypt_seskey without AEAD support. * g10/mainproc.c (symkey_decrypt_seskey): Support AEAD. Nver call BUG but return an error. (proc_symkey_enc): Call symkey_decrypt_seskey in a bug compatible way. * g10/import.c (check_prefs): Check AEAD preferences. * g10/keyedit.c (show_prefs): Print AEAD preferences. -- For easier debugging this patch also changes some diagnostics to also print the encryption mode with the cipher algorithm. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
da3015e3c0
commit
9aab9167bc
11 changed files with 300 additions and 104 deletions
|
@ -2284,7 +2284,7 @@ sk_esk (const char *option, int argc, char *argv[], void *cookie)
|
|||
|
||||
/* Now encrypt the session key (or rather, the algorithm used to
|
||||
encrypt the SKESK plus the session key) using ENCKEY. */
|
||||
err = encrypt_seskey (&s2kdek, &sesdekp,
|
||||
err = encrypt_seskey (&s2kdek, 0, &sesdekp,
|
||||
(void**)&ske->seskey, (size_t *)&ske->seskeylen);
|
||||
if (err)
|
||||
log_fatal ("encrypt_seskey failed: %s\n", gpg_strerror (err));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue