rfc-5723

Internet Key Exchange Protocol Version 2 (IKEv2) Session Resumption

Y. Sheffer, H. Tschofenig
date2010-01 streamIETF areasec wgipsecme statusPROPOSED STANDARD pages26 canonicalhttps://www.rfc-editor.org/rfc/rfc5723 doi10.17487/RFC5723
The Internet Key Exchange version 2 (IKEv2) protocol has a certain computational and communication overhead with respect to the number of round trips required and the cryptographic operations involved. In remote access situations, the Extensible Authentication Protocol (EAP) is used for authentication, which adds several more round trips and consequently latency. To re-establish security associations (SAs) upon a failure recovery condition is time consuming especially when an IPsec peer (such as a VPN gateway) needs to re-establish a large number of SAs with various endpoints. A high number of concurrent sessions might cause additional problems for an IPsec peer during SA re-establishment. In order to avoid the need to re-run the key exchange protocol from scratch, it would be useful to provide an efficient way to resume an IKE/IPsec session. This document proposes an extension to IKEv2 that allows a client to re-establish an IKE SA with a gateway in a highly efficient manner, utilizing a previously established IKE SA. A client can reconnect to a gateway from which it was disconnected. The proposed approach encodes partial IKE state into an opaque ticket, which can be stored on the client or in a centralized store, and is later made available to the IKEv2 responder for re-authentication. We use the term ticket to refer to the opaque data that is created by the IKEv2 responder. This document does not specify the format of the ticket but examples are provided. [STANDARDS-TRACK]

Extracted elements (29)

design-rationale §1

The design is modeled closely on TLS session resumption (RFC 5077) with adaptations for IKEv2's two-phase exchange structure. Only symmetric cryptography is used to minimize CPU consumption.

ipsec, crypto, tls

design-rationale §9.9

The ticket format is intentionally left unspecified because format interoperability is not required — the same gateway that issues the ticket is always the one that interprets it. Appendix A provides example 'ticket by value' and 'ticket by reference' formats as non-normative guidance.

ipsec

design-rationale §1

Two approaches are defined for gateway state storage: 'ticket by value' (state encrypted into the ticket itself) and 'ticket by reference' (an opaque index into gateway storage). The client behaves identically in both cases and cannot distinguish which is in use, so the ticket format is intentionally unspecified.

ipsec, vpn, security

interoperability-note §5

Child SAs, internal IP addresses, other Configuration Payload information, MOBIKE additional addresses, and peer Vendor IDs are not resumed; they must be re-established in the new exchange. New IKEv2 extensions not covered by the state table SHOULD specify how they interact with session resumption.

ipsec, vpn

interoperability-note §4.3.2

NAT traversal status is explicitly not part of session resumption state; it MUST be re-detected in IKE_SESSION_RESUME. If NAT is detected, the initiator switches to UDP encapsulation on port 4500 as per normal IKEv2 procedures.

ipsec, nat

interoperability-note §4.2 MUST

When a multi-round-trip IKE_AUTH exchange is used, N(TICKET_REQUEST) MUST be included in the first IKE_AUTH request and N(TICKET_LT_OPAQUE)/TICKET_NACK/TICKET_ACK MUST only appear in the final IKE_AUTH response.

ipsec

normative-requirement §6.2 MUST

A finite lifetime MUST be specified for every ticket. The ticket lifetime SHOULD be the minimum of the IKE SA lifetime and re-authentication time per RFC 4478. The key protecting the ticket MUST have a lifetime significantly longer than the IKE SA lifetime.

ipsec, security

normative-requirement §6.1 MUST

A 'ticket by value' MUST have its content integrity protected and encrypted. A 'ticket by reference' does not need encryption but access to its backing store MUST be protected so only authorized entities can resolve it.

ipsec, security, crypto

normative-requirement §6.1 MUST

A 'ticket by value' MUST include a protected expiration time (absolute value) and MUST include a key identity field so that ticket encryption/authentication keys can be rotated and algorithms replaced.

ipsec, security

normative-requirement §4.3.2 MUST

IKE_SESSION_RESUME MUST be followed by an IKE_AUTH exchange. The client SHOULD NOT use IKE_SESSION_RESUME unless it knows the gateway supports it.

ipsec

normative-requirement §9.10 MUST

Leakage of identity information (IKEv2 initiator and responder identities) from the opaque ticket state MUST be avoided. The ticket MUST be presented to the responder only once to prevent linkability.

ipsec, security, privacy

normative-requirement §4.3.3 MUST

The IDi value sent in the IKE_AUTH exchange following IKE_SESSION_RESUME MUST be identical to the value included in the ticket. A CERT payload MUST NOT be included in this exchange, and IDr MUST also match the ticket.

ipsec, security

normative-requirement §4.3.1 MUST NOT

Tickets are for one-time use only; a client MUST NOT reuse a ticket. A ticket is considered used only when an IKE SA has been successfully established with it, and a reused ticket SHOULD be rejected by the gateway.

ipsec, security

normative-requirement §9.4 MUST NOT

Untrusted messages MUST NOT be relied upon to detect the need for session resumption; clients should not use a more liberal detection policy than the standard IKE SA liveness test (Section 2.4 of RFC 4306).

ipsec, security

normative-requirement §6.2 MUST

When an IKE SA is deleted by either party, the client MUST delete its stored ticket. When credentials associated with the IKE SA are invalidated (e.g., user logout), the ticket MUST also be deleted.

ipsec, security

normative-requirement §4.2 MUST

When the client accepts a ticket, its local storage MUST also include all state items marked 'from the ticket' in Section 5's state table, since the ticket itself is opaque to the client.

ipsec

protocol-element §4.3.2

A new IKEv2 exchange type IKE_SESSION_RESUME (value 38) is defined, equivalent to IKE_SA_INIT but carrying the client's ticket in an N(TICKET_OPAQUE) payload. It must be followed by an IKE_AUTH exchange before the IKE SA is valid.

ipsec, vpn

protocol-element §2

A Ticket is an opaque data structure created by the IKEv2 responder that encodes all necessary state to re-establish an IKE SA, either by value (encrypted state) or by reference (pointer to gateway-side storage).

ipsec, vpn, security

protocol-element §5.1

Key material for the resumed IKE SA is derived as SKEYSEED = prf(SK_d_old, "Resumption" | Ni | Nr), where SK_d_old is retrieved from the ticket and the literal string 'Resumption' is exactly 10 ASCII characters with no NULL terminator.

ipsec, crypto

registry §8

IKEv2 Exchange Types registry updated with IKE_SESSION_RESUME = 38.

ipsec, registry

registry §7

IKEv2 Notify Message Types - Status Types registry updated with five new values: TICKET_LT_OPAQUE (16409), TICKET_REQUEST (16410), TICKET_ACK (16411), TICKET_NACK (16412), TICKET_OPAQUE (16413).

ipsec, registry

security-consideration §9.1

A stolen 'ticket by value' cannot be used by an attacker to resume a session because the ticket contents are encrypted and the attacker cannot prove knowledge of the secret IKE state during IKE_AUTH. The responder MUST use strong encryption and integrity protection on the ticket.

ipsec, security, crypto

security-consideration §9.3

An adversary flooding a gateway with forged tickets (by value) burdens CPU and memory. For tickets by reference, this creates an amplification attack as the gateway resolves each reference. The regular IKEv2 cookie mechanism can mitigate state-overflow DoS; ticket verification should use efficient symmetric algorithms.

ipsec, security

security-consideration §9.2

Forged or altered 'ticket by value' attacks are defeated by strong integrity protection. For 'ticket by reference', forging a fake reference fails because the adversary lacks the keying material; it is recommended to integrity-protect the reference to also prevent SQL injection and SSRF-style attacks.

ipsec, security

security-consideration §9.5

Keys used to protect 'tickets by value' SHOULD be at least 128 bits, generated per RFC 4086, used only for ticket generation/verification, changed regularly and whenever the ticket format or algorithms change.

ipsec, security, crypto

security-consideration §9.8

Ticket revocation for 'ticket by value' is a known problem since a misbehaving client can present a ticket for an already-deleted IKE SA. Mitigations include an Invalid Ticket List (ITL) or Bloom Filter on the gateway, and short ticket lifetimes (e.g., 1 hour).

ipsec, security

state-machine §4.3

Session resumption proceeds through three states: (1) IKE_SESSION_RESUME exchange where the client presents the ticket and both peers derive crypto material; (2) IKE_AUTH exchange where peers authenticate using prf(SK_px, message octets) and IDi/IDr are verified against the ticket; (3) completion where a new IKE SA and Child SA are established.

ipsec, vpn

wire-format §7.1

The TICKET_LT_OPAQUE Notify payload (type 16409) carries a 4-octet unsigned integer Lifetime field (seconds until expiry, network byte order) followed by a variable-length opaque Ticket field. Protocol ID and SPI Size MUST both be 0.

ipsec

wire-format §7.2

The TICKET_OPAQUE Notify payload (type 16413) carries only the variable-length opaque Ticket field with no lifetime value. Protocol ID and SPI Size MUST both be 0.

ipsec