Shared-secret protocols
Key Exchange
Scheme
Establish a shared secret over an insecure channel. Diffie–Hellman key agreement — X25519, X448, ECDH over NIST, Brainpool and secp256k1 curves, and finite-field DH — lets two parties derive the same secret without ever transmitting it. Key Encapsulation Mechanisms (KEMs), including post-quantum ML-KEM and the hybrid X25519MLKEM768, achieve the same with encapsulate / decapsulate.
The workspace also demonstrates password-authenticated key exchange (SRP-6a and SPAKE2+) on a Client/Server swim-lane, showing every intermediate value. Feed the resulting shared secret into a KDF to derive symmetric keys.
Frequently asked questions
- How can two people agree on a secret without sending it?
- With Diffie–Hellman: each side combines their own private key with the other’s public key to compute the same shared value, which an eavesdropper who sees only the public keys cannot derive.
- What is a hybrid post-quantum key exchange?
- It runs a classical (X25519) and a post-quantum (ML-KEM) exchange together and combines both secrets, staying secure as long as either half holds — protecting against future quantum attacks.
- What do I do with the shared secret?
- Run it through a KDF (HKDF or a single-step KDF) to derive the symmetric encryption and MAC keys you actually use.
Inputs
Your key pair
Peer key pair
Configure
X25519Key agreementCurve25519 Diffie–Hellman (RFC 7748) — fast, the modern default for key agreement.
Algorithm