Pcornel
Security · TLS

Forward Secrecy

Cheat sheet · https://pcornel.dk/topic.php?topic=4743

Back to the Topic

Answer

Forward Secrecy limits retrospective decryption by deriving session keys from ephemeral key exchange so later compromise of long-term authentication keys does not reveal previously recorded session traffic.

Remember

  • Forward secrecy ≠ protection after endpoint/session-key compromise.
  • TLS 1.2 ≠ PFS unless an ephemeral suite is negotiated.
  • TLS 1.3 0-RTT data ≠ forward-secret early data.
  • Certificate rotation ≠ forward secrecy for sessions established with static key transport.

First checks

  • openssl s_client -connect <host>:443 </dev/null | grep 'Server Temp Key' — ECDHE in use
  • nmap --script ssl-enum-ciphers -p 443 <host> — no RSA key exchange
  • testssl.sh -f <host> — forward secrecy check

Verify in this order

ephemeral ECDHE → session keys → discarded

Where it usually breaks

First mismatch in key/secret generation → storage/rotation → trust/certificate validation → protocol negotiation → cryptographic operation → peer/application verification; preserve identity/policy/pre-state before mutation.

TLS → Forward Secrecy proof map

BoundaryEstablishDoes not establish
Scope and intentAsset/data/peer, security property, identity/name, protocol and timeDoes not prove algorithm, key, trust or endpoint correctness
Effective cryptographic stateExact version, algorithm/mode/parameters, key/certificate/path and negotiated resultConfiguration or object presence does not prove correct use
Verification outcomePositive, negative, tamper, expiry/revoke and failure tests correlated with evidenceOne success does not prove every peer, client, path or lifecycle stage
ClosureOriginal operation succeeds; old/unsafe state is retired and regression checks passAdministrative workflow completion alone is not closure

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4743

Confirmation

Confirm action

Continue?