Internet-Draft | WESPv2 | May 2024 |
Klassert & Antony | Expires 29 November 2024 | [Page] |
This document describes the Wrapped Encapsulating Security Payload v2 (WESPv2) protocol, which builds on the Encapsulating Security Payload (ESP) [RFC4303]. It is designed to overcome limitations of the ESP protocol to expose flow information to the network in a transparent way and to align the cipher text to the needs of the sender and receiver. To do so, it defines an optional Flow Identifier where flow specific information can be stored. It also defines a Crypt Offset to allow intermediate devices to read some header bytes at the beginning of the inner packet. In particular, this preserves the original use-case of WESP [RFC5840]. Optional padding can be added for cipher text alignment.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 29 November 2024.¶
Copyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
WESPv2 is a wrapper for the ESP protocol. Due to the absence of a version number in the ESP protocol, in the packet header, ESP can't be updated in a transparent way. Any updates to ESP must be negotiated by IKEv2 and for that, indiscernible to intermediate devices such as routers and firewalls. In the recent past, several attempts were taken to introduce a Flow Identifier for certain use-cases. Examples are [I-D.ponchon-ipsecme-anti-replay-subspaces] and [I-D.he-ipsecme-vpn-shared-ipsecsa]. Such a Flow Identifier could also be used to perform ECMP based on the inner flows at intermediate devices or endpoints. Additionally to that, there exists a specification of the [PSP] protocol that has the need of a Flow Identifier, called Network Identifier (VNI) there. PSP also defines a Crypto Offset to expose parts of the headers of the inner packet. Showing headers on the inner packet was also the original usecase for the WESP protocol. WESPv2 provides a solution for all the aforementioned use-cases.¶
The 64 bit Flow Identifier field introduced by WESPv2 is considered to be opaque to this document. Future documents can define the meaning of this field for their particular use-case. With this, all existing and potential new use-cases for a Flow Identifier can be covered. For instance it can be used for the case of [I-D.ponchon-ipsecme-anti-replay-subspaces] or [I-D.he-ipsecme-vpn-shared-ipsecsa] etc., or combinations thereof if fit into the 64 bit field. A detailed discussion about the problems of the ESP protocol can be found in [I-D.mrossberg-ipsecme-multiple-sequence-counters].¶
Though this document specifies IKEv2 as a negotiation protocol, WESPv2 may use other protocols for negotiation and key derivation. The packet specification is portable to other key protocol use cases, such as [PSP], and offers versioning at the packet level.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119].¶
This document uses the following terms defined in IKEv2 [RFC7296]: Child SA, CREATE_CHILD_SA, IKE_AUTH exchange, USE_TRANSPORT_MODE¶
This document uses the following terms defined in [PSP]: PSP (a recursive acronym for PSP Security Protocol), Network Identifier (VNI), Crypt Offset.¶
This document uses the following terms defined in [RFC5840]: Wrapped Encapsulating Security Payload (WESP), USE_WESP_MODE.¶
This document uses the following terms defined in [RFC2992]: Equal-cost multi-path (ECMP)¶
This document uses the following terms defined in [RFC4303]: Encapsulating Security Payload (ESP).¶
This document uses the following terms defined in [I-D.mrossberg-ipsecme-multiple-sequence-counters]: Sub-Child SA.¶
In this section we define the exact protocol formats and operations. This section is normative.¶
The WESPv2 header is split into a 4 byte base header that is always present and an optional part directly following the base header. The base header essentially describes how to treat the packet. The optional part of the header ensure proper alignment of the ESP cipher text. It also has an option to store an integrity protected flow identifier that can be used for flow classification.¶
The header is constructed in a way that the start of the cipher-text is aligned on a 8 byte boundary respective the start of the IPv4/IPv6 header. Any IPv4 options and optional IPv6 extension Headers are not taken into account here. If the sender has different alignment requirements, optional padding can be used to align the cipher-text. The chosen padding size SHOULD NOT change for a given Child SA. (Authors note: Should the padding size be negotiated?) Like WESPv1, this extension essentially acts as a wrapper to the existing ESP protocol. The value of the new protocol version used to identify this new header is not changed. Instead, the version number in the Flags field is incremented to identify this new protocol version. Further details are shown below:¶
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header | HdrLen |CryptOffset| R | Flags | +---------------+---------------+-------------------------------+ | Padding (optional) | +---------------------------------------------------------------+ | FID (optional) | | | +---------------------------------------------------------------+ | Existing ESP Encapsulation | ~ ~ | | +---------------------------------------------------------------+
0 1 2 3 4 5 6 7 +-+-+-+-+-+-+-+-+ |V V|E|P|F| R | +-+-+-+-+-+-+-+-+
The following section defines the resulting packet format. Tunnel and Transport Modes are handled exactly the same way as in WESP [RFC5840]. The WESPv2 headers are inserted between the outer IPv4/IPv6 header and the ESP header. The WESPv2 header MUST be inserted before the cryptographic operations. After inserting the WESPv2 header, the crypto operations are performed. The full WESPv2 header, including optional padding and Flow Identifier (FID) MUST be included into the integrity protected part of the packet.¶
--------------------------------------------------- | outer IP hdr | ESP | ESP Payload | ESP |ESP| | (any options) | Hdr | Data | Trailer |ICV| ---------------------------------------------------
|<- WESPv2 Hdr ->| ------------------------------------------------------- |outer IP hdr |WESP| PAD | FID |ESP| Pyld | ESP |ESP| |(any options)|BHdr|(opt)|(opt)|Hdr| Data |Trailer|ICV| ------------------------------------------------------- |<-encryption->| |<----------- integrity ----------->|
----------------------------------------------------- | outer | ext. | ESP | ESP Payload | ESP |ESP| | IPv6 Hdr | Hdrs | Hdr | Data | Trailer |ICV| -----------------------------------------------------
|<- WESPv2 Hdr ->| ------------------------------------------------------- | outer |ext.|WESP| PAD | FID |ESP| Pyld | ESP |ESP| |IPv6 Hdr|Hdrs|BHdr|(opt)|(opt)|Hdr| Data |Trailer|ICV| ------------------------------------------------------- |<-encryption->| |<----------- integrity ----------->|
The IKEv2 negotiation follows exactly the way it is done in WESP [RFC5840], with the difference that a new notification USE_WESPv2_MODE is used.¶
This document assumes that WESPv2 negotiation is performed using IKEv2. In order to negotiate the new format of ESP encapsulation via IKEv2 [RFC7296], both parties need to agree to use the new packet format. This can be achieved using a notification method similar to USE_TRANSPORT_MODE, defined in [RFC7296].¶
When negotiating a WESPv2 Child SA, USE_WESPv2_MODE MUST be included in a either in an IKE_AUTH exchange or CREATE_CHILD_SA. and the rest of SA payload necessary for a Child SA using ESP. It signals that the sender supports the WESPv2 version defined in the current document and requests that the Child SA use WESPv2 mode rather than ESP for the SA created. If the request is accepted, the response MUST also include a notification of type USE_WESP_MODE. If the responder declines the request, the Child SA should be established using ESP, as per [RFC7296]. If this is unacceptable to the initiator, the initiator MUST delete the Child SA.¶
Note: Except when using the options to negotiate WESPv1 or WESPv2 mode, all CHILD_SAs will use standard ESP.¶
Negotiation of WESPv2 in this manner preserves all other negotiation parameters, including NAT-T [RFC3948]. NAT-T is wholly compatible with this wrapped format and can be used as-is, without any modifications, in environments where NAT is present and needs to be taken into account.¶
WESPv2 version negotiation is not specified here. If the WESP version is updated in a future specification, then that document MUST specify how the WESP version is negotiated.¶
All multi-octet fields representing integers are laid out in big endian order (also known as "most significant byte first", or "network byte order").¶
1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-----------------------------+-------------------------------+ ! Next Payload !C! RESERVED ! Payload Length ! +---------------+---------------+-------------------------------+ ! Protocol ID ! SPI Size ! Notify Message Type ! +---------------+---------------+-------------------------------+ !0|F|CryptOffset! ! +-------------------------------+-------------------------------+
This document defines a new IKEv2 Notify Message Type payloads for the IANA "IKEv2 Notify Message Types - Status Types" registry.¶
Value Notify Type Messages - Status Types Reference ----- ------------------------------ --------------- [TBD1] USE_WESPv2_MODE [this document]
[Note to RFC Editor: Please remove this section and the reference to [RFC6982]before publication.]¶
This section records the status of known implementations of the protocol defined by this specification at the time of posting of this Internet-Draft, and is based on a proposal described in [RFC7942]. The description of implementations in this section is intended to assist the IETF in its decision processes in progressing drafts to RFCs. Please note that the listing of any individual implementation here does not imply endorsement by the IETF. Furthermore, no effort has been spent to verify the information presented here that was supplied by IETF contributors. This is not intended as, and must not be construed to be, a catalog of available implementations or their features. Readers are advised to note that other implementations may exist.¶
According to [RFC7942], "this will allow reviewers and working groups to assign due consideration to documents that have the benefit of running code, which may serve as evidence of valuable experimentation and feedback that have made the implemented protocols more mature. It is up to the individual working groups to use this information as they see fit".¶
Authors are requested to add a note to the RFC Editor at the top of this section, advising the Editor to remove the entire section before publication, as well as the reference to [RFC7942].¶
In this section we discuss the security properties of WESPv2: TBD¶
TBD¶