man > EVP_KEYEXCH-X25519(7)

📛 NAME

EVP_KEYEXCH-X25519, EVP_KEYEXCH-X448 – X25519 and X448 Key Exchange algorithm support

🚀 Quick Reference

Use CaseCommand / APIDescription
Generate X25519 key pairopenssl genpkey -algorithm X25519 -out key.pemCreate a private key (includes public key)
Extract public keyopenssl pkey -in key.pem -pubout -out pub.pemObtain the peer’s public key
Derive shared secretopenssl pkeyutl -derive -inkey key.pem -peerkey peer.pub -out secret.binPerform X25519/X448 ECDH
API key generationEVP_PKEY_keygen(ctx, &pkey) with EVP_PKEY_CTX_set_ec_paramgen_curve_nid(ctx, NID_X25519)Programmatic key pair creation
API key derivationEVP_PKEY_derive_init(ctx)EVP_PKEY_derive(ctx, secret, &secretlen)Obtain shared secret in code

📖 DESCRIPTION

Key exchange support for the X25519 and X448 key types.

🔑 Key Exchange Parameters

💡 EXAMPLES

Keys for the host and peer can be generated as shown in “Examples” in EVP_PKEY-X25519(7).

The code to generate a shared secret is identical to “Examples” in EVP_KEYEXCH-DH(7).

🔗 SEE ALSO

EVP_PKEY-FFC(7), EVP_PKEY-DH(7), EVP_PKEY(3), provider-keyexch(7), provider-keymgmt(7), OSSL_PROVIDER-default(7), OSSL_PROVIDER-FIPS(7)

© COPYRIGHT

Copyright 2020 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>.

EVP_KEYEXCH-X25519(7)
📛 NAME 🚀 Quick Reference 📖 DESCRIPTION
🔑 Key Exchange Parameters
💡 EXAMPLES 🔗 SEE ALSO © COPYRIGHT

Generated by phpman v4.9.27 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-18 18:08 @2600:1f28:365:80b0:f8a4:e764:d6bb:8e66
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format