rfc-3602

The AES-CBC Cipher Algorithm and Its Use with IPsec

S. Frankel, R. Glenn, S. Kelly
date2003-09 streamIETF areasec wgipsec statusPROPOSED STANDARD pages15 canonicalhttps://www.rfc-editor.org/rfc/rfc3602 doi10.17487/RFC3602
This document describes the use of the Advanced Encryption Standard (AES) Cipher Algorithm in Cipher Block Chaining (CBC) Mode, with an explicit Initialization Vector (IV), as a confidentiality mechanism within the context of the IPsec Encapsulating Security Payload (ESP).

Extracted elements (19)

design-rationale §1

AES was selected by NIST on the basis of security, public disclosure, royalty-free availability worldwide, support for 128/192/256-bit keys, computational efficiency across diverse hardware including smart cards, and simplicity of implementation.

ipsec, crypto

design-rationale §2.1

CBC mode was chosen because it is well-defined, well-understood for symmetric ciphers, and is currently required for all other ESP ciphers, ensuring consistency across the ESP cipher suite.

ipsec, crypto

design-rationale §3

Including the IV in each datagram (rather than deriving it from a counter) ensures decryption can be performed even when datagrams are dropped or reordered in transit, at the cost of 16 octets of overhead per packet.

ipsec, crypto

design-rationale §2.4

The 16-octet block size of AES eliminates the need for additional padding to align the ESP Pad Length and Next Header fields on a 4-octet boundary, since a 16-octet multiple is also a 4-octet multiple.

ipsec

interoperability-note §5.4

HMAC-SHA-1 and HMAC-MD5 are currently considered sufficient strength to serve as IKE generators of 128-bit AES keys and as ESP authenticators for AES encryption using 128-bit keys, without requiring SHA-256/384/512.

ipsec, crypto

normative-requirement §2.2 MUST

All implementations MUST support the 128-bit key size for AES-CBC. Implementations MAY also support 192-bit and 256-bit key sizes.

ipsec, crypto, vpn

normative-requirement §2.3 SHOULD

If weak keys are discovered for AES, weak keys SHOULD be checked for and discarded when using manual key management. When using dynamic key management (e.g., IKE), weak key checks SHOULD NOT be performed as unnecessary complexity.

ipsec, crypto, security

normative-requirement §3 MUST NOT

Implementations MUST NOT use a counter or other low-Hamming-distance source for IVs, to avoid CBC encryption of very similar plaintext blocks in different packets.

ipsec, crypto, security

normative-requirement §2.4 MUST

Padding MUST be added as specified in ESP such that the data to be encrypted (including ESP Pad Length and Next Header fields) has a length that is a multiple of 16 octets.

ipsec, vpn

normative-requirement §3 MUST

The IV field MUST be the same size as the block size (16 octets). The IV MUST be chosen at random and MUST be unpredictable.

ipsec, crypto, vpn

normative-requirement §5.3 MUST

The Key Length attribute MUST be specified in both a Phase 1 IKE exchange and a Phase 2 exchange, because AES supports variable key lengths.

ipsec, crypto

normative-requirement §2.2 MUST

When a 128-bit key is used, implementations MUST use 10 rounds; 192-bit keys MUST use 12 rounds; 256-bit keys MUST use 14 rounds.

ipsec, crypto

protocol-element §2.1

AES-CBC uses a block size of 16 octets (128 bits) and an IV of the same size. The IV is XOR'd with the first plaintext block before encryption; subsequent blocks XOR the previous ciphertext block with the current plaintext before encryption.

ipsec, crypto

protocol-element §2.2

AES supports three key sizes: 128, 192, and 256 bits, with 128 bits as the default. The number of rounds varies per key size: 10, 12, and 14 respectively.

ipsec, crypto

protocol-element §3.2

The keying material provided by the key exchange protocol to the ESP algorithm must be at least as large as the key size; the cipher key is taken from the first <x> bits of that material.

ipsec, crypto

registry §7

IANA has assigned Encryption Algorithm ID 7 to AES-CBC for IKE Phase 1 negotiations, and ESP Transform Identifier 12 to ESP_AES for Phase 2 negotiations.

ipsec, registry

security-consideration §6

Implementations are encouraged to use the largest key sizes practical for their hardware/software configuration. A 128-bit key is considered secure for the foreseeable future, but performance trade-offs must account for both client and server sides of a secure channel.

ipsec, crypto, security

security-consideration §6

Random IV values are necessary to prevent probable plaintext cryptanalysis. Using a counter or low-Hamming-distance source for IVs allows an attacker to exploit similarities between ciphertext blocks across packets.

ipsec, crypto, security

wire-format §3

The ESP payload consists of a 16-octet Initialization Vector followed by the encrypted payload (variable length, a multiple of 16 octets). The IV precedes the ciphertext directly within the ESP payload field.

ipsec, vpn, crypto