]> git.ipfire.org Git - thirdparty/openssl.git/blob - doc/man7/EVP_KEM-X25519.pod
Add HPKE DHKEM provider support for EC, X25519 and X448.
[thirdparty/openssl.git] / doc / man7 / EVP_KEM-X25519.pod
1 =pod
2
3 =head1 NAME
4
5 EVP_KEM-X25519, EVP_KEM-X448
6 - EVP_KEM X25519 and EVP_KEM X448 keytype and algorithm support
7
8 =head1 DESCRIPTION
9
10 The B<X25519> and <X448> keytype and its parameters are described in
11 L<EVP_PKEY-X25519(7)>.
12 See L<EVP_PKEY_encapsulate(3)> and L<EVP_PKEY_decapsulate(3)> for more info.
13
14 =head2 X25519 and X448 KEM parameters
15
16 =over 4
17
18 =item "operation" (B<OSSL_KEM_PARAM_OPERATION>)<UTF8 string>
19
20 The OpenSSL X25519 and X448 Key Encapsulation Mechanisms only support the
21 following operation:
22
23 =over 4
24
25 =item "DHKEM" (B<OSSL_KEM_PARAM_OPERATION_DHKEM>)
26
27 The encapsulate function generates an ephemeral keypair. It produces keymaterial
28 by doing an X25519 or X448 key exchange using the ephemeral private key and a
29 supplied recipient public key. A HKDF operation using the keymaterial and a kem
30 context then produces a shared secret. The shared secret and the ephemeral
31 public key are returned.
32 The decapsulate function uses the recipient private key and the
33 ephemeral public key to produce the same keymaterial, which can then be used to
34 produce the same shared secret.
35 See L<https://www.rfc-editor.org/rfc/rfc9180.html#name-dh-based-kem-dhkem>
36
37 =back
38
39 This can be set using either EVP_PKEY_CTX_set_kem_op() or
40 EVP_PKEY_CTX_set_params().
41
42 =item "ikme" (B<OSSL_KEM_PARAM_IKME>) <octet string>
43
44 Used to specify the key material used for generation of the ephemeral key.
45 This value should not be reused for other purposes.
46 It should have a length of at least 32 for X25519, and 56 for X448.
47 If this value is not set, then a random ikm is used.
48
49 =back
50
51 =head1 CONFORMING TO
52
53 =over 4
54
55 =item RFC9180
56
57 =back
58
59 =head1 SEE ALSO
60
61 L<EVP_PKEY_CTX_set_kem_op(3)>,
62 L<EVP_PKEY_encapsulate(3)>,
63 L<EVP_PKEY_decapsulate(3)>
64 L<EVP_KEYMGMT(3)>,
65 L<EVP_PKEY(3)>,
66 L<provider-keymgmt(7)>
67
68 =head1 COPYRIGHT
69
70 Copyright 2022 The OpenSSL Project Authors. All Rights Reserved.
71
72 Licensed under the Apache License 2.0 (the "License"). You may not use
73 this file except in compliance with the License. You can obtain a copy
74 in the file LICENSE in the source distribution or at
75 L<https://www.openssl.org/source/license.html>.
76
77 =cut