Perfect Forward Secrecy: Protecting Yesterday’s Traffic
An attacker might record an encrypted conversation today and steal the server's long-term private key months later. Does that later theft unlock the recording? With forward secrecy, the old conversation can remain unreadable because the stolen key isn't enough to recover its secrets.
Perfect forward secrecy, usually shortened to PFS or simply forward secrecy, limits what a later theft of long-term keys reveals about earlier encrypted sessions. A session is one period of communication between systems, such as a browser and a website.
Despite the word “perfect,” the protection applies to a particular kind of theft. It depends on which key the attacker steals.
Why Today's Stolen Key Can't Read Yesterday's Traffic
There is more than one key involved
A cryptographic key is data used by a mathematical method to protect information or recover it. Different keys can do different jobs within the same connection.
A server can hold a long-term private key that helps prove its identity. Meanwhile, the browser and server use temporary secrets to establish the keys that protect their conversation. Those session keys do the traffic-protection work.
One example uses Transport Layer Security 1.3, or TLS 1.3, a set of rules for protecting connections such as those between a browser and a website. In a certificate-based connection, a certificate connects the server's identity with a public key; the corresponding private key stays secret.
For this example, the browser and server establish their shared secret through an ephemeral Diffie–Hellman exchange. Ephemeral means temporary: the exchange uses private values created for that connection.
In this type of connection, the long-term private key authenticates the exchange: it helps establish that the exchange really involves the expected server. It isn't simply the key that encrypts every page sent over the connection. The TLS 1.3 specification separates these jobs.
Making a secret the old key can't recover
Diffie–Hellman lets two systems establish a shared secret over a connection an observer can watch. The information they send doesn't reveal their temporary private values.
The systems use the resulting shared secret to derive traffic-protection keys. Proper handling includes discarding temporary secrets when they're no longer needed.
- Put your whole home behind a VPN at speeds up to 1,100 Mbps.
- Stay online when one provider fails, with multi-WAN failover.
- Reach your home network securely while you travel.
Return to the attacker with a recording. The recording contains the information sent across the connection. Later, the attacker obtains the server's identity key. The recording and the stolen key still don't give them the missing temporary private values needed to reconstruct the old session's secrets.
This is more than changing the traffic key regularly. In some older TLS designs, the long-term server key could recover secret material sent when the session began. A later theft could therefore unlock recorded sessions even though those sessions had used different traffic keys.
The difference lies in how the session secrets were established, not just how often they changed. The internet engineering community's TLS security guidance explains that distinction and the protection against later disclosure of long-term keys.
The recording and the readable copy
Forward secrecy protects against a particular route into old conversations. If an attacker steals the old session's own secrets, the long-term key is no longer the obstacle. If they steal a readable copy of the conversation, there's nothing left to decrypt.
The same applies while a compromised computer is handling readable information. Encryption on the connection doesn't keep that computer from seeing the data it must display or process.
Diffie–Hellman Key Exchange, With Numbers You Can Follow

Session Keys: Temporary Secrets for a Protected Exchange

TLS Protects the Connection. The Destination Still Gets the Data.

QUOTE:
"Amateurs hack systems, professionals hack people."
