1=pod 2 3=head1 NAME 4 5EVP_KEM-X25519, EVP_KEM-X448 6- EVP_KEM X25519 and EVP_KEM X448 keytype and algorithm support 7 8=head1 DESCRIPTION 9 10The B<X25519> and <X448> keytype and its parameters are described in 11L<EVP_PKEY-X25519(7)>. 12See 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 20The OpenSSL X25519 and X448 Key Encapsulation Mechanisms only support the 21following operation: 22 23=over 4 24 25=item "DHKEM" (B<OSSL_KEM_PARAM_OPERATION_DHKEM>) 26 27The encapsulate function generates an ephemeral keypair. It produces keymaterial 28by doing an X25519 or X448 key exchange using the ephemeral private key and a 29supplied recipient public key. A HKDF operation using the keymaterial and a kem 30context then produces a shared secret. The shared secret and the ephemeral 31public key are returned. 32The decapsulate function uses the recipient private key and the 33ephemeral public key to produce the same keymaterial, which can then be used to 34produce the same shared secret. 35See L<https://www.rfc-editor.org/rfc/rfc9180.html#name-dh-based-kem-dhkem> 36 37=back 38 39This can be set using either EVP_PKEY_CTX_set_kem_op() or 40EVP_PKEY_CTX_set_params(). 41 42=item "ikme" (B<OSSL_KEM_PARAM_IKME>) <octet string> 43 44Used to specify the key material used for generation of the ephemeral key. 45This value should not be reused for other purposes. 46It should have a length of at least 32 for X25519, and 56 for X448. 47If 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 61L<EVP_PKEY_CTX_set_kem_op(3)>, 62L<EVP_PKEY_encapsulate(3)>, 63L<EVP_PKEY_decapsulate(3)> 64L<EVP_KEYMGMT(3)>, 65L<EVP_PKEY(3)>, 66L<provider-keymgmt(7)> 67 68=head1 HISTORY 69 70This functionality was added in OpenSSL 3.2. 71 72=head1 COPYRIGHT 73 74Copyright 2022 The OpenSSL Project Authors. All Rights Reserved. 75 76Licensed under the Apache License 2.0 (the "License"). You may not use 77this file except in compliance with the License. You can obtain a copy 78in the file LICENSE in the source distribution or at 79L<https://www.openssl.org/source/license.html>. 80 81=cut 82