Home GnuPG

cipher: Add support of Key wrap with padding (KWP).

Description

cipher: Add support of Key wrap with padding (KWP).

* src/gcrypt.h.in (GCRY_CIPHER_EXTENDED): New enum value.
* cipher/cipher-aeswrap.c (wrap): New.
(_gcry_cipher_keywrap_encrypt, unwrap): Use wrap.
(_gcry_cipher_keywrap_encrypt_padding): New.
(_gcry_cipher_keywrap_decrypt): Use unwrap.
(_gcry_cipher_keywrap_decrypt_padding): New.
* cipher/cipher-internal.h: Add declarations.
* cipher/cipher.c (_gcry_cipher_open_internal): Support
GCRY_CIPHER_EXTENDED.
(_gcry_cipher_setup_mode_ops): Extend for GCRY_CIPHER_MODE_AESWRAP.
* tests/aeswrap.c: Add two tests from RFC5649.
  • GnuPG-bug-id: T5752
  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on Jan 3 2022, 6:26 AM
Parents
rC3204c3827e98: build: Update for newer autoconf.
Branches
Unknown
Tags
Unknown
Tasks
T5752: libgcrypt: Adding aes-wrap-pad (RFC5649) support