doc: remove deprecation notes for apps that are staying.
[openssl.git] / doc / man7 / EVP_PKEY-X25519.pod
1 =pod
2
3 =head1 NAME
4
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
8
9 =head1 DESCRIPTION
10
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
14 private key I<priv>.
15
16 In the FIPS provider they are non-approved algorithms and do not have the
17 "fips=yes" property set.
18
19 =head2 Common X25519, X448, ED25519 and ED448 parameters
20
21 In addition to the common parameters that all keytypes should support (see
22 L<provider-keymgmt(7)/Common parameters>), the implementation of these keytypes
23 support the following.
24
25 =over 4
26
27 =item "pub" (B<OSSL_PKEY_PARAM_PUB_KEY>) <octet string>
28
29 The public key value.
30
31 =item "priv" (B<OSSL_PKEY_PARAM_PRIV_KEY>) <octet string>
32
33 The private key value.
34
35 =back
36
37 =head2 ED25519 and ED448 parameters
38
39 =over 4
40
41 =item "mandatory-digest" (B<OSSL_PKEY_PARAM_MANDATORY_DIGEST>) <utf8 string>
42
43 The empty string, signifying that no digest may be specified.
44
45 =back
46
47 =head1 CONFORMING TO
48
49 =over 4
50
51 =item RFC 8032
52
53 =back
54
55 =head1 EXAMPLES
56
57 An B<EVP_PKEY> context can be obtained by calling:
58
59     EVP_PKEY_CTX *pctx =
60         EVP_PKEY_CTX_new_from_name(NULL, "X25519", NULL);
61
62     EVP_PKEY_CTX *pctx =
63         EVP_PKEY_CTX_new_from_name(NULL, "X448", NULL);
64
65     EVP_PKEY_CTX *pctx =
66         EVP_PKEY_CTX_new_from_name(NULL, "ED25519", NULL);
67
68     EVP_PKEY_CTX *pctx =
69         EVP_PKEY_CTX_new_from_name(NULL, "ED448", NULL);
70
71 An B<ED25519> key can be generated like this:
72
73     EVP_PKEY *pkey = NULL;
74     EVP_PKEY_CTX *pctx =
75         EVP_PKEY_CTX_new_from_name(NULL, "ED25519", NULL);
76
77     EVP_PKEY_keygen_init(pctx);
78     EVP_PKEY_gen(pctx, &pkey);
79     EVP_PKEY_CTX_free(pctx);
80
81 An B<X25519> key can be generated in a similar way:
82
83     EVP_PKEY *pkey = NULL;
84     EVP_PKEY_CTX *pctx =
85         EVP_PKEY_CTX_new_from_name(NULL, "X25519", NULL);
86
87     EVP_PKEY_keygen_init(pctx);
88     EVP_PKEY_gen(pctx, &pkey);
89     EVP_PKEY_CTX_free(pctx);
90
91 =head1 SEE ALSO
92
93 L<EVP_KEYMGMT(3)>, L<EVP_PKEY(3)>, L<provider-keymgmt(7)>,
94 L<EVP_KEYEXCH-X25519(7)>, L<EVP_KEYEXCH-X448(7)>,
95 L<EVP_SIGNATURE-ED25519(7)>, L<EVP_SIGNATURE-ED448(7)>
96
97 =head1 COPYRIGHT
98
99 Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
100
101 Licensed under the Apache License 2.0 (the "License").  You may not use
102 this file except in compliance with the License.  You can obtain a copy
103 in the file LICENSE in the source distribution or at
104 L<https://www.openssl.org/source/license.html>.
105
106 =cut