Octet

What happens in IKEv1 quick mode, message by message?

Show the answer

Say this first

Quick mode is phase 2: three messages, all protected by the ISAKMP SA. The initiator sends its proposals (transform sets with the SPI it wants for its inbound SA), a nonce, its proxy IDs and a DH value if PFS is on. The responder checks the proxy IDs against its own policy, picks a proposal and answers with its SPI, nonce and DH value. The third message is a hash that confirms the initiator has the keys, after which both sides use the new inbound and outbound SAs.

Go deeper

The three messages

MsgDirectionPayloads
1initiator to responderHASH(1), SA proposals with initiator SPI, nonce, optional KE, proxy IDs
2responder to initiatorHASH(2), chosen SA with responder SPI, nonce, optional KE, proxy IDs
3initiator to responderHASH(3)

Keys

IPsec keys are derived from the phase 1 key material (SKEYID_d) plus both nonces and the SPI, or also from a fresh DH secret when PFS is on.

SPIs

Each side chooses the SPI for its own inbound SA and tells the peer, so the outbound SPI on one router is the inbound SPI on the other.

One quick mode per selector pair

A crypto ACL with three lines to three remote subnets triggers three quick modes and three SA pairs, and each pair is rekeyed separately.

Traps

  • Saying quick mode happens once per tunnel. It happens once per proxy ID pair and again at every rekey.
How did you do?Book 8.5 Example Systems