TLS 1.3 does not run a single HKDF-Extract on the DH secret. It runs three Extracts in a chain:



The reason: TLS has more than one source of secret, and they arrive at different times — an optional PSK (from a resumption ticket or configured out-of-band) and the fresh (EC)DHE secret Z. A single Extract can only ingest one input keying material (IKM).

So TLS uses a ratchet: each stage feeds the previous stage’s output as the salt for the next Extract, and mixes in the next secret as the IKM:

  • Early Secret — mixes in the PSK (or zeros if none).
  • Handshake Secret — mixes in the DH secret Z; now there’s enough to derive handshake keys.
  • Master Secret — mixes in nothing new (IKM = 0), just advances the ratchet to a final secret for application keys.

The final Master Secret therefore depends on every input mixed in along the way, and because each stage is a one-way HMAC, the ratchet cannot be run backward. (The derived step between stages is just an Expand turning one stage’s output into a proper salt for the next — ratchet plumbing.)

See also

References

Questions

flashcards/software-engineering/tls

Why does TLS 1.3 chain three HKDF-Extract calls instead of one?::It has multiple secret inputs (optional PSK + the DH secret) that arrive at different times, and each Extract can absorb only one IKM — the ratchet folds them in stage by stage

In the TLS 1.3 key schedule, which secret is mixed in at the Handshake Secret stage?::The (EC)DHE shared secret Z

The Early → Handshake → Master chain uses each stage’s output as the salt of the next Extract, mixing in the next secret as the IKM.