summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2022-06-16 14:54:30 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2022-06-16 14:54:30 +0900
commitfbddfb964f0b1c1ec131194b2273c3f834041c84 (patch)
tree85941824f03a5f8a4aa153564324d4a6d0ce1cc9 /src
parent2c5e5ab6843d747c4b877d2c6f47226f61e9ff14 (diff)
downloadlibgcrypt-fbddfb964f0b1c1ec131194b2273c3f834041c84.tar.gz
kdf: Add HKDF of RFC5869.
* src/gcrypt.h.in (GCRY_KDF_HKDF): New. * cipher/kdf.c (hkdf_open, hkdf_compute, hkdf_final, hkdf_close): New. (_gcry_kdf_open, _gcry_kdf_compute, _gcry_kdf_final, _gcry_kdf_close): Handle GCRY_KDF_HKDF. * tests/t-kdf.c (check_hkdf): New. Test vectors from RFC5869. (main): Call check_hkdf. -- GnuPG-bug-id: 5964 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'src')
-rw-r--r--src/gcrypt.h.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gcrypt.h.in b/src/gcrypt.h.in
index 809848b7..299261db 100644
--- a/src/gcrypt.h.in
+++ b/src/gcrypt.h.in
@@ -1603,6 +1603,7 @@ enum gcry_kdf_algos
*/
GCRY_KDF_ONESTEP_KDF = 96, /* One-Step Key Derivation with hash */
GCRY_KDF_ONESTEP_KDF_MAC = 97, /* One-Step Key Derivation with MAC */
+ GCRY_KDF_HKDF = 98,
/* Two-Step Key Derivation with HMAC */
/* Two-Step Key Derivation with CMAC */
/* KDF PRF in SP 800-108r1 */