summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2022-06-07 15:47:45 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2022-06-07 15:47:45 +0900
commitf8c983cb14f8ba0921ce8fa52ea3519feae07861 (patch)
treeaae802b65f58f0c64d49241ddde74fb32bce82f8 /src
parent8d8e80ad753645b5fcbe28bb3e768079415ef848 (diff)
downloadlibgcrypt-f8c983cb14f8ba0921ce8fa52ea3519feae07861.tar.gz
kdf: Add One-Step KDF with hash.
* src/gcrypt.h.in (GCRY_KDF_ONESTEP_KDF): New. * cipher/kdf.c (onestep_kdf_open, onestep_kdf_compute): New. (onestep_kdf_final): New. (_gcry_kdf_open, _gcry_kdf_compute, _gcry_kdf_final): Add GCRY_KDF_ONESTEP_KDF support. * tests/t-kdf.c (check_onestep_kdf): Add the test. (main): Call check_onestep_kdf. -- GnuPG-bug-id: 5964 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'src')
-rw-r--r--src/gcrypt.h.in15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gcrypt.h.in b/src/gcrypt.h.in
index b17e242f..5879acaf 100644
--- a/src/gcrypt.h.in
+++ b/src/gcrypt.h.in
@@ -1592,8 +1592,21 @@ enum gcry_kdf_algos
GCRY_KDF_PBKDF1 = 33,
GCRY_KDF_PBKDF2 = 34,
GCRY_KDF_SCRYPT = 48,
+ /**/
GCRY_KDF_ARGON2 = 64,
- GCRY_KDF_BALLOON = 65
+ GCRY_KDF_BALLOON = 65,
+ /**/
+ /* In the original SP 800-56A, it's called
+ * "Concatenation Key Derivation Function".
+ * Now (as of 2022), it's defined in SP 800-56C rev.2, as
+ * "One-Step Key Derivation".
+ */
+ GCRY_KDF_ONESTEP_KDF = 96, /* One-Step Key Derivation with hash */
+ /* One-Step Key Derivation with HMAC */
+ /* One-Step Key Derivation with KMAC */
+ /* Two-Step Key Derivation with HMAC */
+ /* Two-Step Key Derivation with CMAC */
+ /* KDF PRF in SP 800-108r1 */
};
enum gcry_kdf_subalgo_argon2