/ THE IDEA
In an ephemeral key exchange, each side makes a fresh private value for the session and exchanges a related public value. Ephemeral means intended for short-lived use. The public values let the participants derive a shared secret without sending their private values. Diffie–Hellman is one family of exchanges with this structure. Its arithmetic is designed so each participant can combine their own private value with the other public value, while a passive observer faces a difficult reverse problem at suitable sizes. The exchange must also be authenticated so an attacker cannot silently substitute their own public values. After the session, securely discarding its temporary secrets is essential: forward secrecy cannot protect past data if the exact secrets needed to read it are still stored beside the recording.
THE FORMAL IDEA
A = gᵃ mod p; B = gᵇ mod p; shared = Bᵃ mod p = Aᵇ mod p
| a and b are private numbers; A and B are public values; g and p are public parameters. | | mod p means keep the remainder after division by p. This small integer example teaches the agreement mechanism, not secure parameter selection. |
|
RUN THE TINY EXAMPLE
Change one thing. Predict what happens.
Toy public parameters: g = 5 and p = 23; private a = 3, b = 2. A = 125 mod 23 = 10; B = 25 mod 23 = 2. Both derive 8: 2³ mod 23 = 8; 10² mod 23 = 8. Change only a to 4: A = 4, and both now derive 16.
|
The new session’s changed private input changes the shared value. Real protocols derive traffic keys from this secret and other handshake information. With secure sizes, an authentic exchange and erased temporary values, the long-term identity secret alone is not enough to reconstruct old traffic keys.
/ SO WHAT?
This gives an incident response question more precise than whether encryption was enabled: which key was stolen, and which sessions depend on it? Capturing a live session’s traffic secret is a different event from stealing a later identity key.
ONE CAVEAT |
| The tiny numbers are trivially breakable. Forward secrecy does not protect data copied from an endpoint, and some early-data or pre-shared-key modes have weaker guarantees; it is a protocol property, not a label attached to every encrypted connection. |
KEEP THIS
Fresh session secrets that are authenticated and then erased can keep later identity-key theft from unlocking recorded past traffic.
|
NEXT: Why turning the detector changes a particle’s answer
|