Add macros for the KDF algorithm names.
authorPauli <paul.dale@oracle.com>
Mon, 9 Sep 2019 01:35:25 +0000 (11:35 +1000)
committerPauli <paul.dale@oracle.com>
Wed, 11 Sep 2019 00:22:49 +0000 (10:22 +1000)
This avoids the problems with PBKDF2 and SCRYPT not being of the same form
as the rest.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9814)

include/openssl/core_names.h

index 27b4588ce1897d4d2be7c4bf3d52d53c037f9ac3..b11bc614a811904b3a327e04948af56bab10415b 100644 (file)
@@ -128,6 +128,16 @@ extern "C" {
 #define OSSL_KDF_PARAM_SSHKDF_TYPE  "type"      /* int */
 #define OSSL_KDF_PARAM_SIZE         "size"      /* size_t */
 
+/* Known KDF names */
+#define OSSL_KDF_NAME_HKDF          "HKDF"
+#define OSSL_KDF_NAME_PBKDF2        "PBKDF2"
+#define OSSL_KDF_NAME_SCRYPT        "id-scrypt"
+#define OSSL_KDF_NAME_SSHKDF        "SSHKDF"
+#define OSSL_KDF_NAME_SSKDF         "SSKDF"
+#define OSSL_KDF_NAME_TLS1_PRF      "TLS1-PRF"
+#define OSSL_KDF_NAME_X942KDF       "X942KDF"
+#define OSSL_KDF_NAME_X963KDF       "X963KDF"
+
 /* PKEY parameters */
 /* Diffie-Hellman/DSA Parameters */
 #define OSSL_PKEY_PARAM_FFC_P        "p"