EVP_KEM-X25519(7SSL)

πŸ’– EVP_KEM-X25519 β€” the OpenSSL manual, but make it make sense ✨

okay bestie, gather round, because we're talking about EVP_KEM-X25519(7SSL) β€” that's the manual page name, and yes the whole family is here: EVP_KEM-X25519, EVP_KEM-X448 β€” aka the EVP_KEM X25519 and EVP_KEM X448 keytype and algorithm support. two icons, one page. periodt. πŸ‘‘


✨ NAME ✨

EVP_KEM-X25519, EVP_KEM-X448 β€” EVP_KEM X25519 and EVP_KEM X448 keytype and algorithm support. that's it, that's the name, slay.


🌸 DESCRIPTION 🌸

so the X25519 and <X448> keytype plus all its lil parameters? that's all described over in EVP_PKEY-X25519(7). and if you wanna know more, go check EVP_PKEY_encapsulate(3) and EVP_PKEY_decapsulate(3) for more info. iykyk πŸ¦‹

πŸ”₯ X25519 and X448 KEM parameters πŸ”₯

  • "operation" (OSSL_KEM_PARAM_OPERATION) <UTF8 string> β€” the OpenSSL X25519 and X448 Key Encapsulation Mechanisms only support the following default operation (operating mode), which is:
    • "DHKEM" (OSSL_KEM_PARAM_OPERATION_DHKEM) β€” okay so here's the tea β˜•: the encapsulate function generates an ephemeral keypair. it produces keymaterial by doing an X25519 or X448 key exchange using that ephemeral private key and a supplied recipient public key. then an HKDF operation β€” using the keymaterial and a kem context β€” produces a shared secret. the shared secret and the ephemeral public key get returned. meanwhile, the decapsulate function uses the recipient private key and the ephemeral public key to produce the same keymaterial, which can then be used to produce the same shared secret. it's giving symmetry, it's giving main character energy. πŸ’… see <https://www.rfc-editor.org/rfc/rfc9180.html#name-dh-based-kem-dhkem>

you can set this using either EVP_PKEY_CTX_set_kem_op() or EVP_PKEY_CTX_set_params(). pick your fighter 🫢

  • "ikme" (OSSL_KEM_PARAM_IKME) <octet string> β€” this one's used to specify the key material used for generation of the ephemeral key. bestie, do NOT reuse this value for other purposes, fr fr, that's a whole warning. it should have a length of at least 32 for X25519, and 56 for X448. and if this value isn't set? no stress, a random ikm is used instead. πŸŽ€

🌈 CONFORMING TO 🌈

RFC9180 β€” we stay compliant, we stay iconic. ✨


πŸŽ€ SEE ALSO πŸŽ€

go read them, they're all lowkey essential. πŸ“š


πŸ’œ HISTORY πŸ’œ

  • this functionality was added in OpenSSL 3.2. a whole era. ⭐
  • and the "operation" (operating mode) was a required parameter prior to OpenSSL 3.5. but as of OpenSSL 3.5, "DHKEM" is the default operating mode, and no explicit value need be specified. glow-up behavior honestly. πŸ˜­πŸ’–

Copyright 2022-2025 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html> .


that's the whole page bestie, no gatekeeping, all facts preserved, all options intact. you're welcome. πŸ’…βœ¨

and that's a wrap on version 4.0.3, dated 2026-09-29 β€” from the OpenSSL squad to you. stay encapsulating, stay decapsulating, and never reuse your ikm. bye babes πŸ¦‹πŸ’–

πŸ“¦ where this page comes from