Home / Knowledge hub / Perfect forward secrecy
Knowledge hub
Perfect forward secrecy
Session keys that are discarded, so old traffic stays safe if a key leaks later.
What it means
Perfect forward secrecy, often called forward secrecy, means that each connection uses its own temporary key, which is thrown away afterwards. If the server's long-term private key is stolen later, the stolen key cannot unlock earlier recorded sessions. The setting is usually a few lines of server configuration.
Without it, the same long-term key can protect many sessions. An attacker who records encrypted traffic today, and gets the key next year, reads everything. With it, each recording is locked with a key that no longer exists anywhere. That is the point of the word forward.
Why it matters
Traffic can be recorded by anyone on the path and stored cheaply. Forward secrecy turns a future key leak, a court order or a breach of your server from a disaster for all past customers into a problem for new traffic only.
It is also the sensible direction given long-term worries. It does not stop quantum computers, so see quantum-safe cryptography for that, but it limits how much old traffic a single stolen key can expose. Auditors and scanners flag its absence.
How it shows up
It comes from using an ephemeral Diffie-Hellman key exchange in TLS. TLS 1.3 removed the older static RSA key exchange, so its normal handshakes provide forward secrecy. In TLS 1.2, you choose it by picking cipher suites whose names contain DHE or ECDHE.
Check your configuration. Old suites without it may still be enabled for compatibility. Session tickets are a quieter risk: if the key that encrypts tickets lives for weeks and is shared across servers, it can undo the benefit, so rotate it often. Test the server with an online scanner or a command-line tool that lists accepted suites.
Questions people ask
Perfect forward secrecy, answered
Is perfect forward secrecy the same as end-to-end encryption?
No. Forward secrecy is about how session keys are made and discarded. End-to-end encryption is about who can read the message.
A messaging app can have both. Both can matter in one product.
Does TLS 1.3 always give forward secrecy?
Its standard certificate-based handshakes do, because key exchange is always ephemeral. Pre-shared key modes without a Diffie-Hellman exchange can differ.
Most web traffic uses the standard form. Check your own configuration.
How do I enable it on my server?
Enable TLS 1.3, and for TLS 1.2 allow only suites using ECDHE or DHE. Remove static RSA key exchange.
Your web server or load balancer documentation lists the settings. Then retest the endpoint.
Does forward secrecy protect against a server breach?
It protects recorded past traffic from a later key theft. It does not protect data being served now or data stored on the server.
It is one layer among several.
Can scanners test for it?
Yes. Online TLS scanners and tools that list supported cipher suites report whether forward secrecy is available and which suites lack it.
Run one after any change. Fix any that show up.
Related
Terms that sit next to this one
TLS
The protocol that encrypts traffic between a browser and a server.
Cipher suite
The set of algorithms two sides agree to use when they set up a secure connection.
Encryption in transit
Protecting data while it travels between a browser and your servers.
HTTPS
The encrypted web protocol, and the minimum for anything with a login.
Quantum-safe cryptography
Encryption designed to stay secure against future quantum computers.
Would old traffic stay private?
We check how your running app handles transport security and report only what we could show. Each finding carries the request, the response and the evidence. Book a pilot on one app.
Or start with a $199 pilot on one application: thirty days, success criteria agreed before day one, credited against the annual if you convert.