summaryrefslogtreecommitdiff
path: root/include/openssl
diff options
context:
space:
mode:
authorJames Muir <muir.james.a@gmail.com>2022-10-15 22:23:39 -0400
committerHugo Landau <hlandau@openssl.org>2023-01-13 07:09:09 +0000
commit836080a89a1f5e45dac4e0df76b9270587f65d5b (patch)
tree72abd378cbb77d89d85c3d1dcb14c7e92d0653a0 /include/openssl
parent9fa553247874728cee8ca0ece9aaed476eb0f303 (diff)
downloadopenssl-new-836080a89a1f5e45dac4e0df76b9270587f65d5b.tar.gz
Support all five EdDSA instances from RFC 8032
Fixes #6277 Description: Make each of the five EdDSA instances defined in RFC 8032 -- Ed25519, Ed25519ctx, Ed25519ph, Ed448, Ed448ph -- available via the EVP APIs. The desired EdDSA instance is specified via an OSSL_PARAM. All instances, except for Ed25519, allow context strings as input. Context strings are passed via an OSSL_PARAM. For Ed25519ctx, the context string must be nonempty. Ed25519, Ed25519ctx, Ed448 are PureEdDSA instances, which means that the full message (not a digest) must be passed to sign and verify operations. Ed25519ph, Ed448ph are HashEdDSA instances, which means that the input message is hashed before sign and verify. Testing: All 21 test vectors from RFC 8032 have been added to evppkey_ecx.txt (thanks to Shane Lontis for showing how to do that). Those 21 test vectors are exercised by evp_test.c and cover all five instances. Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/19705)
Diffstat (limited to 'include/openssl')
-rw-r--r--include/openssl/core_names.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/openssl/core_names.h b/include/openssl/core_names.h
index 1b19ef74d0..2cde6cdb94 100644
--- a/include/openssl/core_names.h
+++ b/include/openssl/core_names.h
@@ -467,6 +467,8 @@ extern "C" {
OSSL_PKEY_PARAM_MGF1_PROPERTIES
#define OSSL_SIGNATURE_PARAM_DIGEST_SIZE OSSL_PKEY_PARAM_DIGEST_SIZE
#define OSSL_SIGNATURE_PARAM_NONCE_TYPE "nonce-type"
+#define OSSL_SIGNATURE_PARAM_INSTANCE "instance"
+#define OSSL_SIGNATURE_PARAM_CONTEXT_STRING "context-string"
/* Asym cipher parameters */
#define OSSL_ASYM_CIPHER_PARAM_DIGEST OSSL_PKEY_PARAM_DIGEST