Debian Codegraph @

upstream/debian-unstable/man7/EVP_PKEY-X25519.7ssl

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "EVP_PKEY-X25519 7SSL"
58 .TH EVP_PKEY-X25519 7SSL 2026-04-07 3.6.2 OpenSSL
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 EVP_PKEY\-X25519, EVP_PKEY\-X448, EVP_PKEY\-ED25519, EVP_PKEY\-ED448,
65 EVP_KEYMGMT\-X25519, EVP_KEYMGMT\-X448, EVP_KEYMGMT\-ED25519, EVP_KEYMGMT\-ED448
66 \&\- EVP_PKEY X25519, X448, ED25519 and ED448 keytype and algorithm support
67 .SH DESCRIPTION
68 .IX Header "DESCRIPTION"
69 The \fBX25519\fR, \fBX448\fR, \fBED25519\fR and \fBED448\fR keytypes are
70 implemented in OpenSSL's default and FIPS providers. These implementations
71 support the associated key, containing the public key \fIpub\fR and the
72 private key \fIpriv\fR.
73 .SS "Common Keygen Parameters for X25519, X448, ED25519 and ED448"
74 .IX Subsection "Common Keygen Parameters for X25519, X448, ED25519 and ED448"
75 The following parameters can be used during key generation by calling
76 \&\fBEVP_PKEY_CTX_set_params()\fR after calling \fBEVP_PKEY_keygen_init()\fR.
77 .IP """properties"" (\fBOSSL_PKEY_PARAM_PROPERTIES\fR) <octet string>" 4
78 .IX Item """properties"" (OSSL_PKEY_PARAM_PROPERTIES) <octet string>"
79 The property query to use when fetching algorithms during the key generation
80 operation.
81 .SS "Keygen Parameters for X25519 and X448"
82 .IX Subsection "Keygen Parameters for X25519 and X448"
83 .IP """dhkem-ikm"" (\fBOSSL_PKEY_PARAM_DHKEM_IKM\fR) <octet string>" 4
84 .IX Item """dhkem-ikm"" (OSSL_PKEY_PARAM_DHKEM_IKM) <octet string>"
85 DHKEM requires the generation of a keypair using an input key material (seed).
86 Use this to specify the key material used for generation of the private key.
87 This value should not be reused for other purposes.
88 It should have a length of at least 32 for X25519, and 56 for X448.
89 .IP """group"" (\fBOSSL_PKEY_PARAM_GROUP_NAME\fR) <UTF8 string>" 4
90 .IX Item """group"" (OSSL_PKEY_PARAM_GROUP_NAME) <UTF8 string>"
91 The group name must be "x25519" or "x448" respectively for those algorithms.
92 This is only present for consistency with other key exchange algorithms and is
93 typically not needed.
94 .SS "Common Parameters for X25519, X448, ED25519 and ED448"
95 .IX Subsection "Common Parameters for X25519, X448, ED25519 and ED448"
96 In addition to the common parameters that all keytypes should support (see
97 "Common parameters" in \fBprovider\-keymgmt\fR\|(7)), the implementation of these keytypes
98 support the following.
99 .IP """pub"" (\fBOSSL_PKEY_PARAM_PUB_KEY\fR) <octet string>" 4
100 .IX Item """pub"" (OSSL_PKEY_PARAM_PUB_KEY) <octet string>"
101 The public key value.
102 .IP """priv"" (\fBOSSL_PKEY_PARAM_PRIV_KEY\fR) <octet string>" 4
103 .IX Item """priv"" (OSSL_PKEY_PARAM_PRIV_KEY) <octet string>"
104 The private key value.
105 .SS "Parameters for X25519 and X448"
106 .IX Subsection "Parameters for X25519 and X448"
107 .IP """encoded-pub-key"" (\fBOSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY\fR) <octet string>" 4
108 .IX Item """encoded-pub-key"" (OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY) <octet string>"
109 Used for getting and setting the encoding of a public key for the \fBX25519\fR and
110 \&\fBX448\fR key types. Public keys are expected be encoded in a format as defined by
111 RFC7748.
112 .IP """fips-indicator"" (\fBOSSL_PKEY_PARAM_FIPS_APPROVED_INDICATOR\fR) <integer>" 4
113 .IX Item """fips-indicator"" (OSSL_PKEY_PARAM_FIPS_APPROVED_INDICATOR) <integer>"
114 This getter is only supported by X25519 and X448 OpenSSL FIPS provider.
115 Since X25519 and X448 are unapproved in FIPS 140\-3 this getter returns 0.
116 .SS "Parameters for ED25519 and ED448"
117 .IX Subsection "Parameters for ED25519 and ED448"
118 .IP """mandatory-digest"" (\fBOSSL_PKEY_PARAM_MANDATORY_DIGEST\fR) <UTF8 string>" 4
119 .IX Item """mandatory-digest"" (OSSL_PKEY_PARAM_MANDATORY_DIGEST) <UTF8 string>"
120 The empty string, signifying that no digest may be specified.
121 .SH "CONFORMING TO"
122 .IX Header "CONFORMING TO"
123 .IP "RFC 8032" 4
124 .IX Item "RFC 8032"
125 .PD 0
126 .IP "RFC 8410" 4
127 .IX Item "RFC 8410"
128 .PD
129 .SH EXAMPLES
130 .IX Header "EXAMPLES"
131 An \fBEVP_PKEY\fR context can be obtained by calling:
132 .PP
133 .Vb 2
134 \& EVP_PKEY_CTX *pctx =
135 \& EVP_PKEY_CTX_new_from_name(NULL, "X25519", NULL);
136 \&
137 \& EVP_PKEY_CTX *pctx =
138 \& EVP_PKEY_CTX_new_from_name(NULL, "X448", NULL);
139 \&
140 \& EVP_PKEY_CTX *pctx =
141 \& EVP_PKEY_CTX_new_from_name(NULL, "ED25519", NULL);
142 \&
143 \& EVP_PKEY_CTX *pctx =
144 \& EVP_PKEY_CTX_new_from_name(NULL, "ED448", NULL);
145 .Ve
146 .PP
147 An \fBX25519\fR key can be generated like this:
148 .PP
149 .Vb 1
150 \& pkey = EVP_PKEY_Q_keygen(NULL, NULL, "X25519");
151 .Ve
152 .PP
153 An \fBX448\fR, \fBED25519\fR, or \fBED448\fR key can be generated likewise.
154 .SH "SEE ALSO"
155 .IX Header "SEE ALSO"
156 \&\fBEVP_KEYMGMT\fR\|(3), \fBEVP_PKEY\fR\|(3), \fBprovider\-keymgmt\fR\|(7),
157 \&\fBEVP_KEYEXCH\-X25519\fR\|(7), \fBEVP_KEYEXCH\-X448\fR\|(7),
158 \&\fBEVP_SIGNATURE\-ED25519\fR\|(7), \fBEVP_SIGNATURE\-ED448\fR\|(7)
159 .SH COPYRIGHT
160 .IX Header "COPYRIGHT"
161 Copyright 2020\-2025 The OpenSSL Project Authors. All Rights Reserved.
162 .PP
163 Licensed under the Apache License 2.0 (the "License"). You may not use
164 this file except in compliance with the License. You can obtain a copy
165 in the file LICENSE in the source distribution or at
166 <https://www.openssl.org/source/license.html>.