Passa al contenuto principale

3. Intestazioni e formati del payload

Nelle tabelle di questa sezione, alcune primitive crittografiche e attributi di configurazione sono contrassegnati come "UNSPECIFIED". Non esistono specifiche note per questi elementi, quindi l'interoperabilità è attualmente impossibile. Una specifica futura potrà descriverne l'uso, ma fino ad allora le implementazioni destinate all'interoperabilità NON DOVREBBERO tentare di usare elementi marcati "UNSPECIFIED".

3.1. Intestazione IKE​

I messaggi IKE usano le porte UDP 500 e/o 4500, con un messaggio IKE per datagramma UDP. Le informazioni dall'inizio del pacchetto fino all'intestazione UDP sono in gran parte ignorate, salvo che gli indirizzi IP e le porte UDP delle intestazioni sono invertiti e usati per i pacchetti di ritorno. Sulla porta UDP 500 i messaggi IKE iniziano subito dopo l'intestazione UDP. Sulla porta 4500 i messaggi IKE hanno quattro ottetti zero anteposti. Questi quattro ottetti non fanno parte del messaggio IKE e non sono inclusi in campi di lunghezza o checksum definiti da IKE. Ogni messaggio IKE inizia con l'intestazione IKE, indicata come HDR in questo documento. Dopo l'intestazione seguono uno o più payload IKE, ciascuno identificato dal campo Next Payload del payload precedente. L'ordine si determina con Next Payload nell'intestazione IKE e poi in ogni payload fino a Next Payload zero. Se si trova un payload di tipo "Encrypted", viene decifrato e il contenuto analizzato come payload aggiuntivi. Un payload Encrypted DEVE essere l'ultimo nel pacchetto e un payload Encrypted NON DEVE contenere un altro Encrypted.

Lo SPI del rispondente nell'intestazione identifica un'istanza di IKE Security Association. Una singola istanza IKE può quindi multiplexare sessioni distinte con più peer, incluse più sessioni per peer.

Tutti i campi multi-ottetto che rappresentano interi sono in ordine big endian ("most significant byte first", ordine di rete).

Il formato dell'intestazione IKE è mostrato nella figura 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 ottetti) - Valore scelto dall'iniziatore per identificare univocamente un'IKE SA. Questo valore NON DEVE essere zero.

  • Responder's SPI (8 ottetti) - Valore scelto dal rispondente per identificare univocamente un'IKE SA. DEVE essere zero nel primo messaggio di uno scambio iniziale IKE (inclusi ripetizioni con cookie).

  • Next Payload (1 ottetto) - Tipo del payload che segue immediatamente l'intestazione.

  • Major Version (4 bit) - Versione maggiore IKE. Le implementazioni di questa versione DEVONO impostare 2. Le implementazioni IKE/ISAKMP precedenti DEVONO impostare 1. Le implementazioni IKEv2 di questo documento DEVONO rifiutare o ignorare messaggi con versione maggiore di 2 con notifica INVALID_MAJOR_VERSION (sezione 2.5).

  • Minor Version (4 bit) - Versione minore. Le implementazioni DEVONO impostare 0 e IGNORARE la versione minore ricevuta.

  • Exchange Type (1 ottetto) - Tipo di scambio. La tabella riflette la data di RFC 4306; valori aggiornati in [IKEV2IANA].

Exchange TypeValue
IKE_SA_INIT34
IKE_AUTH35
CREATE_CHILD_SA36
INFORMATIONAL37
  • Flags (1 ottetto) - Opzioni come bit.
        +-+-+-+-+-+-+-+-+
|X|X|R|V|I|X|X|X|
+-+-+-+-+-+-+-+-+

"Impostato" è 1, "cancellato" 0. I bit X DEVONO essere cancellati in invio e ignorati in ricezione.

  • R (Response) - Indica risposta a messaggio con stesso Message ID. DEVE essere cancellato nelle richieste e impostato nelle risposte. Un endpoint IKE NON DEVE generare risposta a messaggio marcato come risposta (eccezione sezione 2.21.2).

  • V (Version) - Capacità di parlare versione maggiore più alta. Le implementazioni IKEv2 DEVONO cancellare in invio e ignorare in ricezione.

  • I (Initiator) - DEVE essere impostato nei messaggi dell'iniziatore originale dell'IKE SA e cancellato nel rispondente originale. Cambia con chi ha iniziato l'ultimo rekey dell'IKE SA.

  • Message ID (4 ottetti, senza segno) - Ritrasmissione e abbinamento richiesta/risposta; essenziale contro replay. Sezioni 2.1 e 2.2.

  • Length (4 ottetti, senza segno) - Lunghezza totale del messaggio (intestazione + payload) in ottetti.

3.2. Intestazione generica del payload​

Ogni payload IKE definito nelle sezioni da 3.3 a 3.16 inizia con un'intestazione generica del payload, mostrata nella figura 5. Le figure sotto includono tale intestazione; per brevità non si ripete la descrizione di ogni campo.

                        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

I campi dell'intestazione generica:

  • Next Payload (1 ottetto) - Identificatore del tipo del payload successivo nel messaggio. Se il payload corrente è l'ultimo, il campo è 0. Consente di concatenare payload accodandoli. Il payload Encrypted, sempre ultimo, è eccezione: contiene dati strutturati come payload aggiuntivi. Nella sua intestazione Next Payload è il tipo del primo payload contenuto; l'ultimo contenuto ha Next Payload zero. I valori sono nella tabella; aggiornamenti 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

(I valori 1-32 non devono essere assegnati in futuro per evitare sovrapposizioni con IKEv1.)

  • Critical (1 bit) - DEVE essere zero se il mittente vuole che il destinatario salti questo payload se non capisce il tipo nel Next Payload del payload precedente. DEVE essere uno se il messaggio intero va rifiutato. DEVE essere ignorato se il tipo è capito. DEVE essere zero per i tipi definiti in questo documento. Il bit Critical riguarda il payload corrente. Tutte le implementazioni DEVONO capire tutti i tipi di questo documento. I payload saltati dovrebbero avere Next Payload e Payload Length validi. Vedere la sezione 2.5.

  • RESERVED (7 bit) - DEVE essere inviato a zero; DEVE essere ignorato in ricezione.

  • Payload Length (2 ottetti, senza segno) - Lunghezza in ottetti del payload corrente inclusa l'intestazione generica.

Molti payload contengono campi "RESERVED". Alcuni payload IKEv2 (e storicamente IKEv1) non sono allineati a confini di 4 ottetti.

3.3. Payload dell'associazione di sicurezza​

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. Sottostruttura della proposta​

                        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. Sottostruttura transform​

                        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. Tipi di transform validi per protocollo​

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. ID transform obbligatori​

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. Attributi transform​

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. Negoziazione degli attributi​

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. Payload di scambio delle chiavi​

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. Payload di identificazione​

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. Payload del certificato​

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. Payload di richiesta del certificato​

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. Payload di autenticazione​

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. Payload Nonce​

Il Nonce payload, indicato in questo documento come Ni e Nr rispettivamente per il nonce dell'iniziatore e del rispondente, contiene dati casuali usati per garantire la liveness durante uno scambio e per proteggere dagli attacchi di replay.

Il Nonce payload è definito come segue:

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

Figura 15: Formato del Nonce payload

  • Nonce Data (lunghezza variabile) - Contiene i dati casuali generati dall'entità trasmittente.

Il tipo di payload per il Nonce payload è quaranta (40).

La dimensione dei Nonce Data DEVE essere tra 16 e 256 ottetti inclusi. I valori di nonce NON DEVONO essere riutilizzati.

3.10. Payload di notifica​

Il Notify payload, indicato come N in questo documento, serve a trasmettere dati informativi, come condizioni di errore e transizioni di stato, a un peer IKE. Un Notify payload può comparire in un messaggio di risposta (di solito specificando perché una richiesta è stata rifiutata), in uno scambio INFORMATIONAL (per segnalare un errore non presente in una richiesta IKE), o in qualsiasi altro messaggio per indicare le capacità del mittente o modificare il significato della richiesta.

Il Notify payload è definito come segue:

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

Figura 16: Formato del Notify payload

  • Protocol ID (1 ottetto) - Se questa notifica riguarda una SA esistente la cui SPI è nel campo SPI, questo campo indica il tipo di quella SA. Per notifiche riguardanti Child SA, questo campo DEVE contenere (2) per AH o (3) per ESP. Tra le notifiche definite in questo documento, la SPI è inclusa solo con INVALID_SELECTORS, REKEY_SA e CHILD_SA_NOT_FOUND. Se il campo SPI è vuoto, questo campo DEVE essere inviato a zero e DEVE essere ignorato in ricezione.

  • SPI Size (1 ottetto) - Lunghezza in ottetti della SPI come definita dall'ID protocollo IPsec, o zero se non c'è SPI applicabile. Per una notifica riguardante l'IKE SA, la SPI Size DEVE essere zero e il campo deve essere vuoto.

  • Notify Message Type (2 ottetti) - Specifica il tipo di messaggio di notifica.

  • SPI (lunghezza variabile) - Security Parameter Index.

  • Notification Data (lunghezza variabile) - Dati di stato o errore trasmessi oltre al Notify Message Type. I valori dipendono dal tipo (vedere sotto).

Il tipo di payload per il Notify payload è quarantuno (41).

3.10.1. Tipi di messaggio Notify​

Le informazioni di notifica possono essere messaggi di errore che spiegano perché una SA non ha potuto essere stabilita. Possono anche essere dati di stato che un processo che gestisce un database SA desidera comunicare a un processo peer.

La tabella seguente elenca i messaggi di notifica e i valori corrispondenti. Il numero di stati di errore distinti è stato fortemente ridotto rispetto a IKEv1 sia per semplificare sia per evitare di fornire informazioni di configurazione a sonde.

I tipi nell'intervallo 0 - 16383 servono a segnalare errori. Un'implementazione che riceve un Notify payload con uno di questi tipi non riconosciuti in una risposta DEVE presumere che la richiesta corrispondente sia fallita completamente. Tipi di errore non riconosciuti in una richiesta e tipi di stato in una richiesta o risposta DEVONO essere ignorati e dovrebbero essere registrati.

I Notify payload con tipi di stato POSSONO essere aggiunti a qualsiasi messaggio e DEVONO essere ignorati se non riconosciuti. Servono a indicare capacità e, come parte della negoziazione SA, a negoziare parametri non crittografici.

Ulteriori informazioni sulla gestione degli errori si trovano nella sezione 2.21.

I valori nella tabella seguente sono aggiornati alla data di pubblicazione del RFC 4306, più due tipi di errore aggiunti in questo documento. Altri valori possono essere stati aggiunti successivamente. I lettori devono consultare [IKEV2IANA] per i valori più recenti.

Messaggi NOTIFY: tipi di erroreValore
UNSUPPORTED_CRITICAL_PAYLOAD1
Vedere sezione 2.5.
INVALID_IKE_SPI4
Vedere sezione 2.21.
INVALID_MAJOR_VERSION5
Vedere sezione 2.5.
INVALID_SYNTAX7
Indica che il messaggio IKE ricevuto non era valido perché un tipo, una lunghezza o un valore erano fuori intervallo o perché la richiesta è stata rifiutata per motivi di policy. Per evitare un attacco DoS con messaggi falsi, questo stato può essere restituito solo per e in un pacchetto crittografato se Message ID e checksum crittografico erano validi. Per evitare fughe di informazioni verso chi sonda un nodo, questo stato DEVE essere inviato in risposta a qualsiasi errore non coperto dagli altri tipi di stato. Per il debug, informazioni di errore più dettagliate dovrebbero essere scritte su console o log.
INVALID_MESSAGE_ID9
Vedere sezione 2.3.
INVALID_SPI11
Vedere sezione 1.5.
NO_PROPOSAL_CHOSEN14
Nessuna delle suite crittografiche proposte era accettabile. Può essere inviato quando le proposte offerte (inclusi, a titolo esemplificativo, valori del payload SA, notifica USE_TRANSPORT_MODE, notifica IPCOMP_SUPPORTED) non sono accettabili per il rispondente. Può anche essere usato come errore «generico» della Child SA quando la Child SA non può essere creata per altri motivi. Vedere anche la sezione 2.7.
INVALID_KE_PAYLOAD17
Vedere le sezioni 1.2 e 1.3.
AUTHENTICATION_FAILED24
Inviato nella risposta a un messaggio IKE_AUTH quando, per qualche motivo, l'autenticazione è fallita. Nessun dato associato. Vedere anche la sezione 2.21.2.
SINGLE_PAIR_REQUIRED34
Vedere sezione 2.9.
NO_ADDITIONAL_SAS35
Vedere sezione 1.3.
INTERNAL_ADDRESS_FAILURE36
Vedere sezione 3.15.4.
FAILED_CP_REQUIRED37
Vedere sezione 2.19.
TS_UNACCEPTABLE38
Vedere sezione 2.9.
INVALID_SELECTORS39
PUÒ essere inviato in uno scambio INFORMATIONAL IKE quando un nodo riceve un pacchetto ESP o AH i cui selettori non corrispondono a quelli della SA su cui è stato consegnato (e ciò ha causato lo scarto del pacchetto). Le Notification Data contengono l'inizio del pacchetto in errore (come nei messaggi ICMP) e il campo SPI della notifica è impostato in modo da corrispondere alla SPI della Child SA.
TEMPORARY_FAILURE43
Vedere sezione 2.25.
CHILD_SA_NOT_FOUND44
Vedere sezione 2.25.
Messaggi NOTIFY: tipi di statoValore
INITIAL_CONTACT16384
Vedere sezione 2.4.
SET_WINDOW_SIZE16385
Vedere sezione 2.3.
ADDITIONAL_TS_POSSIBLE16386
Vedere sezione 2.9.
IPCOMP_SUPPORTED16387
Vedere sezione 2.22.
NAT_DETECTION_SOURCE_IP16388
Vedere sezione 2.23.
NAT_DETECTION_DESTINATION_IP16389
Vedere sezione 2.23.
COOKIE16390
Vedere sezione 2.6.
USE_TRANSPORT_MODE16391
Vedere sezione 1.3.1.
HTTP_CERT_LOOKUP_SUPPORTED16392
Vedere sezione 3.6.
REKEY_SA16393
Vedere sezione 1.3.3.
ESP_TFC_PADDING_NOT_SUPPORTED16394
Vedere sezione 1.3.1.
NON_FIRST_FRAGMENTS_ALSO16395
Vedere sezione 1.3.1.

3.11. Payload di eliminazione​

Il Delete payload, indicato come D in questo documento, contiene un identificatore di Security Association (SA) specifico del protocollo che il mittente ha rimosso dal proprio database di SA e che quindi non è più valido. La figura 17 mostra il formato del Delete payload. È possibile inviare più SPI in un Delete payload; tuttavia ogni SPI DEVE riferirsi allo stesso protocollo. La mescolanza di identificatori di protocollo NON DEVE essere effettuata nel Delete payload. È tuttavia consentito includere più Delete payload in un singolo scambio INFORMATIONAL, ognuno dei quali elenca SPI per un protocollo diverso.

L'eliminazione dell'IKE SA è indicata da un ID protocollo pari a 1 (IKE) ma senza SPI. L'eliminazione di una Child SA, come ESP o AH, conterrà l'ID protocollo IPsec di quel protocollo (2 per AH, 3 per ESP), e la SPI è la SPI che l'estremità mittente si aspetterebbe nei pacchetti ESP o AH in ingresso.

Il Delete payload è definito come segue:

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

Figura 17: Formato del Delete payload

  • Protocol ID (1 ottetto) - Deve essere 1 per un'IKE SA, 2 per AH o 3 per ESP.

  • SPI Size (1 ottetto) - Lunghezza in ottetti della SPI come definita dall'ID protocollo. DEVE essere zero per IKE (la SPI è nell'intestazione del messaggio) o quattro per AH ed ESP.

  • Num of SPIs (2 ottetti, intero senza segno) - Il numero di SPI contenute nel Delete payload. La dimensione di ciascuna SPI è definita dal campo SPI Size.

  • Security Parameter Index(es) (lunghezza variabile) - Identifica la o le Security Association specifiche da eliminare. La lunghezza di questo campo è determinata dai campi SPI Size e Num of SPIs.

Il tipo di payload per il Delete payload è quarantadue (42).

3.12. Payload ID fornitore​

Il Vendor ID payload, indicato come V in questo documento, contiene una costante definita dal fornitore. La costante è usata dai fornitori per identificare e riconoscere istanze remote delle proprie implementazioni. Questo meccanismo consente a un fornitore di sperimentare nuove funzionalità mantenendo la compatibilità all'indietro.

Un Vendor ID payload PUÒ annunciare che il mittente è in grado di accettare determinate estensioni del protocollo, oppure PUÒ semplicemente identificare l'implementazione come ausilio al debug. Un Vendor ID payload NON DEVE cambiare l'interpretazione di alcuna informazione definita in questa specifica (cioè il bit critical DEVE essere 0). È possibile inviare più Vendor ID payload. Un'implementazione non è tenuta a inviare alcun Vendor ID payload.

Un Vendor ID payload può essere inviato come parte di qualsiasi messaggio. La ricezione di un Vendor ID payload noto consente a un'implementazione di usare numeri d'uso privato descritti in questo documento, come payload privati, scambi privati, notifiche private, ecc. I Vendor ID sconosciuti DEVONO essere ignorati.

Gli autori di documenti che desiderano estendere questo protocollo DEVONO definire un Vendor ID payload per annunciare la capacità di implementare l'estensione nel documento. Si prevede che i documenti che ottengono accettazione e standardizzazione ricevano «numeri magici» dall'intervallo Future Use da parte dell'IANA e che l'obbligo di usare un Vendor ID venga meno.

I campi del Vendor ID payload sono definiti come segue:

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

Figura 18: Formato del Vendor ID payload

  • Vendor ID (lunghezza variabile) - Chi sceglie il Vendor ID è responsabile di garantirne l'unicità in assenza di un registro centrale. Buona pratica è includere nome azienda, nome persona o informazioni simili. Per ostentazione si possono includere latitudine, longitudine e istante in cui si è scelto l'ID e qualche input casuale. Un digest di messaggio di una lunga stringa univoca è preferibile alla lunga stringa stessa.

Il tipo di payload per il Vendor ID payload è quarantatre (43).

3.13. Payload selettore di traffico​

Il Traffic Selector payload, indicato come TS in questo documento, consente ai peer di identificare flussi di pacchetti per l'elaborazione da parte dei servizi di sicurezza IPsec. Il Traffic Selector payload consiste nell'intestazione generica IKE dei payload seguita da singoli Traffic Selector come segue:

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

Figura 19: Formato del Traffic Selector payload

  • Number of TSs (1 ottetto) - Numero di Traffic Selector forniti.

  • RESERVED - Questo campo DEVE essere inviato a zero e DEVE essere ignorato in ricezione.

  • Traffic Selectors (lunghezza variabile) - Uno o più Traffic Selector individuali.

La lunghezza del Traffic Selector payload include l'intestazione TS e tutti i Traffic Selector.

Il tipo di payload per il Traffic Selector payload è quarantaquattro (44) per gli indirizzi al lato dell'iniziatore della SA e quarantacinque (45) per il lato del rispondente.

Non è richiesto che TSi e TSr contengano lo stesso numero di Traffic Selector individuali. Si interpretano così: un pacchetto corrisponde a un dato TSi/TSr se corrisponde ad almeno un selettore individuale in TSi e ad almeno uno in TSr.

Ad esempio, i seguenti Traffic Selector:

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

corrisponderebbero a pacchetti UDP da 198.51.100.66 verso ovunque, con una qualsiasi delle quattro combinazioni di porte sorgente/destinazione (100,300), (100,400), (200,300) e (200, 400).

Pertanto alcuni tipi di policy possono richiedere più coppie di Child SA. Una policy che corrisponde solo alle porte (100,300) e (200,400), ma non alle altre due combinazioni, non può essere negoziata come singola coppia di Child SA.

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

Figura 20: Traffic Selector

*Nota: Tutti i campi tranne TS Type e Selector Length dipendono dal TS Type. I campi mostrati sono per TS Type 7 e 8, gli unici due valori attualmente definiti.

  • TS Type (un ottetto) - Specifica il tipo di Traffic Selector.

  • IP protocol ID (1 ottetto) - Valore che specifica un ID protocollo IP associato (come UDP, TCP, ICMP). Zero significa che l'ID protocollo non è rilevante per questo Traffic Selector -- la SA può trasportare tutti i protocolli.

  • Selector Length (2 ottetti, intero senza segno) - Specifica la lunghezza di questa sottostruttura Traffic Selector inclusa l'intestazione.

  • Start Port (2 ottetti, intero senza segno) - Valore che specifica il numero di porta minimo consentito. Per protocolli senza porta (incluso protocollo 0), o se tutte le porte sono consentite, questo campo DEVE essere zero. I valori Type e Code ICMP e ICMPv6, nonché i valori Type MH MIPv6, sono rappresentati in questo campo come specificato nella sezione 4.4.1.1 di [IPSECARCH]. Type e Code ICMP sono trattati come un singolo intero a 16 bit, Type negli otto bit più significativi e Code nei meno significativi. I Type MH MIPv6 sono trattati come intero a 16 bit con Type negli otto bit alti e gli otto bit bassi a zero.

  • End Port (2 ottetti, intero senza segno) - Valore che specifica il numero di porta massimo consentito. Per protocolli senza porta o se tutte le porte sono consentite, questo campo DEVE essere 65535. ICMP/ICMPv6 e MIPv6 MH come nella sezione 4.4.1.1 di [IPSECARCH].

  • Starting Address - L'indirizzo minimo incluso in questo Traffic Selector (lunghezza determinata dal TS Type).

  • Ending Address - L'indirizzo massimo incluso in questo Traffic Selector (lunghezza determinata dal TS Type).

I sistemi conformi a [IPSECARCH] che vogliono indicare porte «ANY» DEVONO impostare la porta iniziale a 0 e quella finale a 65535; secondo [IPSECARCH], «ANY» include «OPAQUE». Per indicare solo «OPAQUE» senza «ANY», DEVONO impostare inizio 65535 e fine 0.

I tipi di Traffic Selector 7 e 8 possono riferirsi anche ai campi type e code ICMP o ICMPv6 e ai campi Type MH per l'intestazione di mobilità IPv6 [MIPV6]. Tuttavia né ICMP né MIPv6 hanno campi sorgente e destinazione separati. Il metodo per specificare i Traffic Selector per ICMP e MIPv6 è mostrato per esempio nella sezione 4.4.1.3 di [IPSECARCH].

La tabella seguente elenca i valori del campo Traffic Selector Type e i corrispondenti dati del selettore di indirizzo. I valori sono aggiornati alla data di pubblicazione del RFC 4306; per i valori più recenti vedere [IKEV2IANA].

TS TypeValore
TS_IPV4_ADDR_RANGE7
Intervallo di indirizzi IPv4 rappresentato da due valori di quattro ottetti. Il primo è l'indirizzo IPv4 iniziale (inclusivo) e il secondo quello finale (inclusivo). Tutti gli indirizzi tra i due estremi sono considerati nella lista.
TS_IPV6_ADDR_RANGE8
Intervallo di indirizzi IPv6 rappresentato da due valori di sedici ottetti. Il primo è l'indirizzo IPv6 iniziale (inclusivo) e il secondo quello finale (inclusivo). Tutti gli indirizzi tra i due estremi sono considerati nella lista.

3.14. Payload crittografato​

L'Encrypted payload, indicato come SK {...} in questo documento, contiene altri payload in forma crittografata. Se è presente un Encrypted payload in un messaggio, DEVE essere l'ultimo payload del messaggio. Spesso è l'unico payload del messaggio. Questo payload è anche detto payload «Encrypted and Authenticated».

Gli algoritmi di crittografia e protezione dell'integrità sono negoziati durante l'istituzione dell'IKE SA, e le chiavi sono calcolate come specificato nelle sezioni 2.14 e 2.18.

Questo documento specifica l'elaborazione crittografica degli Encrypted payload usando un cifrario a blocchi in modalità CBC e un algoritmo di controllo dell'integrità che calcola un checksum di lunghezza fissa su un messaggio di dimensione variabile. Il progetto è modellato sugli algoritmi ESP descritti in RFC 2104 [HMAC], 4303 [ESP] e 2451 [ESPCBC]. Questo documento specifica completamente l'elaborazione crittografica dei dati IKE, ma quei documenti vanno consultati per la motivazione di progetto. Documenti futuri POSSONO specificare l'elaborazione degli Encrypted payload per altri tipi di trasformazione, come la crittografia in modalità contatore e gli algoritmi di crittografia autenticata. I peer NON DEVONO negoziare trasformazioni per cui non esiste tale specifica.

Quando si usa un algoritmo di crittografia autenticata per proteggere l'IKE SA, la costruzione dell'Encrypted payload è diversa da quanto descritto qui. Vedere [AEAD] per maggiori informazioni sugli algoritmi di crittografia autenticata e sul loro uso in IKEv2.

Il tipo di payload per un Encrypted payload è quarantasei (46). L'Encrypted payload consiste nell'intestazione generica IKE dei payload seguita dai campi seguenti:

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

Figura 21: Formato dell'Encrypted payload

  • Next Payload - Il tipo di payload del primo payload incorporato. Si tratta di un'eccezione al formato di intestazione standard, poiché l'Encrypted payload è l'ultimo payload del messaggio e quindi il campo Next Payload sarebbe normalmente zero. Ma poiché il contenuto di questo payload è costituito da payload incorporati e non c'era un posto naturale per il tipo del primo, quel tipo è posto qui.

  • Payload Length - Include le lunghezze dell'intestazione, del vettore di inizializzazione (IV), degli IKE payload crittografati, del Padding, del Pad Length e degli Integrity Checksum Data.

  • Initialization Vector - Per i cifrari in modalità CBC, la lunghezza dell'IV è uguale alla lunghezza di blocco dell'algoritmo di crittografia sottostante. I mittenti DEVONO selezionare un nuovo IV imprevedibile per ogni messaggio; i destinatari DEVONO accettare qualsiasi valore. Si consiglia di consultare [MODES] per la generazione degli IV. In particolare, usare l'ultimo blocco di testo cifrato del messaggio precedente non è considerato imprevedibile. Per modalità diverse da CBC, il formato e l'elaborazione dell'IV sono specificati nel documento che definisce l'algoritmo e la modalità di crittografia.

  • Gli IKE payload sono come specificato prima in questa sezione. Questo campo è crittografato con il cifrario negoziato.

  • Il Padding PUÒ contenere qualsiasi valore scelto dal mittente e DEVE avere una lunghezza tale che la combinazione dei payload, del Padding e del Pad Length sia un multiplo della dimensione di blocco della crittografia. Questo campo è crittografato con il cifrario negoziato.

  • Pad Length è la lunghezza del campo Padding. Il mittente DOVREBBE impostare Pad Length al valore minimo che rende la combinazione di payload, Padding e Pad Length un multiplo della dimensione di blocco, ma il destinatario DEVE accettare qualsiasi lunghezza che produca un allineamento corretto. Questo campo è crittografato con il cifrario negoziato.

  • Integrity Checksum Data è il checksum crittografico dell'intero messaggio dall'intestazione IKE fissa fino al Pad Length. Il checksum DEVE essere calcolato sul messaggio crittografato. La sua lunghezza è determinata dall'algoritmo di integrità negoziato.

3.15. Payload di configurazione​

Il Configuration payload, indicato come CP in questo documento, serve a scambiare informazioni di configurazione tra peer IKE. Lo scambio consente a un IRAC di richiedere un indirizzo IP interno a un IRAS e di scambiare altre informazioni del tipo che si otterrebbero con il Dynamic Host Configuration Protocol (DHCP) se l'IRAC fosse collegato direttamente a una LAN.

Il Configuration payload è definito come segue:

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

Figura 22: Formato del Configuration payload

Il tipo di payload per il Configuration payload è quarantasette (47).

  • CFG Type (1 ottetto) - Il tipo di scambio rappresentato dai Configuration Attributes. I valori nella tabella seguente sono aggiornati alla data di pubblicazione del RFC 4306. Valori successivi in [IKEV2IANA].
CFG TypeValore
CFG_REQUEST1
CFG_REPLY2
CFG_SET3
CFG_ACK4
  • RESERVED (3 ottetti) - DEVE essere inviato a zero; DEVE essere ignorato in ricezione.

  • Configuration Attributes (lunghezza variabile) - Strutture tipo-lunghezza-valore (TLV) specifiche del Configuration payload, definite sotto. Possono esserci zero o più Configuration Attributes in questo payload.

3.15.1. Attributi di configurazione​

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

Figura 23: Formato del Configuration attribute

  • Reserved (1 bit) - Questo bit DEVE essere zero e DEVE essere ignorato in ricezione.

  • Attribute Type (15 bit) - Identificatore univoco per ciascun tipo di Configuration Attribute.

  • Length (2 ottetti, intero senza segno) - Lunghezza in ottetti del valore.

  • Value (zero o più ottetti) - Valore a lunghezza variabile di questo Configuration Attribute. I tipi di attributo seguono.

I valori nella tabella seguente sono aggiornati alla data di pubblicazione del RFC 4306 (INTERNAL_ADDRESS_EXPIRY e INTERNAL_IP6_NBNS rimossi dal RFC 5996). Valori successivi in [IKEV2IANA].

Attribute TypeValoreMulti-valoreLunghezza
INTERNAL_IP4_ADDRESS1YES*0 o 4 ottetti
INTERNAL_IP4_NETMASK2NO0 o 4 ottetti
INTERNAL_IP4_DNS3YES0 o 4 ottetti
INTERNAL_IP4_NBNS4YES0 o 4 ottetti
INTERNAL_IP4_DHCP6YES0 o 4 ottetti
APPLICATION_VERSION7NO0 o più
INTERNAL_IP6_ADDRESS8YES*0 o 17 ottetti
INTERNAL_IP6_DNS10YES0 o 16 ottetti
INTERNAL_IP6_DHCP12YES0 o 16 ottetti
INTERNAL_IP4_SUBNET13YES0 o 8 ottetti
SUPPORTED_ATTRIBUTES14NOMultiplo di 2
INTERNAL_IP6_SUBNET15YES17 ottetti

* Questi attributi possono essere multi-valore in risposta solo se sono stati richiesti più valori.

  • INTERNAL_IP4_ADDRESS, INTERNAL_IP6_ADDRESS - Un indirizzo sulla rete interna, talvolta detto indirizzo red node o privato; PUÒ essere un indirizzo privato su Internet. In un messaggio di richiesta, l'indirizzo indicato è quello richiesto (o lunghezza zero se non si richiede un indirizzo specifico). Una richiesta specifica suggerisce spesso una connessione precedente con quell'indirizzo e il desiderio di riutilizzarlo. Con IPv6, il richiedente PUÒ fornire gli ottetti bassi desiderati. Più indirizzi interni POSSONO essere richiesti con più attributi indirizzo interno. Il rispondente PUÒ inviare al massimo il numero di indirizzi richiesti. INTERNAL_IP6_ADDRESS ha due campi: indirizzo IPv6 di 16 ottetti e lunghezza prefisso di un ottetto come in [ADDRIPV6]. L'indirizzo richiesto è valido finché è valida questa IKE SA (o le sue successive dopo rekey) che lo ha richiesto. Vedere la sezione 3.15.3.

  • INTERNAL_IP4_NETMASK - La maschera di rete della rete interna. È consentita una sola maschera nelle richieste e risposte (es. 255.255.255.0) e DEVE essere usata solo con INTERNAL_IP4_ADDRESS. INTERNAL_IP4_NETMASK in CFG_REPLY equivale grosso modo a INTERNAL_IP4_SUBNET con le stesse informazioni («inviare il traffico verso questi indirizzi attraverso me»), ma implica anche un confine di link. Il client può usare indirizzo e maschera per calcolare il broadcast del link. Un attributo INTERNAL_IP4_NETMASK vuoto in CFG_REQUEST può richiedere questa informazione (il gateway può inviarla anche senza richiesta). Valori non vuoti in CFG_REQUEST non hanno senso e NON DEVONO essere inclusi.

  • INTERNAL_IP4_DNS, INTERNAL_IP6_DNS - Specifica l'indirizzo di un server DNS nella rete. Più server DNS POSSONO essere richiesti. Il rispondente PUÒ rispondere con zero o più attributi server DNS.

  • INTERNAL_IP4_NBNS - Indirizzo di un NetBios Name Server (WINS) nella rete. Più server NBNS POSSONO essere richiesti. Il rispondente PUÒ rispondere con zero o più attributi NBNS.

  • INTERNAL_IP4_DHCP, INTERNAL_IP6_DHCP - Indica all'host di inviare le richieste DHCP interne all'indirizzo nell'attributo. Più server DHCP POSSONO essere richiesti. Il rispondente PUÒ rispondere con zero o più attributi server DHCP.

  • APPLICATION_VERSION - Versione o informazioni applicative dell'host IPsec. Stringa di caratteri ASCII stampabili NON terminata da null.

  • INTERNAL_IP4_SUBNET - Le sottoreti protette da questo dispositivo perimetrale. Due campi: indirizzo IP e maschera. Più sottoreti POSSONO essere richieste. Il rispondente PUÒ rispondere con zero o più attributi sottorete. Vedere la sezione 3.15.2.

  • SUPPORTED_ATTRIBUTES - In una Request, questo attributo DEVE avere lunghezza zero e chiede al rispondente di elencare tutti gli attributi supportati. La risposta contiene un attributo con identificatori da 2 ottetti ciascuno. La lunghezza divisa per 2 dà il numero di attributi supportati.

  • INTERNAL_IP6_SUBNET - Sottoreti protette da questo dispositivo. Indirizzo IPv6 di 16 ottetti e lunghezza prefisso di un ottetto come in [ADDRIPV6]. Più sottoreti POSSONO essere richieste. Vedere la sezione 3.15.2.

Questo documento non raccomanda metodi specifici per determinare quali informazioni inviare in risposta, né come un IRAS scelga quale server DNS restituire a un IRAC richiedente.

La coppia CFG_REQUEST e CFG_REPLY consente a un endpoint IKE di richiedere informazioni al peer. Se un attributo nel Configuration payload CFG_REQUEST non ha lunghezza zero, è una suggestione per quell'attributo. Il Configuration payload CFG_REPLY PUÒ restituire quel valore o uno nuovo, aggiungere attributi o omettere richieste. Attributi non riconosciuti o non supportati DEVONO essere ignorati in richieste e risposte.

La coppia CFG_SET e CFG_ACK consente di inviare dati di configurazione al peer. Il Configuration payload CFG_SET contiene attributi che l'iniziatore vuole modificare sul peer. Se il rispondente ha accettato dati, DEVE restituire un Configuration payload con gli attributi accettati e dati di lunghezza zero. Gli attributi non accettati NON DEVONO comparire nel CFG_ACK. Se nulla è accettato, il rispondente DEVE restituire un CFG_ACK vuoto o una risposta senza CFG_ACK. Non ci sono usi definiti per CFG_SET/CFG_ACK al momento; possono essere usati con estensioni basate su Vendor ID. Un'implementazione PUÒ ignorare i payload CFG_SET.

3.15.2. Significato di INTERNAL_IP4_SUBNET e INTERNAL_IP6_SUBNET​

Gli attributi INTERNAL_IP4/6_SUBNET possono indicare sottoreti aggiuntive raggiungibili tramite il gateway che annuncia gli attributi e che richiedono una o più SA separate. Possono anche esprimere la politica del gateway sul traffico che deve passare dal gateway; il client può scegliere se altro traffico (coperto da TSr ma non da INTERNAL_IP4/6_SUBNET) passa dal gateway o va diretto. Il traffico verso gli indirizzi elencati in INTERNAL_IP4/6_SUBNET dovrebbe passare dal gateway che annuncia gli attributi. Se non esiste Child SA i cui Traffic Selectors coprono l'indirizzo, occorrono nuove SA.

Esempio con due sottoreti 198.51.100.0/26 e 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)

Risposta valida (TSr e INTERNAL_IP4_SUBNET stessa informazione):

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

In questi casi INTERNAL_IP4_SUBNET non aggiunge informazione utile.

Altra risposta possibile:

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)

Il client può inviare tutto il traffico via gateway; il gateway accetta anche traffico fuori INTERNAL_IP4_SUBNET direttamente verso la destinazione.

Se la politica richiede SA separate per le due sottoreti:

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 è utile anche se il TSr del client copre solo parte dello spazio:

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)

Possibile risposta:

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)

Poiché il significato di INTERNAL_IP4_SUBNET/INTERNAL_IP6_SUBNET nei CFG_REQUEST è poco chiaro, non sono affidabili nei CFG_REQUEST.

3.15.3. Configuration payload per IPv6​

I Configuration payload per IPv6 si basano sui corrispondenti IPv4 e non seguono pienamente il «modo IPv6 usuale». In particolare non si usano autoconfigurazione stateless IPv6, annunci router né neighbor discovery. Vedere [IPV6CONFIG] (sperimentale).

Un client può ricevere un indirizzo IPv6 con INTERNAL_IP6_ADDRESS. Scambio minimo:

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)

Il client PUÒ inviare INTERNAL_IP6_ADDRESS non vuoto in CFG_REQUEST. Il gateway verifica l'indirizzo; se non accettabile, prova l'identificatore di interfaccia con altro prefisso o ne sceglie un altro.

INTERNAL_IP6_ADDRESS include anche la lunghezza del prefisso; in CFG_REPLY corrisponde a INTERNAL_IP4_NETMASK in IPv4.

I tunnel IPsec con IKEv2 non sono «interfacce» complete nel senso dell'architettura di indirizzamento IPv6 [ADDRIPV6]; spesso mancano indirizzi link-local, complicando protocolli come [MLDV2].

3.15.4. Errori nell'assegnazione degli indirizzi​

Se il rispondente incontra un errore assegnando un indirizzo IP all'iniziatore durante l'elaborazione di un Configuration payload, risponde con la notifica INTERNAL_ADDRESS_FAILURE. L'IKE SA viene comunque creata anche se la Child SA iniziale non può essere creata per questo errore. Se l'errore avviene in IKE_AUTH, non si crea Child SA. Esistono casi più complessi.

Se il rispondente non supporta affatto i Configuration payload, può ignorarli tutti. Tali implementazioni non inviano mai INTERNAL_ADDRESS_FAILURE.

Se l'iniziatore richiede obbligatoriamente un indirizzo IP, tratta come errore una risposta senza CFG_REPLY.

L'iniziatore può richiedere un tipo di indirizzo (IPv4 o IPv6) non supportato dal rispondente, che comunque supporta i Configuration payload. Il rispondente ignora quel tipo e elabora il resto come al solito.

Se alcune (non tutte) richieste multiple falliscono, il rispondente risponde solo con gli indirizzi assegnati con successo. INTERNAL_ADDRESS_FAILURE solo se non si può assegnare alcun indirizzo.

Se l'iniziatore non riceve gli indirizzi richiesti dalla policy, PUÒ mantenere l'IKE SA e riprovare il Configuration payload in uno scambio INFORMATIONAL separato dopo un timeout, oppure demolire l'IKE SA con un Delete payload e riprovare da capo. I timeout non devono essere troppo brevi (minuti). La penuria di indirizzi spesso si risolve solo quando altri client liberano il pool o il pool viene ampliato.

3.16. Payload del protocollo di autenticazione estensibile (EAP)​

Il Extensible Authentication Protocol payload, indicato come EAP in questo documento, consente di autenticare le IKE SA usando il protocollo definito in RFC 3748 [EAP] e le successive estensioni. Con EAP occorre selezionare un metodo EAP appropriato. Molti metodi sono stati definiti, specificando l'uso del protocollo con vari meccanismi di autenticazione. I tipi di metodo EAP sono elencati in [EAP-IANA]. Per chiarezza si include qui un breve riassunto del formato EAP.

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

Figura 24: Formato del EAP payload

Il tipo di payload per un EAP payload è quarantotto (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...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Figura 25: Formato del messaggio EAP

  • Code (1 ottetto) - Indica se questo messaggio è Request (1), Response (2), Success (3) o Failure (4).

  • Identifier (1 ottetto) - Usato in PPP per distinguere messaggi riprodotti da messaggi ripetuti. Poiché in IKE EAP opera su un protocollo affidabile, qui l'Identifier non ha funzione. In un messaggio di risposta, questo ottetto DEVE essere uguale all'identificatore della richiesta corrispondente.

  • Length (2 ottetti, intero senza segno) - La lunghezza del messaggio EAP. DEVE essere inferiore di quattro rispetto alla Payload Length del payload incapsulante.

  • Type (1 ottetto) - Presente solo se il campo Code è Request (1) o Response (2). Per altri codici, la lunghezza del messaggio EAP DEVE essere quattro ottetti e i campi Type e Type_Data NON DEVONO essere presenti. In un messaggio Request (1), Type indica i dati richiesti. In Response (2), Type DEVE essere Nak oppure corrispondere al tipo di dati richiesti. Poiché IKE passa un'indicazione dell'identità dell'iniziatore nel primo messaggio dello scambio IKE_AUTH, il rispondente NON DOVREBBE inviare richieste EAP Identity (tipo 1). L'iniziatore PUÒ tuttavia rispondere a tali richieste se le riceve.

  • Type_Data (lunghezza variabile) - Varia con il Type della Request e della Response associata. Per la documentazione dei metodi EAP, vedere [EAP].

Poiché IKE passa un'indicazione dell'identità dell'iniziatore nel primo messaggio dello scambio IKE_AUTH, il rispondente NON DOVREBBE inviare richieste EAP Identity. L'iniziatore PUÒ tuttavia rispondere a tali richieste se le riceve.