Zum Hauptinhalt springen

3. Header und Nutzdatenformate

In den Tabellen dieses Abschnitts sind einige kryptographische Primitive und Konfigurationsattribute als "UNSPECIFIED" gekennzeichnet. Dafür gibt es keine bekannten Spezifikationen, daher ist Interoperabilität derzeit unmöglich. Eine künftige Spezifikation kann ihre Verwendung beschreiben, aber bis dahin SOLLEN Implementierungen, die interoperabel sein sollen, keine als "UNSPECIFIED" markierten Elemente verwenden.

3.1. IKE-Header​

IKE-Nachrichten verwenden die UDP-Ports 500 und/oder 4500, mit einer IKE-Nachricht pro UDP-Datagramm. Die Informationen vom Paketanfang bis zum UDP-Header werden weitgehend ignoriert, außer dass die IP-Adressen und UDP-Ports aus den Headern umgekehrt und für Rückpakete verwendet werden. Auf UDP-Port 500 beginnen IKE-Nachrichten unmittelbar nach dem UDP-Header. Auf UDP-Port 4500 haben IKE-Nachrichten vier Null-Oktetts vorangestellt. Diese vier Oktette sind nicht Teil der IKE-Nachricht und in keinem von IKE definierten Längenfeld oder Prüfsumme enthalten. Jede IKE-Nachricht beginnt mit dem IKE-Header, in diesem Dokument als HDR bezeichnet. Auf den Header folgen eine oder mehrere IKE-Payloads, jeweils durch ein Next-Payload-Feld des vorherigen Payloads identifiziert. Die Reihenfolge ergibt sich aus dem Next-Payload-Feld im IKE-Header und anschließend aus jedem Payload, bis Next Payload null ist. Wird ein Payload vom Typ "Encrypted" gefunden, wird er entschlüsselt und der Inhalt als weitere Payloads geparst. Ein Encrypted-Payload MUSS der letzte im Paket sein und ein Encrypted-Payload DARF keinen weiteren Encrypted-Payload enthalten.

Das Responder-SPI im Header identifiziert eine Instanz einer IKE Security Association. Eine IKE-Instanz kann daher mehrere Sitzungen mit mehreren Peers multiplexen, einschließlich mehrerer Sitzungen pro Peer.

Alle mehroktettigen Felder für Ganzzahlen liegen in Big-Endian-Reihenfolge ("most significant byte first", Netzwerkbyte-Reihenfolge).

Das Format des IKE-Headers zeigt Abbildung 4.

                        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 |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IKE SA Responder's SPI |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Next Payload | MjVer | MnVer | Exchange Type | Flags |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Message ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Figure 4: IKE Header Format
  • Initiator's SPI (8 Oktette) - Vom Initiator gewählter Wert zur eindeutigen Identifikation einer IKE-SA. Dieser Wert DARF NICHT null sein.

  • Responder's SPI (8 Oktette) - Vom Responder gewählter Wert zur eindeutigen Identifikation einer IKE-SA. In der ersten Nachricht eines initialen IKE-Austauschs (einschließlich Wiederholungen mit Cookie) MUSS dieser Wert null sein.

  • Next Payload (1 Oktett) - Typ des unmittelbar folgenden Payloads.

  • Major Version (4 Bits) - Major-Version des IKE-Protokolls. Implementierungen dieser Version MÜSSEN Major 2 setzen. Ältere IKE-/ISAKMP-Implementierungen MÜSSEN 1 setzen. IKEv2-Implementierungen dieses Dokuments MÜSSEN Nachrichten mit Major größer als 2 mit INVALID_MAJOR_VERSION ablehnen oder ignorieren (Abschnitt 2.5).

  • Minor Version (4 Bits) - Minor-Version. Implementierungen MÜSSEN 0 setzen und die Minor-Version empfangener Nachrichten IGNORIEREN.

  • Exchange Type (1 Oktett) - Austauschtyp. Die Tabelle entspricht dem Stand von RFC 4306; aktuelle Werte in [IKEV2IANA].

Exchange TypeValue
IKE_SA_INIT34
IKE_AUTH35
CREATE_CHILD_SA36
INFORMATIONAL37
  • Flags (1 Oktett) - Optionen als Bits.
        +-+-+-+-+-+-+-+-+
|X|X|R|V|I|X|X|X|
+-+-+-+-+-+-+-+-+

„Gesetzt“ bedeutet 1, „gelöscht“ 0. X-Bits MÜSSEN beim Senden gelöscht und beim Empfang ignoriert werden.

  • R (Response) - Kennzeichnet eine Antwort auf eine Nachricht mit derselben Message ID. Muss in Anfragen gelöscht und in Antworten gesetzt sein. Ein IKE-Endpunkt DARF keine Antwort auf eine als Antwort markierte Nachricht erzeugen (Ausnahme Abschnitt 2.21.2).

  • V (Version) - Höhere Major-Version möglich. IKEv2-Implementierungen MÜSSEN beim Senden löschen und beim Empfang ignorieren.

  • I (Initiator) - Muss in Nachrichten des ursprünglichen IKE-SA-Initiators gesetzt und beim ursprünglichen Responder gelöscht sein. Ändert sich mit dem letzten IKE-SA-Rekey-Initiator.

  • Message ID (4 Oktette, vorzeichenlos) - Retransmission und Zuordnung Anfrage/Antwort; wichtig gegen Wiedergabe. Abschnitte 2.1 und 2.2.

  • Length (4 Oktette, vorzeichenlos) - Gesamtlänge der Nachricht (Header + Payloads) in Oktetten.

3.2. Generischer Nutzdaten-Header​

Jeder in den Abschnitten 3.3 bis 3.16 definierte IKE-Payload beginnt mit einem generischen Nutzdaten-Header gemäß Abbildung 5. Die folgenden Abbildungen enthalten diesen Header; zur Kürze wird jedes Feld nicht erneut beschrieben.

                        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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Figure 5: Generic Payload Header

Die Felder des generischen Headers:

  • Next Payload (1 Oktett) - Typ des nächsten Payloads im Message. Ist der aktuelle Payload der letzte, ist das Feld 0. Ermöglicht Verkettung durch Anhängen. Encrypted-Payload ist Ausnahme und immer zuletzt; enthält strukturell weitere Payloads. Im Encrypted-Header steht Next Payload für den ersten inneren Payload; der letzte inneren hat Next Payload 0. Typwerte unten; aktuelle Werte in [IKEV2IANA].
Next Payload TypeNotationValue
No Next Payload0
Security AssociationSA33
Key ExchangeKE34
Identification - InitiatorIDi35
Identification - ResponderIDr36
CertificateCERT37
Certificate RequestCERTREQ38
AuthenticationAUTH39
NonceNi, Nr40
NotifyN41
DeleteD42
Vendor IDV43
Traffic Selector - InitiatorTSi44
Traffic Selector - ResponderTSr45
Encrypted and AuthenticatedSK46
ConfigurationCP47
Extensible AuthenticationEAP48

(Werte 1-32 sollen künftig nicht vergeben werden, um Überschneidung mit IKEv1 zu vermeiden.)

  • Critical (1 Bit) - MUSS null sein, wenn der Empfänger diesen Payload überspringen soll, falls er den Typ im Next Payload des vorherigen Payloads nicht versteht. MUSS eins sein, wenn die ganze Nachricht verworfen werden soll. MUSS ignoriert werden, wenn der Typ verstanden wird. MUSS für in diesem Dokument definierte Typen null sein. Der Critical-Bit gilt für den aktuellen Payload. Alle Typen dieses Dokuments MÜSSEN verstanden werden. Übersprungene Payloads sollten gültige Next-Payload- und Payload-Length-Felder haben. Siehe Abschnitt 2.5.

  • RESERVED (7 Bits) - MUSS als null gesendet und beim Empfang ignoriert werden.

  • Payload Length (2 Oktette, vorzeichenlos) - Länge des aktuellen Payloads einschließlich generischem Header in Oktetten.

Viele Payloads enthalten als "RESERVIERT" markierte Felder. Einige IKEv2-Payloads (und historisch IKEv1) sind nicht an 4-Oktett-Grenzen ausgerichtet.

3.3. Nutzdaten der Sicherheitsassoziation​

The Security Association payload, denoted SA in this document, is used to negotiate attributes of a Security Association. Assembly of Security Association payloads requires great peace of mind. An SA payload MAY contain multiple proposals. If there is more than one, they MUST be ordered from most preferred to least preferred. Each proposal contains a single IPsec protocol (where a protocol is IKE, ESP, or AH), each protocol MAY contain multiple transforms, and each transform MAY contain multiple attributes. When parsing an SA, an implementation MUST check that the total Payload Length is consistent with the payload's internal lengths and counts. Proposals, Transforms, and Attributes each have their own variable-length encodings. They are nested such that the Payload Length of an SA includes the combined contents of the SA, Proposal, Transform, and Attribute information. The length of a Proposal includes the lengths of all Transforms and Attributes it contains. The length of a Transform includes the lengths of all Attributes it contains.

The syntax of Security Associations, Proposals, Transforms, and Attributes is based on ISAKMP; however, the semantics are somewhat different. The reason for the complexity and the hierarchy is to allow for multiple possible combinations of algorithms to be encoded in a single SA. Sometimes there is a choice of multiple algorithms, whereas other times there is a combination of algorithms. For example, an initiator might want to propose using ESP with either (3DES and HMAC_MD5) or (AES and HMAC_SHA1).

One of the reasons the semantics of the SA payload have changed from ISAKMP and IKEv1 is to make the encodings more compact in common cases.

The Proposal structure contains within it a Proposal Num and an IPsec protocol ID. Each structure MUST have a proposal number one (1) greater than the previous structure. The first Proposal in the initiator's SA payload MUST have a Proposal Num of one (1). One reason to use multiple proposals is to propose both standard crypto ciphers and combined-mode ciphers. Combined-mode ciphers include both integrity and encryption in a single encryption algorithm, and MUST either offer no integrity algorithm or a single integrity algorithm of "NONE", with no integrity algorithm being the RECOMMENDED method. If an initiator wants to propose both combined-mode ciphers and normal ciphers, it must include two proposals: one will have all the combined-mode ciphers, and the other will have all the normal ciphers with the integrity algorithms. For example, one such proposal would have two proposal structures. Proposal 1 is ESP with AES-128, AES-192, and AES-256 bits in Cipher Block Chaining (CBC) mode, with either HMAC-SHA1-96 or XCBC-96 as the integrity algorithm; Proposal 2 is AES-128 or AES-256 in GCM mode with an 8-octet Integrity Check Value (ICV). Both proposals allow but do not require the use of ESNs (Extended Sequence Numbers). This can be illustrated as:

   SA Payload
|
+--- Proposal #1 ( Proto ID = ESP(3), SPI size = 4,
| | 7 transforms, SPI = 0x052357bb )
| |
| +-- Transform ENCR ( Name = ENCR_AES_CBC )
| | +-- Attribute ( Key Length = 128 )
| |
| +-- Transform ENCR ( Name = ENCR_AES_CBC )
| | +-- Attribute ( Key Length = 192 )
| |
| +-- Transform ENCR ( Name = ENCR_AES_CBC )
| | +-- Attribute ( Key Length = 256 )
| |
| +-- Transform INTEG ( Name = AUTH_HMAC_SHA1_96 )
| +-- Transform INTEG ( Name = AUTH_AES_XCBC_96 )
| +-- Transform ESN ( Name = ESNs )
| +-- Transform ESN ( Name = No ESNs )
|
+--- Proposal #2 ( Proto ID = ESP(3), SPI size = 4,
| 4 transforms, SPI = 0x35a1d6f2 )
|
+-- Transform ENCR ( Name = AES-GCM with a 8 octet ICV )
| +-- Attribute ( Key Length = 128 )
|
+-- Transform ENCR ( Name = AES-GCM with a 8 octet ICV )
| +-- Attribute ( Key Length = 256 )
|
+-- Transform ESN ( Name = ESNs )
+-- Transform ESN ( Name = No ESNs )

Each Proposal/Protocol structure is followed by one or more transform structures. The number of different transforms is generally determined by the Protocol. AH generally has two transforms: Extended Sequence Numbers (ESNs) and an integrity check algorithm. ESP generally has three: ESN, an encryption algorithm, and an integrity check algorithm. IKE generally has four transforms: a Diffie-Hellman group, an integrity check algorithm, a PRF algorithm, and an encryption algorithm. For each Protocol, the set of permissible transforms is assigned Transform ID numbers, which appear in the header of each transform.

If there are multiple transforms with the same Transform Type, the proposal is an OR of those transforms. If there are multiple transforms with different Transform Types, the proposal is an AND of the different groups. For example, to propose ESP with (3DES or AES-CBC) and (HMAC_MD5 or HMAC_SHA), the ESP proposal would contain two Transform Type 1 candidates (one for 3DES and one for AEC-CBC) and two Transform Type 3 candidates (one for HMAC_MD5 and one for HMAC_SHA). This effectively proposes four combinations of algorithms. If the initiator wanted to propose only a subset of those, for example (3DES and HMAC_MD5) or (IDEA and HMAC_SHA), there is no way to encode that as multiple transforms within a single Proposal. Instead, the initiator would have to construct two different Proposals, each with two transforms.

A given transform MAY have one or more Attributes. Attributes are necessary when the transform can be used in more than one way, as when an encryption algorithm has a variable key size. The transform would specify the algorithm and the attribute would specify the key size. Most transforms do not have attributes. A transform MUST NOT have multiple attributes of the same type. To propose alternate values for an attribute (for example, multiple key sizes for the AES encryption algorithm), an implementation MUST include multiple transforms with the same Transform Type each with a single Attribute.

Note that the semantics of Transforms and Attributes are quite different from those in IKEv1. In IKEv1, a single Transform carried multiple algorithms for a protocol with one carried in the Transform and the others carried in the Attributes.

                        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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ <Proposals> ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Figure 6: Security Association Payload
  • Proposals (variable) - One or more proposal substructures.

The payload type for the Security Association payload is thirty-three (33).

3.3.1. Proposal-Unterstruktur​

                        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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Last Substruc | RESERVED | Proposal Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Proposal Num | Protocol ID | SPI Size |Num Transforms|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ SPI (variable) ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ <Transforms> ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Figure 7: Proposal Substructure
  • Last Substruc (1 octet) - Specifies whether or not this is the last Proposal Substructure in the SA. This field has a value of 0 if this was the last Proposal Substructure, and a value of 2 if there are more Proposal Substructures. This syntax is inherited from ISAKMP, but is unnecessary because the last Proposal could be identified from the length of the SA. The value (2) corresponds to a payload type of Proposal in IKEv1, and the first four octets of the Proposal structure are designed to look somewhat like the header of a payload.

  • RESERVED (1 octet) - MUST be sent as zero; MUST be ignored on receipt.

  • Proposal Length (2 octets, unsigned integer) - Length of this proposal, including all transforms and attributes that follow.

  • Proposal Num (1 octet) - When a proposal is made, the first proposal in an SA payload MUST be 1, and subsequent proposals MUST be one more than the previous proposal (indicating an OR of the two proposals). When a proposal is accepted, the proposal number in the SA payload MUST match the number on the proposal sent that was accepted.

  • Protocol ID (1 octet) - Specifies the IPsec protocol identifier for the current negotiation. The values in the following table are only current as of the publication date of RFC 4306. Other values may have been added since then or will be added after the publication of this document. Readers should refer to [IKEV2IANA] for the latest values.

ProtocolProtocol ID
IKE1
AH2
ESP3
  • SPI Size (1 octet) - For an initial IKE SA negotiation, this field MUST be zero; the SPI is obtained from the outer header. During subsequent negotiations, it is equal to the size, in octets, of the SPI of the corresponding protocol (8 for IKE, 4 for ESP and AH).

  • Num Transforms (1 octet) - Specifies the number of transforms in this proposal.

  • SPI (variable) - The sending entity's SPI. Even if the SPI Size is not a multiple of 4 octets, there is no padding applied to the payload. When the SPI Size field is zero, this field is not present in the Security Association payload.

  • Transforms (variable) - One or more transform substructures.

3.3.2. Transform-Unterstruktur​

                        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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Last Substruc | RESERVED | Transform Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Transform Type | RESERVED | Transform ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Transform Attributes ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Figure 8: Transform Substructure
  • Last Substruc (1 octet) - Specifies whether or not this is the last Transform Substructure in the Proposal. This field has a value of 0 if this was the last Transform Substructure, and a value of 3 if there are more Transform Substructures. This syntax is inherited from ISAKMP, but is unnecessary because the last transform could be identified from the length of the proposal. The value (3) corresponds to a payload type of Transform in IKEv1, and the first four octets of the Transform structure are designed to look somewhat like the header of a payload.

  • RESERVED - MUST be sent as zero; MUST be ignored on receipt.

  • Transform Length - The length (in octets) of the Transform Substructure including Header and Attributes.

  • Transform Type (1 octet) - The type of transform being specified in this transform. Different protocols support different Transform Types. For some protocols, some of the transforms may be optional. If a transform is optional and the initiator wishes to propose that the transform be omitted, no transform of the given type is included in the proposal. If the initiator wishes to make use of the transform optional to the responder, it includes a transform substructure with Transform ID = 0 as one of the options.

  • Transform ID (2 octets) - The specific instance of the Transform Type being proposed.

The Transform Type values are listed below. The values in the following table are only current as of the publication date of RFC 4306. Other values may have been added since then or will be added after the publication of this document. Readers should refer to [IKEV2IANA] for the latest values.

DescriptionTrans. TypeUsed In
Encryption Algorithm (ENCR)1IKE and ESP
Pseudorandom Function (PRF)2IKE
Integrity Algorithm (INTEG)3IKE*, AH, optional in ESP
Diffie-Hellman Group (D-H)4IKE, optional in AH & ESP
Extended Sequence Numbers (ESN)5AH and ESP

(*) Negotiating an integrity algorithm is mandatory for the Encrypted payload format specified in this document. For example, [AEAD] specifies additional formats based on authenticated encryption, in which a separate integrity algorithm is not negotiated.

For Transform Type 1 (Encryption Algorithm), the Transform IDs are listed below. The values in the following table are only current as of the publication date of RFC 4306. Other values may have been added since then or will be added after the publication of this document. Readers should refer to [IKEV2IANA] for the latest values.

NameNumberDefined In
ENCR_DES_IV641(UNSPECIFIED)
ENCR_DES2[RFC2405], [DES]
ENCR_3DES3[RFC2451]
ENCR_RC54[RFC2451]
ENCR_IDEA5[RFC2451], [IDEA]
ENCR_CAST6[RFC2451]
ENCR_BLOWFISH7[RFC2451]
ENCR_3IDEA8(UNSPECIFIED)
ENCR_DES_IV329(UNSPECIFIED)
ENCR_NULL11[RFC2410]
ENCR_AES_CBC12[RFC3602]
ENCR_AES_CTR13[RFC3686]

For Transform Type 2 (Pseudorandom Function), the Transform IDs are listed below. The values in the following table are only current as of the publication date of RFC 4306. Other values may have been added since then or will be added after the publication of this document. Readers should refer to [IKEV2IANA] for the latest values.

NameNumberDefined In
PRF_HMAC_MD51[RFC2104], [MD5]
PRF_HMAC_SHA12[RFC2104], [FIPS.180-4.2012]
PRF_HMAC_TIGER3(UNSPECIFIED)

For Transform Type 3 (Integrity Algorithm), defined Transform IDs are listed below. The values in the following table are only current as of the publication date of RFC 4306. Other values may have been added since then or will be added after the publication of this document. Readers should refer to [IKEV2IANA] for the latest values.

NameNumberDefined In
NONE0
AUTH_HMAC_MD5_961[RFC2403]
AUTH_HMAC_SHA1_962[RFC2404]
AUTH_DES_MAC3(UNSPECIFIED)
AUTH_KPDK_MD54(UNSPECIFIED)
AUTH_AES_XCBC_965[RFC3566]

For Transform Type 4 (Diffie-Hellman group), defined Transform IDs are listed below. The values in the following table are only current as of the publication date of RFC 4306. Other values may have been added since then or will be added after the publication of this document. Readers should refer to [IKEV2IANA] for the latest values.

NameNumberDefined In
NONE0
768-bit MODP Group1Appendix B
1024-bit MODP Group2Appendix B
1536-bit MODP Group5[ADDGROUP]
2048-bit MODP Group14[ADDGROUP]
3072-bit MODP Group15[ADDGROUP]
4096-bit MODP Group16[ADDGROUP]
6144-bit MODP Group17[ADDGROUP]
8192-bit MODP Group18[ADDGROUP]

Although ESP and AH do not directly include a Diffie-Hellman exchange, a Diffie-Hellman group MAY be negotiated for the Child SA. This allows the peers to employ Diffie-Hellman in the CREATE_CHILD_SA exchange, providing perfect forward secrecy for the generated Child SA keys.

Note that the MODP Diffie-Hellman groups listed above do not need any special validity tests to be performed, but other types of groups (elliptic curve groups, and MODP groups with small subgroups) need to have some additional tests performed on them to use them securely. See "Additional Diffie-Hellman Tests for IKEv2" ([RFC6989]) for more information.

For Transform Type 5 (Extended Sequence Numbers), defined Transform IDs are listed below. The values in the following table are only current as of the publication date of RFC 4306. Other values may have been added since then or will be added after the publication of this document. Readers should refer to [IKEV2IANA] for the latest values.

NameNumber
No Extended Sequence Numbers0
Extended Sequence Numbers1

Note that an initiator who supports ESNs will usually include two ESN transforms, with values "0" and "1", in its proposals. A proposal containing a single ESN transform with value "1" means that using normal (non-extended) sequence numbers is not acceptable.

Numerous additional Transform Types have been defined since the publication of RFC 4306. Please refer to the IANA "Internet Key Exchange Version 2 (IKEv2) Parameters" registry for details.

3.3.3. Gültige Transform-Typen je Protokoll​

The number and type of transforms that accompany an SA payload are dependent on the protocol in the SA itself. An SA payload proposing the establishment of an SA has the following mandatory and optional Transform Types. A compliant implementation MUST understand all mandatory and optional types for each protocol it supports (though it need not accept proposals with unacceptable suites). A proposal MAY omit the optional types if the only value for them it will accept is NONE.

ProtocolMandatory TypesOptional Types
IKEENCR, PRF, INTEG*, D-H
ESPENCR, ESNINTEG, D-H
AHINTEG, ESND-H

(*) Negotiating an integrity algorithm is mandatory for the Encrypted payload format specified in this document. For example, [AEAD] specifies additional formats based on authenticated encryption, in which a separate integrity algorithm is not negotiated.

3.3.4. Obligatorische Transform-IDs​

The specification of suites that MUST and SHOULD be supported for interoperability has been removed from this document because they are likely to change more rapidly than this document evolves. At the time of publication of this document, [RFC4307] specifies these suites, but note that it might be updated in the future, and other RFCs might specify different sets of suites.

An important lesson learned from IKEv1 is that no system should only implement the mandatory algorithms and expect them to be the best choice for all customers.

It is likely that IANA will add additional transforms in the future, and some users may want to use private suites, especially for IKE where implementations should be capable of supporting different parameters, up to certain size limits. In support of this goal, all implementations of IKEv2 SHOULD include a management facility that allows specification (by a user or system administrator) of Diffie-Hellman parameters (the generator, modulus, and exponent lengths and values) for new Diffie-Hellman groups. Implementations SHOULD provide a management interface through which these parameters and the associated Transform IDs may be entered (by a user or system administrator), to enable negotiating such groups.

All implementations of IKEv2 MUST include a management facility that enables a user or system administrator to specify the suites that are acceptable for use with IKE. Upon receipt of a payload with a set of Transform IDs, the implementation MUST compare the transmitted Transform IDs against those locally configured via the management controls, to verify that the proposed suite is acceptable based on local policy. The implementation MUST reject SA proposals that are not authorized by these IKE suite controls. Note that cryptographic suites that MUST be implemented need not be configured as acceptable to local policy.

3.3.5. Transform-Attribute​

Each transform in a Security Association payload may include attributes that modify or complete the specification of the transform. The set of valid attributes depends on the transform. Currently, only a single attribute type is defined: the Key Length attribute is used by certain encryption transforms with variable-length keys (see below for details).

The attributes are type/value pairs and are defined below. Attributes can have a value with a fixed two-octet length or a variable-length value. For the latter, the attribute is encoded as type/length/value.

                        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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|A| Attribute Type | AF=0 Attribute Length |
|F| | AF=1 Attribute Value |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| AF=0 Attribute Value |
| AF=1 Not Transmitted |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Figure 9: Data Attributes
  • Attribute Format (AF) (1 bit) - Indicates whether the data attribute follows the Type/Length/Value (TLV) format or a shortened Type/Value (TV) format. If the AF bit is zero (0), then the attribute uses TLV format; if the AF bit is one (1), the TV format (with two-byte value) is used.

  • Attribute Type (15 bits) - Unique identifier for each type of attribute (see below).

  • Attribute Value (variable length) - Value of the attribute associated with the attribute type. If the AF bit is a zero (0), this field has a variable length defined by the Attribute Length field. If the AF bit is a one (1), the Attribute Value has a length of 2 octets.

The only currently defined attribute type (Key Length) is fixed length; the variable-length encoding specification is included only for future extensions. Attributes described as fixed length MUST NOT be encoded using the variable-length encoding unless that length exceeds two bytes. Variable-length attributes MUST NOT be encoded as fixed-length even if their value can fit into two octets. Note: This is a change from IKEv1, where increased flexibility may have simplified the composer of messages but certainly complicated the parser.

The values in the following table are only current as of the publication date of RFC 4306. Other values may have been added since then or will be added after the publication of this document. Readers should refer to [IKEV2IANA] for the latest values.

Attribute TypeValueAttribute Format
Key Length (in bits)14TV

Values 0-13 and 15-17 were used in a similar context in IKEv1, and should not be assigned except to matching values.

The Key Length attribute specifies the key length in bits (MUST use network byte order) for certain transforms as follows:

  • The Key Length attribute MUST NOT be used with transforms that use a fixed-length key. For example, this includes ENCR_DES, ENCR_IDEA, and all the Type 2 (Pseudorandom Function) and Type 3 (Integrity Algorithm) transforms specified in this document. It is recommended that future Type 2 or 3 transforms do not use this attribute.

  • Some transforms specify that the Key Length attribute MUST be always included (omitting the attribute is not allowed, and proposals not containing it MUST be rejected). For example, this includes ENCR_AES_CBC and ENCR_AES_CTR.

  • Some transforms allow variable-length keys, but also specify a default key length if the attribute is not included. For example, these transforms include ENCR_RC5 and ENCR_BLOWFISH.

Implementation note: To further interoperability and to support upgrading endpoints independently, implementers of this protocol SHOULD accept values that they deem to supply greater security. For instance, if a peer is configured to accept a variable-length cipher with a key length of X bits and is offered that cipher with a larger key length, the implementation SHOULD accept the offer if it supports use of the longer key.

Support for this capability allows a responder to express a concept of "at least" a certain level of security -- "a key length of at least X bits for cipher Y". However, as the attribute is always returned unchanged (see the next section), an initiator willing to accept multiple key lengths has to include multiple transforms with the same Transform Type, each with a different Key Length attribute.

3.3.6. Verhandlung von Attributen​

During Security Association negotiation initiators present offers to responders. Responders MUST select a single complete set of parameters from the offers (or reject all offers if none are acceptable). If there are multiple proposals, the responder MUST choose a single proposal. If the selected proposal has multiple transforms with the same type, the responder MUST choose a single one. Any attributes of a selected transform MUST be returned unmodified. The initiator of an exchange MUST check that the accepted offer is consistent with one of its proposals, and if not MUST terminate the exchange.

If the responder receives a proposal that contains a Transform Type it does not understand, or a proposal that is missing a mandatory Transform Type, it MUST consider this proposal unacceptable; however, other proposals in the same SA payload are processed as usual. Similarly, if the responder receives a transform that it does not understand, or one that contains a Transform Attribute it does not understand, it MUST consider this transform unacceptable; other transforms with the same Transform Type are processed as usual. This allows new Transform Types and Transform Attributes to be defined in the future.

Negotiating Diffie-Hellman groups presents some special challenges. SA offers include proposed attributes and a Diffie-Hellman public number (KE) in the same message. If in the initial exchange the initiator offers to use one of several Diffie-Hellman groups, it SHOULD pick the one the responder is most likely to accept and include a KE corresponding to that group. If the responder selects a proposal using a different Diffie-Hellman group (other than NONE), the responder will indicate the correct group in the response and the initiator SHOULD pick an element of that group for its KE value when retrying the first message. It SHOULD, however, continue to propose its full supported set of groups in order to prevent a man-in-the-middle downgrade attack. If one of the proposals offered is for the Diffie-Hellman group of NONE, and the responder selects that Diffie-Hellman group, then it MUST ignore the initiator's KE payload and omit the KE payload from the response.

3.4. Nutzdaten für den Schlüsselaustausch​

The Key Exchange payload, denoted KE in this document, is used to exchange Diffie-Hellman public numbers as part of a Diffie-Hellman key exchange. The Key Exchange payload consists of the IKE generic payload header followed by the Diffie-Hellman public value itself.

                        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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Diffie-Hellman Group Num | RESERVED |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Key Exchange Data ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Figure 10: Key Exchange Payload Format

A Key Exchange payload is constructed by copying one's Diffie-Hellman public value into the "Key Exchange Data" portion of the payload. The length of the Diffie-Hellman public value for MODP groups MUST be equal to the length of the prime modulus over which the exponentiation was performed, prepending zero bits to the value if necessary.

The Diffie-Hellman Group Num identifies the Diffie-Hellman group in which the Key Exchange Data was computed (see Section 3.3.2). This Diffie-Hellman Group Num MUST match a Diffie-Hellman group specified in a proposal in the SA payload that is sent in the same message, and SHOULD match the Diffie-Hellman group in the first group in the first proposal, if such exists. If none of the proposals in that SA payload specifies a Diffie-Hellman group, the KE payload MUST NOT be present. If the selected proposal uses a different Diffie-Hellman group (other than NONE), the message MUST be rejected with a Notify payload of type INVALID_KE_PAYLOAD. See also Sections 1.2 and 2.7.

The payload type for the Key Exchange payload is thirty-four (34).

3.5. Identifikations-Nutzdaten​

The Identification payloads, denoted IDi and IDr in this document, allow peers to assert an identity to one another. This identity may be used for policy lookup, but does not necessarily have to match anything in the CERT payload; both fields may be used by an implementation to perform access control decisions. When using the ID_IPV4_ADDR/ID_IPV6_ADDR identity types in IDi/IDr payloads, IKEv2 does not require this address to match the address in the IP header of IKEv2 packets, or anything in the TSi/TSr payloads. The contents of IDi/IDr are used purely to fetch the policy and authentication data related to the other party.

NOTE: In IKEv1, two ID payloads were used in each direction to hold Traffic Selector (TS) information for data passing over the SA. In IKEv2, this information is carried in TS payloads (see Section 3.13).

The Peer Authorization Database (PAD) as described in RFC 4301 [IPSECARCH] describes the use of the ID payload in IKEv2 and provides a formal model for the binding of identity to policy in addition to providing services that deal more specifically with the details of policy enforcement. The PAD is intended to provide a link between the SPD and the IKE Security Association management. See Section 4.4.3 of RFC 4301 for more details.

The Identification payload consists of the IKE generic payload header followed by identification fields 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Next Payload |C| RESERVED | Payload Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ID Type | RESERVED |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Identification Data ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Figure 11: Identification Payload Format
  • ID Type (1 octet) - Specifies the type of Identification being used.

  • RESERVED - MUST be sent as zero; MUST be ignored on receipt.

  • Identification Data (variable length) - Value, as indicated by the Identification Type. The length of the Identification Data is computed from the size in the ID payload header.

The payload types for the Identification payload are thirty-five (35) for IDi and thirty-six (36) for IDr.

The following table lists the assigned semantics for the Identification Type field. The values in the following table are only current as of the publication date of RFC 4306. Other values may have been added since then or will be added after the publication of this document. Readers should refer to [IKEV2IANA] for the latest values.

ID TypeValue
ID_IPV4_ADDR1
ID_FQDN2
ID_RFC822_ADDR3
ID_IPV6_ADDR5
ID_DER_ASN1_DN9
ID_DER_ASN1_GN10
ID_KEY_ID11
  • ID_IPV4_ADDR - A single four (4) octet IPv4 address.

  • ID_FQDN - A fully-qualified domain name string. An example of an ID_FQDN is "example.com". The string MUST NOT contain any terminators (e.g., NULL, CR, etc.). All characters in the ID_FQDN are ASCII; for an "internationalized domain name", the syntax is as defined in [IDNA], for example "xn--tmonesimerkki-bfbb.example.net".

  • ID_RFC822_ADDR - A fully-qualified RFC 822 email address string. An example of a ID_RFC822_ADDR is "[email protected]". The string MUST NOT contain any terminators. Because of [EAI], implementations would be wise to treat this field as UTF-8 encoded text, not as pure ASCII.

  • ID_IPV6_ADDR - A single sixteen (16) octet IPv6 address.

  • ID_DER_ASN1_DN - The binary Distinguished Encoding Rules (DER) encoding of an ASN.1 X.500 Distinguished Name [PKIX].

  • ID_DER_ASN1_GN - The binary DER encoding of an ASN.1 X.509 GeneralName [PKIX].

  • ID_KEY_ID - An opaque octet stream that may be used to pass vendor-specific information necessary to do certain proprietary types of identification.

Two implementations will interoperate only if each can generate a type of ID acceptable to the other. To assure maximum interoperability, implementations MUST be configurable to send at least one of ID_IPV4_ADDR, ID_FQDN, ID_RFC822_ADDR, or ID_KEY_ID, and MUST be configurable to accept all of these four types. Implementations SHOULD be capable of generating and accepting all of these types. IPv6-capable implementations MUST additionally be configurable to accept ID_IPV6_ADDR. IPv6-only implementations MAY be configurable to send only ID_IPV6_ADDR instead of ID_IPV4_ADDR for IP addresses.

EAP [EAP] does not mandate the use of any particular type of identifier, but often EAP is used with Network Access Identifiers (NAIs) defined in [NAI]. Although NAIs look a bit like email addresses (e.g., "[email protected]"), the syntax is not exactly the same as the syntax of email address in [MAILFORMAT]. For those NAIs that include the realm component, the ID_RFC822_ADDR identification type SHOULD be used. Responder implementations should not attempt to verify that the contents actually conform to the exact syntax given in [MAILFORMAT], but instead should accept any reasonable-looking NAI. For NAIs that do not include the realm component, the ID_KEY_ID identification type SHOULD be used.

See "The Internet IP Security PKI Profile of IKEv1/ISAKMP, IKEv2, and PKIX" ([RFC4945]) for more information about matching Identification payloads and the contents of the PKIX Certificates.

3.6. Zertifikat-Nutzdaten​

The Certificate payload, denoted CERT in this document, provides a means to transport certificates or other authentication-related information via IKE. Certificate payloads SHOULD be included in an exchange if certificates are available to the sender. The Hash and URL formats of the Certificate payloads should be used in case the peer has indicated an ability to retrieve this information from elsewhere using an HTTP_CERT_LOOKUP_SUPPORTED Notify payload. Note that the term "Certificate payload" is somewhat misleading, because not all authentication mechanisms use certificates and data other than certificates may be passed in this payload.

The Certificate payload 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Next Payload |C| RESERVED | Payload Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Cert Encoding | |
+-+-+-+-+-+-+-+-+ |
~ Certificate Data ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Figure 12: Certificate Payload Format
  • Certificate Encoding (1 octet) - This field indicates the type of certificate or certificate-related information contained in the Certificate Data field. The values in the following table are only current as of the publication date of RFC 4306. Other values may have been added since then or will be added after the publication of this document. Readers should refer to [IKEV2IANA] for the latest values.
Certificate EncodingValueNote
PKCS #7 wrapped X.509 certificate1UNSPECIFIED
PGP Certificate2UNSPECIFIED
DNS Signed Key3UNSPECIFIED
X.509 Certificate - Signature4
Kerberos Token6UNSPECIFIED
Certificate Revocation List (CRL)7
Authority Revocation List (ARL)8UNSPECIFIED
SPKI Certificate9UNSPECIFIED
X.509 Certificate - Attribute10UNSPECIFIED
Deprecated (was Raw RSA Key)11DEPRECATED
Hash and URL of X.509 certificate12
Hash and URL of X.509 bundle13
  • Certificate Data (variable length) - Actual encoding of certificate data. The type of certificate is indicated by the Certificate Encoding field.

The payload type for the Certificate payload is thirty-seven (37).

Specific syntax for some of the certificate type codes above is not defined in this document. The types whose syntax is defined in this document are:

  • "X.509 Certificate - Signature" contains a DER-encoded X.509 certificate whose public key is used to validate the sender's AUTH payload. Note that with this encoding, if a chain of certificates needs to be sent, multiple CERT payloads are used, only the first of which holds the public key used to validate the sender's AUTH payload.

  • "Certificate Revocation List" contains a DER-encoded X.509 certificate revocation list.

  • Hash and URL encodings allow IKE messages to remain short by replacing long data structures with a 20-octet SHA-1 hash (see [FIPS.180-4.2012]) of the replaced value followed by a variable-length URL that resolves to the DER-encoded data structure itself. This improves efficiency when the endpoints have certificate data cached and makes IKE less subject to DoS attacks that become easier to mount when IKE messages are large enough to require IP fragmentation [DOSUDPPROT].

The "Hash and URL of a bundle" type uses the following ASN.1 definition for the X.509 bundle:

   CertBundle
{ iso(1) identified-organization(3) dod(6) internet(1)
security(5) mechanisms(5) pkix(7) id-mod(0)
id-mod-cert-bundle(34) }

DEFINITIONS EXPLICIT TAGS ::=
BEGIN

IMPORTS
Certificate, CertificateList
FROM PKIX1Explicit88
{ iso(1) identified-organization(3) dod(6)
internet(1) security(5) mechanisms(5) pkix(7)
id-mod(0) id-pkix1-explicit(18) } ;

CertificateOrCRL ::= CHOICE {
cert [0] Certificate,
crl [1] CertificateList }

CertificateBundle ::= SEQUENCE OF CertificateOrCRL

END

Implementations MUST be capable of being configured to send and accept up to four X.509 certificates in support of authentication, and also MUST be capable of being configured to send and accept the two Hash and URL formats (with HTTP URLs). If multiple certificates are sent, the first certificate MUST contain the public key associated with the private key used to sign the AUTH payload. The other certificates may be sent in any order.

Implementations MUST support the http: scheme for hash-and-URL lookup. The behavior of other URL schemes [URLS] is not currently specified, and such schemes SHOULD NOT be used in the absence of a document specifying them.

3.7. Zertifikatsanforderungs-Nutzdaten​

The Certificate Request payload, denoted CERTREQ in this document, provides a means to request preferred certificates via IKE and can appear in the IKE_SA_INIT response and/or the IKE_AUTH request. Certificate Request payloads MAY be included in an exchange when the sender needs to get the certificate of the receiver.

The Certificate Request payload 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Next Payload |C| RESERVED | Payload Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Cert Encoding | |
+-+-+-+-+-+-+-+-+ |
~ Certification Authority ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Figure 13: Certificate Request Payload Format
  • Certificate Encoding (1 octet) - Contains an encoding of the type or format of certificate requested. Values are listed in Section 3.6.

  • Certification Authority (variable length) - Contains an encoding of an acceptable certification authority for the type of certificate requested.

The payload type for the Certificate Request payload is thirty-eight (38).

The Certificate Encoding field has the same values as those defined in Section 3.6. The Certification Authority field contains an indicator of trusted authorities for this certificate type. The Certification Authority value is a concatenated list of SHA-1 hashes of the public keys of trusted Certification Authorities (CAs). Each is encoded as the SHA-1 hash of the Subject Public Key Info element (see Section 4.1.2.7 of [PKIX]) from each Trust Anchor certificate. The 20-octet hashes are concatenated and included with no other formatting.

The contents of the Certification Authority field are defined only for X.509 certificates, which are types 4, 12, and 13. Other values SHOULD NOT be used until Standards-Track specifications that specify their use are published.

Note that the term "Certificate Request" is somewhat misleading, in that values other than certificates are defined in a "Certificate" payload and requests for those values can be present in a Certificate Request payload. The syntax of the Certificate Request payload in such cases is not defined in this document.

The Certificate Request payload is processed by inspecting the Cert Encoding field to determine whether the processor has any certificates of this type. If so, the Certification Authority field is inspected to determine if the processor has any certificates that can be validated up to one of the specified certification authorities. This can be a chain of certificates.

If an end-entity certificate exists that satisfies the criteria specified in the CERTREQ, a certificate or certificate chain SHOULD be sent back to the certificate requestor if the recipient of the CERTREQ:

  • is configured to use certificate authentication,

  • is allowed to send a CERT payload,

  • has matching CA trust policy governing the current negotiation, and

  • has at least one time-wise and usage-appropriate end-entity certificate chaining to a CA provided in the CERTREQ.

Certificate revocation checking must be considered during the chaining process used to select a certificate. Note that even if two peers are configured to use two different CAs, cross-certification relationships should be supported by appropriate selection logic.

The intent is not to prevent communication through the strict adherence of selection of a certificate based on CERTREQ, when an alternate certificate could be selected by the sender that would still enable the recipient to successfully validate and trust it through trust conveyed by cross-certification, CRLs, or other out-of-band configured means. Thus, the processing of a CERTREQ should be seen as a suggestion for a certificate to select, not a mandated one. If no certificates exist, then the CERTREQ is ignored. This is not an error condition of the protocol. There may be cases where there is a preferred CA sent in the CERTREQ, but an alternate might be acceptable (perhaps after prompting a human operator).

The HTTP_CERT_LOOKUP_SUPPORTED notification MAY be included in any message that can include a CERTREQ payload and indicates that the sender is capable of looking up certificates based on an HTTP-based URL (and hence presumably would prefer to receive certificate specifications in that format).

3.8. Authentisierungs-Nutzdaten​

The Authentication payload, denoted AUTH in this document, contains data used for authentication purposes. The syntax of the Authentication Data varies according to the Auth Method as specified below.

The Authentication payload 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Next Payload |C| RESERVED | Payload Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Auth Method | RESERVED |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Authentication Data ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Figure 14: Authentication Payload Format
  • Auth Method (1 octet) - Specifies the method of authentication used. The types of signatures are listed here. The values in the following table are only current as of the publication date of RFC 4306. Other values may have been added since then or will be added after the publication of this document. Readers should refer to [IKEV2IANA] for the latest values.
MechanismValue
RSA Digital Signature1
Shared Key Message Integrity Code2
DSS Digital Signature3
  • RSA Digital Signature - Computed as specified in Section 2.15 using an RSA private key with RSASSA-PKCS1-v1_5 signature scheme specified in [PKCS1] (implementers should note that IKEv1 used a different method for RSA signatures). To promote interoperability, implementations that support this type SHOULD support signatures that use SHA-1 as the hash function and SHOULD use SHA-1 as the default hash function when generating signatures. Implementations can use the certificates received from a given peer as a hint for selecting a mutually understood hash function for the AUTH payload signature. Note, however, that the hash algorithm used in the AUTH payload signature doesn't have to be the same as any hash algorithm(s) used in the certificate(s).

  • Shared Key Message Integrity Code - Computed as specified in Section 2.15 using the shared key associated with the identity in the ID payload and the negotiated PRF.

  • DSS Digital Signature - Computed as specified in Section 2.15 using a DSS private key (see [DSS]) over a SHA-1 hash.

  • RESERVED - MUST be sent as zero; MUST be ignored on receipt.

  • Authentication Data (variable length) - see Section 2.15.

The payload type for the Authentication payload is thirty-nine (39).

3.9. Nonce-Nutzdaten​

Das Nonce-Payload, in diesem Dokument als Ni bzw. Nr für den Nonce des Initiators bzw. des Responders bezeichnet, enthält Zufallsdaten, die während eines Austauschs die Aktualität (Liveness) sichern und Wiederholungsangriffe abwehren.

Das Nonce-Payload ist wie folgt definiert:

                    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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Nonce Data ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Abbildung 15: Format des Nonce-Payloads

  • Nonce Data (variable Länge) - Enthält die von der sendenden Entität erzeugten Zufallsdaten.

Der Nutzdatentyp für das Nonce-Payload ist vierzig (40).

Die Größe der Nonce Data MUSS zwischen 16 und 256 Oktetten einschließlich liegen. Nonce-Werte DÜRFEN NICHT wiederverwendet werden.

3.10. Benachrichtigungs-Nutzdaten​

Das Notify-Payload, in diesem Dokument als N bezeichnet, dient der Übermittlung informativer Daten wie Fehlerzustände und Zustandsübergänge an einen IKE-Peer. Ein Notify-Payload kann in einer Antwortnachricht vorkommen (üblicherweise mit Angabe, warum eine Anfrage abgelehnt wurde), in einem INFORMATIONAL-Austausch (zur Meldung eines Fehlers außerhalb einer IKE-Anfrage) oder in jeder anderen Nachricht, um Fähigkeiten des Senders anzuzeigen oder die Bedeutung der Anfrage zu ändern.

Das Notify-Payload ist wie folgt definiert:

                    1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Next Payload |C| RESERVED | Payload Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Protocol ID | SPI Size | Notify Message Type |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Security Parameter Index (SPI) ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Notification Data ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Abbildung 16: Format des Notify-Payloads

  • Protocol ID (1 Oktett) - Betrifft diese Benachrichtigung eine bestehende SA, deren SPI im SPI-Feld steht, gibt dieses Feld den Typ dieser SA an. Für Benachrichtigungen zu Child-SAs MUSS dieses Feld entweder (2) für AH oder (3) für ESP enthalten. Unter den in diesem Dokument definierten Benachrichtigungen ist die SPI nur bei INVALID_SELECTORS, REKEY_SA und CHILD_SA_NOT_FOUND enthalten. Ist das SPI-Feld leer, MUSS dieses Feld als Null gesendet und beim Empfang ignoriert werden.

  • SPI Size (1 Oktett) - Länge des SPI in Oktetten gemäß IPsec-Protokoll-ID oder null, wenn kein SPI zutrifft. Bei einer Benachrichtigung zur IKE-SA MUSS die SPI Size null sein und das Feld leer.

  • Notify Message Type (2 Oktette) - Gibt den Typ der Benachrichtigungsnachricht an.

  • SPI (variable Länge) - Security Parameter Index.

  • Notification Data (variable Länge) - Status- oder Fehlerdaten zusätzlich zum Notify Message Type. Die Werte sind typspezifisch (siehe unten).

Der Nutzdatentyp für das Notify-Payload ist einundvierzig (41).

3.10.1. Notify-Nachrichtentypen​

Benachrichtigungsinformationen können Fehlermeldungen sein, die angeben, warum eine SA nicht etabliert werden konnte. Sie können auch Statusdaten sein, die ein Prozess, der eine SA-Datenbank verwaltet, einem Peer-Prozess mitteilen möchte.

Die folgende Tabelle listet die Benachrichtigungsnachrichten und ihre Werte. Die Anzahl unterschiedlicher Fehlerstatus wurde gegenüber IKEv1 stark reduziert, sowohl zur Vereinfachung als auch um Konfigurationsinformationen gegenüber Sonden nicht preiszugeben.

Typen im Bereich 0 - 16383 dienen der Fehlerberichterstattung. Eine Implementierung, die in einer Antwort ein Notify-Payload mit einem dieser nicht erkannten Typen erhält, MUSS annehmen, dass die zugehörige Anfrage vollständig fehlgeschlagen ist. Nicht erkannte Fehlertypen in einer Anfrage und Statustypen in Anfrage oder Antwort MÜSSEN ignoriert und sollten protokolliert werden.

Notify-Payloads mit Statustypen DÜRFEN jeder Nachricht hinzugefügt werden und MÜSSEN ignoriert werden, wenn nicht erkannt. Sie dienen der Anzeige von Fähigkeiten und werden im Rahmen der SA-Aushandlung zur Aushandlung nicht-kryptographischer Parameter verwendet.

Weitere Informationen zur Fehlerbehandlung finden sich in Abschnitt 2.21.

Die Werte der folgenden Tabelle gelten nur bis zum Veröffentlichungsdatum von RFC 4306 zuzüglich zweier in diesem Dokument hinzugefügter Fehlertypen. Später können weitere Werte hinzugekommen sein. Aktuelle Werte in [IKEV2IANA].

NOTIFY-Nachrichten: FehlertypenWert
UNSUPPORTED_CRITICAL_PAYLOAD1
Siehe Abschnitt 2.5.
INVALID_IKE_SPI4
Siehe Abschnitt 2.21.
INVALID_MAJOR_VERSION5
Siehe Abschnitt 2.5.
INVALID_SYNTAX7
Zeigt an, dass die empfangene IKE-Nachricht ungültig war, weil Typ, Länge oder Wert außerhalb des zulässigen Bereichs lagen oder die Anfrage aus Richtliniengründen abgelehnt wurde. Um DoS-Angriffe mit gefälschten Nachrichten zu vermeiden, darf dieser Status nur für und in einem verschlüsselten Paket zurückgegeben werden, wenn Message ID und kryptographische Prüfsumme gültig waren. Um Informationslecks bei Sondierungen zu vermeiden, MUSS dieser Status als Antwort auf jeden Fehler gesendet werden, der von keinem anderen Statustyp abgedeckt ist. Zur Fehlersuche sollten detailliertere Fehlerinformationen auf Konsole oder in ein Protokoll geschrieben werden.
INVALID_MESSAGE_ID9
Siehe Abschnitt 2.3.
INVALID_SPI11
Siehe Abschnitt 1.5.
NO_PROPOSAL_CHOSEN14
Keines der vorgeschlagenen Kryptosuites war akzeptabel. Kann gesendet werden, wenn die angebotenen Vorschläge (einschließlich, aber nicht beschränkt auf SA-Payload-Werte, USE_TRANSPORT_MODE-Benachrichtigung, IPCOMP_SUPPORTED-Benachrichtigung) für den Responder nicht akzeptabel sind. Kann auch als „generischer“ Child-SA-Fehler dienen, wenn die Child-SA aus einem anderen Grund nicht erstellt werden kann. Siehe auch Abschnitt 2.7.
INVALID_KE_PAYLOAD17
Siehe Abschnitte 1.2 und 1.3.
AUTHENTICATION_FAILED24
In der Antwort auf eine IKE_AUTH-Nachricht gesendet, wenn die Authentifizierung aus irgendeinem Grund fehlschlug. Keine zugehörigen Daten. Siehe auch Abschnitt 2.21.2.
SINGLE_PAIR_REQUIRED34
Siehe Abschnitt 2.9.
NO_ADDITIONAL_SAS35
Siehe Abschnitt 1.3.
INTERNAL_ADDRESS_FAILURE36
Siehe Abschnitt 3.15.4.
FAILED_CP_REQUIRED37
Siehe Abschnitt 2.19.
TS_UNACCEPTABLE38
Siehe Abschnitt 2.9.
INVALID_SELECTORS39
KANN in einem IKE-INFORMATIONAL-Austausch gesendet werden, wenn ein Knoten ein ESP- oder AH-Paket erhält, dessen Selektoren nicht mit denen der SA übereinstimmen, über die es zugestellt wurde (und das zum Verwerfen führte). Die Notification Data enthalten den Anfang des fehlerhaften Pakets (wie bei ICMP), und das SPI-Feld der Benachrichtigung entspricht der SPI der Child-SA.
TEMPORARY_FAILURE43
Siehe Abschnitt 2.25.
CHILD_SA_NOT_FOUND44
Siehe Abschnitt 2.25.
NOTIFY-Nachrichten: StatustypenWert
INITIAL_CONTACT16384
Siehe Abschnitt 2.4.
SET_WINDOW_SIZE16385
Siehe Abschnitt 2.3.
ADDITIONAL_TS_POSSIBLE16386
Siehe Abschnitt 2.9.
IPCOMP_SUPPORTED16387
Siehe Abschnitt 2.22.
NAT_DETECTION_SOURCE_IP16388
Siehe Abschnitt 2.23.
NAT_DETECTION_DESTINATION_IP16389
Siehe Abschnitt 2.23.
COOKIE16390
Siehe Abschnitt 2.6.
USE_TRANSPORT_MODE16391
Siehe Abschnitt 1.3.1.
HTTP_CERT_LOOKUP_SUPPORTED16392
Siehe Abschnitt 3.6.
REKEY_SA16393
Siehe Abschnitt 1.3.3.
ESP_TFC_PADDING_NOT_SUPPORTED16394
Siehe Abschnitt 1.3.1.
NON_FIRST_FRAGMENTS_ALSO16395
Siehe Abschnitt 1.3.1.

3.11. Lösch-Nutzdaten​

Das Delete-Payload, in diesem Dokument als D bezeichnet, enthält einen protokollspezifischen Security-Association-Identifikator (SA), den der Absender aus seiner Security-Association-Datenbank entfernt hat und der daher nicht mehr gültig ist. Abbildung 17 zeigt das Format des Delete-Payloads. Mehrere SPIs können in einem Delete-Payload gesendet werden; jede SPI MUSS jedoch für dasselbe Protokoll sein. Das Vermischen von Protokollkennungen im Delete-Payload DARF NICHT vorgenommen werden. Es ist jedoch zulässig, mehrere Delete-Payloads in einem einzigen INFORMATIONAL-Austausch aufzunehmen, wobei jedes Delete-Payload SPIs für ein anderes Protokoll auflistet.

Das Löschen der IKE-SA wird durch eine Protokoll-ID von 1 (IKE), aber ohne SPIs, angezeigt. Das Löschen einer Child-SA wie ESP oder AH enthält die IPsec-Protokoll-ID dieses Protokolls (2 für AH, 3 für ESP), und die SPI ist die SPI, die der sendende Endpunkt in eingehenden ESP- oder AH-Paketen erwarten würde.

Das Delete-Payload ist wie folgt definiert:

                    1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Next Payload |C| RESERVED | Payload Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Protocol ID | SPI Size | Num of SPIs |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Security Parameter Index(es) (SPI) ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Abbildung 17: Format des Delete-Payloads

  • Protocol ID (1 Oktett) - Muss 1 für eine IKE-SA, 2 für AH oder 3 für ESP sein.

  • SPI Size (1 Oktett) - Länge des SPI in Oktetten gemäß Protokoll-ID. MUSS für IKE null sein (SPI steht im Nachrichtenkopf) oder vier für AH und ESP.

  • Num of SPIs (2 Oktette, vorzeichenlose Ganzzahl) - Die Anzahl der im Delete-Payload enthaltenen SPIs. Die Größe jeder SPI wird durch das Feld SPI Size festgelegt.

  • Security Parameter Index(es) (variable Länge) - Identifiziert die zu löschende(n) spezifische(n) Security Association(s). Die Länge dieses Feldes ergibt sich aus SPI Size und Num of SPIs.

Der Nutzdatentyp für das Delete-Payload ist zweiundvierzig (42).

3.12. Hersteller-ID-Nutzdaten​

Das Vendor-ID-Payload, in diesem Dokument als V bezeichnet, enthält eine herstellerdefinierte Konstante. Die Konstante dient Herstellern dazu, entfernte Instanzen ihrer Implementierungen zu identifizieren und wiederzuerkennen. Dieser Mechanismus ermöglicht es einem Hersteller, neue Funktionen zu erproben und gleichzeitig die Abwärtskompatibilität zu wahren.

Ein Vendor-ID-Payload KANN ankündigen, dass der Absender bestimmte Protokollerweiterungen akzeptieren kann, oder er KANN die Implementierung lediglich zur Unterstützung der Fehlersuche identifizieren. Ein Vendor-ID-Payload DARF die Interpretation keiner in dieser Spezifikation definierten Information ändern (d. h. das Critical-Bit MUSS 0 sein). Mehrere Vendor-ID-Payloads DÜRFEN gesendet werden. Eine Implementierung muss kein Vendor-ID-Payload senden.

Ein Vendor-ID-Payload kann Teil jeder Nachricht sein. Der Empfang eines bekannten Vendor-ID-Payloads erlaubt einer Implementierung, private Nutzungsnummern zu verwenden, die in diesem Dokument beschrieben sind, z. B. private Payloads, private Austausche, private Benachrichtigungen usw. Unbekannte Vendor-IDs MÜSSEN ignoriert werden.

Autoren von Dokumenten, die dieses Protokoll erweitern wollen, MÜSSEN ein Vendor-ID-Payload definieren, um die Fähigkeit zur Umsetzung der Erweiterung im Dokument anzukündigen. Es wird erwartet, dass anerkannte und standardisierte Dokumente von der IANA „Magic Numbers“ aus dem Future-Use-Bereich erhalten und die Anforderung eines Vendor-ID-Payloads entfällt.

Die Felder des Vendor-ID-Payloads sind wie folgt definiert:

                    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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Vendor ID (VID) ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Abbildung 18: Format des Vendor-ID-Payloads

  • Vendor ID (variable Länge) - Die Person, die die Vendor ID wählt, ist dafür verantwortlich, ihre Eindeutigkeit trotz fehlender zentraler Registrierung sicherzustellen. Gute Praxis ist die Aufnahme eines Firmennamens, Personennamens oder ähnlicher Informationen. Wer es zeigen will, kann Breitengrad, Längengrad und Zeitpunkt der ID-Wahl sowie Zufallsdaten einbeziehen. Eine Message-Digest einer langen eindeutigen Zeichenkette ist der langen Zeichenkette selbst vorzuziehen.

Der Nutzdatentyp für das Vendor-ID-Payload ist dreiundvierzig (43).

3.13. Traffic-Selektor-Nutzdaten​

Das Traffic-Selector-Payload, in diesem Dokument als TS bezeichnet, ermöglicht es Peers, Paketströme zur Verarbeitung durch IPsec-Sicherheitsdienste zu identifizieren. Das Traffic-Selector-Payload besteht aus dem generischen IKE-Nutzdatenkopf, gefolgt von einzelnen Traffic Selectors wie folgt:

                    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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Number of TSs | RESERVED |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ <Traffic Selectors> ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Abbildung 19: Format des Traffic-Selector-Payloads

  • Number of TSs (1 Oktett) - Anzahl der bereitgestellten Traffic Selectors.

  • RESERVED - Dieses Feld MUSS als Null gesendet und beim Empfang ignoriert werden.

  • Traffic Selectors (variable Länge) - Ein oder mehrere einzelne Traffic Selectors.

Die Länge des Traffic-Selector-Payloads umfasst den TS-Kopf und alle Traffic Selectors.

Der Nutzdatentyp für das Traffic-Selector-Payload ist vierundvierzig (44) für Adressen am Ende der SA beim Initiator und fünfundvierzig (45) am Ende beim Responder.

Es ist nicht erforderlich, dass TSi und TSr dieselbe Anzahl einzelner Traffic Selectors enthalten. Sie werden daher so interpretiert: Ein Paket passt zu einem gegebenen TSi/TSr, wenn es zu mindestens einem individuellen Selektor in TSi und mindestens einem in TSr passt.

Beispielsweise würden die folgenden Traffic Selectors

TSi = ((17, 100, 198.51.100.66-198.51.100.66),
(17, 200, 198.51.100.66-198.51.100.66))
TSr = ((17, 300, 0.0.0.0-255.255.255.255),
(17, 400, 0.0.0.0-255.255.255.255))

UDP-Pakete von 198.51.100.66 zu beliebigem Ziel mit einer der vier Kombinationen Quell-/Zielports (100,300), (100,400), (200,300) und (200, 400) abbilden.

Manche Richtlinientypen erfordern daher mehrere Child-SA-Paare. Eine Richtlinie, die nur (100,300) und (200,400), nicht aber die beiden anderen Kombinationen abbildet, kann nicht als ein einzelnes Child-SA-Paar ausgehandelt werden.

3.13.1. Traffic Selector​

                    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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TS Type |IP Protocol ID*| Selector Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Start Port* | End Port* |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Starting Address* ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Ending Address* ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Abbildung 20: Traffic Selector

*Hinweis: Alle Felder außer TS Type und Selector Length hängen vom TS Type ab. Die gezeigten Felder gelten für TS Types 7 und 8, die einzigen derzeit definierten Werte.

  • TS Type (ein Oktett) - Gibt den Typ des Traffic Selectors an.

  • IP protocol ID (1 Oktett) - Wert für eine zugehörige IP-Protokoll-ID (z. B. UDP, TCP, ICMP). Null bedeutet, dass die Protokoll-ID für diesen Traffic Selector irrelevant ist -- die SA kann alle Protokolle tragen.

  • Selector Length (2 Oktette, vorzeichenlose Ganzzahl) - Länge dieser Traffic-Selector-Teilstruktur einschließlich Kopf.

  • Start Port (2 Oktette, vorzeichenlose Ganzzahl) - Kleinster von diesem Traffic Selector zulässiger Port. Für Protokolle ohne Port (einschließlich Protokoll 0) oder wenn alle Ports erlaubt sind, MUSS dieses Feld null sein. ICMP- und ICMPv6-Type- und -Code-Werte sowie MIPv6-MH-Type-Werte werden in diesem Feld wie in Abschnitt 4.4.1.1 von [IPSECARCH] angegeben dargestellt. ICMP Type und Code gelten als eine 16-Bit-Portzahl, Type in den höchstwertigen 8 Bits, Code in den niederwertigsten 8 Bits. MIPv6-MH-Type-Werte gelten als 16-Bit-Portzahl, Type in den höchstwertigen 8 Bits, die niederwertigsten 8 Bits null.

  • End Port (2 Oktette, vorzeichenlose Ganzzahl) - Größter zulässiger Port. Für Protokolle ohne Port oder wenn alle Ports erlaubt sind, MUSS dieses Feld 65535 sein. ICMP/ICMPv6 und MIPv6 MH wie in Abschnitt 4.4.1.1 von [IPSECARCH].

  • Starting Address - Kleinste in diesem Traffic Selector enthaltene Adresse (Länge durch TS Type bestimmt).

  • Ending Address - Größte in diesem Traffic Selector enthaltene Adresse (Länge durch TS Type bestimmt).

Systeme gemäß [IPSECARCH], die „ANY“-Ports anzeigen wollen, MÜSSEN Startport 0 und Endport 65535 setzen; „ANY“ schließt „OPAQUE“ ein. Für nur „OPAQUE“, nicht „ANY“, MÜSSEN Start 65535 und Ende 0 sein.

Traffic-Selector-Typen 7 und 8 können sich auch auf ICMP-/ICMPv6-Type- und -Code-Felder sowie MH-Type-Felder des IPv6-Mobilitätskopfes [MIPV6] beziehen. ICMP- und MIPv6-Pakete haben jedoch keine getrennten Quell- und Zielfelder. Die Angabe für ICMP und MIPv6 ist beispielhaft in Abschnitt 4.4.1.3 von [IPSECARCH] gezeigt.

Die folgende Tabelle listet Werte für das Feld Traffic Selector Type und die zugehörigen Adressselektor-Daten. Stand nur bis RFC 4306; neuere Werte in [IKEV2IANA].

TS TypeWert
TS_IPV4_ADDR_RANGE7
IPv4-Adressbereich durch zwei Vier-Oktett-Werte: Anfangs- und Endadresse (jeweils einschließlich). Alle dazwischen liegenden Adressen gehören zur Liste.
TS_IPV6_ADDR_RANGE8
IPv6-Adressbereich durch zwei Sechzehn-Oktett-Werte: Anfangs- und Endadresse (jeweils einschließlich). Alle dazwischen liegenden Adressen gehören zur Liste.

3.14. Verschlüsselte Nutzdaten​

Das Encrypted-Payload, in diesem Dokument als SK {...} bezeichnet, enthält andere Nutzdaten in verschlüsselter Form. Ist ein Encrypted-Payload in einer Nachricht vorhanden, MUSS es die letzte Nutzlast der Nachricht sein. Oft ist es die einzige Nutzlast. Diese Nutzlast wird auch als „Encrypted and Authenticated“-Payload bezeichnet.

Die Algorithmen für Verschlüsselung und Integritätsschutz werden beim Aufbau der IKE-SA ausgehandelt, und die Schlüssel werden gemäß den Abschnitten 2.14 und 2.18 berechnet.

Dieses Dokument legt die kryptographische Verarbeitung von Encrypted-Payloads mit einem Blockchiffre im CBC-Modus und einem Integritätsprüfalgorithmus fest, der eine Prüfsumme fester Länge über eine Nachricht variabler Größe berechnet. Das Design orientiert sich an den in RFC 2104 [HMAC], 4303 [ESP] und 2451 [ESPCBC] beschriebenen ESP-Algorithmen. Die kryptographische Verarbeitung von IKE-Daten ist in diesem Dokument vollständig spezifiziert; für die Designbegründung sind jene Dokumente heranzuziehen. Zukünftige Dokumente KÖNNEN die Verarbeitung von Encrypted-Payloads für andere Transformtypen, z. B. Counter-Mode-Verschlüsselung und authentifizierte Verschlüsselungsalgorithmen, festlegen. Peers DÜRFEN keine Transformationen aushandeln, für die keine solche Spezifikation existiert.

Wird ein authentifiziertes Verschlüsselungsverfahren zum Schutz der IKE-SA verwendet, unterscheidet sich der Aufbau des Encrypted-Payloads von der hier beschriebenen Darstellung. Siehe [AEAD] zu authentifizierten Verschlüsselungsalgorithmen und ihrer Verwendung in IKEv2.

Der Nutzdatentyp für ein Encrypted-Payload ist sechsundvierzig (46). Das Encrypted-Payload besteht aus dem generischen IKE-Nutzdatenkopf und den folgenden Feldern:

                    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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Initialization Vector |
| (length is block size for encryption algorithm) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ Encrypted IKE Payloads ~
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | Padding (0-255 octets) |
+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
| | Pad Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ Integrity Checksum Data ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Abbildung 21: Format des Encrypted-Payloads

  • Next Payload - Der Nutzdatentyp der ersten eingebetteten Nutzlast. Dies ist eine Ausnahme vom Standardkopfformat, da das Encrypted-Payload die letzte Nutzlast der Nachricht ist und das Feld Next Payload daher normalerweise null wäre. Da der Inhalt eingebettete Nutzdaten sind und es keinen natürlichen Platz für den Typ der ersten gab, wird dieser hier untergebracht.

  • Payload Length - Umfasst die Längen von Kopf, Initialisierungsvektor (IV), verschlüsselten IKE-Nutzdaten, Padding, Pad Length und Integrity Checksum Data.

  • Initialization Vector - Bei CBC-Modus-Chiffren ist die Länge des IV gleich der Blocklänge des zugrunde liegenden Verschlüsselungsalgorithmus. Sender MÜSSEN für jede Nachricht einen neuen, nicht vorhersagbaren IV wählen; Empfänger MÜSSEN jeden Wert akzeptieren. Zur IV-Erzeugung siehe [MODES]. Insbesondere gilt die Verwendung des letzten Geheimtextblocks der vorherigen Nachricht nicht als nicht vorhersagbar. Für andere Modi als CBC werden IV-Format und -Verarbeitung im Dokument zum Verschlüsselungsalgorithmus und -modus festgelegt.

  • IKE-Nutzdaten wie weiter oben in diesem Abschnitt spezifiziert. Dieses Feld wird mit dem ausgehandelten Chiffre verschlüsselt.

  • Padding KANN einen vom Sender gewählten beliebigen Wert enthalten und MUSS eine Länge haben, sodass die Kombination aus Nutzdaten, Padding und Pad Length ein Vielfaches der Verschlüsselungsblockgröße ist. Dieses Feld wird mit dem ausgehandelten Chiffre verschlüsselt.

  • Pad Length ist die Länge des Padding-Feldes. Der Sender SOLLTE Pad Length auf den kleinsten Wert setzen, der die genannte Kombination zu einem Vielfachen der Blockgröße macht, der Empfänger MUSS jedoch jede Länge akzeptieren, die eine korrekte Ausrichtung ergibt. Dieses Feld wird mit dem ausgehandelten Chiffre verschlüsselt.

  • Integrity Checksum Data ist die kryptographische Prüfsumme der gesamten Nachricht vom festen IKE-Kopf bis einschließlich Pad Length. Die Prüfsumme MUSS über die verschlüsselte Nachricht berechnet werden. Ihre Länge ergibt sich aus dem ausgehandelten Integritätsalgorithmus.

3.15. Konfigurations-Nutzdaten​

Das Configuration-Payload, in diesem Dokument als CP bezeichnet, dient dem Austausch von Konfigurationsinformationen zwischen IKE-Peers. Der Austausch ermöglicht es einem IRAC, eine interne IP-Adresse von einem IRAS anzufordern und weitere Informationen auszutauschen, die man mit dem Dynamic Host Configuration Protocol (DHCP) erhalten würde, wenn der IRAC direkt an ein LAN angeschlossen wäre.

Das Configuration-Payload ist wie folgt definiert:

                    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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| CFG Type | RESERVED |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Configuration Attributes ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Abbildung 22: Format des Configuration-Payloads

Der Nutzdatentyp für das Configuration-Payload ist siebenundvierzig (47).

  • CFG Type (1 Oktett) - Der von den Configuration Attributes dargestellte Austauschtyp. Die Werte in der folgenden Tabelle gelten nur bis zum Veröffentlichungsdatum von RFC 4306. Später hinzugekommene Werte siehe [IKEV2IANA].
CFG TypeWert
CFG_REQUEST1
CFG_REPLY2
CFG_SET3
CFG_ACK4
  • RESERVED (3 Oktette) - MUSS als Null gesendet und beim Empfang ignoriert werden.

  • Configuration Attributes (variable Länge) - Typ-Länge-Wert-Strukturen (TLV) speziell für das Configuration-Payload, unten definiert. Es können null oder mehr Configuration Attributes in dieser Nutzlast enthalten sein.

3.15.1. Konfigurationsattribute​

                    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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|R| Attribute Type | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Value ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Abbildung 23: Format des Configuration Attribute

  • Reserved (1 Bit) - Dieses Bit MUSS null sein und MUSS beim Empfang ignoriert werden.

  • Attribute Type (15 Bits) - Eindeutiger Bezeichner für jeden Configuration-Attribute-Typ.

  • Length (2 Oktette, vorzeichenlose Ganzzahl) - Länge des Wertes in Oktetten.

  • Value (null oder mehr Oktette) - Variabler Wert dieses Configuration Attribute. Die Attributtypen folgen unten.

Die Werte der folgenden Tabelle gelten bis zum Veröffentlichungsdatum von RFC 4306 (INTERNAL_ADDRESS_EXPIRY und INTERNAL_IP6_NBNS wurden durch RFC 5996 entfernt). Neuere Werte in [IKEV2IANA].

Attribute TypeWertMehrwertigLänge
INTERNAL_IP4_ADDRESS1YES*0 oder 4 Oktette
INTERNAL_IP4_NETMASK2NO0 oder 4 Oktette
INTERNAL_IP4_DNS3YES0 oder 4 Oktette
INTERNAL_IP4_NBNS4YES0 oder 4 Oktette
INTERNAL_IP4_DHCP6YES0 oder 4 Oktette
APPLICATION_VERSION7NO0 oder mehr
INTERNAL_IP6_ADDRESS8YES*0 oder 17 Oktette
INTERNAL_IP6_DNS10YES0 oder 16 Oktette
INTERNAL_IP6_DHCP12YES0 oder 16 Oktette
INTERNAL_IP4_SUBNET13YES0 oder 8 Oktette
SUPPORTED_ATTRIBUTES14NOVielfaches von 2
INTERNAL_IP6_SUBNET15YES17 Oktette

* Diese Attribute dürfen in der Antwort nur dann mehrwertig sein, wenn mehrere Werte angefordert wurden.

  • INTERNAL_IP4_ADDRESS, INTERNAL_IP6_ADDRESS - Eine Adresse im internen Netz, manchmal Red-Node- oder Privatadresse genannt; KANN eine private Adresse im Internet sein. In einer Anfragenachricht ist die angegebene Adresse eine gewünschte Adresse (oder Länge null, wenn keine spezifische Adresse gewünscht ist). Eine spezifische Adresse deutet oft auf eine frühere Verbindung mit dieser Adresse hin und Wiederverwendungswunsch. Bei IPv6 KANN der Anforderer die gewünschten niederwertigen Adressoktette angeben. Mehrere interne Adressen KÖNNEN durch mehrere interne Adressattribute angefordert werden. Der Responder DARF höchstens so viele Adressen senden wie angefordert. INTERNAL_IP6_ADDRESS besteht aus zwei Feldern: 16-Oktett-IPv6-Adresse und 1-Oktett-Präfixlänge gemäß [ADDRIPV6]. Die angeforderte Adresse ist gültig, solange diese IKE SA (oder ihre Nachfolger nach Rekey), die sie angefordert hat, gültig ist. Siehe Abschnitt 3.15.3.

  • INTERNAL_IP4_NETMASK - Die Netzmaske des internen Netzes. Nur eine Netzmaske ist in Anfrage- und Antwortnachrichten erlaubt (z. B. 255.255.255.0) und MUSS nur mit INTERNAL_IP4_ADDRESS verwendet werden. INTERNAL_IP4_NETMASK in CFG_REPLY bedeutet in etwa dasselbe wie INTERNAL_IP4_SUBNET mit denselben Informationen („Trafik zu diesen Adressen über mich senden“), impliziert aber auch eine Linkgrenze. Der Client kann z. B. mit eigener Adresse und Maske die Broadcast-Adresse des Links berechnen. Ein leeres INTERNAL_IP4_NETMASK-Attribut kann in CFG_REQUEST diese Information anfordern (Gateway kann sie auch ohne Anfrage sendieren). Nicht leere Werte in CFG_REQUEST sind unsinnig und DÜRFEN NICHT vorkommen.

  • INTERNAL_IP4_DNS, INTERNAL_IP6_DNS - Adresse eines DNS-Servers im Netz. Mehrere DNS-Server KÖNNEN angefordert werden. Der Responder KANN mit null oder mehr DNS-Server-Attributen antworten.

  • INTERNAL_IP4_NBNS - Adresse eines NetBios Name Server (WINS) im Netz. Mehrere NBNS-Server KÖNNEN angefordert werden. Der Responder KANN mit null oder mehr NBNS-Attributen antworten.

  • INTERNAL_IP4_DHCP, INTERNAL_IP6_DHCP - Weist den Host an, interne DHCP-Anfragen an die im Attribut enthaltene Adresse zu senden. Mehrere DHCP-Server KÖNNEN angefordert werden. Der Responder KANN mit null oder mehr DHCP-Server-Attributen antworten.

  • APPLICATION_VERSION - Versions- oder Anwendungsinformation des IPsec-Hosts. Druckbare ASCII-Zeichenkette OHNE Nullterminator.

  • INTERNAL_IP4_SUBNET - Die geschützten Teilnetze, die dieses Randgerät schützt. Zwei Felder: IP-Adresse und Netzmaske. Mehrere Teilnetze KÖNNEN angefordert werden. Der Responder KANN mit null oder mehr Teilnetz-Attributen antworten. Siehe Abschnitt 3.15.2.

  • SUPPORTED_ATTRIBUTES - In einer Request MUSS dieses Attribut Länge null haben und den Responder auffordern, alle unterstützten Attribute zurückzugeben. Die Antwort enthält ein Attribut mit Kennungen je 2 Oktette. Länge geteilt durch 2 ergibt die Anzahl unterstützter Attribute.

  • INTERNAL_IP6_SUBNET - Geschützte Teilnetze dieses Randgeräts. 16-Oktett-IPv6-Adresse und 1-Oktett-Präfixlänge gemäß [ADDRIPV6]. Mehrere Teilnetze KÖNNEN angefordert werden. Siehe Abschnitt 3.15.2.

Dieses Dokument empfiehlt keine konkrete Methode, wie eine Implementierung feststellt, welche Informationen in einer Antwort zu senden sind; insbesondere keine spezifische Methode, mit der ein IRAS bestimmt, welcher DNS-Server an einen anfragenden IRAC zurückgegeben wird.

CFG_REQUEST und CFG_REPLY erlauben einem IKE-Endpunkt, Informationen vom Peer anzufordern. Ist ein Attribut im CFG_REQUEST-Configuration-Payload nicht länge-null, gilt es als Vorschlag für dieses Attribut. CFG_REPLY KANN denselben oder einen neuen Wert zurückgeben, neue Attribute hinzufügen oder angeforderte weglassen. Nicht erkannte oder nicht unterstützte Attribute MÜSSEN in Anfragen und Antworten ignoriert werden.

CFG_SET und CFG_ACK erlauben das Pushen von Konfigurationsdaten. Das CFG_SET-Configuration-Payload enthält Attribute, die der Initiator vom Peer geändert haben möchte. Hat der Responder Konfigurationsdaten akzeptiert, MUSS er ein Configuration-Payload zurückgeben, das die akzeptierten Attribute mit länge-null-Daten enthält. Nicht akzeptierte Attribute DÜRFEN nicht im CFG_ACK-Configuration-Payload stehen. Wurde nichts akzeptiert, MUSS der Responder entweder ein leeres CFG_ACK-Payload oder eine Antwort ohne CFG_ACK zurückgeben. Für CFG_SET/CFG_ACK gibt es derzeit keine definierten Verwendungen; Erweiterungen mit Vendor-IDs sind möglich. Implementierungen DÜRFEN CFG_SET-Payloads ignorieren.

3.15.2. Bedeutung von INTERNAL_IP4_SUBNET und INTERNAL_IP6_SUBNET​

INTERNAL_IP4/6_SUBNET-Attribute können zusätzliche Teilnetze anzeigen, die über das Gateway erreichbar sind, das die Attribute ankündigt, und eine oder mehrere getrennte SAs erfordern. Sie können auch die Gateway-Richtlinie ausdrücken, welcher Trafik durch das Gateway gehen soll; der Client kann wählen, ob anderer Trafik (von TSr abgedeckt, aber nicht in INTERNAL_IP4/6_SUBNET) über das Gateway oder direkt geht. Trafik zu den in INTERNAL_IP4/6_SUBNET aufgeführten Adressen sollte über das ankündigende Gateway gesendet werden. Gibt es keine Child-SA, deren Traffic Selectors die Adresse abdecken, müssen neue SAs erstellt werden.

Beispiel mit zwei Teilnetzen 198.51.100.0/26 und 192.0.2.0/24:

CP(CFG_REQUEST) =
INTERNAL_IP4_ADDRESS()
TSi = (0, 0-65535, 0.0.0.0-255.255.255.255)
TSr = (0, 0-65535, 0.0.0.0-255.255.255.255)

Gültige Antwort (TSr und INTERNAL_IP4_SUBNET gleiche Information):

CP(CFG_REPLY) =
INTERNAL_IP4_ADDRESS(198.51.100.234)
INTERNAL_IP4_SUBNET(198.51.100.0/255.255.255.192)
INTERNAL_IP4_SUBNET(192.0.2.0/255.255.255.0)
TSi = (0, 0-65535, 198.51.100.234-198.51.100.234)
TSr = ((0, 0-65535, 198.51.100.0-198.51.100.63),
(0, 0-65535, 192.0.2.0-192.0.2.255))

Hier trägt INTERNAL_IP4_SUBNET wenig nützliche Zusatzinformation.

Alternative Antwort:

CP(CFG_REPLY) =
INTERNAL_IP4_ADDRESS(198.51.100.234)
INTERNAL_IP4_SUBNET(198.51.100.0/255.255.255.192)
INTERNAL_IP4_SUBNET(192.0.2.0/255.255.255.0)
TSi = (0, 0-65535, 198.51.100.234-198.51.100.234)
TSr = (0, 0-65535, 0.0.0.0-255.255.255.255)

Der Client darf den gesamten Trafik über das Gateway senden; das Gateway erlaubt auch direkten Trafik außerhalb INTERNAL_IP4_SUBNET.

Erfordert die Gateway-Richtlinie getrennte SAs für die beiden Teilnetze, zeigt folgende Antwort, dass für das zweite Teilnetz eine separate SA nötig ist:

CP(CFG_REPLY) =
INTERNAL_IP4_ADDRESS(198.51.100.234)
INTERNAL_IP4_SUBNET(198.51.100.0/255.255.255.192)
INTERNAL_IP4_SUBNET(192.0.2.0/255.255.255.0)
TSi = (0, 0-65535, 198.51.100.234-198.51.100.234)
TSr = (0, 0-65535, 198.51.100.0-198.51.100.63)

INTERNAL_IP4_SUBNET ist auch nützlich, wenn der TSr des Clients nur einen Teil des Adressraums abdeckt:

CP(CFG_REQUEST) =
INTERNAL_IP4_ADDRESS()
TSi = (0, 0-65535, 0.0.0.0-255.255.255.255)
TSr = (0, 0-65535, 192.0.2.155-192.0.2.155)

Mögliche Gateway-Antwort:

CP(CFG_REPLY) =
INTERNAL_IP4_ADDRESS(198.51.100.234)
INTERNAL_IP4_SUBNET(198.51.100.0/255.255.255.192)
INTERNAL_IP4_SUBNET(192.0.2.0/255.255.255.0)
TSi = (0, 0-65535, 198.51.100.234-198.51.100.234)
TSr = (0, 0-65535, 192.0.2.155-192.0.2.155)

Da die Bedeutung von INTERNAL_IP4_SUBNET/INTERNAL_IP6_SUBNET in CFG_REQUESTs unklar ist, sind sie dort nicht zuverlässig verwendbar.

3.15.3. Configuration payloads für IPv6​

Die IPv6-Configuration-Payloads basieren auf den IPv4-Pendants und folgen nicht vollständig der „üblichen IPv6-Vorgehensweise“. Insbesondere keine zustandslose IPv6-Autokonfiguration oder Router-Advertisements, auch keine Neighbor Discovery. Siehe [IPV6CONFIG] zu IPv6 in IKEv2 (derzeit experimentell).

Ein Client kann eine IPv6-Adresse über INTERNAL_IP6_ADDRESS erhalten. Minimaler Austausch:

CP(CFG_REQUEST) =
INTERNAL_IP6_ADDRESS()
INTERNAL_IP6_DNS()
TSi = (0, 0-65535, :: - FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF)
TSr = (0, 0-65535, :: - FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF)

CP(CFG_REPLY) =
INTERNAL_IP6_ADDRESS(2001:DB8:0:1:2:3:4:5/64)
INTERNAL_IP6_DNS(2001:DB8:99:88:77:66:55:44)
TSi = (0, 0-65535, 2001:DB8:0:1:2:3:4:5 - 2001:DB8:0:1:2:3:4:5)
TSr = (0, 0-65535, :: - FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF)

Der Client KANN ein nicht leeres INTERNAL_IP6_ADDRESS in CFG_REQUEST senden. Das Gateway prüft die Adresse; bei Ablehnung versucht es den Schnittstellen-Identifier mit anderem Präfix oder wählt einen anderen Identifier.

INTERNAL_IP6_ADDRESS enthält ein Präfixlängenfeld; in CFG_REPLY entspricht es INTERNAL_IP4_NETMASK in IPv4.

IPsec-Tunnel über IKEv2 sind keine vollwertigen „Schnittstellen“ im Sinne der IPv6-Adressarchitektur [ADDRIPV6]; insbesondere fehlen oft Link-Local-Adressen, was Protokolle wie [MLDV2] erschwert.

3.15.4. Fehler bei der Adresszuweisung​

Tritt beim Zuweisen einer IP-Adresse an den Initiator während der Verarbeitung eines Configuration-Payloads ein Fehler auf, antwortet der Responder mit INTERNAL_ADDRESS_FAILURE. Die IKE SA wird dennoch erzeugt, auch wenn die anfängliche Child-SA deswegen fehlschlägt. Innerhalb von IKE_AUTH wird keine Child-SA erzeugt. Komplexere Fehlerfälle existieren.

Unterstützt der Responder keine Configuration-Payloads, kann er alle ignorieren. Solche Implementierungen senden nie INTERNAL_ADDRESS_FAILURE.

Fordert der Initiator zwingend eine IP-Adresse, gilt eine Antwort ohne CFG_REPLY als Fehler.

Der Initiator kann einen Adresstyp (IPv4 oder IPv6) anfordern, den der Responder nicht unterstützt, obwohl er Configuration-Payloads unterstützt. Der Responder ignoriert diesen Typ und verarbeitet den Rest wie üblich.

Schlagen einige (nicht alle) Anfragen mehrerer Adressen fehl, antwortet der Responder nur mit den erfolgreichen. INTERNAL_ADDRESS_FAILURE nur, wenn gar keine Adresse zuweisbar ist.

Erhält der Initiator die von der Politik geforderte(n) Adresse(n) nicht, KANN er die IKE SA aufrechterhalten und das Configuration-Payload nach Timeout in einem separaten INFORMATIONAL erneut versuchen, oder die IKE SA mit Delete-Payload abbauen und später neu starten. Timeouts sollten nicht zu kurz sein (mehrere Minuten). Adressmangel löst sich oft erst bei Client-Abmeldungen oder größerem Pool.

3.16. EAP-Nutzdaten​

Das Extensible Authentication Protocol-Payload, in diesem Dokument als EAP bezeichnet, erlaubt die Authentifizierung von IKE-SAs mit dem in RFC 3748 [EAP] definierten Protokoll und späteren Erweiterungen. Bei EAP ist eine geeignete EAP-Methode auszuwählen. Viele Methoden wurden definiert und legen die Nutzung des Protokolls mit verschiedenen Authentifizierungsmechanismen fest. EAP-Methodentypen sind in [EAP-IANA] aufgeführt. Zur Klarheit folgt eine kurze Zusammenfassung des EAP-Formats.

                    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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ EAP Message ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Abbildung 24: Format des EAP-Payloads

Der Nutzdatentyp für ein EAP-Payload ist achtundvierzig (48).

                    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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Code | Identifier | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Type_Data...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Abbildung 25: Format der EAP-Nachricht

  • Code (1 Oktett) - Gibt an, ob diese Nachricht Request (1), Response (2), Success (3) oder Failure (4) ist.

  • Identifier (1 Oktett) - Wird in PPP verwendet, um wiedergegebene von wiederholten Nachrichten zu unterscheiden. Da EAP in IKE über ein zuverlässiges Protokoll läuft, hat der Identifier hier keine Funktion. In einer Antwortnachricht MUSS dieses Oktett mit dem Kennzeichner der zugehörigen Anforderung übereinstimmen.

  • Length (2 Oktette, vorzeichenlose Ganzzahl) - Die Länge der EAP-Nachricht. MUSS um vier kleiner sein als die Payload Length des kapselnden Payloads.

  • Type (1 Oktett) - Nur vorhanden, wenn Code Request (1) oder Response (2) ist. Bei anderen Codes MUSS die EAP-Nachrichtenlänge vier Oktette betragen, und die Felder Type und Type_Data DÜRFEN nicht vorhanden sein. Bei Request (1) gibt Type die angeforderten Daten an. Bei Response (2) MUSS Type entweder Nak sein oder mit dem Typ der angeforderten Daten übereinstimmen. Da IKE in der ersten Nachricht des IKE_AUTH-Austauschs eine Angabe zur Identität des Initiators übermittelt, SOLLTE der Responder keine EAP-Identity-Requests (Typ 1) senden. Der Initiator KANN jedoch auf solche Anfragen antworten, wenn er sie erhält.

  • Type_Data (variable Länge) - Hängt vom Typ der Request und der zugehörigen Response ab. Zur Dokumentation der EAP-Methoden siehe [EAP].

Da IKE in der ersten Nachricht des IKE_AUTH-Austauschs eine Angabe zur Identität des Initiators übermittelt, SOLLTE der Responder keine EAP-Identity-Requests senden. Der Initiator KANN jedoch auf solche Anfragen antworten, wenn er sie erhält.