summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2020-03-18 09:25:33 +1000
committerPauli <paul.dale@oracle.com>2020-04-17 19:51:37 +1000
commit43cd37014ef4433ae8e82ba64bddc42cf0bd618a (patch)
treebced2c75951e842e5e04bf16a8481a029c4d5f81 /include
parent1ee1e551148d963b566a69c2e6e9a583646112fc (diff)
ecx: add key generation support.
Specifically for x25519, x448, ed25519 and ed448. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11371)
Diffstat (limited to 'include')
-rw-r--r--include/crypto/ecx.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/crypto/ecx.h b/include/crypto/ecx.h
index 0c6655ca79..2aa1ae1d6f 100644
--- a/include/crypto/ecx.h
+++ b/include/crypto/ecx.h
@@ -72,6 +72,7 @@ struct ecx_key_st {
typedef struct ecx_key_st ECX_KEY;
+size_t ecx_key_length(ECX_KEY_TYPE type);
ECX_KEY *ecx_key_new(ECX_KEY_TYPE type, int haspubkey);
unsigned char *ecx_key_allocate_privkey(ECX_KEY *key);
void ecx_key_free(ECX_KEY *key);
@@ -82,6 +83,8 @@ int X25519(uint8_t out_shared_key[32], const uint8_t private_key[32],
void X25519_public_from_private(uint8_t out_public_value[32],
const uint8_t private_key[32]);
+int ED25519_public_from_private(OPENSSL_CTX *ctx, uint8_t out_public_key[32],
+ const uint8_t private_key[32]);
int ED25519_sign(uint8_t *out_sig, const uint8_t *message, size_t message_len,
const uint8_t public_key[32], const uint8_t private_key[32],
OPENSSL_CTX *libctx, const char *propq);
@@ -89,6 +92,8 @@ int ED25519_verify(const uint8_t *message, size_t message_len,
const uint8_t signature[64], const uint8_t public_key[32],
OPENSSL_CTX *libctx, const char *propq);
+int ED448_public_from_private(OPENSSL_CTX *ctx, uint8_t out_public_key[57],
+ const uint8_t private_key[57]);
int ED448_sign(OPENSSL_CTX *ctx, uint8_t *out_sig, const uint8_t *message,
size_t message_len, const uint8_t public_key[57],
const uint8_t private_key[57], const uint8_t *context,