5 EVP_PKEY-X25519, EVP_PKEY-X448, EVP_PKEY-ED25519, EVP_PKEY-ED448,
6 EVP_KEYMGMT-X25519, EVP_KEYMGMT-X448, EVP_KEYMGMT-ED25519, EVP_KEYMGMT-ED448
7 - EVP_PKEY X25519, X448, ED25519 and ED448 keytype and algorithm support
11 The B<X25519>, B<X448>, B<ED25519> and B<ED448> keytypes are
12 implemented in OpenSSL's default and FIPS providers. These implementations
13 support the associated key, containing the public key I<pub> and the
16 In the FIPS provider they are non-approved algorithms and do not have the
17 "fips=yes" property set.
18 No additional parameters can be set during key generation.
21 =head2 Common X25519, X448, ED25519 and ED448 parameters
23 In addition to the common parameters that all keytypes should support (see
24 L<provider-keymgmt(7)/Common parameters>), the implementation of these keytypes
25 support the following.
29 =item "pub" (B<OSSL_PKEY_PARAM_PUB_KEY>) <octet string>
33 =item "priv" (B<OSSL_PKEY_PARAM_PRIV_KEY>) <octet string>
35 The private key value.
37 =item "tls-encoded-pt" (B<OSSL_PKEY_PARAM_TLS_ENCODED_PT>) <octet string>
39 Used for getting and setting the encoding of the public key used in a key exchange
40 message for the TLS protocol.
44 =head2 ED25519 and ED448 parameters
48 =item "mandatory-digest" (B<OSSL_PKEY_PARAM_MANDATORY_DIGEST>) <utf8 string>
50 The empty string, signifying that no digest may be specified.
66 An B<EVP_PKEY> context can be obtained by calling:
69 EVP_PKEY_CTX_new_from_name(NULL, "X25519", NULL);
72 EVP_PKEY_CTX_new_from_name(NULL, "X448", NULL);
75 EVP_PKEY_CTX_new_from_name(NULL, "ED25519", NULL);
78 EVP_PKEY_CTX_new_from_name(NULL, "ED448", NULL);
80 An B<ED25519> key can be generated like this:
82 EVP_PKEY *pkey = NULL;
84 EVP_PKEY_CTX_new_from_name(NULL, "ED25519", NULL);
86 EVP_PKEY_keygen_init(pctx);
87 EVP_PKEY_gen(pctx, &pkey);
88 EVP_PKEY_CTX_free(pctx);
90 An B<X25519> key can be generated in a similar way:
92 EVP_PKEY *pkey = NULL;
94 EVP_PKEY_CTX_new_from_name(NULL, "X25519", NULL);
96 EVP_PKEY_keygen_init(pctx);
97 EVP_PKEY_gen(pctx, &pkey);
98 EVP_PKEY_CTX_free(pctx);
102 L<EVP_KEYMGMT(3)>, L<EVP_PKEY(3)>, L<provider-keymgmt(7)>,
103 L<EVP_KEYEXCH-X25519(7)>, L<EVP_KEYEXCH-X448(7)>,
104 L<EVP_SIGNATURE-ED25519(7)>, L<EVP_SIGNATURE-ED448(7)>
108 Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
110 Licensed under the Apache License 2.0 (the "License"). You may not use
111 this file except in compliance with the License. You can obtain a copy
112 in the file LICENSE in the source distribution or at
113 L<https://www.openssl.org/source/license.html>.