EVP_KEM-EC(7ossl)

πŸ“¦ version 3.5.0, in opensuse-leap 16.0

✨ NAME ✨

okay bestie, this is the EVP_KEM-EC(7ossl) page, and it’s all about EVP_KEM EC keytype and algorithm support πŸ¦‹πŸ’–.

πŸ’– DESCRIPTION πŸ’–

The EC keytype and its parameters are described in EVP_PKEY-EC(7). For the full tea on encapsulating and decapsulating, go peek at EVP_PKEY_encapsulate(3) and EVP_PKEY_decapsulate(3) β€” they’ve got more info πŸ‘€βœ¨.

🧚 EC KEM parameters 🧚

  • "operation" (OSSL_KEM_PARAM_OPERATION) <UTF8 string> β€” this sets the operating mode. The OpenSSL EC Key Encapsulation Mechanisms only support this default operation (operating mode), periodt:
    • "DHKEM" (OSSL_KEM_PARAM_OPERATION_DHKEM) β€” the encapsulate function generates an ephemeral keypair. It produces keymaterial by doing an ECDH key exchange using the ephemeral private key and a supplied recipient public key. Then an HKDF operation uses that keymaterial and a kem context to produce a shared secret. The shared secret and the ephemeral public key are returned. 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. 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(). Slay πŸ’….

  • "ikme" (OSSL_KEM_PARAM_IKME) <octet string> β€” use this to specify the key material used for generation of the ephemeral key. This value should not be reused for other purposes, bestie. It can only be used for the curves P-256, P-384, and P-521, and it should have a length of at least the size of the encoded private key β€” that’s 32, 48, and 66 for the listed curves. If this value is not set, then a random ikm is used πŸŽ€.

🌈 CONFORMING TO 🌈

RFC9180 β€” iconic, honestly ⭐.

πŸŽ€ SEE ALSO πŸŽ€

⭐ HISTORY ⭐

This functionality was added in OpenSSL 3.2 πŸ¦‹.

The "operation" (operating mode) was a required parameter prior to OpenSSL 3.5. As of OpenSSL 3.5, "DHKEM" is the default operating mode, and no explicit value need be specified. We love a glow-up πŸ’…βœ¨.

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.


And that’s the whole page, bestie! Footer vibes: version 3.5.0, date 2026-09-25, manual EVP_KEM-EC(7ossl) β€” bye, love u πŸ«ΆπŸ’œβœ¨

πŸ“¦ where this page comes from