← All tools

Public-key

ECDH key exchange

Simulate Alice and Bob generating independent key pairs and deriving the exact same shared secret — without ever transmitting it.

1. Generate two independent key pairs

Real P-256 ECDH keys — one for Alice, one for Bob.

2. Each side derives the shared secret independently

3. What if an attacker tries, without Bob's private key?