RFC 9838
Group Key Management Using the Internet Key Exchange Protocol Version 2 (IKEv2)
RFC 9838: Group Key Management Using the Internet Key Exchange Protocol Version 2 (IKEv2) ๐
Okay bestie, let's do the title block first ๐ This is RFC 9838, and it's titled Group Key Management Using the Internet Key Exchange Protocol Version 2 (IKEv2). It came out of the Internet Engineering Task Force (IETF), it's a Standards Track document (so it's on the path to being a real Internet Standard ๐ฅ), and it's dated November 2025. The authors are V. Smyslov from ELVIS-PLUS and B. Weis, who's Independent. The ISSN is 2070-1721, and this RFC obsoletes RFC 6407 ๐
Abstract ๐
So this doc adds an extension to IKEv2 for group key management ๐ฆ It follows the Multicast Security (MSEC) Group Key Management architecture, which has two parts: member registration and group rekeying. Both parts are required so a Group Controller/Key Server (GCKS) can hand authorized Group Members (GMs) their IPsec Group Security Associations (GSAs). After that, the GMs swap IP multicast or other group traffic as IPsec packets ๐
This document obsoletes RFC 6407. ๐ธ
Status of This Memo ๐
This is an Internet Standards Track document. โจ
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.
Info about the current status of this doc, any errata, and how to send feedback is at https://www.rfc-editor.org/info/rfc9838. ๐
Copyright Notice โ๏ธ
Copyright (c) 2025 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, since 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 they are provided without warranty as described in the Revised BSD License. ๐
Table of Contents ๐บ๏ธ
1. Introduction and Overview
1.1. Requirements Notation
1.2. Terminology
2. G-IKEv2 Protocol
2.1. G-IKEv2 Integration into the IKEv2 Protocol
2.1.1. G-IKEv2 Transport and Port
2.2. G-IKEv2 Payloads
2.3. G-IKEv2 Member Registration and Secure Channel
Establishment
2.3.1. GSA_AUTH Exchange
2.3.2. GSA_REGISTRATION Exchange
2.3.3. GM Registration Operations
2.3.4. GCKS Registration Operations
2.4. Group Maintenance Channel
2.4.1. GSA_REKEY
2.4.2. GSA_INBAND_REKEY Exchange
2.4.3. Deletion of SAs
2.5. Counter-Based Modes of Operation
2.5.1. Allocation of Sender-ID
2.5.2. GM Usage of Sender-ID
2.6. Replay Protection for Multicast Data-Security SAs
2.7. Encryption Transforms with Implicit IV
3. Group Key Management and Access Control
3.1. Key Wrap Keys
3.1.1. Default Key Wrap Key
3.2. GCKS Key Management Semantics
3.2.1. Forward Access Control Requirements
3.3. GM Key Management Semantics
3.4. SA Keys
4. Header and Payload Formats
4.1. G-IKEv2 Header
4.2. Group Identification Payload
4.3. Security Association - GM Supported Transforms Payload
4.4. Group Security Association Payload
4.4.1. Group Policies
4.4.2. Group Security Association Policy Substructure
4.4.3. Group-Wide Policy Substructure
4.5. Key Download Payload
4.5.1. Key Bags
4.5.2. Group Key Bag Substructure
4.5.3. Member Key Bag Substructure
4.5.4. Key Wrapping
4.6. Delete Payload
4.7. Notify Payload
4.7.1. INVALID_GROUP_ID Notification
4.7.2. AUTHORIZATION_FAILED Notification
4.7.3. REGISTRATION_FAILED Notification
4.7.4. GROUP_SENDER Notification
4.8. Authentication Payload
5. Using G-IKEv2 Attributes
6. Interaction with IKEv2 and ESP Extensions
6.1. Implicit IV for Counter-Based Ciphers in ESP
6.2. Mixing Preshared Keys in IKEv2 for Post-Quantum Security
6.3. Aggregation and Fragmentation Mode for ESP
7. GDOI Protocol Extensions
8. Security Considerations
8.1. GSA Registration and Secure Channel
8.2. GSA Maintenance Channel
8.2.1. Authentication/Authorization
8.2.2. Confidentiality
8.2.3. On-Path Attack Protection
8.2.4. Replay/Reflection Attack Protection
9. IANA Considerations
9.1. New Registries
9.1.1. Guidance for Designated Experts
9.2. Changes in the Existing IKEv2 Registries
10. References
10.1. Normative References
10.2. Informative References
Appendix A. Use of LKH in G-IKEv2
A.1. Notation
A.2. Group Creation
A.3. Simple Group SA Rekey
A.4. Group Member Exclusion
Acknowledgements
Contributors
Authors' Addresses
1. Introduction and Overview ๐
Okay so this doc is an IKEv2 extension called G-IKEv2, and it's built for group key management ๐ A group key management protocol hands IPsec keys and policy to a bunch of IPsec devices that are allowed to talk to each other using a Group Security Association (GSA), which is defined in the Multicast Group Security Architecture [RFC3740]. The group's data traffic (like IP multicast packets) is protected by a key that the Group Controller/Key Server (GCKS) pushes out to the Group Members (GMs) ๐ฆ
G-IKEv2 follows "The Multicast Group Security Architecture" [RFC3740], "Multicast Extensions to the Security Architecture for the Internet Protocol" [RFC5374], and "Multicast Security (MSEC) Group Key Management Architecture" [RFC4046]. It also replaces "The Group Domain of Interpretation" [RFC6407], which defined a similar group key management protocol using IKEv1 [RFC2409] (which IKEv2 has since deprecated). When G-IKEv2 is used, group key management gets the simplicity, extra robustness, and crypto upgrades that come with IKEv2 (see Appendix A of [RFC7296]) ๐ง
G-IKEv2 has two phases: registration and rekeying ๐ธ In the registration phase, a GM contacts a GCKS to join a group. It gets the policy and keying material it needs to talk to the other GMs in the group and to the GCKS. In the rekeying phase, the GCKS periodically refreshes the keying material for both GM-to-GM traffic and GM-to-GCKS traffic โจ
G-IKEv2 has two ways to do registration. When a GM first contacts a GCKS, it uses the GSA_AUTH exchange (Section 2.3.1) to join a group. This happens after the IKE_SA_INIT exchange (kind of like the IKE_AUTH exchange in IKEv2), and it ends with an IKE Security Association (SA) between the GM and the GCKS. During this exchange, the GCKS authenticates and authorizes the GM, then pushes the policy and the keys the group uses to the GM ๐ The second new exchange type is GSA_REGISTRATION (Section 2.3.2). A GM can use it inside an IKE SA that's already set up with the GCKS, for example to join another group ๐
Refreshing the group keys can happen in two ways. One is unicast, using the GSA_INBAND_REKEY exchange (Section 2.4.2) over a specific IKE SA between a GM and a GCKS. The other is multicast, using the GSA_REKEY pseudo-exchange (Section 2.4.1), which is used when new keys go out to all GMs at once ๐
Big and small groups can use different mixes of these mechanisms ๐ When a large group of devices is communicating, the GCKS will probably use the GSA_REKEY message because it's more efficient. Figure 1 shows this. Multicast communications are drawn with a double line.
| Note: For clarity, IKE_SA_INIT is omitted from Figures 1 and 2.
+--------+
+----IKEv2---->| GCKS |<----IKEv2----+
| +--------+ |
| || ^ |
| || | |
| || GSA_AUTH |
| || or |
| || GSA_REGISTRATION |
| || | |
GSA_AUTH || IKEv2 GSA_AUTH
or || | or
GSA_REGISTRATION GSA_REKEY | GSA_REGISTRATION
| || | |
| *==========**================* |
| || || | || |
v \/ \/ v \/ v
+-------+ +--------+ +-------+
| GM | ... | GM | ... | GM |
+-------+ +--------+ +-------+
|| || ||
*=====ESP/AH=====**=====ESP/AH====*
Figure 1: G-IKEv2 Used in Large Groups
Or a small group can keep it simple and just use GSA_AUTH or GSA_REGISTRATION as the registration protocols, with the GCKS issuing rekeys through GSA_INBAND_REKEY inside the same IKE SA ๐
GSA_AUTH or GSA_REGISTRATION, GSA_INBAND_REKEY
+--------------------IKEv2----------------------+
| |
| GSA_AUTH or GSA_REGISTRATION, |
| GSA_INBAND_REKEY |
| +-----------IKEv2-------------+ |
| | | |
| |GSA_AUTH or GSA_REGISTRATION,| |
| | GSA_INBAND_REKEY | |
| | +--IKEv2-+ | |
v v v v v v
+---------+ +----+ +----+ +----+
| GCKS/GM | | GM | | GM | | GM |
+---------+ +----+ +----+ +----+
|| || || ||
*==ESP/AH==**=====ESP/AH====**===ESP/AH===*
Figure 2: G-IKEv2 Used in Small Groups
You can also mix the two approaches. For example, the GCKS might use the sturdier GSA_INBAND_REKEY to give keys to some GMs (say, the ones acting as senders in the group) and use GSA_REKEY for everyone else ๐ฅ
| Note: GCKS may also be a GM (as shown in Figure 2).
IKEv2 message semantics are kept intact, so every communication is a message request-response pair. The one exception is the GSA_REKEY pseudo-exchange, which is a single message that delivers group updates to the GMs ๐
1.1. Requirements Notation ๐
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. ๐ซถ
1.2. Terminology
Okay bestie, quick vibe check ๐ you're assumed to already know the IPsec architecture [RFC4301] and its multicast extension [RFC5374] ๐ง . This doc is an extension to IKEv2 [RFC7296], and it skips a LOT of the details ๐ซถ. The notation and conventions from [RFC7296] are used for describing G-IKEv2 payloads and exchanges โจ.
Here are the key terms we'll be using all over the place (mostly borrowed from [RFC3740], [RFC5374], and [RFC6407]) ๐ฆ
Group: A set of IPsec devices that communicate with each other using multicast. ๐ธ
Group Member (GM): An IPsec device that belongs to a group. A GM is authorized to be a group sender and/or a group receiver. ๐
Group Receiver: A GM that is authorized to receive packets sent to a group by a group sender. ๐
Group Sender: A GM that is authorized to send packets to a group. ๐ฃ
Group Key Management (GKM) Protocol: A key management protocol used by a GCKS to distribute IPsec Security Association policy and keying material. A GKM protocol is needed because a group of IPsec devices require the same SAs. For example, when an IPsec SA describes an IP multicast destination, the sender and all receivers need to have the group SA. ๐
Group Controller/Key Server (GCKS): A Group Key Management (GKM) protocol server that manages IPsec state for a group. A GCKS authenticates and provides the IPsec SA policy and keying material to GMs. ๐
Data-Security SA: A multicast SA between each multicast sender and the group's receivers. The Data-Security SA protects data between member senders and member receivers. One or more SAs are required for the multicast transmission of data messages from the group sender to other GMs. This specification relies on Encapsulating Security Payload (ESP) and Authentication Header (AH) as protocols for Data-Security SAs. ๐ก๏ธ
Rekey SA: A single multicast SA between the GCKS and all of the GMs. This SA is used for multicast transmission of key management messages from the GCKS to all GMs. ๐
Group SA: A Data-Security SA or Rekey SA that is shared as part of group policy. ๐
Group Security Association (GSA): A collection of Data-Security SAs and Rekey SAs necessary for a GM to receive key updates. A GSA describes the working policy for a group. Refer to the MSEC Group Key Management Architecture [RFC4046] for additional information. ๐งฉ
Traffic Encryption Key (TEK): The symmetric cipher key used in a Data-Security SA (e.g., IPsec ESP) to protect traffic. ๐
Key Encryption Key (KEK): The symmetric key (or a set of keys) used in a Rekey SA to protect its messages. The set of keys may include keys for encryption and authentication, as well as keys for key wrapping. ๐๏ธ
Key Wrap Key (KWK): The symmetric cipher key used to protect another key. ๐
Group-Wide (GW) policy: Group policy not related to a particular SA. ๐
Activation Time Delay (ATD): Defines how long group senders should wait after receiving new SAs before sending traffic over them. โณ
Deactivation Time Delay (DTD): Defines how long GMs should wait after receiving a request to delete Data-Security SAs before actually deleting them. โ
Sender-ID: A unique identifier of a group sender in the context of an active GSA used to form the Initialization Vector (IV) in counter-based cipher modes. ๐
Logical Key Hierarchy (LKH): A group management method defined in Section 5.4 of [RFC2627]. ๐ณ
2. G-IKEv2 Protocol ๐
G-IKEv2 is an extension to the IKEv2 protocol [RFC7296] that provides group authorization, secure policy, and keys download from the GCKS to GMs. It's giving main character energy for group key stuff ๐
2.1. G-IKEv2 Integration into the IKEv2 Protocol
G-IKEv2 is compatible with most IKEv2 extensions defined so far (see Section 6 for details). In particular, it is assumed that, if necessary, the IKE_INTERMEDIATE exchanges [RFC9242] may be utilized while establishing the registration SA. It is also believed that future IKEv2 extensions will be possible to use with G-IKEv2. However, some IKEv2 extensions may require special handling when used with G-IKEv2. โจ
2.1.1. G-IKEv2 Transport and Port
As an IKEv2 extension, G-IKEv2 SHOULD use the IKEv2 ports (500, 4500). ๐ช G-IKEv2 MAY use TCP transport for the IKE SA used for registration (which is unicast), as defined in TCP Encapsulation of IKEv2 and IPsec [RFC9329]. G-IKEv2 MAY also use UDP port 848, the same as Group Domain of Interpretation (GDOI) [RFC6407], because they serve a similar function. The version number in the IKE header distinguishes the G-IKEv2 protocol from the GDOI protocol [RFC6407]. ๐ข
Section 2.23 of [RFC7296] describes how IKEv2 supports paths with NATs. ๐ The G-IKEv2 registration SA doesn't create any unicast IPsec SAs; thus, if a NAT is present between the GM and the GCKS, there is no unicast ESP traffic to encapsulate in UDP. However, the actions described in this section regarding the IKE SA MUST be honored. The behavior of GMs and GCKS MUST NOT depend on the port used to create the initial IKE SA. For example, if the GM and the GCKS used UDP port 848 for the IKE_SA_INIT exchange, they will operate the same as if they had used UDP port 500. ๐
Heads up: the port you use for the initial IKE SA does NOT change how GMs and GCKS behave. Same vibes either way ๐
2.2. G-IKEv2 Payloads
In the following descriptions, the payloads contained in the G-IKEv2 messages are indicated by names as listed below. ๐
+==========+=============================+=============+
| Notation | Payload | Defined in |
+==========+=============================+=============+
| AUTH | Authentication | [RFC7296] |
+----------+-----------------------------+-------------+
| CERT | Certificate | [RFC7296] |
+----------+-----------------------------+-------------+
| CERTREQ | Certificate Request | [RFC7296] |
+----------+-----------------------------+-------------+
| D | Delete | [RFC7296] |
+----------+-----------------------------+-------------+
| GSA | Group Security Association | Section 4.4 |
+----------+-----------------------------+-------------+
| HDR | IKE header (not a payload) | [RFC7296] |
+----------+-----------------------------+-------------+
| IDg | Group Identification | Section 4.2 |
+----------+-----------------------------+-------------+
| IDi | Identification - Initiator | [RFC7296] |
+----------+-----------------------------+-------------+
| IDr | Identification - Responder | [RFC7296] |
+----------+-----------------------------+-------------+
| KD | Key Download | Section 4.5 |
+----------+-----------------------------+-------------+
| KE | Key Exchange | [RFC7296] |
+----------+-----------------------------+-------------+
| Ni, Nr | Nonce | [RFC7296] |
+----------+-----------------------------+-------------+
| N | Notify | [RFC7296] |
+----------+-----------------------------+-------------+
| SA | Security Association | [RFC7296] |
+----------+-----------------------------+-------------+
| SAg | Security Association - GM | Section 4.3 |
| | Supported Transforms | |
+----------+-----------------------------+-------------+
| SK | Encrypted and Authenticated | [RFC7296] |
| | (also known as Encrypted) | |
+----------+-----------------------------+-------------+
Table 1: Payloads Used in G-IKEv2
Payloads defined as part of other IKEv2 extensions MAY also be included in these messages. Payloads that may optionally appear in G-IKEv2 messages will be shown in brackets, such as [CERTREQ]. ๐งบ
G-IKEv2 defines several new payloads not used in IKEv2: ๐
Group Identification (IDg): The GM requests the GCKS for membership into the group by sending its IDg payload. ๐โโ๏ธ
Security Association - GM Supported Transforms (SAg): The GM optionally sends supported transforms so that GCKS may select a policy appropriate for all members of the group (which is not negotiated, unlike SA parameters in IKEv2). ๐ค
Group Security Association (GSA): The GCKS sends the group policy to the GM using this payload. ๐
Key Download (KD): The GCKS sends the keys and the security parameters to the GMs using this payload. ๐
The details of the contents of each payload are described in Section 4. ๐
2.3. G-IKEv2 Member Registration and Secure Channel Establishment
Initial registration is combined with establishing a secure connection between the entity seeking registration and the GCKS. ๐ This process consists of a minimum of two exchanges, IKE_SA_INIT and GSA_AUTH; member registration may have a few more messages exchanged if the Extensible Authentication Protocol (EAP) method, cookie challenge (for DoS protection), negotiation of key exchange method, or IKEv2 extensions based on the IKEv2 Intermediate Exchange [RFC9242] are used. Each exchange consists of request/response pairs. The first exchange, called IKE_SA_INIT, is defined in IKEv2 [RFC7296]. This exchange negotiates cryptographic algorithms, exchanges nonces, and computes a shared key between the GM and the GCKS. In addition to the cryptographic algorithms negotiated for use in IKEv2 SA, a key wrap algorithm is also negotiated in this exchange by means of a new "Key Wrap Algorithm" transform. See Section 4.5.4 for details. ๐
The second exchange, called GSA_AUTH, is similar to the IKEv2 IKE_AUTH exchange [RFC7296]. It authenticates the previously exchanged messages and exchanges identities and certificates. The GSA_AUTH messages are encrypted and integrity protected with keys established through the previous exchanges, so the identities are hidden from eavesdroppers and all fields in all the messages are authenticated. ๐ต๏ธโโ๏ธ The GCKS authorizes GMs to be allowed into the group as part of the GSA_AUTH exchange. Once the GCKS accepts a GM to join a group, it will provide the GM with the data-security keys (TEKs) and/or a group key encrypting key (KEK) as part of the GSA_AUTH response message. ๐
The established secure channel between the GM and the GCKS is in fact IKE SA (as defined in [RFC7296]) and is referred to as such throughout this document. However, it is NOT RECOMMENDED to use this IKE SA for the purpose of creating unicast Child SAs between the GM and the GCKS since authentication requirements for group admission and for unicast communication may differ. In addition, the life cycle of this IKE SA is determined by the GCKS and this SA can be deleted at any time. ๐
2.3.1. GSA_AUTH Exchange โจ
okay so the GSA_AUTH exchange is how everyone gets to prove who they are and swap identities and certificates, like a full-on verification moment ๐ชช๐ . G-IKEv2 also uses it for GM registration and authorization, so it's doing a lot of work bestie ๐ซถ.
It's giving IKE_AUTH vibes, but with its own glow-up ๐ฆ. Its goal is to set up a multicast Data-Security SA(s) and optionally give the GM the keys for a Rekey SA ๐. The payloads look a little different because policy isn't negotiated between the GM and the GCKS. Instead, the GCKS just hands the policy to the GM ๐. Also, GSA_AUTH has its own exchange type, not the IKE_AUTH one, so it's its own main character ๐.
๐ Note: Due to the similarities between IKE_AUTH and GSA_AUTH, most IKEv2 extensions to the IKE_AUTH exchange (like secure password authentication [RFC6467]) can also be used with the GSA_AUTH exchange.
Here's the GM sending its request to join ๐จ:
Initiator (GM) Responder (GCKS)
-------------------- ------------------
HDR, SK{IDi, [CERT,] [CERTREQ,] [IDr,]
AUTH, IDg, [SAg,] [N(GROUP_SENDER),] [N]} -->
Figure 3: GSA_AUTH Request
So a GM starts a GSA_AUTH request to join the group named in the IDg payload ๐ธ. It may include an SAg payload to say which Transforms it's willing to accept. And if a GM plans to act as a group sender, it MUST include a Notify payload with the status type GROUP_SENDER โจ. That's how the GCKS knows to add any extra policy group senders need ๐.
Initiator (GM) Responder (GCKS)
-------------------- ------------------
<-- HDR, SK{IDr, [CERT,]
AUTH, GSA, KD, [N]}
Figure 4: GSA_AUTH Normal Response
The GCKS replies with IDr, an optional CERT, and AUTH payloads, and they mean the same thing they do in IKE_AUTH ๐ง. It also tells the GM about the group's cryptographic policies in the GSA payload, plus the key material in the KD payload ๐.
Errors should be handled the way Section 2.21.2 of [RFC7296] says ๐. On top of the usual IKEv2 error stuff, the GCKS can also reject the registration if the IDg is invalid or authorization fails, and so on ๐
โโ๏ธ. When that happens (see Section 4.7), the GSA_AUTH response won't have the GSA or KD, but it will have a Notify payload explaining what went wrong ๐จ. If the GM sent an SAg and the GCKS checks it and finds the GM can't support the group's security policy, the GCKS sends back NO_PROPOSAL_CHOSEN ๐. Other error notifications can be INVALID_GROUP_ID, AUTHORIZATION_FAILED, or REGISTRATION_FAILED ๐ญ.
Initiator (GM) Responder (GCKS)
-------------------- ------------------
<-- HDR, SK{IDr, [CERT,] AUTH, N}
Figure 5: GSA_AUTH Error Response for Group-Related Errors
Now, if GSA_AUTH finishes fine but the GM decides the policy from the GCKS is unacceptable, the member SHOULD tell the GCKS by starting a GSA_REGISTRATION exchange with the IDg payload and the NO_PROPOSAL_CHOSEN notification (see Figure 8) ๐ฃ. Tell them, bestie ๐ .
2.3.2. GSA_REGISTRATION Exchange โจ
Once the IKE SA between the GM and the GCKS is up, the GM can keep using it for other registration requests whenever it needs to ๐. That's when it uses the GSA_REGISTRATION exchange ๐ง. Payloads here get generated and processed the same way they are in Section 2.3.1 ๐.
Initiator (GM) Responder (GCKS)
-------------------- ------------------
HDR, SK{IDg, [SAg,]
[N(GROUP_SENDER),] [N]} -->
<-- HDR, SK{GSA, KD, [N]}
Figure 6: GSA_REGISTRATION Normal Exchange
Just like with GSA_AUTH, the GCKS can reject the request if the IDg is invalid, authorization fails, or the GM can't support the group's security policy (the GCKS can figure that out by checking the SAg payload) ๐ โโ๏ธ. In that case, the GCKS sends back an appropriate error notification, as described in Section 2.3.1 ๐ฉ.
Initiator (GM) Responder (GCKS)
-------------------- ------------------
HDR, SK{IDg, [SAg,]
[N(GROUP_SENDER),] [N]} -->
<-- HDR, SK{N}
Figure 7: GSA_REGISTRATION Error Exchange
This exchange also works if the GM finds the GCKS's policy unacceptable, or if it wants to leave the group for some reason ๐. The GM SHOULD let the GCKS know by sending IDg along with the Notify type NO_PROPOSAL_CHOSEN or REGISTRATION_FAILED, like shown below ๐ฌ. When that happens, the GCKS MUST remove the GM from the group named in IDg ๐ช. No cap, that's a big deal ๐.
Initiator (GM) Responder (GCKS)
-------------------- ------------------
HDR, SK{IDg, N} -->
<-- HDR, SK{}
Figure 8: GM Reporting Errors in GSA_REGISTRATION Exchange
2.3.3. GM Registration Operations ๐
Okay so, when a GM wants to register, it starts by reaching out to the GCKS with the IKE_SA_INIT exchange. This one is totally unchanged from IKE_SA_INIT in IKEv2, so no new drama here ๐ . The IKE_SA_INIT exchange may optionally be followed by one or more IKE_INTERMEDIATE exchanges, but only if the GM and the GCKS already agreed to use IKEv2 extensions built on this exchange โจ.
Next up, the GM sends the GSA_AUTH request. It carries the IKEv2 payloads from IKE_AUTH (minus the SAi2, TSi, and TSr payloads) plus the Group ID, so the GCKS knows which group the GM wants to join ๐ซถ. A GM intending to emit data traffic MUST send a GROUP_SENDER notification. This notification does two jobs at once: it says "hey, I'm a sender," and it lets the GM ask for Sender-ID values in case the Data-Security SA uses a counter-mode cipher. Section 2.5.1 has the guidance on requesting Sender-ID values, so go check that out ๐ธ.
A GM may be limited in which Transform IDs it can or is willing to use, and it may find it useful to tell the GCKS which Transform IDs it will accept for each security protocol. To do that, it includes the SAg payload in the request. Proposals for the Rekey SA and for the Data-Security SAs (AH [RFC4302] and/or ESP [RFC4303]) may be included in SAg. Proposals for the Rekey SA are identified by a brand-new Security Protocol Identifier, GIKE_UPDATE, with the value 6 ๐ฆ. Each Proposal lists the Transforms the GM is able and willing to support for that protocol. Which Transform Types are valid depends on the protocol (AH, ESP, GIKE_UPDATE), and they're all defined in Table 2. Other Transform Types SHOULD NOT be included, because the GCKS will just ignore them. Each Proposal in an SAg has an SPI length of zero, so the SPI field is empty. The GCKS MUST NOT use the SPI length and SPI fields in the SAg payload. Rude, but fair ๐ค.
Generally, one Proposal per protocol (GIKE_UPDATE, AH/ESP) will be enough. The transforms aren't negotiated here, so the GM is basically just warning the GCKS about any restrictions it has. Quick heads-up: the rule from Section 3.3 of [RFC7296] that AEAD and non-AEAD transforms can't be mixed in one proposal does NOT apply when you're forming the SAg payload ๐. Hmm, wait, let me be precise on that: the rule doesn't hold in this situation. If the GM has restrictions on how algorithms can be combined, it can express that by sending several proposals instead ๐ก.
Here's a fun one. The Proposal Num field in the Proposal substructure gets special treatment in the SAg payload. It lets a GM say that the algorithms used in the Rekey SA and in the Data-Security (AH and/or ESP) SAs depend on each other ๐ง . Proposals for different protocols that share the same Proposal Num value are treated as a set. So if the GCKS uses transforms from one of those Proposals for one protocol, it MUST only use transforms from one of the Proposals with that same Proposal Num value for the other protocols. For example, a GM might support algorithms X and Y for both Rekey and Data-Security SAs, but with a catch: if X is used for the Rekey SA, then only X can be used for the Data-Security SAs, and the same goes for Y. Matching Proposal Num values mean "these proposals go together." When there are no dependencies between transforms, every Proposal in the SAg payload just gets the same Proposal Num value, and life is simple ๐.
The SAg payload is optional, but it is RECOMMENDED that the GM include it in the GSA_AUTH request. That way the GCKS can pick an appropriate policy ๐.
A GM MAY also show support for IPcomp by including one or more IPCOMP_SUPPORTED notifications along with the SAg payload in the request. The Compression Parameter Index (CPI) in these notifications is set to zero, and the GCKS MUST ignore it ๐.
When the GM gets the GSA_AUTH response, it parses the response from the GCKS and authenticates the exchange using the IKEv2 method. Then it processes the GSA and KD payloads ๐.
The GSA payload holds the security policy and the cryptographic protocols used by the group. It describes zero or more Data-Security SAs (TEK), zero or one Rekey SA (KEK), and zero or one GW policy. At least one TEK or KEK policy MUST be Present, though ๐. If the GM finds the policy in the GSA payload unacceptable, it SHOULD notify the GCKS by starting a GSA_REGISTRATION exchange with a NO_PROPOSAL_CHOSEN Notify payload (see Section 2.3.2). This should normally not happen if the GM included the SAg payload in the GSA_AUTH request and the GCKS actually took it into account ๐. Last step: the KD payload gets parsed, which provides the keying material for the TEK and/or KEK. The KD payload contains a list of key bags, and each key bag holds the keying material for SAs distributed in the GSA payload. Keying material gets matched by comparing the SPIs in the key bags to the SPIs previously included in the GSA payloads. Once the TEK keys and policy are matched, the GM hands them to the data-security subsystem, and it's ready to send or receive packets that match the TEK policy ๐.
If the GM is not a sender for a received Data-Security SA, it MUST install that SA only in the inbound direction. If the GM is a sender for a received Data-Security SA and it is not going to receive back the data it sends, it MUST install that SA only in the outgoing direction ๐ฅ๐ค.
If the first Message ID the GM should expect to receive is non-zero, the GSA KEK policy includes the attribute GSA_INITIAL_MESSAGE_ID with that expected non-zero value. The GM MUST check the value of this attribute against any Message ID it previously received for this group. If the value is less than the previously received number, it should be considered stale and MUST be ignored. This could happen if two GSA_AUTH exchanges ran in parallel and the Message ID changed ๐ฌ. This attribute is how the GM guards against GSA_REKEY message replay attacks. The first GSA_REKEY message the GM receives from the GCKS will have a Message ID greater than or equal to the Message ID received in the GSA_INITIAL_MESSAGE_ID attribute ๐ก๏ธ.
GMs MUST install the Rekey SA only in the inbound direction. Period, no exceptions ๐ โโ๏ธ.
Once a GM successfully registers to the group, it MUST replace any information it has for this group (policy, keys) that came from a previous registration with the new information. Fresh start, bestie โจ.
Once a GM has received the GIKE_UPDATE policy during a registration, the IKE SA MAY be closed. By convention, the GCKS is the one that closes the IKE SA. The GM SHOULD NOT close it ๐
. The GCKS MAY choose to keep the IKE SA open for inband rekey, especially for small groups. If inband rekey is used, the initial IKE SA can be rekeyed by either side with the standard IKEv2 mechanism described in Section 1.3.2 of [RFC7296]. But if, for some reason, the IKE SA gets closed and no GIKE_UPDATE policy was received during registration, the GM MUST consider itself excluded from the group. To keep participating, the GM needs to re-register ๐ญ.
2.3.4. GCKS Registration Operations ๐
A G-IKEv2 GCKS listens for incoming requests from GMs ๐. When the GCKS receives an IKE_SA_INIT request, it selects an IKE proposal and generates a nonce and a Diffie-Hellman (DH) value to include in the IKE_SA_INIT response ๐ธ.
When the GCKS receives the GSA_AUTH request, it authenticates the GM through the GSA_AUTH exchange. Then it authorizes the GM according to the group policy before getting ready to send the GSA_AUTH response. If the GCKS fails to authorize the GM, it responds with an AUTHORIZATION_FAILED notification. The GCKS may also respond with an INVALID_GROUP_ID notification if the requested group is unknown to it, or with a REGISTRATION_FAILED notification if there's a problem with the requested group (e.g., if the capacity of the group is exceeded) ๐ซ.
The GSA_AUTH response includes the group policy in the GSA payload and the keys in the KD payload. If the GCKS policy includes a group rekey option and the initial Message ID value the GCKS will use when sending GSA_REKEY messages to the GMs is non-zero, then that value is specified in the GSA_INITIAL_MESSAGE_ID attribute. This Message ID is what stops GSA_REKEY message replay attacks, and it goes up every time a GSA_REKEY message is sent to the group ๐. The GCKS data traffic policy goes in the GSA TEK, and the keys go in the KD TEK. The GW policy MAY also be included to provide the Activation Time Delay (ATD) and/or Deactivation Time Delay (DTD) (Section 4.4.3.1.1), which specify activation and deactivation delays for SAs generated from the TEKs โฐ. If the GM said it's a sender of data traffic and one or more Data-Security SAs in the GSA payload use a counter mode of operation, the GCKS responds with one or more Sender-ID values (see Section 2.5) ๐ข.
Multicast Extensions to the Security Architecture [RFC5374] defines two modes of operation for multicast Data-Security SAs: transport mode and tunnel mode with address preservation. In the latter case, the outer source and destination addresses are taken from the inner IP packet ๐ฆ. Which mode the Data-Security SAs use is determined by whether the USE_TRANSPORT_MODE notification is present in the GCKS's response message of the registration exchange. If it's present, SAs get created in transport mode. If it's not, SAs get created in tunnel mode. If multiple Data-Security SAs are created in a single registration exchange, they all share the same mode of operation ๐.
If the GCKS receives a GSA_REGISTRATION exchange asking it to register a GM to a group, the GCKS needs to authorize the GM for the new group (IDg) and respond with the matching group policy and keys. If the GCKS fails to authorize the GM, it responds with the AUTHORIZATION_FAILED notification. For the reasons described above, the GCKS may also respond with an INVALID_GROUP_ID or REGISTRATION_FAILED Notify message ๐.
If a GM includes an SAg in its GSA_AUTH or GSA_REGISTRATION request, the GCKS may evaluate it according to an implementation-specific policy ๐งฉ. The GCKS has a few options:
- The GCKS could evaluate the list of Transforms and compare it to its current policy for the group. If the GM did not include all of the ESP, AH, or
GIKE_UPDATETransforms that match the current group policy or the capabilities of all other currently active GMs, then the GCKS SHOULD return aNO_PROPOSAL_CHOSENnotification. Alternatively, the GCKS can change the group policy as defined below. - The GCKS could store the list of Transforms with the goal of migrating the group policy from the current set of transforms to a different one, once all of the GMs indicate that they can support transforms from the new set ๐.
- The GCKS could store the list of Transforms and adjust the current group policy based on the capabilities of the devices, as long as they fall within the acceptable security policy of the GCKS ๐ฏ.
Depending on its policy, the GCKS may have no further need for the IKE SA (for example, if it doesn't plan to start a GSA_INBAND_REKEY exchange). If the GM doesn't start another registration exchange or Notify (e.g., NO_PROPOSAL_CHOSEN) and the GCKS isn't planning to use the SA, then the GCKS SHOULD close the IKE SA after a short period of time to save resources ๐งนโจ.
2.4. Group Maintenance Channel โจ
okay so bestie, the GCKS is the one in charge of rekeying the secure group, following whatever the group policy says ๐ rekeying is basically when the GCKS hands out replacement TEK(s) and/or KEK, deletes TEK(s), and/or kicks out GMs ๐ the GCKS can kick off a rekey message if group membership and/or policy has changed or if the keys are about to expire โฐ G-IKEv2 gives us two forms of group maintenance channels to push new policy down to GMs ๐
GSA_REKEY: The GSA_REKEY is a pseudo-exchange, which is literally just one-way IKEv2 message sent by the GCKS, with the rekey policy delivered to GMs using IP multicast as the transport ๐ก this is so valuable for large and dynamic groups where policy changes a lot and you need a scalable rekey method ๐ฆ when GSA_REKEY is used, the IKE SA protecting the member registration exchanges is usually terminated, and GMs just wait for policy changes from the GCKS via the GSA_REKEY messages ๐ธ
GSA_INBAND_REKEY: The GSA_INBAND_REKEY is a normal IKEv2 exchange that runs over the IKE SA set up to protect the member registration exchange ๐ it lets the GCKS rekey without needing a separate GSA_REKEY pseudo-exchange ๐ it gives reliable policy delivery and is super useful when G-IKEv2 is used with a small group of cooperating devices ๐ซถ
Depending on its policy, the GCKS MAY combine these two methods ๐ for example, the GCKS may use GSA_INBAND_REKEY to deliver a key to the GMs acting as senders (since that gives reliable key delivery), and GSA_REKEY for the rest of the GMs ๐ง
2.4.1. GSA_REKEY โจ
okay so the GCKS starts the G-IKEv2 rekey by sending a protected message to the GMs, usually over IP multicast ๐ก the Rekey messages don't need responses and go out to multiple GMs, so the windowing mechanism from Section 2.3 of [RFC7296] MUST NOT be used for the Rekey messages ๐ the GCKS rekey message replaces the current rekey GSA KEK or KEK array (like with LKH) and/or creates new Data-Security SAs ๐ฅ the GM_SENDER_ID attribute in the Key Download payload (defined in Section 4.5.3.3) MUST NOT be part of the Rekey Exchange, because it's sender-specific info and the Rekey Exchange is group specific ๐ the GCKS kicks off the GSA_REKEY pseudo-exchange like this:
GMs (Receivers) GCKS (Sender)
----------------- ---------------
<-- HDR, SK{GSA, KD, [N,] [AUTH]}
Figure 9: GSA_REKEY Pseudo-Exchange
HDR is defined in Section 4.1 ๐ GSA_REKEY reuses the IKEv2 header, but the "IKE SA Initiator's SPI" and the "IKE SA Responder's SPI" fields are treated as a single field that's 16 octets long and holds the SPI of a Rekey SA ๐ฆ the GCKS provides the value for this field in the GSA payload (see Section 4.4.2) ๐ the Message ID in this message starts at whatever the GCKS sent to the GMs in the GSA_INITIAL_MESSAGE_ID attribute, or from zero if that attribute wasn't sent ๐ then the Message ID goes up by one every time a new GSA_REKEY message is sent to the GMs โญ
the GSA payload has the current policy for rekey and Data-Security SAs ๐ธ the GSA may contain a new Rekey SA and/or new Data-Security SA(s) (Section 4.4) ๐
the KD payload holds the keys for the policy included in the GSA ๐ if one or more Data-Security SAs are being refreshed in this rekey message, the IPsec keys get updated in the KD, and/or if the Rekey SA is being refreshed, the rekey Key or the LKH KEK array (like with LKH) gets updated in the KD payload ๐
a Delete payload MAY be included to tell the GM to delete existing SAs ๐๏ธ check out Section 4.6 for more detail ๐ซถ
the AUTH payload MUST be included to authenticate the GSA_REKEY message if the authentication method is based on public key signatures, and MUST NOT be included if authentication is implicit ๐ in the implicit case, a GM can decrypt the GSA_REKEY message and verify its Integrity Check Value (ICV), which proves the sender knows the current KEK, so the sender gets authenticated as a member of the group ๐ง but heads up: implicit authentication doesn't give you source origin authentication ๐ญ so using implicit authentication for GSA_REKEY is NOT RECOMMENDED unless source origin authentication isn't required (for example, in a small group of highly trusted GMs) โ ๏ธ more on authentication methods in Section 4.4.2.1.1 ๐
during GM registration, the GCKS sends the authentication key in the KD payload, in the AUTH_KEY attribute, which the GM uses to authenticate the key server ๐๏ธ before the current authentication key expires, the GCKS will send a new AUTH_KEY to the GMs in a GSA_REKEY message ๐ฆ the authentication key sent in the rekey message may not be the same one sent during GM registration ๐ธ if implicit authentication is used, then AUTH_KEY MUST NOT be sent to GMs ๐ โโ๏ธ
2.4.1.1. GSA_REKEY Message Authentication โจ
okay so the content of the AUTH payload generally depends on the authentication method from the Group Controller Authentication Method (GCAUTH) transform (Section 4.4.2.1.1) ๐ this spec only defines one authentication method, Digital Signature, and the AUTH payload holds a digital signature calculated over the content of the not-yet-encrypted GSA_REKEY message โ๏ธ
the digital signing is applied to the concatenation of two chunks: A and P ๐งฉ chunk A starts with the first octet of the G-IKEv2 header (not counting the four octets of zeros prepended if port 4500 is used) and runs through the last octet of the Encrypted Payload header ๐ chunk P is the not-yet-encrypted content of the Encrypted payload, excluding the Initialization Vector, the Padding, the Pad Length, and the Integrity Checksum Data fields (see Section 3.14 of [RFC7296] for the Encrypted payload description) ๐ basically chunk P is the inner payloads in plaintext form ๐ Figure 10 shows the layout of chunks P and A in the GSA_REKEY message ๐
before the AUTH payload gets calculated, the inner payloads of the Encrypted payload must be fully formed and ready for encryption, except for the content of the AUTH payload ๐ง the AUTH payload MUST have correct values in the Payload header, the Auth Method, and the RESERVED fields ๐ the Authentication Data field is zeroed, but the ASN.1 Length and the AlgorithmIdentifier fields must be properly filled in (see Signature Authentication in [RFC7427]) ๐
for the AUTH payload calculation, the Length field in the IKE header and the Payload Length field in the Encrypted Payload header are adjusted so they don't count the lengths of the Initialization Vector, Integrity Checksum Data, and Padding (along with the Pad Length field) ๐ซง so the Length field in the IKE header (AdjustedLen in Figure 10) gets set to the sum of the lengths of A and P, and the Payload Length field in the Encrypted Payload header (AdjustedPldLen in Figure 10) gets set to the length of P plus the size of the Payload header (four octets) ๐ซ
the input to the digital signature algorithm that computes the AUTH payload content can be described like this:
DataToAuthenticate = A | P
GsaRekeyMessage = GenIKEHDR | EncPayload
GenIKEHDR = [ four octets 0 if using port 4500 ] | AdjustedIKEHDR
AdjustedIKEHDR = SPIi | SPIr | . . . | AdjustedLen
EncPayload = AdjustedEncPldHdr | IV | InnerPlds | Pad | PadLen | ICV
AdjustedEncPldHdr = NextPld | C | RESERVED | AdjustedPldLen
A = AdjustedIKEHDR | AdjustedEncPldHdr
P = InnerPlds
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ^ ^
| IKE SA Initiator's SPI | | |
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ I |
| IKE SA Responder's SPI | K |
| | E |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| Next Payload | MjVer | MnVer | Exchange Type | Flags | h A
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ d |
| Message ID | r |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
| AdjustedLen | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ x |
| Next Payload |C| RESERVED | AdjustedPldLen | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | v
| | |
~ Initialization Vector ~ E
| | n
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ c ^
| | r |
~ Inner Payloads (not yet encrypted) ~ P
| | P |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ l v
~ Padding (0-255 octets) | Pad Length | d
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| | |
~ Integrity Checksum Data ~ |
| | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ v
Figure 10: Data to Authenticate in the GSA_REKEY Messages
the authentication data gets calculated using the authentication algorithm from the Group Controller Authentication Method transform (Section 4.4.2.1.1) and the current authentication key given in the AUTH_KEY attribute (Section 4.5.3.2) ๐ then the calculated authentication data goes into the AUTH payload, the Length fields in the IKE header and the Encryption Payload header get restored, the content of the Encrypted payload is encrypted, and the ICV is computed using the current KEK ๐ slay ๐
2.4.1.2. IKE Fragmentation โจ
Okay so, IKEv2 fragmentation [RFC7383] can be used to chop up big GSA_REKEY messages ๐งฉ, BUT there's a catch bestie. When the GSA_REKEY message goes out as an IP multicast packet, the GMs don't really send anything back ๐. That causes a few things, and they're kind of a big deal ๐
- Policy about IKE fragmentation is implicit. If a GCKS sees that every GM has negotiated support for IKE fragmentation in IKE_SA_INIT, then it MAY use IKE fragmentation on big GSA_REKEY messages ๐.
- The GCKS has to ALWAYS fragment based on a preconfigured threshold. It can't just send unfragmented messages and wait to see if anyone complains, because nobody responds ๐ญ. Section 2.5.1 of [RFC7383] has recommendations for picking that threshold ๐ธ.
- PMTU can't be used. The Path MTU (PMTU) mechanism, defined in Section 2.5.2 of [RFC7383], is a no-go here because there are no GSA_REKEY response messages to work with ๐ .
Now, the authentication data calculation MUST be applied to whole messages only, and that happens before any IKE Fragmentation ๐. If a message came in fragmented, it SHOULD be put back together before its authenticity gets checked, just like it arrived unfragmented โจ. The RESERVED field in the rebuilt Encrypted Payload header MUST be set to the value of the RESERVED field in the Encrypted Fragment payload header from the first fragment (the one with Fragment Number equal to 1) ๐ฆ.
2.4.1.3. GSA_REKEY GCKS Operations ๐
The GCKS builds the rekey message with a Message ID that is one greater than the one in the previous rekey message ๐ข. The first message sent over a new Rekey SA MUST use a Message ID of 0 ๐. The GSA, KD, and N payloads follow, with the same characteristics as in the GSA Registration exchange ๐. The AUTH payload (if present) is created as defined in Section 2.4.1.1 ๐ซถ.
Here's the tea: GSA_REKEY messages are never acknowledged, and the network could totally drop them ๐ฌ. So some GMs might miss the new policy entirely ๐. To help with that, during a rekey event the GCKS MAY send several copies of an encrypted GSA_REKEY message with the new policy ๐. The retransmitted copies MUST be bitwise identical, and they SHOULD go out within a short time window (a few seconds) ๐ง. That keeps the SA lifetime math from getting messed up for GMs who would otherwise receive different copies โฑ๏ธ.
The GCKS MAY also include one or several GSA_NEXT_SPI attributes, which specify SPIs for the upcoming rekeys ๐ฎ. That way listening GMs can notice when a rekey message got lost and recover from it ๐. See Section 4.4.2.2.3 for more detail ๐.
2.4.1.4. GSA_REKEY GM Operations ๐
When a GM gets the rekey message from the GCKS, it decrypts it and checks its integrity using the current KEK ๐. If the AUTH payload is in the decrypted message, the GM validates authenticity using the key it got in an earlier G-IKEv2 exchange โ . Then it checks the Message ID and processes the GSA and KD payloads ๐ . After that, it installs the new Data-Security SA(s) and/or a new Rekey SA ๐ฆ. Parsing the payloads is identical to what happens in the registration exchange, so no new drama there ๐ธ.
Replay protection works like this: a GM REJECTS any GSA_REKEY message whose Message ID is smaller than the current Message ID it's expecting ๐ซ. For the first GSA_REKEY message it gets, the GM expects a Message ID equal to or greater than the one it received in the GSA_INITIAL_MESSAGE_ID attribute ๐. If the GSA_INITIAL_MESSAGE_ID attribute wasn't received for the Rekey SA, the GM MUST assume zero as the first expected Message ID ๐ข. For later GSA_REKEY messages, the GM expects a Message ID greater than the last valid GSA_REKEY message ID it received ๐.
This spec assumes that GSA_REKEY messages go out at intervals way bigger than normal network packet reordering intervals ๐.
If the GSA payload includes a Data-Security SA using a counter-mode cipher, and the receiving GM is a sender for that SA, the GM uses its current Sender-ID value with the Data-Security SAs to build counter-mode nonces ๐. If it's a sender and doesn't have a current Sender-ID value (for example, when no counter-mode is used for other Data-Security SAs), it MUST NOT install the Data-Security SAs ๐ โโ๏ธ. It MUST start a re-registration with the GCKS to get a Sender-ID value (along with the current group policy) ๐.
Once a new Rekey SA is installed because of a GSA_REKEY message, the current Rekey SA (the one the message came in on) MUST be silently deleted after waiting the DEACTIVATION_TIME_DELAY interval, no matter when it would have expired โณ. If the message has a Delete payload for an existing Data-Security SA, then after installing the new Data-Security SA, the old one (identified by the Protocol and SPI fields in the Delete payload) MUST be silently deleted after waiting the DEACTIVATION_TIME_DELAY interval, regardless of its expiration time ๐๏ธ.
If a Data-Security SA hasn't been rekeyed yet and is about to expire (a "soft lifetime" expiration, described in Section 4.4.2.1 of [RFC4301]), the GM SHOULD start a registration with the GCKS ๐. That registration acts as a request for current SAs and will download replacement SAs, assuming the GCKS policy created them ๐. A GM SHOULD also start a registration request if a Rekey SA is about to expire and hasn't been replaced yet โฐ.
2.4.2. GSA_INBAND_REKEY Exchange ๐
When the IKE SA protecting the member registration exchange is still up while a GM is in the group, the GCKS can use the GSA_INBAND_REKEY exchange to send policy updates to that GM one-on-one ๐ซถ.
GM (Responder) GCKS (Initiator)
---------------- ------------------
<-- HDR, SK{GSA, KD, [N]}
HDR, SK{} -->
Figure 11: GSA_INBAND_REKEY Exchange
Since this is a normal IKEv2 exchange, the HDR is treated as defined in IKEv2 [RFC7296] ๐.
2.4.2.1. GSA_INBAND_REKEY GCKS Operations ๐ ๏ธ
The GSA, KD, and N payloads are built the same way as in a registration exchange ๐ .
2.4.2.2. GSA_INBAND_REKEY GM Operations ๐ง
The GM processes the GSA, KD, and N payloads the same way it would if they came in a registration exchange ๐ธ.
2.4.3. Deletion of SAs ๐๏ธ
Sometimes the GCKS wants to tell GMs to delete policy, like when the application sending data traffic is done or when group policy has changed ๐. Deleting SAs is done by sending the Delete Payload described in Section 3.11 of [RFC7296] as part of the GSA_REKEY pseudo-exchange, like this ๐.
GMs (Receivers) GCKS (Sender)
---------------- ---------------
<-- HDR, SK{D, [N,] [AUTH]}
Figure 12: SA Deletion in GSA_REKEY
If the GCKS has a unicast SA with a GM, it can use the GSA_INBAND_REKEY exchange to delete SAs ๐.
GM (Responder) GCKS (Initiator)
--------------- ------------------
<-- HDR, SK{D, [N]}
HDR, SK{} -->
Figure 13: SA Deletion in GSA_INBAND_REKEY
Sometimes the GCKS wants to start over with a clean slate, for example if it runs out of available Sender-IDs ๐งน. It can signal deletion of ALL the Data-Security SAs by sending a Delete payload with an SPI value of zero ๐ฅ. So if the GCKS wants to remove the Rekey SA and all the Data-Security SAs, it sends a Delete payload with an SPI of zero and a Protocol ID of AH or ESP, followed by another Delete payload with an SPI of zero and a Protocol ID of GIKE_UPDATE ๐ซฃ.
If a GM gets a Delete payload with zero SPI and a Protocol ID of GIKE_UPDATE, that means the GM has been excluded from the group ๐ฑ. That Delete payload can show up in either the GSA_REKEY pseudo-exchange or the GSA_INBAND_REKEY exchange ๐ โโ๏ธ. In this situation the GM MUST re-register if it wants to keep participating in the group ๐. The registration works as described in Section 2.3 ๐. It is RECOMMENDED that a GM waits a randomly chosen amount of time before starting a registration request in this situation, so the GCKS doesn't get overloaded ๐. This document doesn't specify the maximum delay (it's implementation-dependent), but it's believed that a delay on the order of seconds suits most situations โณ. If the unicast SA between the GM and the GCKS exists, the GM may use the GSA_REGISTRATION exchange to re-register ๐. However, after excluding a GM from the group, the GCKS MAY immediately delete the unicast SA with that GM (if there is one) if that GM's credentials have been revoked ๐ซ.
2.5. Counter-Based Modes of Operation ๐ข
Several counter-based modes of operation have been specified for ESP (e.g., AES-CTR [RFC3686], AES-GCM [RFC4106], AES-CCM [RFC4309], ChaCha20-Poly1305 [RFC7634], and AES-GMAC [RFC4543]) and for AH (e.g., AES-GMAC [RFC4543]) ๐. These counter-based modes require that no two senders in the group EVER send a packet with the same IV using the same cipher key and mode ๐ณ. This requirement is met in G-IKEv2 when the following measures are taken ๐ซถ:
- The GCKS distributes a unique key for each Data-Security SA. ๐
- The GCKS uses the method described in [RFC6054], which gives each sender a portion of the IV space by provisioning each sender with one or more unique Sender-ID values. ๐ฆ
2.5.1. Allocation of Sender-ID ๐ฆ
When at least one Data-Security SA included in the group policy includes a counter-based mode of operation, the GCKS automatically allocates and distributes one Sender-ID to each GM acting in the role of sender on the Data-Security SA. ๐ The Sender-ID value is used exclusively by the group sender to which it was allocated. The group sender uses the same Sender-ID for each Data-Security SA specifying the use of a counter-based mode of operation. A GCKS MUST distribute unique keys for each Data-Security SA, including a counter-based mode of operation in order to maintain unique key and nonce usage. โจ Okay, that last bit is literally the whole point, bestie ๐ฅ
During registration, the group sender can choose to request one or more Sender-ID values. Requesting a value of 1 is not necessary since the GCKS will automatically allocate exactly one to the group sender. ๐ A group sender MUST request as many Sender-ID values matching the number of encryption modules in which it will be installing the TEKs in the outbound direction. Alternatively, a group sender MAY request more than one Sender-ID and use them serially. This could be useful when it is anticipated that the group sender will exhaust their range of Data-Security SA nonces using a single Sender-ID too quickly (e.g., before the time-based policy in the TEK expires). ๐ธ Basically, if your nonces are gonna run out before your TEK expires, grab extra IDs. Lowkey smart.
When the group policy includes a counter-based mode of operation, a GCKS should use the following method to allocate Sender-ID values, which ensures that each Sender-ID will be allocated to just one group sender. ๐ง
- A GCKS maintains a Sender-ID counter, which records the Sender-IDs that have been allocated. Sender-IDs are allocated sequentially with zero as the first allocated value.
- Each time a Sender-ID is allocated, the current value of the counter is saved and allocated to the group sender. The Sender-ID counter is then incremented in preparation for the next allocation.
- When the GCKS specifies a counter-based mode of operation in the Data-Security SA, a group sender may request a count of Sender-IDs during registration in a Notify payload information of type SENDER. When the GCKS receives this request, it increments the Sender-ID counter once for each requested Sender-ID and distributes each Sender-ID value to the group sender. The GCKS should have a policy-defined upper bound for the number of Sender-ID values that it will return irrespective of the number requested by the GM. ๐ So the server gets to cap it, no matter how greedy the GM is. Iconic.
- A GCKS allocates new Sender-ID values for each registration operation by a group sender, regardless of whether the group sender had previously contacted the GCKS. In this way, the GCKS is not required to maintain a record of which Sender-ID values it had previously allocated to each group sender. More importantly, since the GCKS cannot reliably detect whether the group sender had sent data on the current group Data-Security SAs, it does not know what Data-Security counter-mode nonce values that a group sender has used. By distributing new Sender-ID values, the key server ensures that each time a conforming group sender installs a Data-Security SA, it will use a unique set of counter-based mode nonces. ๐ซถ The vibe: new registration, new ID, fresh nonces. No drama.
- When the Sender-ID counter maintained by the GCKS reaches its final Sender-ID value, no more Sender-ID values can be distributed. Before distributing any new Sender-ID values, the GCKS MUST exclude all GMs from the group as described in Section 2.4.3. This will result in the GMs performing re-registration, during which they will receive new Data-Security SAs and group senders will additionally receive new Sender-ID values. The new Sender-ID values can safely be used because they are only used with the new Data-Security SAs. ๐ญ The GCKS has to kick everyone out to reset the whole thing. Big energy, but it's safe ๐
2.5.2. GM Usage of Sender-ID ๐
A GM applies the Sender-ID to Data-Security SAs as follows:
- The most significant bits of the IV indicated in the GWP_SENDER_ID_BITS attribute (Section 4.4.3.1.2) are taken to be the Sender-ID field of the IV.
- The Sender-ID is placed in the least significant bits of the Sender-ID field, where any unused most significant bits are set to zero. If the Sender-ID value doesn't fit into the number of bits from the GWP_SENDER_ID_BITS attributes, then the GM MUST treat this as a fatal error and re-register to the group. ๐ Not fitting = fatal, no cap.
2.6. Replay Protection for Multicast Data-Security SAs ๐
IPsec provides anti-replay service as part of its security services. With multicast extensions for IPsec, replay protection is not always possible to achieve (see Section 6.1 of [RFC3740]). In particular, if there are many group senders for a Data-Security SA, then each of them will independently increment the Sequence Number field in the ESP header (see Section 2.2 of [RFC4303] and Section 2.5 of [RFC4302]), thus making it impossible for the group receivers to filter out replayed packets. However, if there is only one group sender for a Data-Security SA, then it is possible to achieve replay protection with some restrictions (see Section 4.4.2.1.3). The GCKS MAY create several Data-Security SAs with the same traffic selectors allowing only a single group sender in each SA if it is desirable to get replay protection with multiple (but still a limited number) of group senders. โญ
IPsec architecture assumes that whether anti-replay service is enabled or not is a local matter for an IPsec receiver. In other words, an IPsec sender always increments the Sequence Number field in the ESP/AH header and a receiver decides whether to check for replayed packets or not. Since it is known in some cases that the replay protection is not possible (like in an SA with many group senders), a new Transform ID "32-bit Unspecified Numbers" is defined for the Sequence Numbers (SNs) Transform Type. Using this Transform ID, the GCKS can inform GMs that the uniqueness of sequence numbers for a given SA is not guaranteed. The decision of whether to enable anti-replay service is still a local matter of a GM (in accordance with IPsec architecture). ๐
The GCKS MUST include the Sequence Numbers transform in the GSA payload for every Data-Security SA. See Section 4.4.2.1.3 for more details.
When a Data-Security SA has a single sender, the GCKS MUST be configured to rekey the SA frequently enough so that the 32-bit sequence numbers do not wrap. ๐
2.7. Encryption Transforms with Implicit IV ๐ฆ
The "Transform Type 1 - Encryption Algorithm Transform IDs" IANA registry [IKEV2-IANA] defines several transforms with implicit IV. These transforms rely on ESP Sequence Numbers for constructing IV (see [RFC8750] for details). It requires anti-replay service to be enabled for an ESP SA using these encryption transforms. Unless the properties of sequence numbers for a multicast ESP SA include their uniqueness (see Section 2.6), encryption transforms that rely on Sequence Numbers for IV construction MUST NOT be used. In any case, such transforms MUST NOT be used for any G-IKEv2 SA (both unicast and multicast). ๐ โโ๏ธ
Two MUST NOTs in one paragraph, so this is a hard no. Don't even think about it ๐ค
3. Group Key Management and Access Control ๐
Through the G-IKEv2 rekey, G-IKEv2 supports algorithms such as Logical Key Hierarchy (LKH) that have the property of denying access to a new group key by a member removed from the group (forward access control) and to an old group key by a member added to the group (backward access control). This is unrelated to the Perfect Forward Secrecy (PFS) property as defined in Section 2.12 of [RFC7296]. ๐ Different thing, don't mix them up!
Group management algorithms providing forward and backward access control other than LKH have also been proposed, for example, OFT [OFT] and Subset Difference [NNL]. These algorithms could be used with G-IKEv2 but are not specified as a part of this document. ๐ธ
This specification assumes that all group keys, that are sent to the GMs by the GCKS, are encrypted with some other keys, called Key Wrap Keys (KWKs). The Key Wrap Algorithm transform defines the algorithm used for key wrapping in the context of an SA. ๐
3.1. Key Wrap Keys ๐
Every GM always knows at least one KWK -- the KWK that is associated with the IKE SA or multicast Rekey SA over which wrapped keys are sent. In this document, it is called default KWK and is denoted as "GSK_w". ๐ง
For the purpose of forward access control, the GCKS may provide each GM with its personal KWK at the time of registration. Additionally, several intermediate KWKs that form a key hierarchy and are shared among several GMs may be provided by the GCKS. โจ
Each KWK is associated with a key wrap algorithm specified in the Key Wrap Algorithm transform. The size of these KWKs is determined by the key wrap algorithm used, but it SHOULD NOT be less than the size of the key for the Encryption Algorithm transform for the Rekey SA and for all Data-Security SAs in the group (taking the Key Length attribute into consideration if it is present). ๐ Don't go smaller than the keys they're protecting, okay?
3.1.1. Default Key Wrap Key ๐ท
The default KWK (GSK_w) is only used in the context of a single IKE SA. Every IKE SA (unicast IKE SA or multicast Rekey SA) will have its own GSK_w. ๐
For the unicast IKE SA (used for the GM registration and for GSA_INBAND_REKEY exchanges if they appear), the GSK_w is computed as follows:
GSK_w = prf+(SK_d, "Key Wrap for G-IKEv2")
where the string "Key Wrap for G-IKEv2" is 20 ASCII characters without null termination. ๐ข
For the multicast Rekey SA, the GSK_w is provided along with other SA keys as defined in Section 3.4. ๐
3.2. GCKS Key Management Semantics ๐
The Wrapped Key Download method allows the GCKS to employ various key management methods. ๐
- A simple key management method: The GCKS always sends group SA keys encrypted with the GSK_w.
- An LKH key management method: The GCKS provides each GM with an individual key at the time of the GM registration (encrypted with GSK_w). Then, the GCKS forms a hierarchy of keys so that the group SA keys are encrypted with other keys that are encrypted with other keys and so on, tracing back to the keys for each GM. ๐ณ
- Other key policies may also be employed by the GCKS. ๐ฆ
3.2.1. Forward Access Control Requirements โจ
Okay so, when group membership changes through a group management algorithm, you usually also need new Data-Security SAs and their keys ๐. Fresh SAs and keys are what make sure members who got denied access can't keep participating in the group ๐ซ.
If forward access control is something the group wants, then a new TEK policy and its associated keys MUST NOT be included in a G-IKEv2 rekey message that changes group membership ๐ โโ๏ธ. The reason is that the GSA TEK policy and its keys aren't protected with the new KEK. A second G-IKEv2 rekey message can deliver the new GSA TEK policies and their keys, though ๐ . It's protected with the new KEK, so the members who were denied access won't be able to see it at all ๐.
If the group's forward access control policy includes keeping group policy changes away from denied members, then the GCKS MUST send two sequential G-IKEv2 rekey messages that change the group KEK ๐. The first one makes a brand-new KEK for the group. Denied GMs can't get into that new KEK, but they can still see the group policy, because that message is protected under the current KEK ๐ฌ. The next rekey message carries the changed group policy and changes the KEK again, and that's what gives you complete forward access control ๐. Oh, and a G-IKEv2 rekey message MUST NOT change the policy without creating a new KEK. Non-negotiable ๐.
If other LKH methods or other group management algorithms get added to G-IKEv2, those methods MAY drop the restrictions above that require multiple rekey messages ๐ฆ. They just have to spell out how the forward access control policy stays maintained within a single G-IKEv2 rekey message ๐ง.
3.3. GM Key Management Semantics
The GM Key Management semantics are written so they don't depend on which key management method the GCKS uses ๐ง . All the complicated key stuff lives in the GCKS, which is free to do things like sending group SA keys directly or using some kind of key hierarchy (e.g., LKH) ๐ณ. The GM behaves the same way no matter which of these policies is in play ๐.
All keys in G-IKEv2 are sent in encrypted form, as described in Section 4.5.4 ๐. That format has a 32-bit Key ID (the ID of the key being encrypted) and a 32-bit KWK ID (the ID of the key that was used to encrypt it) โจ. Keys can be encrypted with the default KWK (GSK_w) or with other keys that the GM got in the WRAP_KEY attributes ๐. If a key was encrypted with GSK_w, the KWK ID field is set to zero. Otherwise, the KWK ID field tells you which key was used for the encryption ๐๏ธ. A zero Key ID always identifies the key that the keys for protecting Data-Security SAs and Rekey SA are taken from ๐.
When a GM gets a message from the GCKS that installs a new Data-Security or Rekey SA, it has a KD payload with an SA_KEY attribute holding the keying material for that SA ๐ฆ. For a Data-Security SA, there's exactly one SA_KEY attribute, and both its Key ID and KWK ID fields are set to zero. So the default KWK (GSK_w) should be used to pull out this keying material ๐ซถ.
For a multicast Rekey SA, there might be multiple SA_KEY attributes, depending on the key management method the GCKS is using ๐. If there are multiple SA_KEY attributes, then all of them MUST contain the same keying material, just encrypted with different KWKs ๐. The GM doesn't usually know which key management method the GCKS picked, so it can always follow the same procedure to get the keys ๐. The GM tries to decrypt at least one SA_KEY attribute using either GSK_w or the keys from the WRAP_KEY attributes that are in the same message or came in earlier messages ๐.
We'll use the term "Key Path" for an ordered sequence of keys where each key after the first was used to encrypt the one before it ๐งฉ. The GM keeps its own Key Path (called Working Key Path) in the memory tied to each group it's registered to, and it updates that path when needed ๐พ. When a GSA_REKEY message arrives, the GM goes through the received SA_KEY attributes one at a time and tries to build a new key path. That path starts at one of these attributes and ends with any key in the Working Key Path or with the default KWK (GSK_w) ๐ค๏ธ.
In the simplest case, the SA_KEY attribute is encrypted with GSK_w, so the new Key Path is empty ๐. With fancier key management methods, a Key Path holds intermediate keys from the WRAP_KEY attributes the GM has received so far, starting from when it registered to the group ๐ช. If the GM can build a new Key Path using the intermediate keys it has, then it can decrypt the SA_KEY attribute and use what's inside to make new SA keys ๐ฅณ. If it can't build a new Key Path, that means the GM has been excluded from the group ๐ช.
Depending on the new Key Path, the GM should take these steps to get ready for future key updates ๐ธ:
- If the new Key Path is empty, then no actions are needed. This can happen if no
WRAP_KEYattributes from the received message were used. - If the new Key Path is non-empty and it ends with the default KWK (
GSK_w), then the GM stores the whole new Key Path as its Working Key Path. This only happens when the GM is registering to the group, because that's when the GCKS hands over the GM's personal key and the other keys from the key tree it needs. Those keys make up the GM's first Working Key Path ๐. - In all other cases, the new Key Path ends at some intermediate key from the GM's current Working Key Path. Here, the new Key Path is built by replacing part of the GM's current Working Key Path, starting from the beginning and going up to (but not including) the key the GM used to decrypt the last key in the new Key Path ๐.
Appendix A has an example of how this algorithm works with the LKH key management method ๐.
3.4. SA Keys
The keys used for Data-Security SAs or a Rekey SA (called SA keys here) get downloaded to GMs as keying material ๐ฅ. From that material, a set of keys is deterministically extracted, according to policy ๐ฏ.
For a Data-Security SA, the keys are taken according to the third bullet in Section 2.17 of [RFC7296] ๐. Specifically, for the ESP and AH SAs, the encryption key (if there is one) MUST be taken from the leftmost bits of the keying material, and the integrity key (if there is one) MUST be taken from the remaining bits ๐ช.
For a Rekey SA, these keys are taken from the keying material ๐:
GSK_e | GSK_a | GSK_w = KEYMAT
Here, GSK_e and GSK_a are the keys used for the Encryption Algorithm and Integrity Algorithm transforms, respectively, for the corresponding SA, and GSK_w is a default KWK for this SA ๐. Note that GSK_w gets used with the key wrap algorithm specified in the Key Wrap Algorithm transform ๐. If an AEAD algorithm is used for encryption, then GSK_a won't be used at all. (A GM can use the formula above, assuming the length of GSK_a is zero) ๐.
4. Header and Payload Formats โจ
G-IKEv2 is an IKEv2 extension, so it inherits IKEv2's wire format for data structures ๐ง. The processing of some payloads is different, though. Several new payloads are defined: Group Identification (IDg) (Section 4.2), Security Association - GM Supported Transforms (SAg) (Section 4.3), Group Security Association (GSA) (Section 4.4), and Key Download (KD) (Section 4.5) ๐ท. The G-IKEv2 header (Section 4.1), the IDg payload, and the SAg payload reuse the IKEv2 formats for the IKEv2 header, the IDi/IDr payloads, and the SA payload, respectively ๐. New exchange types GSA_AUTH, GSA_REGISTRATION, GSA_REKEY, and GSA_INBAND_REKEY get added too ๐.
This section covers the new payloads and how existing IKEv2 payloads are processed differently ๐ฆ.
4.1. G-IKEv2 Header
G-IKEv2 uses the same IKE header format as specified in Section 3.1 of [RFC7296] ๐. The Major Version is 2 and the Minor Version is 0, same as IKEv2. The IKE SA Initiator's SPI, IKE SA Responder's SPI, Flags, Message ID, and Length are all as specified in [RFC7296] โ .
4.2. Group Identification Payload
The Group Identification (IDg) payload lets the GM say which group it wants to join ๐ซง. It's built using the IKEv2 Identification Payload (Section 3.5 of [RFC7296]) ๐งธ. The ID type ID_KEY_ID MUST be supported ๐. The ID types ID_IPV4_ADDR, ID_FQDN, ID_RFC822_ADDR, and ID_IPV6_ADDR SHOULD be supported ๐. The ID types ID_DER_ASN1_DN and ID_DER_ASN1_GN aren't expected to be used ๐
โโ๏ธ. The Payload Type for the IDg payload is fifty (50) ๐ข.
4.3. Security Association - GM Supported Transforms Payload
The Security Association - GM Supported Transforms (SAg) payload declares which Transforms a GM is willing to accept ๐ . It's built using the format of the IKEv2 Security Association payload (Section 3.3 of [RFC7296]) ๐งฉ. The Payload Type for SAg payloads is thirty-three (33), which is the same as the SA Payload Type ๐.
4.4. Group Security Association Payload
The GSA payload is how the GCKS asserts security attributes for both Rekey and Data-Security SAs ๐. The Payload Type for the GSA payload is fifty-one (51) ๐.
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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ <Group Policies> ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 14: GSA Payload Format
The GSA payload fields are defined like this ๐:
Next Payload,C,RESERVED, andPayload Lengthfields: These make up the IKEv2 generic payload header and are defined in Section 3.2 of [RFC7296] ๐งพ.Group Policies(variable): A set of group policies for the group ๐.
4.4.1. Group Policies โจ
okay so group policies come in two flavors ๐: group SA policy and group-wide (GW) policy. Group SA policy sets the parameters for the group's Security Association. Depending on the security protocol, that can be a Rekey SA (GSA KEK) policy or a Data-Security (GSA TEK) SA policy. A GSA payload can carry zero or one GSA KEK policy, zero or more GSA TEK policies, and zero or one GW policy. One thing is locked in: either one GSA KEK or one GSA TEK policy MUST be present. ๐
the flexibility here is so good ๐ฅน For example, if the group policy doesn't need a Rekey SA, the GCKS doesn't have to send a GSA KEK policy to the group member, because every SA update can go through the GSA_INBAND_REKEY exchange over the unicast IKE SA. Or the group policy might use a Rekey SA but only hand a KEK to the GM as part of the unicast IKE SA. In that case the GSA KEK policy isn't needed in the GSA_REKEY message. ๐
multiple GSA TEKs are giving multi-stream energy ๐. You can tie several related data streams (video, audio, and text) to one session, but each one still gets its own individual Security Association. ๐ฆ
a GW policy is where the group-wide rules live, like instructions for when to activate and deactivate SAs. ๐ธ
policies are shipped as substructures inside the GSA payload. The group SA substructure format is in Section 4.4.2, and the GW policy format is in Section 4.4.3. The first octet of a substructure tells you exactly what type it is: it's zero for GW policy, and non-zero (technically it holds a Security Protocol Identifier) for group SA policies. no confusion, no drama โจ
4.4.2. Group Security Association Policy Substructure
this substructure holds the parameters for one SA used with this group ๐ง. Depending on the security protocol, that SA is either a Rekey SA or a Data-Security SA (ESP and AH). The GCKS MUST NOT distribute both ESP and AH policies for the same set of Traffic Selectors. ๐ซ absolutely not, bestie ๐
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Protocol | SPI Size | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ SPI ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Source Traffic Selector ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Destination Traffic Selector ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ <Group SA Transforms> ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ <Group SA Attributes> ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 15: Group SA Policy Substructure Format
here's the rundown on each field ๐ซถ
Protocol(1 octet): says which security protocol this group SA belongs to. The values come from the "IKEv2 Security Protocol Identifiers" registry in [IKEV2-IANA]. The valid values are 6 (GIKE_UPDATE) for a Rekey SA, and 2 (AH) or 3 (ESP) for Data-Security SAs. โจSPI Size(1 octet): the size of the SPI for the SA, which depends on the SA protocol. It's 16 octets for GIKE_UPDATE and 4 octets for AH and ESP. ๐ขLength(2 octets, unsigned integer): the length of this substructure, header included. ๐SPI(variable): the Security Parameter Index for the group SA. Its size is set by the SPI Size field. As mentioned above, the GCKS assigns these. For GIKE_UPDATE, the SPI is the IKEv2 header SPI pair. The first 8 octets become the "IKE SA Initiator's SPI" field in the G-IKEv2 rekey message IKEv2 HDR, and the second 8 octets become the "IKE SA Responder's SPI" in that same HDR. ๐ฆSource & Destination Traffic Selectors(variable): substructures describing the source and destination of the network identities. Their format is defined in IKEv2 (Section 3.13.1 of [RFC7296]). ๐ฏ- For the Rekey SA (with the GIKE_UPDATE protocol), the destination traffic selectors MUST define a single multicast IP address, an IP protocol (assumed to be UDP), and a single port that the GSA_REKEY messages will be destined to. In this case, the source traffic selector SHOULD define a single IP address, an IP protocol (assumed to be UDP), and a single port that the GSA_REKEY messages will be originated from. The source traffic selector MAY define a wildcard IP address and/or wildcard port. ๐
- For the Data-Security (AH and ESP) SAs, the destination traffic selectors will usually define a single multicast IP address. The source traffic selector in this case will usually define a single IP address or be a wildcard selector. An IP protocol and ports define the characteristics of the traffic protected by this Data-Security SA. ๐
- If the Data-Security SAs are created in tunnel mode, then it MUST be tunnel mode with address preservation (see Multicast Extensions to the Security Architecture [RFC5374]. UDP encapsulation of ESP packets [RFC3948] cannot be specified in G-IKEv2, so it isn't used for the multicast Data-Security SAs. ๐ โโ๏ธ
Group SA Transforms(variable): a list of Transform Substructures that specifies the policy information for the SA. Their format is defined in IKEv2 (Section 3.3.2 of [RFC7296]). The "Last Substruc" field in each Transform Substructure is set to 3, except in the last one, where it's set to 0. Section 4.4.2.1 explains how to use IKEv2 transforms in the group SA policy substructure. ๐งฉGroup SA Attributes(variable): policy attributes tied to the group SA. The following sections describe the possible attributes. Any or all of them may be optional, depending on the protocol and the group policy. Section 4.4.2.2 defines the attributes used in the group SA policy substructure. ๐ฐ
4.4.2.1. Group SA Transforms
group SA policy is defined using transforms ๐ง. The transforms from [RFC7296] are used here. G-IKEv2 also adds two new Transform Types: Group Controller Authentication Method (GCAUTH) and Key Wrap Algorithm (KWA). See Section 9 for those. ๐
which Transform Types are valid depends on the SA protocol, and the table below sums it up. Exactly one instance of each mandatory Transform Type, and at most one instance of each optional Transform Type, MUST be present in the group SA policy substructure. Same energy as a perfectly planned outfit ๐
+=============+=============================+================+
| Protocol | Mandatory Types | Optional Types |
+=============+=============================+================+
| GIKE_UPDATE | ENCR, INTEG*, GCAUTH**, KWA | |
+-------------+-----------------------------+----------------+
| ESP | ENCR, SN | INTEG |
+-------------+-----------------------------+----------------+
| AH | INTEG, SN | |
+-------------+-----------------------------+----------------+
Table 2: Valid Transform Types
notes time ๐
(*): If the AEAD encryption algorithm is used, then the INTEG transform either MUST NOT be specified or MUST contain the value NONE. Otherwise, it MUST be specified and MUST contain a value other than NONE. โ ๏ธ(**): this one only shows up when a GM is registering, during the GSA_AUTH and GSA_REGISTRATION exchanges. ๐
4.4.2.1.1. Group Controller Authentication Method Transform ๐
okay so this transform is all about how the GCKS proves to the GMs that its GSA_REKEY messages are legit, bestie ๐ it's giving security checkpoint โจ
The Group Controller Authentication Method (GCAUTH) transform is used to convey information on how the GCKS will authenticate the GSA_REKEY messages. ๐ซถ
This document creates a new IKEv2 IANA registry for Transform IDs of this Transform Type, which has been initially populated as described in Section 9. In particular, the following entries have been added:
+=======+========================================+
| Value | Group Controller Authentication Method |
+=======+========================================+
| 0 | Reserved |
+-------+----------------------------------------+
| 1 | Implicit |
+-------+----------------------------------------+
| 2 | Digital Signature |
+-------+----------------------------------------+
Table 3: Group Controller Authentication Method Transform IDs ๐ธ
These Transform IDs are defined as follows:
Implicit ๐ฆ No authentication of the GSA_REKEY messages will be provided by the GCKS besides the ability for the GMs to correctly decrypt them and verify their ICV. In this case, the GCKS MUST NOT include the AUTH_KEY attribute into the KD payload. Additionally, the AUTH payload MUST NOT be included in the GIKE_UPDATE messages.
Digital Signature ๐ Digital signatures will be used by the GCKS to authenticate the GSA_REKEY messages. In this case, the GCKS MUST include the AUTH_KEY attribute containing the public key into the KD payload at the time the GM is registered to the group. To specify the details of the signature algorithm, a new attribute Signature Algorithm Identifier (value 18) is defined. This attribute contains DER-encoded ASN.1 object AlgorithmIdentifier, which specifies the signature algorithm and the hash function that the GCKS will use for authentication. The AlgorithmIdentifier object is defined in Section 4.1.1.2 of [RFC5280]. Also, see [RFC7427] for the list of common AlgorithmIdentifier values used in IKEv2. ๐ง
In the case of the Digital Signature Transform ID, the GCKS MUST include the Signature Algorithm Identifier attribute in the Group Controller Authentication Method transform. In this case, the AUTH payload in the GIKE_UPDATE messages MUST contain the Digital Signature authentication method (value 14) and be formatted as defined in Section 3 of [RFC7427]. The AlgorithmIdentifier ASN.1 object in the AUTH payload MUST match the content of the Signature Algorithm Identifier attribute in the Group Controller Authentication Method transform. The Signature Algorithm Identifier attribute is only meaningful for the Digital Signature Transform ID and MUST NOT be used with other Transform IDs. ๐
More authentication methods may be defined in the future. โจ
The authentication method MUST NOT change as a result of rekey operations. This means that the Group Controller Authentication Method transform MUST NOT appear in the rekey messages; it may only appear in the registration exchange (either GSA_AUTH or GSA_REGISTRATION). ๐
The type of the Group Controller Authentication Method transform is 14.
4.4.2.1.2. Key Wrap Algorithm Transform ๐
The Key Wrap Algorithm (KWA) transform is used to convey information about an algorithm that is used for key wrapping in G-IKEv2. See Section 4.5.4 for details. ๐ฆ
This document creates a new IKEv2 IANA registry for the key wrap algorithms, which has been initially populated as described in Section 9. In particular, the following entries have been added:
+=======+====================+
| Value | Key Wrap Algorithm |
+=======+====================+
| 0 | Reserved |
+-------+--------------------+
| 1 | KW_5649_128 |
+-------+--------------------+
| 2 | KW_5649_192 |
+-------+--------------------+
| 3 | KW_5649_256 |
+-------+--------------------+
| 4 | KW_ARX |
+-------+--------------------+
Table 4: Key Wrap Algorithm Transform IDs ๐
These algorithms are defined as follows:
KW_5649_128, KW_5649_192, KW_5649_256 ๐ The key wrap algorithm defined in [RFC5649] with a 128-bit, 192-bit, and 256-bit key, respectively. This key wrap algorithm is designed for use with AES block cipher.
KW_ARX ๐ธ The ARX-KW-8-2-4-GX key wrap algorithm defined in [ARX-KW]. This key wrap algorithm is designed for use with Chacha20 stream cipher.
More key wrap algorithms may be defined in the future. The requirement is that these algorithms must be able to wrap key material of size up to 256 bytes. โญ
The type of the Key Wrap Algorithm transform is 13. ๐ซถ
4.4.2.1.3. Sequence Numbers Transform ๐ฅ
The Sequence Numbers (SNs) Transform Type is defined in [RFC9827]. This transform describes the properties of sequence numbers of IPsec packets. There are currently two Transform IDs defined for this Transform Type: "32-bit Sequential Numbers" and "Partially Transmitted 64-bit Sequential Numbers" that correspond to non-ESN and ESN cases from AH [RFC4302] and ESP [RFC4303] specifications. ๐ง
Transform ID "32-bit Sequential Numbers" SHOULD be used by the GCKS for single-sender multicast Data-Security SAs utilizing protocols ESP or AH. ๐
Since both AH [RFC4302] and ESP [RFC4303] are defined in such a way that high-order 32 bits of extended sequence numbers are never transmitted, it makes using ESN in multicast Data-Security SAs problematic because GMs that join the group long after it is created will have to somehow learn the current high-order 32 bits of ESN for each sender in the group. The algorithm for doing this described in AH [RFC4302] and ESP [RFC4303] is resource-consuming and is only suitable when a receiver is able to guess the high-order 32 bits close enough to its real value, which is not the case for multicast SAs. For this reason, the "Partially Transmitted 64-bit Sequential Numbers" Transform ID MUST NOT be used for multicast Data-Security SAs utilizing protocols ESP or AH. ๐
This document defines a new Transform ID for this Transform Type: "32-bit Unspecified Numbers" (2). This Transform ID defines the following properties:
- Sequence numbers are 32 bits in size and are transmitted in the Sequence Number field of AH and ESP packets.
- The value of sequence numbers is not guaranteed to be unique for the duration of an SA, thus they are not suitable for replay protection.
This Transform ID MUST be used by the GCKS in case of multi-sender multicast Data-Security SAs utilizing protocols ESP or AH to inform the GMs that the replay protection is not expected to be possible. The GCKS MAY also use this Transform ID for single-sender multicast Data-Security SAs if replay protection is not needed (e.g., it is done on the application level). ๐ฆ
4.4.2.2. Group SA Attributes ๐ท
Group SA attributes are generally used to provide GMs with additional parameters for the group SA policy. Unlike security parameters distributed via transforms, which are expected not to change over time (unless the policy changes), the parameters distributed via group SA attributes may depend on the time the provision takes place, on the existence of other group SAs, or on other conditions. ๐
This document creates a new IKEv2 IANA registry for the types of group SA attributes, which has been initially populated as described in Section 9. In particular, the following attributes have been added:
+=====+========================+======+============+==============+
|Value| Group SA Attributes |Format|Multi-Valued| Used in |
| | | | | Protocol |
+=====+========================+======+============+==============+
|0 | Reserved | |
+-----+------------------------+------+------------+--------------+
|1 | GSA_KEY_LIFETIME |TLV |NO | GIKE_UPDATE, |
| | | | | AH, ESP |
+-----+------------------------+------+------------+--------------+
|2 | GSA_INITIAL_MESSAGE_ID |TLV |NO | GIKE_UPDATE |
+-----+------------------------+------+------------+--------------+
|3 | GSA_NEXT_SPI |TLV |YES | GIKE_UPDATE, |
| | | | | AH, ESP |
+-----+------------------------+------+------------+--------------+
Table 5: Group SA Attributes ๐
The attributes follow the format defined in IKEv2 (Section 3.3.5 of [RFC7296]). The "Format" column defines what attribute format is allowed: Type/Length/Value (TLV) or Type/Value (TV). The "Multi-Valued" column defines whether multiple instances of the attribute can appear. The "Used in Protocol" column lists the security protocols, for which the attribute can be used. โจ
4.4.2.2.1. GSA_KEY_LIFETIME Attribute โณ
The GSA_KEY_LIFETIME attribute (1) specifies the maximum time for which the SA is valid. The value is a 4-octet unsigned integer in network byte order, specifying a valid time period in seconds. When the lifetime expires, the group SA and all associated keys MUST be deleted. The GCKS may delete the SA at any time before the end of the validity period. ๐ฅ
A single attribute of this type MUST be included into any group SA policy substructure if multicast rekey is employed by the GCKS. This attribute SHOULD NOT be used if inband rekey (via the GSA_INBAND_REKEY exchange) is employed by the GCKS for the GM. ๐
4.4.2.2.2. GSA_INITIAL_MESSAGE_ID Attribute ๐ง
The GSA_INITIAL_MESSAGE_ID attribute (2) defines the initial Message ID to be used by the GCKS in the GSA_REKEY messages. The Message ID is a 4-octet unsigned integer in network byte order. ๐
A single attribute of this type is included into the GSA KEK policy substructure if the initial Message ID of the Rekey SA is non-zero. Note that it is always true if a GM joins the group after some multicast rekey operations have already taken place in this group. In this case, this attribute will be included into the group SA policy when the GM is registered. ๐ธ
This attribute MUST NOT be used if inband rekey (via the GSA_INBAND_REKEY exchange) is employed by the GCKS for the GM. ๐
4.4.2.2.3. GSA_NEXT_SPI Attribute ๐ฆ
okay so the optional GSA_NEXT_SPI attribute (3) carries the SPI that the GCKS reserved for the next Rekey SA or Data-Security SAs that will replace the current ones ๐ฎ. The length of the attribute data comes from the SPI Size field in the group SA policy substructure this attribute lives in (see Section 4.4.2), and the attribute data holds the SPI exactly as it would appear on the network ๐ธ. Multiple attributes of this type MAY be included, which means any of the supplied SPIs can be used in the replacement group SA ๐.
The GM MAY store these values. Later on, if the GM starts getting messages with one of these SPIs without having seen a rekey message over the current Rekey SA, then that can be a sign the rekey message got lost on its way to this GM ๐. In that case, the GM SHOULD re-register to the group ๐.
Note that this way of spotting lost rekey messages can only be used by group receivers ๐ง. There's also no point in including this attribute in GSA_INBAND_REKEY messages, since those use reliable transport โจ. Also, the GCKS is totally free to forget its promises and not use the SPIs it sent in earlier GSA_NEXT_SPI attributes (like if the GCKS gets rebooted ๐), so the GM must only treat this information as a "best effort" made by the GCKS to prepare for future rekeys ๐ซถ.
This attribute MUST NOT be used if inband rekey (via the GSA_INBAND_REKEY exchange) is employed by the GCKS for the GM ๐ซ.
4.4.3. Group-Wide Policy Substructure ๐
Group-specific policy that doesn't belong to any SA policy can be distributed to all GMs using the GW policy substructure ๐ฃ.
The GW policy substructure is defined as follows:
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Protocol | RESERVED | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ <GW Policy Attributes> ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 16: GW Policy Substructure Format
The GW policy substructure fields are defined as follows:
Protocol (1 octet): MUST be zero 0๏ธโฃ. This value is reserved (see Section 9) and is never used for any security protocol, so it's used here to show that this substructure contains policy that isn't related to any specific protocol ๐ง.
RESERVED (1 octet): MUST be zero on transmission and MUST be ignored on receipt ๐.
Length (2 octets, unsigned integer): Length of this substructure, including the header ๐.
GW Policy Attributes (variable): Contains policy attributes associated with no specific SA. The following sections describe possible attributes. Any or all attributes may be optional depending on the group policy ๐ .
4.4.3.1. GW Policy Attributes ๐
This document creates a new IKEv2 IANA registry for the types of group-wide policy attributes, which has been initially populated as described in Section 9. In particular, the following attributes have been added ๐:
+=======+======================+========+==============+
| Value | GW Policy Attributes | Format | Multi-Valued |
+=======+======================+========+==============+
| 0 | Reserved | |
+-------+----------------------+--------+--------------+
| 1 | GWP_ATD | TV | NO |
+-------+----------------------+--------+--------------+
| 2 | GWP_DTD | TV | NO |
+-------+----------------------+--------+--------------+
| 3 | GWP_SENDER_ID_BITS | TV | NO |
+-------+----------------------+--------+--------------+
Table 6: GW Policy Attributes
The attributes follow the format defined in the IKEv2 (Section 3.3.5 of [RFC7296]) ๐งฉ. The "Format" column defines what attribute format is allowed: Type/Length/Value (TLV) or Type/Value (TV). The "Multi-Valued" column defines whether multiple instances of the attribute can appear ๐ข.
4.4.3.1.1. GWP_ATD and GWP_DTD Attributes โณ
Section 4.2.1 of [RFC5374] specifies a key rollover method that requires two values to be provided to GMs: Activation Time Delay (ATD) and Deactivation Time Delay (DTD) ๐.
The GWP_ATD attribute (1) lets a GCKS set the Activation Time Delay for Data-Security SAs of the group ๐. The ATD defines how long active members of the group (those who send traffic) should wait after receiving new SAs before sending traffic over them โฑ๏ธ. Note that to get a smooth rollover, passive members of the group should activate the SAs immediately once they receive them ๐.
The GWP_DTD attribute (2) lets the GCKS set the DTD for previously distributed SAs ๐๏ธ. The DTD defines how long passive GMs should wait, after receiving a request to delete Data-Security SAs, before actually deleting them โ. Note that active members of the group should stop sending traffic over these old SAs once new replacement SAs are activated (after the time specified in the GWP_ATD attribute) ๐ซ .
The GWP_ATD and GWP_DTD attributes contain a 16-bit unsigned integer in network byte order, specifying the delay in seconds ๐ข. These attributes are OPTIONAL ๐ท. If one of them or both are not sent by the GCKS, then no corresponding delay should be employed ๐คทโโ๏ธ.
4.4.3.1.2. GWP_SENDER_ID_BITS Attribute ๐
The GWP_SENDER_ID_BITS attribute (3) declares how many bits of the cipher nonce are taken to represent a Sender-ID value ๐ง . The bits are applied as the most significant bits of the IV, as shown in Figure 1 of Using Counter Modes with ESP and AH to Protect Group Traffic [RFC6054] and as specified in Section 2.5.2. Guidance for a GCKS choosing the value is provided in Section 3 of [RFC6054]. This value is applied to each Sender-ID value distributed in the KD payload ๐ฏ.
The GCKS MUST include this attribute if there is more than one sender in the group and any of the Data-Security SAs use a counter-based cipher mode ๐จ. The number of Sender-ID bits is represented as a 16-bit unsigned integer in network byte order ๐.
4.5. Key Download Payload ๐๏ธ
The Key Download (KD) payload contains the group keys for the SAs specified in the GSA payload ๐. The Payload Type for the Key Download payload is fifty-two (52) ๐ซ.
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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ <Key Bags> ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 17: Key Download Payload Format
The Key Download payload fields are defined as follows:
Next Payload, C, RESERVED, and Payload Length fields: These comprise the IKEv2 generic payload header and are defined in Section 3.2 of [RFC7296] ๐งพ.
Key Bags (variable): A set of key bag substructures ๐๏ธ.
4.5.1. Key Bags ๐
Keys are distributed in substructures called key bags ๐. Each key bag contains one or more keys that are logically related. These are keys for either a single SA (Data-Security SA or Rekey SA) or a single GM. In the latter case, besides keys, the key bag may also contain security parameters for this GM ๐ง.
For this reason, two types of key bags are defined: Group Key Bag and Member Key Bag. The type is unambiguously determined by the first byte of the key bag substructure. For a Member Key Bag, it is zero, and for a Group Key Bag, it contains a Security Protocol Identifier, which is always non-zero ๐. For a Group Key Bag, the Protocol along with the SPI (see Figure 18) identifies the SA that is associated with the keys in this bag ๐.
4.5.2. Group Key Bag Substructure ๐โจ
okay so the Group Key Bag substructure is where the SA key info lives ๐ It's tied to group SAs, either Data-Security SAs or a group Rekey SA, so it's literally the main event ๐
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Protocol | SPI Size | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ SPI ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ <Group Key Bag Attributes> ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 18: Group Key Bag Substructure Format ๐
Here's the field breakdown, bestie ๐ซถ
Protocol (1 octet): identifies the security protocol for this key bag. The values live in the "IKEv2 Security Protocol Identifiers" registry in [IKEV2-IANA]. The valid values are 6 (GIKE_UPDATE) for a KEK Key packet, and 2 (AH) or 3 (ESP) for a TEK key bag. ๐SPI Size (1 octet): the size of the SPI for the corresponding SA. It depends on the security protocol: 16 octets for GIKE_UPDATE, and 4 octets for AH and ESP. ๐งLength (2 octets, unsigned integer): the length of this substructure, header included. ๐SPI (variable): the Security Parameter Index for the corresponding SA. Its size is set by the SPI Size field. For GIKE_UPDATE, the SPI is the IKEv2 header SPI pair: the first 8 octets become the "IKE SA Initiator's SPI" field in the G-IKEv2 rekey message IKEv2 HDR, and the second 8 octets become the "IKE SA Responder's SPI" in that same HDR. It's giving header-within-a-header energy ๐Group Key Bag Attributes (variable): contains the key information for the corresponding SA. ๐ฅ
This document makes a brand-new IKEv2 IANA registry for the types of Group Key Bag attributes. It's initially populated as described in Section 9, and these attributes got added ๐ฆ
+=======+===============+========+==============+=============+
| Value | Group Key Bag | Format | Multi-Valued | Used in |
| | Attributes | | | Protocol |
+=======+===============+========+==============+=============+
| 0 | Reserved | |
+-------+---------------+--------+--------------+-------------+
| 1 | SA_KEY | TLV | YES* | GIKE_UPDATE |
| | | | NO | AH, ESP |
+-------+---------------+--------+--------------+-------------+
Table 7: Group Key Bag Attributes ๐ธ
Notes
- (*): multiple SA_KEY attributes may only show up for the GIKE_UPDATE protocol in the GSA_REKEY pseudo-exchange, and only if the GCKS uses a group key management method that lets it exclude GMs from the group (like LKH). Main-character-only behaviour ๐
The attributes follow the format defined in IKEv2 (Section 3.3.5 of [RFC7296]). The "Format" column says which attribute format is allowed: Type/Length/Value (TLV) or Type/Value (TV). The "Multi-Valued" column says whether multiple instances of the attribute can appear. The "Used in Protocol" column lists the security protocols that can use the attribute. ๐ซถ
4.5.2.1. SA_KEY Attribute ๐๏ธ
The SA_KEY attribute (1) carries keying material for the corresponding SA. Its content is formatted according to Section 4.5.4, with a precondition that the Key ID field MUST always be zero. The size of the keying material MUST be equal to the total size of the keys that need to be taken from this keying material (see Section 3.4) for the corresponding SA. Lowkey strict, but that's what keeps it correct ๐
If the key bag is for a Data-Security SA (AH or ESP protocols), then exactly one SA_KEY attribute MUST be present, with both the Key ID and KWK ID fields set to zero. ๐
If the key bag is for a Rekey SA (GIKE_UPDATE protocol), then exactly one SA_KEY attribute MUST be present in the GSA_AUTH, GSA_REGISTRATION, and GSA_INBAND_REKEY exchanges. In the GSA_REKEY pseudo-exchange, at least one SA_KEY attribute MUST be present, and more attributes MAY be present, depending on the key management method the GCKS uses. โจ
4.5.3. Member Key Bag Substructure ๐งธ
The Member Key Bag substructure carries keys and other parameters that are specific to one member of the group and aren't tied to any particular group SA. It's the personal stuff ๐ฉท
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Protocol | RESERVED | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ <Member Key Bag Attributes> ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 19: Member Key Bag Substructure Format ๐
The Member Key Bag substructure fields work like this:
Protocol (1 octet): MUST be zero. This value is reserved (see Section 9) and is never used for any security protocol, so it signals that this key bag isn't tied to any particular SA. ๐RESERVED ( octet): MUST be zero on transmission and MUST be ignored on receipt. ๐Length (2 octets, unsigned integer): the length of this substructure, header included. ๐Member Key Bag Attributes (variable): contains key information and other parameters exclusively for one particular member of the group. ๐
The Member Key Bag substructure holds sensitive information for a single GM. That's why it MUST NOT be sent in GSA_REKEY messages, and it MUST only be sent via unicast SA at the moment the GM registers to the group (in either the GSA_AUTH or GSA_REGISTRATION exchanges). Private stuff stays private ๐คซ๐
This document makes a new IKEv2 IANA registry for the types of Member Key Bag attributes. It's initially populated as described in Section 9, and these attributes got added:
+=======+===========================+========+==============+
| Value | Member Key Bag Attributes | Format | Multi-Valued |
+=======+===========================+========+==============+
| 0 | Reserved |
+-------+---------------------------+--------+--------------+
| 1 | WRAP_KEY | TLV | YES |
+-------+---------------------------+--------+--------------+
| 2 | AUTH_KEY | TLV | NO |
+-------+---------------------------+--------+--------------+
| 3 | GM_SENDER_ID | TLV | YES |
+-------+---------------------------+--------+--------------+
Table 8: Member Key Bag Attributes ๐ฆ
The attributes follow the format defined in IKEv2 (Section 3.3.5 of [RFC7296]). The "Format" column says which attribute format is allowed: Type/Length/Value (TLV) or Type/Value (TV). The "Multi-Valued" column says whether multiple instances of the attribute can appear. ๐
4.5.3.1. WRAP_KEY Attribute ๐
The WRAP_KEY attribute (1) carries a key that's used to encrypt other keys. One or more of these attributes are sent to GMs if the GCKS key management method relies on a key hierarchy (e.g., LKH). This attribute MUST NOT be used if the GCKS uses inband rekey (via the GSA_INBAND_REKEY exchange) for the GM. Key-within-a-key vibes ๐ช
The content of the attribute has a format defined in Section 4.5.4, with a precondition that the Key ID field MUST NOT be zero. The algorithm associated with the key is defined by the Key Wrap Algorithm transform for the SA that the WRAP_KEY attributes were sent in. The size of the attribute data MUST be equal to the key size for this key wrap algorithm. ๐
Multiple instances of the WRAP_KEY attributes MAY be present in the key bag. โจ
4.5.3.2. AUTH_KEY Attribute ๐ก๏ธ
The AUTH_KEY attribute (2) carries the key that's used to authenticate the GSA_REKEY messages. Its content depends on the authentication method the GCKS specified in the Group Controller Authentication Method transform in the GSA payload. ๐
- If digital signatures are used for GSA_REKEY message authentication, then the content of the AUTH_KEY attribute is a public key used for digital signature authentication. The public key MUST be represented as the DER-encoded ASN.1 object SubjectPublicKeyInfo, defined in Section 4.1.2.7 of [RFC5280]. The algorithm field inside the SubjectPublicKeyInfo object MUST match the content of the Signature Algorithm Identifier attribute in the Group Controller Authentication Method transform. When the id-RSASSA-PSS object identifier appears in the algorithm field of the SubjectPublicKeyInfo object, then the parameters field MUST include the RSASSA-PSS-params structure. ๐
- In case of implicit authentication, the AUTH_KEY Attribute isn't used and MUST be absent (see Section 2.4.1). ๐ซฅ
Multiple instances of the AUTH_KEY attributes MUST NOT be sent. One is the loneliest number and also the only allowed number ๐
4.5.3.3. GM_SENDER_ID Attribute ๐ชช
The GM_SENDER_ID attribute (3) is used to download one or more Sender-ID values for the exclusive use of a GM. One or more of these attributes MUST be sent by the GCKS if the GM told the GCKS it would be a sender (by including the GROUP_SENDER notification in the request) and at least one of the Data-Security SAs included in the GSA payload uses a counter-based mode of encryption. Sender-IDs, but make them personal ๐
If the GMs have requested multiple Sender-ID values in the GROUP_SENDER notification, then the GCKS SHOULD provide the requested number of Sender-IDs by sending multiple instances of the GM_SENDER_ID attribute. The GCKS MAY send fewer values than the GM requested (e.g., if it's running out of Sender-IDs), but it MUST NOT send more than requested. Taking only what you asked for is a whole mood ๐ฅน
This attribute MUST NOT appear in rekey operations (in the GSA_REKEY pseudo-exchange or in the GSA_INBAND_REKEY exchange). No re-gifting in rekey season ๐
4.5.4. Key Wrapping ๐
Okay bestie, so symmetric keys in G-IKEv2 are never sent in the clear inside G-IKEv2 messages ๐. They're always wrapped up in other symmetric keys, and that's called key wrapping. Ngl it's giving bodyguard energy ๐ . Wrap algorithms are usually built on generic encryption algorithms, but their mode of operation is tuned for protecting short, high-entropy data with minimal extra overhead โจ. They can be generic in general, but in practice they're often tied to the encryption algorithm underneath. For example, AES Key Wrap with Padding Algorithm [RFC5649] defines key wrapping using AES, and Key Wrapping Constructions using SipHash and ChaCha [ARX-KW] define key wrapping using Chacha20 ๐ฆ.
So in G-IKEv2, the key wrap algorithm MUST be negotiated in the IKE_SA_INIT exchange ๐ค. That way the GCKS can slide encrypted keys over to the GM in the GSA_AUTH exchange ๐. If the GCKS plans to use the multicast Rekey SA for group rekey, then it MUST specify the key wrap algorithm in the group SA policy for the Rekey SA inside the GSA payload ๐. Heads up that the key wrap algorithms for these two cases MAY be different ๐. For the unicast SA, the GM and the GCKS negotiate the algorithm between themselves. For the multicast Rekey SA, the GCKS hands the algorithm to the GMs as part of the group policy ๐. If an SAg payload is included in the GSA_AUTH request, then it MUST indicate which key wrap algorithms the GM supports ๐. In every one of these cases, the key wrap algorithm gets specified in a Key Wrap Algorithm transform (see Section 4.4.2.1.2) ๐ธ.
Here's how the wrapped key is laid out, Figure 20 ๐:
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Key ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| KWK ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Encrypted Key ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 20: Wrapped Key Format
Now the fields, one by one ๐ง:
Key ID(4 octets): the ID of the encrypted key. The value zero means the encrypted key holds SA keys (in the form of keying material; see Section 3.4). Otherwise, it holds some intermediate key ๐.KWK ID(4 octets): the ID of the key that was used to encrypt the key with the specified Key ID. The value zero means the default KWK was used to do the encrypting. Otherwise, some intermediate key did the job ๐.Encrypted Key(variable): the encrypted key bits. These bits are either one encrypted key or the result of encrypting a concatenation of keys (key material) for several algorithms. How this field is formatted depends on the key wrap algorithm for the SA the wrapped key gets sent over ๐ฆ.
4.6. Delete Payload ๐๏ธ
The Delete payload is used in G-IKEv2 when the GCKS wants to delete Data-Security and Rekey SAs ๐ . The Protocol field in the Delete payload has an extended meaning: a zero protocol means "delete the whole Group SA" (aka all the Data-Security SAs and the Rekey SA) ๐. See Section 2.4.3 for the deets โจ.
4.7. Notify Payload ๐ฃ
G-IKEv2 uses the same Notify payload as specified in Section 3.10 of [RFC7296] ๐ซถ. G-IKEv2 also brings in some extra Notify message types to communicate error conditions and status. Those live in Section 9 ๐ธ.
4.7.1. INVALID_GROUP_ID Notification ๐ซ
INVALID_GROUP_ID (45) is a brand-new error notification ๐ โโ๏ธ. It says the IDg payload sent during registration points at an invalid group. The Protocol ID and SPI Size fields in the Notify payload MUST be zero ๐. There's no data attached to this one, and the content of the Notification Data field MUST be ignored on receipt ๐.
4.7.2. AUTHORIZATION_FAILED Notification ๐
AUTHORIZATION_FAILED (46) is another new error notification. It gets sent in response to a GSA_AUTH or GSA_REGISTRATION message when authorization failed ๐ญ. The Protocol ID and SPI Size fields in the Notify payload MUST be zero ๐. There's no data with this notification either, and the content of the Notification Data field MUST be ignored on receipt ๐.
4.7.3. REGISTRATION_FAILED Notification โ
REGISTRATION_FAILED (49) is a new error notification that the GCKS sends when a GM's registration request can't be satisfied for reasons that have nothing to do with that particular GM. Think: the group is at capacity, e.g., the group's capacity is exceeded ๐ซ . The Protocol ID and SPI Size fields in the Notify payload MUST be zero ๐. No data here, and the content of the Notification Data field MUST be ignored on receipt ๐.
4.7.4. GROUP_SENDER Notification ๐ก
GROUP_SENDER (16429) is a new status notification ๐. It gets sent in the GSA_AUTH or GSA_REGISTRATION exchanges to say that the GM intends to be a sender of data traffic ๐ค. The data includes a count of how many Sender-ID values the GM wants. The count MUST be 4 octets long and contain the big-endian representation of the number of requested Sender-IDs ๐ข. And the Protocol ID and SPI Size fields in the Notify payload MUST be zero ๐.
4.8. Authentication Payload ๐ชช
G-IKEv2 uses the same Authentication payload as specified in Section 3.8 of [RFC7296] to authenticate the rekey message โ . Plot twist: if it's used in the GSA_REKEY messages, the content of the payload gets computed differently, as described in Section 2.4.1.1 ๐ง .
5. Using G-IKEv2 Attributes โจ
okay so G-IKEv2 has a whole bunch of attributes the GCKS uses to send info down to GMs ๐ฆ but they can't just show up anywhere, bestie. There are rules about where and when each one is allowed, and those rules get spelled out right when each attribute is introduced. To make life easier, the rules are summarized in Table 9 (for multicast rekey operations) and Table 10 (for inband rekey operations) ๐
Here's the notation we're using:
SA single attribute of this type MUST be present.MMultiple attributes of this type MAY be present.[]Attribute is OPTIONAL.-Attribute MUST NOT be present.
Quick heads up ๐ the restrictions are defined per substructure, the one that has its own attributes, and NOT per whole G-IKEv2 message. so don't look at a message and think "the whole thing is restricted," it's the individual substructures that matter ๐
+========================+==================+===========+=======+
| Attributes | GSA_AUTH | GSA_REKEY | Notes |
| | GSA_REGISTRATION | | |
+========================+==================+===========+=======+
| Group SA Attributes (Section 4.4.2.2) |
+========================+==================+===========+=======+
| GSA_KEY_LIFETIME | S | S | |
+------------------------+------------------+-----------+-------+
| GSA_INITIAL_MESSAGE_ID | [S] | [S] | |
+------------------------+------------------+-----------+-------+
| GSA_NEXT_SPI | [M] | [M] | |
+========================+==================+===========+=======+
| GW Policy Attributes (Section 4.4.3.1) |
+========================+==================+===========+=======+
| GWP_ATD | [S] | [S] | |
+------------------------+------------------+-----------+-------+
| GWP_DTD | [S] | [S] | |
+------------------------+------------------+-----------+-------+
| GWP_SENDER_ID_BITS | S | - | 1 |
+========================+==================+===========+=======+
| Key Bag Attributes (Section 4.5.1) |
+========================+==================+===========+=======+
| SA_KEY | S | S[M] | 2 |
+------------------------+------------------+-----------+-------+
| WRAP_KEY | [M] | [M] | 3 |
+------------------------+------------------+-----------+-------+
| AUTH_KEY | S | [S] | 4 |
+------------------------+------------------+-----------+-------+
| GM_SENDER_ID | S[M] | - | 1 |
+------------------------+------------------+-----------+-------+
Table 9: Attributes in G-IKEv2 Exchanges with Multicast Rekey
Operations
Notes for Table 9 ๐ง
(1): okay this one is the big one ๐ฅ GWP_SENDER_ID_BITS MUST be present if the GCKS policy includes at least one cipher in counter mode of operation AND the GM included the GROUP_SENDER notify in the registration request. Otherwise it MUST NOT be present. In the first case, at least one GM_SENDER_ID attribute MUST be present (and more MAY be present if the GM asked for more Sender-IDs), and in the latter case it MUST NOT be present. so basically: counter mode plus GROUP_SENDER means you need the bits and the IDs, and otherwise they're a hard no ๐
โโ๏ธ
(2): for a Data-Security SA, exactly one SA_KEY attribute MUST be present. For a Rekey SA, exactly one SA_KEY attribute MUST be present in the GSA_AUTH and GSA_REGISTRATION exchange. In the GSA_REKEY pseudo-exchange, at least one SA_KEY attribute MUST be present, and more of these attributes MAY be present. the rekey pseudo-exchange is the one that gets to be extra ๐
(3): the WRAP_KEY attribute MUST be present if the GCKS uses a key management method that relies on a key tree (like LKH) ๐ณ
(4): the AUTH_KEY attribute MUST be present in the GSA_AUTH and GSA_REGISTRATION exchanges if the GCKS uses an authentication method for rekey operations based on digital signatures, and it MUST NOT be present if implicit authentication is used. It MUST also be present in the GSA_REKEY pseudo-exchange if the GCKS uses digital signatures and wants to change the public key for the multicast rekey operations that follow โ๏ธ
Now for the inband version ๐ฆ
+========================+================+==================+=====+
| Attributes |GSA_AUTH | GSA_INBAND_REKEY |Notes|
| |GSA_REGISTRATION| | |
+========================+================+==================+=====+
| Group SA Attributes (Section 4.4.2.2) |
+========================+================+==================+=====+
| GSA_KEY_LIFETIME |[S] | [S] | |
+------------------------+----------------+------------------+-----+
| GSA_INITIAL_MESSAGE_ID |- | - | |
+------------------------+----------------+------------------+-----+
| GSA_NEXT_SPI |- | - | |
+========================+================+==================+=====+
| GW Policy Attributes (Section 4.4.3.1) |
+========================+================+==================+=====+
| GWP_ATD |[S] | [S] | |
+------------------------+----------------+------------------+-----+
| GWP_DTD |[S] | [S] | |
+------------------------+----------------+------------------+-----+
| GWP_SENDER_ID_BITS |S | - |1 |
+========================+================+==================+=====+
| Key Bag Attributes (Section 4.5.1) |
+========================+================+==================+=====+
| SA_KEY |S | S | |
+------------------------+----------------+------------------+-----+
| WRAP_KEY |- | - | |
+------------------------+----------------+------------------+-----+
| AUTH_KEY |- | - | |
+------------------------+----------------+------------------+-----+
| GM_SENDER_ID |S[M] | - |1 |
+------------------------+----------------+------------------+-----+
Table 10: Attributes in G-IKEv2 Exchanges with Inband Rekey
Operations
Notes for Table 10 ๐ธ
(1): same drill as the multicast one โจ GWP_SENDER_ID_BITS MUST be present if the GCKS policy includes at least one cipher in counter mode of operation AND the GM included the GROUP_SENDER notify in the registration request. Otherwise it MUST NOT be present. At least one GM_SENDER_ID attribute MUST be present in the first case (and more MAY be present if the GM requested more Sender-IDs), and it MUST NOT be present in the second case.
6. Interaction with IKEv2 and ESP Extensions ๐ง
okay so there are a bunch of IKEv2 and ESP extensions out there that add extra powers ๐ช and G-IKEv2 plays nicely with most of them, lowkey iconic ๐ซถ EAP authentication from [RFC7296] can be used to set up the registration IKE SA ๐ and the same goes for EAP-only authentication [RFC5998] and secure password authentication [RFC6467]. G-IKEv2 is compatible with the IKEv2 Redirect Mechanism [RFC5685] and can use it, and it's also compatible with IKEv2 Session Resumption [RFC5723]. And it works with Multiple Key Exchanges in the IKEv2 framework too, as defined in [RFC9370] ๐ฆ
This list is NOT the whole list of compatible extensions, though. Some IKEv2 extensions do need special handling when they're used in G-IKEv2, so keep an eye out for those ๐
6.1. Implicit IV for Counter-Based Ciphers in ESP ๐
Using an implicit IV for counter-based encryption modes in ESP is defined in [RFC8750]. This one relies on ESP sequence numbers being unique, so it can't be used for multi-sender multicast SAs ๐ โโ๏ธ BUT it IS possible to use the implicit IV extension for a single-sender multicast ESP SA โ Also, while implicit IVs can work with ESN, using ESN is prohibited in multicast SAs (see Section 4.4.2.1.3) ๐ซ
6.2. Mixing Preshared Keys in IKEv2 for Post-Quantum Security ๐ก๏ธ
G-IKEv2 can take advantage of the protection that Post-quantum Preshared Keys (PPKs) for IKEv2 give you [RFC8784] ๐ However, using PPKs still leaves the initial IKE SA open to quantum computer (QC) attacks. The group SA keys are protected with the default KWK (GSK_w), which is derived from SK_d, so they can't be broken even by an attacker with a QC ๐ But other data sent over the initial IKE SA might be vulnerable to an attacker with a QC of sufficient size. That attacker could store all the traffic until they get a QC big enough, then decrypt it. That's the Store Now Decrypt Later attack, and it's terrifying ๐ญ See Section 6 of [RFC8784] for the details.
While the group keys are protected by the PPK and are therefore immune to QCs, GCKS implementations that care about the other data sent over the initial IKE SA MUST rely on IKEv2 extensions that protect even the initial IKE SA against QCs (like [RFC9867]) ๐ซก
6.3. Aggregation and Fragmentation Mode for ESP ๐
Aggregation and fragmentation mode for ESP is defined in [RFC9347]. This mode lets IP packets get split across several ESP packets, or lets several IP packets get bundled into a single ESP packet ๐ฆ It can only be used with ESP tunnel mode, and it relies on monotonically increasing sequence numbers in the incoming packets. So yeah, it's impossible to use this mode for multi-sender multicast SAs ๐ And since multicast Data-Security SAs are unidirectional, the congestion control feature of aggregation and fragmentation mode can't be used either.
It IS possible to use aggregation and fragmentation mode without congestion control for a single-sender multicast ESP SA that was created in tunnel mode โจ GMs that support this mode can send the USE_AGGFRAG notification in the registration request, along with the SAg payload. If the Data-Security SA(s) to be installed on the GMs use aggregation and fragmentation mode, the GCKS signals that by including the USE_AGGFRAG notification along with the GSA payload in its response ๐
7. GDOI Protocol Extensions ๐ท
A few extensions were defined for the GDOI protocol [RFC6407], like GDOI Support for IEC 62351 Security Services [RFC8052] or the GDOI GROUPKEY-PUSH Acknowledgement Message [RFC8263] ๐ It's expected that these extensions will be redefined for G-IKEv2 in separate documents, if needed. Not our problem rn, but good to know ๐
8. Security Considerations ๐
โ ๏ธ okay bestie, this section is SERIOUS. Read it like your group chat's life depends on it ๐ญ
When an entity joins the group and becomes a GM, it has to trust that the GCKS only authorized entities that are admitted to the group. It also has to trust that other GMs won't leak the information shared within the group. No pressure ๐ฅบ
8.1. GSA Registration and Secure Channel ๐ก๏ธ
The G-IKEv2 registration procedure uses IKEv2 initial exchanges, which means it inherits all the security considerations documented in Section 5 of [RFC7296]. That includes authentication, confidentiality, on-path attack protection, protection against replay and reflection attacks, and denial-of-service protection ๐ซถ The GSA_REGISTRATION exchange also takes advantage of those protections. On top of all that, G-IKEv2 brings in the ability to authorize a particular GM regardless of whether they have IKEv2 credentials ๐
8.2. GSA Maintenance Channel ๐โจ
Okay bestie, the GSA maintenance channel is locked down tight. It's cryptographically and integrity protected using the cryptographic algorithm and key negotiated in the GSA member registration exchange ๐ ๐
8.2.1. Authentication/Authorization ๐ก๏ธ
So the authentication key gets handed out during GM registration, and the receiver of the rekey message uses that key to check the message really came from the authorized GCKS ๐ Iconic verification energy.
There's also implicit authentication ๐ Here, the GM's ability to decrypt and verify the ICV of incoming messages counts as proof that the sender knows the group keys and is therefore a member of the group. BUT ngl, implicit authentication doesn't give source origin authentication, so the GM can't be sure the message came from the GCKS ๐ญ That's why using implicit authentication is NOT RECOMMENDED, unless it's used with a small group of trusted parties ๐ซถ
8.2.2. Confidentiality ๐คซ
Confidentiality is handled by distributing a confidentiality key as part of the GSA member registration exchange ๐๏ธ Secret keeper era.
8.2.3. On-Path Attack Protection ๐ง
The GSA maintenance channel is integrity protected by using a digital signature โ๏ธ๐
8.2.4. Replay/Reflection Attack Protection ๐
The GSA_REKEY message includes a monotonically increasing sequence number ๐ which is how it protects against replay and reflection attacks. A GM spots a replayed message by comparing the Message ID number to that of the last rekey message it received ๐ Any rekey message with a Message ID number less than or equal to the last received value MUST be discarded ๐๏ธ Also, implementations should keep a record of recently received GSA rekey messages for this comparison ๐
The super strict role separation between the GCKS and the GMs is a big deal here ๐ธ As a consequence, a Rekey SA is limited to outbound/inbound only, and that helps prevent reflection attacks ๐ช Main character defense, honestly.
9. IANA Considerations ๐๐
9.1. New Registries ๐๏ธ
Per this document, new registries have been created for G-IKEv2 under the "Internet Key Exchange Version 2 (IKEv2) Parameters" registry group [IKEV2-IANA]. The terms Reserved, Expert Review, and Private Use are as defined in [RFC8126] ๐
- IANA has created the "Transform Type 13 - Key Wrap Algorithm Transform IDs" registry. The registration policy for this registry is Expert Review [RFC8126]. The initial values of the registry are as follows:
+============+==========================+
| Value | Key Wrap Algorithm |
+============+==========================+
| 0 | Reserved |
+------------+--------------------------+
| 1 | KW_5649_128 |
+------------+--------------------------+
| 2 | KW_5649_192 |
+------------+--------------------------+
| 3 | KW_5649_256 |
+------------+--------------------------+
| 4 | KW_ARX |
+------------+--------------------------+
| 5-1023 | Unassigned |
+------------+--------------------------+
| 1024-65535 | Reserved for Private Use |
+------------+--------------------------+
Table 11
- IANA has created the "Transform Type 14 - Group Controller Authentication Method Transform IDs" registry. The registration policy for this registry is Expert Review [RFC8126]. The initial values of the registry are as follows:
+============+========================================+
| Value | Group Controller Authentication Method |
+============+========================================+
| 0 | Reserved |
+------------+----------------------------------------+
| 1 | Implicit |
+------------+----------------------------------------+
| 2 | Digital Signature |
+------------+----------------------------------------+
| 3-1023 | Unassigned |
+------------+----------------------------------------+
| 1024-65535 | Reserved for Private Use |
+------------+----------------------------------------+
Table 12
- IANA has created the "Group SA Attributes" registry. The registration policy for this registry is Expert Review [RFC8126]. The initial values of the registry are as follows:
+===========+======================+======+======+============+
|Value |Group SA Attributes |Format|Multi-|Used in |
| | | |Valued|Protocol |
+===========+======================+======+======+============+
|0 |Reserved | |
+-----------+----------------------+------+------+------------+
|1 |GSA_KEY_LIFETIME |TLV |NO |GIKE_UPDATE,|
| | | | |AH, ESP |
+-----------+----------------------+------+------+------------+
|2 |GSA_INITIAL_MESSAGE_ID|TLV |NO |GIKE_UPDATE |
+-----------+----------------------+------+------+------------+
|3 |GSA_NEXT_SPI |TLV |YES |GIKE_UPDATE,|
| | | | |AH, ESP |
+-----------+----------------------+------+------+------------+
|4-16383 |Unassigned | |
+-----------+----------------------+--------------------------+
|16384-32767|Reserved for Private | |
| |Use | |
+-----------+----------------------+--------------------------+
Table 13
- IANA has created the "Group-Wide Policy Attributes" registry. The registration policy for this registry is Expert Review [RFC8126]. The initial values of the registry are as follows:
+=============+======================+========+==============+
| Value | GW Policy Attributes | Format | Multi-Valued |
+=============+======================+========+==============+
| 0 | Reserved | |
+-------------+----------------------+--------+--------------+
| 1 | GWP_ATD | TV | NO |
+-------------+----------------------+--------+--------------+
| 2 | GWP_DTD | TV | NO |
+-------------+----------------------+--------+--------------+
| 3 | GWP_SENDER_ID_BITS | TV | NO |
+-------------+----------------------+--------+--------------+
| 4-16383 | Unassigned | |
+-------------+----------------------+-----------------------+
| 16384-32767 | Reserved for Private | |
| | Use | |
+-------------+----------------------+-----------------------+
Table 14
- IANA has created the "Group Key Bag Attributes" registry. The registration policy for this registry is Expert Review [RFC8126]. The initial values of the registry are as follows:
+=============+=============+======+==============+=============+
| Value | Group Key |Format| Multi-Valued | Used in |
| | Bag | | | Protocol |
| | Attributes | | | |
+=============+=============+======+==============+=============+
| 0 | Reserved | |
+-------------+-------------+------+--------------+-------------+
| 1 | SA_KEY |TLV | YES | GIKE_UPDATE |
| | | | NO | AH, ESP |
+-------------+-------------+------+--------------+-------------+
| 2-16383 | Unassigned | |
+-------------+-------------+-----------------------------------+
| 16384-32767 | Reserved | |
| | for | |
| | Private | |
| | Use | |
+-------------+-------------+-----------------------------------+
Table 15
- IANA has created the "Member Key Bag Attributes" registry. The registration policy for this registry is Expert Review [RFC8126]. The initial values of the registry are as follows:
+=============+================+========+==============+
| Value | Member Key Bag | Format | Multi-Valued |
| | Attributes | | |
+=============+================+========+==============+
| 0 | Reserved | |
+-------------+----------------+--------+--------------+
| 1 | WRAP_KEY | TLV | YES |
+-------------+----------------+--------+--------------+
| 2 | AUTH_KEY | TLV | NO |
+-------------+----------------+--------+--------------+
| 3 | GM_SENDER_ID | TLV | YES |
+-------------+----------------+--------+--------------+
| 4-16383 | Unassigned | |
+-------------+----------------+-----------------------+
| 16384-32767 | Reserved for | |
| | Private Use | |
+-------------+----------------+-----------------------+
Table 16
9.1.1. Guidance for Designated Experts ๐งโโ๏ธ
In all cases of Expert Review described in this section, the designated expert (DE) is expected to make sure suitable documentation (a specification) exists, as described in [RFC8126], and to check that it's permanently and publicly available ๐ The DE is also expected to check the clarity of purpose and use of the requested code points โจ Lastly, the DE must verify that any specification produced outside the IETF doesn't conflict with work that's active or already published within the IETF ๐ซถ Keeping the vibes clean and the registries drama-free ๐ ๐
9.2. Changes in the Existing IKEv2 Registries ๐
Okay, the registry updates are where things get really satisfying ๐ฆ Here's exactly what IANA changed.
- In the "IKEv2 Exchange Types" registry, IANA updated the references for the following entries so they point to this document, and registered "GSA_INBAND_REKEY" ๐ธ
+=======+==================+
| Value | Exchange Type |
+=======+==================+
| 39 | GSA_AUTH |
+-------+------------------+
| 40 | GSA_REGISTRATION |
+-------+------------------+
| 41 | GSA_REKEY |
+-------+------------------+
| 42 | GSA_INBAND_REKEY |
+-------+------------------+
Table 17
- In the "IKEv2 Payload Types" registry, IANA listed this document as a reference for the following entries ๐ง
+=======+============================+==========+
| Value | Next Payload Type | Notation |
+=======+============================+==========+
| 50 | Group Identification | IDg |
+-------+----------------------------+----------+
| 51 | Group Security Association | GSA |
+-------+----------------------------+----------+
| 52 | Key Download | KD |
+-------+----------------------------+----------+
Table 18
- Also in the "IKEv2 Payload Types" registry, IANA updated the definition of Payload Type 33 and added a reference to this document ๐
+=======+=========================+==========+===========+
| Value | Next Payload Type | Notation | Reference |
+=======+=========================+==========+===========+
| 33 | Security Association | SA | [RFC7296] |
| +-------------------------+----------+-----------+
| | Security Association - | SAg | RFC 9838 |
| | GM Supported Transforms | | |
+-------+-------------------------+----------+-----------+
Table 19
- In the "Transform Type Values" registry, IANA made these changes โจ
- Registered "Key Wrap Algorithm (KWA)" and "Group Controller Authentication Method (GCAUTH)".
- Updated the "Used In" column for values 1 and 3 and listed this document as an additional reference.
+======+================================+======================+
| Type | Description | Used In |
+======+================================+======================+
| 1 | Encryption Algorithm (ENCR) | (IKE, GIKE_UPDATE, |
| | | ESP) |
+------+--------------------------------+----------------------+
| 3 | Integrity Algorithm (INTEG) | (IKE, GIKE_UPDATE, |
| | | AH, optional in ESP) |
+------+--------------------------------+----------------------+
| 13 | Key Wrap Algorithm (KWA) | (IKE, GIKE_UPDATE) |
+------+--------------------------------+----------------------+
| 14 | Group Controller | (GIKE_UPDATE) |
| | Authentication Method (GCAUTH) | |
+------+--------------------------------+----------------------+
Table 20
- In the "IKEv2 Transform Attribute Types" registry, IANA added the following entry ๐ฆ
+=======+================================+========+
| Value | Attribute Type | Format |
+=======+================================+========+
| 18 | Signature Algorithm Identifier | TLV |
+-------+--------------------------------+--------+
Table 21
- In the "Transform Type 5 - Sequence Numbers Transform IDs" registry, IANA added the following entry ๐
+========+============================+
| Number | Name |
+========+============================+
| 2 | 32-bit Unspecified Numbers |
+--------+----------------------------+
Table 22
- In the "IKEv2 Notify Message Error Types" registry, IANA made these changes ๐ฅ
- Registered "REGISTRATION_FAILED".
- Updated the references for "INVALID_GROUP_ID" and "AUTHORIZATION_FAILED" to point to this document.
+=======+===========================+
| Value | Notify Message Error Type |
+=======+===========================+
| 45 | INVALID_GROUP_ID |
+-------+---------------------------+
| 46 | AUTHORIZATION_FAILED |
+-------+---------------------------+
| 49 | REGISTRATION_FAILED |
+-------+---------------------------+
Table 23
- An earlier draft of this document [G-IKEV2] registered Notify type 16429 in the "IKEv2 Notify Message Status Types" registry under the name SENDER_REQUEST_ID. Per this document, IANA renamed it as follows ๐
+=======+============================+
| Value | Notify Message Status Type |
+=======+============================+
| 16429 | GROUP_SENDER |
+-------+----------------------------+
Table 24
- In the "IKEv2 Security Protocol Identifiers" registry, IANA added the following entry ๐
+=============+=============+
| Protocol ID | Protocol |
+=============+=============+
| 6 | GIKE_UPDATE |
+-------------+-------------+
Table 25
10. References ๐
10.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>.
[RFC4301] Kent, S. and K. Seo, "Security Architecture for the
Internet Protocol", RFC 4301, DOI 10.17487/RFC4301,
December 2005, <https://www.rfc-editor.org/info/rfc4301>.
[RFC4302] Kent, S., "IP Authentication Header", RFC 4302,
DOI 10.17487/RFC4302, December 2005,
<https://www.rfc-editor.org/info/rfc4302>.
[RFC4303] Kent, S., "IP Encapsulating Security Payload (ESP)",
RFC 4303, DOI 10.17487/RFC4303, December 2005,
<https://www.rfc-editor.org/info/rfc4303>.
[RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S.,
Housley, R., and W. Polk, "Internet X.509 Public Key
Infrastructure Certificate and Certificate Revocation List
(CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008,
<https://www.rfc-editor.org/info/rfc5280>.
[RFC6054] McGrew, D. and B. Weis, "Using Counter Modes with
Encapsulating Security Payload (ESP) and Authentication
Header (AH) to Protect Group Traffic", RFC 6054,
DOI 10.17487/RFC6054, November 2010,
<https://www.rfc-editor.org/info/rfc6054>.
[RFC7296] Kaufman, C., Hoffman, P., Nir, Y., Eronen, P., and T.
Kivinen, "Internet Key Exchange Protocol Version 2
(IKEv2)", STD 79, RFC 7296, DOI 10.17487/RFC7296, October
2014, <https://www.rfc-editor.org/info/rfc7296>.
[RFC7427] Kivinen, T. and J. Snyder, "Signature Authentication in
the Internet Key Exchange Version 2 (IKEv2)", RFC 7427,
DOI 10.17487/RFC7427, January 2015,
<https://www.rfc-editor.org/info/rfc7427>.
[RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for
Writing an IANA Considerations Section in RFCs", BCP 26,
RFC 8126, DOI 10.17487/RFC8126, June 2017,
<https://www.rfc-editor.org/info/rfc8126>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC9827] Smyslov, V., "Renaming the Extended Sequence Numbers (ESN)
Transform Type in the Internet Key Exchange Protocol
Version 2 (IKEv2)", RFC 9827, DOI 10.17487/RFC9827,
November 2025, <https://www.rfc-editor.org/info/rfc9827>.
Okay bestie, picking up right where we left off. Here's the rest of the references and the appendix, so buckle up ๐โจ
10.2. Informative References
[ARX-KW]Shinichi, S., "ARX-KW, a family of key wrapping constructions using SipHash and ChaCha", Cryptology ePrint Archive, Paper 2020/059, January 2020, <https://eprint.iacr.org/2020/059.pdf>. ๐[G-IKEV2]Rowles, S., Yeung, A., Tran, P., and Y. Nir, "Group Key Management using IKEv2", Work in Progress, Internet-Draft, draft-yeung-g-ikev2-07, 5 November 2013, <https://datatracker.ietf.org/doc/html/draft-yeung-g-ikev2-07>. ๐ฆ[IKEV2-IANA]IANA, "Internet Key Exchange Version 2 (IKEv2) Parameters", <http://www.iana.org/assignments/ikev2-parameters>. ๐ธ[NNL]Naor, D., Naor, M., and J. Lotspiech, "Revocation and Tracing Schemes for Stateless Receivers", Advances in Cryptology - CRYPTO 2001, Lecture Notes in Computer Science, vol. 2139, pp. 41-62, DOI 10.1007/3-540-44647-8_3, 2001, <http://www.wisdom.weizmann.ac.il/~naor/PAPERS/2nl.pdf>. ๐ง[OFT]McGrew, D. and A. Sherman, "Key Establishment in Large Dynamic Groups Using One-Way Function Trees", IEEE Transactions on Software Engineering, vol. 29, no. 5, pp. 444-458, DOI 10.1109/TSE.2003.1199073, May 1998, <https://pdfs.semanticscholar.org/d24c/7b41f7bcc2b6690e1b4d80eaf8c3e1cc5ee5.pdf>. ๐[RFC2409]Harkins, D. and D. Carrel, "The Internet Key Exchange (IKE)", RFC 2409, DOI 10.17487/RFC2409, November 1998, <https://www.rfc-editor.org/info/rfc2409>. ๐[RFC2627]Wallner, D., Harder, E., and R. Agee, "Key Management for Multicast: Issues and Architectures", RFC 2627, DOI 10.17487/RFC2627, June 1999, <https://www.rfc-editor.org/info/rfc2627>. ๐[RFC3686]Housley, R., "Using Advanced Encryption Standard (AES) Counter Mode With IPsec Encapsulating Security Payload (ESP)", RFC 3686, DOI 10.17487/RFC3686, January 2004, <https://www.rfc-editor.org/info/rfc3686>. โจ[RFC3740]Hardjono, T. and B. Weis, "The Multicast Group Security Architecture", RFC 3740, DOI 10.17487/RFC3740, March 2004, <https://www.rfc-editor.org/info/rfc3740>. ๐[RFC3948]Huttunen, A., Swander, B., Volpe, V., DiBurro, L., and M. Stenberg, "UDP Encapsulation of IPsec ESP Packets", RFC 3948, DOI 10.17487/RFC3948, January 2005, <https://www.rfc-editor.org/info/rfc3948>. ๐ซถ[RFC4046]Baugher, M., Canetti, R., Dondeti, L., and F. Lindholm, "Multicast Security (MSEC) Group Key Management Architecture", RFC 4046, DOI 10.17487/RFC4046, April 2005, <https://www.rfc-editor.org/info/rfc4046>. ๐ฅ[RFC4106]Viega, J. and D. McGrew, "The Use of Galois/Counter Mode (GCM) in IPsec Encapsulating Security Payload (ESP)", RFC 4106, DOI 10.17487/RFC4106, June 2005, <https://www.rfc-editor.org/info/rfc4106>. ๐[RFC4309]Housley, R., "Using Advanced Encryption Standard (AES) CCM Mode with IPsec Encapsulating Security Payload (ESP)", RFC 4309, DOI 10.17487/RFC4309, December 2005, <https://www.rfc-editor.org/info/rfc4309>. ๐ธ[RFC4543]McGrew, D. and J. Viega, "The Use of Galois Message Authentication Code (GMAC) in IPsec ESP and AH", RFC 4543, DOI 10.17487/RFC4543, May 2006, <https://www.rfc-editor.org/info/rfc4543>. ๐ฆ[RFC5374]Weis, B., Gross, G., and D. Ignjatic, "Multicast Extensions to the Security Architecture for the Internet Protocol", RFC 5374, DOI 10.17487/RFC5374, November 2008, <https://www.rfc-editor.org/info/rfc5374>. ๐ง[RFC5649]Housley, R. and M. Dworkin, "Advanced Encryption Standard (AES) Key Wrap with Padding Algorithm", RFC 5649, DOI 10.17487/RFC5649, September 2009, <https://www.rfc-editor.org/info/rfc5649>. ๐[RFC5685]Devarapalli, V. and K. Weniger, "Redirect Mechanism for the Internet Key Exchange Protocol Version 2 (IKEv2)", RFC 5685, DOI 10.17487/RFC5685, November 2009, <https://www.rfc-editor.org/info/rfc5685>. ๐[RFC5723]Sheffer, Y. and H. Tschofenig, "Internet Key Exchange Protocol Version 2 (IKEv2) Session Resumption", RFC 5723, DOI 10.17487/RFC5723, January 2010, <https://www.rfc-editor.org/info/rfc5723>. ๐[RFC5998]Eronen, P., Tschofenig, H., and Y. Sheffer, "An Extension for EAP-Only Authentication in IKEv2", RFC 5998, DOI 10.17487/RFC5998, September 2010, <https://www.rfc-editor.org/info/rfc5998>. โจ[RFC6407]Weis, B., Rowles, S., and T. Hardjono, "The Group Domain of Interpretation", RFC 6407, DOI 10.17487/RFC6407, October 2011, <https://www.rfc-editor.org/info/rfc6407>. ๐[RFC6467]Kivinen, T., "Secure Password Framework for Internet Key Exchange Version 2 (IKEv2)", RFC 6467, DOI 10.17487/RFC6467, December 2011, <https://www.rfc-editor.org/info/rfc6467>. ๐ซถ[RFC7383]Smyslov, V., "Internet Key Exchange Protocol Version 2 (IKEv2) Message Fragmentation", RFC 7383, DOI 10.17487/RFC7383, November 2014, <https://www.rfc-editor.org/info/rfc7383>. ๐ฅ[RFC7634]Nir, Y., "ChaCha20, Poly1305, and Their Use in the Internet Key Exchange Protocol (IKE) and IPsec", RFC 7634, DOI 10.17487/RFC7634, August 2015, <https://www.rfc-editor.org/info/rfc7634>. ๐[RFC8052]Weis, B., Seewald, M., and H. Falk, "Group Domain of Interpretation (GDOI) Protocol Support for IEC 62351 Security Services", RFC 8052, DOI 10.17487/RFC8052, June 2017, <https://www.rfc-editor.org/info/rfc8052>. ๐ธ[RFC8263]Weis, B., Mangla, U., Karl, T., and N. Maheshwari, "Group Domain of Interpretation (GDOI) GROUPKEY-PUSH Acknowledgement Message", RFC 8263, DOI 10.17487/RFC8263, November 2017, <https://www.rfc-editor.org/info/rfc8263>. ๐ฆ[RFC8750]Migault, D., Guggemos, T., and Y. Nir, "Implicit Initialization Vector (IV) for Counter-Based Ciphers in Encapsulating Security Payload (ESP)", RFC 8750, DOI 10.17487/RFC8750, March 2020, <https://www.rfc-editor.org/info/rfc8750>. ๐ง[RFC8784]Fluhrer, S., Kampanakis, P., McGrew, D., and V. Smyslov, "Mixing Preshared Keys in the Internet Key Exchange Protocol Version 2 (IKEv2) for Post-quantum Security", RFC 8784, DOI 10.17487/RFC8784, June 2020, <https://www.rfc-editor.org/info/rfc8784>. ๐[RFC9242]Smyslov, V., "Intermediate Exchange in the Internet Key Exchange Protocol Version 2 (IKEv2)", RFC 9242, DOI 10.17487/RFC9242, May 2022, <https://www.rfc-editor.org/info/rfc9242>. ๐[RFC9329]Pauly, T. and V. Smyslov, "TCP Encapsulation of Internet Key Exchange Protocol (IKE) and IPsec Packets", RFC 9329, DOI 10.17487/RFC9329, November 2022, <https://www.rfc-editor.org/info/rfc9329>. ๐[RFC9347]Hopps, C., "Aggregation and Fragmentation Mode for Encapsulating Security Payload (ESP) and Its Use for IP Traffic Flow Security (IP-TFS)", RFC 9347, DOI 10.17487/RFC9347, January 2023, <https://www.rfc-editor.org/info/rfc9347>. โจ[RFC9370]Tjhai, CJ., Tomlinson, M., Bartlett, G., Fluhrer, S., Van Geest, D., Garcia-Morchon, O., and V. Smyslov, "Multiple Key Exchanges in the Internet Key Exchange Protocol Version 2 (IKEv2)", RFC 9370, DOI 10.17487/RFC9370, May 2023, <https://www.rfc-editor.org/info/rfc9370>. ๐[RFC9867]Smyslov, V., "Mixing Preshared Keys in the IKE_INTERMEDIATE and CREATE_CHILD_SA Exchanges of the Internet Key Exchange Protocol Version 2 (IKEv2) for Post-Quantum Security", RFC 9867, DOI 10.17487/RFC9867, November 2025, <https://www.rfc-editor.org/info/rfc9867>. ๐ซถ
Appendix A. Use of LKH in G-IKEv2 ๐
Okay so this appendix is giving "how do you kick someone out of a group without rebuilding the whole thing" energy, and I'm obsessed ๐ญ๐. Section 5.4 of [RFC2627] describes the LKH architecture and how a GCKS uses LKH to exclude GMs. This section clarifies how the LKH architecture is used with G-IKEv2. ๐ธ
A.1. Notation
In this section, we will use the notation X{Y}, where a key with ID Y is encrypted with the key with ID X. The notation GSK_w{Y} means that the default wrap key GSK_w (with zero KWK ID)is used to encrypt key Y, and the notation X{K_sa} means key X is used to encrypt the SA key K_sa (which always has a Key ID of zero). Note that GSK_w{K_sa} means that the SA key is encrypted with the default wrap key, in which case, both KWK ID and Key ID are zero. โจ
The content of the KD payload will be shown as a sequence of key bags. The Group Key Bag substructure will be denoted as GP(SAn)() when n is an SPI for the SA and the Member Key Bag substructure will be denoted as MP(). The content of the key bags is shown as SA_KEY and WRAP_KEY attributes with the notation described above. For simplicity, the type of the attribute will not be shown because it is implicitly defined by the type of key bag. ๐ง
Below is the example of a KD payload:
KD(GP(SA1)(X{K_sa}),MP(Y{X},Z{Y},GSK_w{Z})
Figure 21: Example of a KD Payload ๐
For simplicity, any other attributes in the KD payload are omitted. ๐
We will also use the notation X->Y->Z to describe the Key Path. In this case, key Y is needed to decrypt key X and key Z is needed to decrypt key Y. In the example above, the keys had the following relation: K_sa->X->Y->Z->GSK_w. ๐
A.2. Group Creation ๐ณ
Okay so when a GCKS forms a group, it creates a key tree, as shown in Figure 22. The tree has logical keys (shown as the values of their Key IDs in the figure) and a private key shared with only one single GM. In the figure, the GMs are letters followed by their key ID in parentheses. The root holds the multicast Rekey SA key, written as SAn(K_san). The figure assumes the Key IDs are assigned sequentially, but that's not a requirement, it's just there to make things easier to picture. The GCKS can make a complete tree like this one, or a partial tree that gets built on demand as members join. โจ
SA1(K_sa1)
+------------------------------+
1 2
+---------------+ +---------------+
3 4 5 6
+-------+ +-------+ +--------+ +--------+
A(7) B(8) C(9) D(10) E(11) F(12) G(13) H(14)
Figure 22: Initial LKH Tree
When GM A joins the group, the GCKS gives it the keys in the KD payload of the GSA_AUTH or GSA_REGISTRATION exchange. Using the tree from the figure above, the KD payload will be:
KD(GP(SA1)(1{K_sa1}),MP(3{1},7{3},GSK_w{7})
Figure 23: KD Payload for the Group Member A
From these attributes, GM A builds the Key Path K_sa1->1->3->7->GSK_w. Since it ends up with GSK_w, it uses all the WRAP_KEY attributes in the path as its Working Key Path, which is 1->3->7. ๐
Other GMs get their keys the same way when they join, so their Working Key Paths look like this:
A: 1->3->7 B: 1->3->8 C: 1->4->9, D: 1->4->10
E: 2->5->11 F: 2->5->12 G: 2->6->13 H: 2->6->14
Figure 24: Key Paths for all GMs
A.3. Simple Group SA Rekey ๐
If the GCKS does a simple SA rekey without changing group membership, it only sends a Group Key Bag in the KD payload. That bag has a new SA key, encrypted with the default KWK. Easy. ๐ฆ
KD(GP(SA2)(GSK_w{K_sa2}))
Figure 25: KD Payload for the Simple Group SA Rekey
All the GMs can decrypt it, and nothing changes in their Working Key Paths. ๐ซถ
A.4. Group Member Exclusion ๐ซ
If the GCKS has reason to believe a GM should be excluded, it can do that by sending a GSA_REKEY message with a set of GM_KEY attributes. That lets every GM except the excluded one get a new SA key. Iconic behavior, honestly. ๐
In this example, the GCKS excludes GM F. To do that, it changes the key tree by replacing key 2 with key 15 and key 5 with key 16. It also generates a new SA key for a new SA3. ๐
SA3(K_sa3)
+------------------------------+
1 15
+---------------+ +---------------+
3 4 16 6
+-------+ +-------+ +---- +--------+
A(7) B(8) C(9) D(10) E(11) F(12) G(13) H(14)
Figure 26: LKH Tree after F Has Been Excluded
Then it sends this KD payload for the new Rekey SA3:
KD(GP(SA3)(1{K_sa3},15{K_sa3}),MP(6{15},16{15},11{16})
Figure 27: KD Payload for the Group Member F
Here's what happens when they process it:
- GMs A, B, C, and D can decrypt the SA_KEY attribute
1{K_sa3}using the "1" key from their key path. Since there are no new GM_KEY attributes in the new Key Path, they don't update their Working Key Paths. - GMs G and H construct the new Key Path
15->6and can decrypt the intermediate key 15 using key 6 from their Working Key Paths. So they update their Working Key Paths by replacing everything up to key 6 with the new Key Path, which swaps key 2 for key 15. - GM E constructs the new Key Path
16->15->11and can decrypt the intermediate key 16 using key 11 from its Working Key Path. So it updates its Working Key Path by replacing everything up to key 11 with the new Key Path, which swaps key 2 for key 15 and key 5 for key 16. - GM F can't construct any Key Path that leads to a key it holds, so it can't decrypt the new SA key for SA3. That means it gets excluded from the group once SA3 is used. ๐ฅ
In the end, the GMs have these Working Key Paths:
A: 1->3->7 B: 1->3->8 C: 1->4->9, D: 1->4->10
E: 15->16->11 F: excluded G: 15->6->13 H: 15->6->14
Figure 28: Key Paths for all GMs after Exclusion of a GM
Acknowledgements ๐
The authors thank Lakshminath Dondeti and Jing Xiang for first exploring the use of IKEv2 for group key management and for providing the basis behind the protocol. Mike Sullenberger and Amjad Inamdar were instrumental in helping resolve many issues in several draft versions of the document. ๐
The authors are grateful to Tero Kivinen, Daniel Migault, Gorry Fairhurst, Robert Sparks, Russ Housley, and Paul Wouters for their careful reviews and valuable proposals for improving the document quality. ๐
Contributors ๐ง
The following individuals made substantial contributions to earlier draft versions of this document.
Sheela Rowles
Cisco Systems
Aldous Yeung
Cisco Systems
Email: cyyeung@cisco.com
Paulina Tran
Cisco Systems
Yoav Nir
Dell EMC
Email: ynir.ietf@gmail.com
Authors' Addresses โ๏ธ
Valery Smyslov
ELVIS-PLUS
Russian Federation
Email: svan@elvis.ru
Brian Weis
Independent
United States of America
Email: bew.stds@gmail.com
๐ฆ where this page comes from
- ietf: rfc9838 2025-11
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms