2
0

EVP_KEM-X25519.pod 2.1 KB

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