summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-08-15 12:39:20 +0200
committerRichard Levitte <levitte@openssl.org>2019-08-19 08:10:16 +0200
commit81ff9eebbcf15ce04b52cc4257b265617ba412eb (patch)
tree41a8d094bed2e3bfaa2b5f323134ca63241ee72b /include
parentfaee6b21048623a422d537cdbad24f50c5c21937 (diff)
Use macros internally for algorithm names
The macros are defined in include/openssl/core_names.h and follow the naming standard OSSL_{OPNAME}_NAME_{ALGONAME}, where {OPNAME} is the name of the operation (such as MAC) and {ALGONAME} is the name of the algorithm. Example: OSSL_MAC_NAME_HMAC Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9635)
Diffstat (limited to 'include')
-rw-r--r--include/openssl/core_names.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/openssl/core_names.h b/include/openssl/core_names.h
index c1bc3a7d7b..76fe37ee4a 100644
--- a/include/openssl/core_names.h
+++ b/include/openssl/core_names.h
@@ -64,6 +64,10 @@ extern "C" {
#define OSSL_DIGEST_PARAM_SIZE "size" /* OSSL_PARAM_INTEGER */
#define OSSL_DIGEST_PARAM_FLAGS "flags" /* OSSL_PARAM_UNSIGNED_INTEGER */
+/* Known DIGEST names (not a complete list) */
+#define OSSL_DIGEST_NAME_KECCAK_KMAC128 "KECCAK_KMAC128"
+#define OSSL_DIGEST_NAME_KECCAK_KMAC256 "KECCAK_KMAC256"
+
/* MAC parameters */
#define OSSL_MAC_PARAM_KEY "key" /* octet string */
#define OSSL_MAC_PARAM_IV "iv" /* octet string */
@@ -84,6 +88,12 @@ extern "C" {
#define OSSL_MAC_PARAM_DIGESTSIZE "digestsize" /* size_t */
#define OSSL_MAC_PARAM_OUTLEN "outlen" /* size_t */
+/* Known MAC names (not a complete list) */
+#define OSSL_MAC_NAME_CMAC "CMAC"
+#define OSSL_MAC_NAME_HMAC "HMAC"
+#define OSSL_MAC_NAME_KMAC128 "KMAC128"
+#define OSSL_MAC_NAME_KMAC256 "KMAC256"
+
/* PKEY parameters */
/* Diffie-Hellman Parameters */
#define OSSL_PKEY_PARAM_DH_P "dh-p"