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