Block mode family

AES-CBC

Cipher Block Chaining with AES: confidentiality only; needs a random IV and a separate MAC

standard 3 variants NIST SP 800-38A

Overview

CBC (Cipher Block Chaining) is a classic block cipher mode defined in NIST SP 800-38A. Each plaintext block is XORed with the previous ciphertext block before encryption, so identical blocks encrypt differently. It provides confidentiality but no integrity.

The first block is XORed with an initialisation vector (IV), and each later block with the preceding ciphertext block, before AES encryption. Decryption reverses the process and can run in parallel, but encryption is inherently sequential. Messages must be padded to a multiple of 16 bytes, usually with PKCS #7 padding.

NextSSL includes AES-128-CBC, AES-192-CBC and AES-256-CBC. CBC was the dominant mode in TLS up to 1.2 and remains common in file formats and legacy protocols. Ciphertext length always grows by at least one block of padding. In TLS 1.3, CBC cipher suites were removed entirely in favour of AEAD modes, and new protocols should follow the same approach.

History

1980–2001
  1. ECB, CBC, CFB and OFB defined for DES in FIPS 81

  2. Carried over to AES in NIST SP 800-38A

How it works

  1. Generate a random 16-byte IV
  2. Pad the plaintext to a multiple of 16 bytes
  3. XOR each block with the previous ciphertext (or IV) and encrypt
  4. Send IV and ciphertext, and authenticate both separately

Security notes

CBC requires an unpredictable IV; predictable IVs enabled the BEAST attack on TLS 1.0. Without authentication, CBC with padding is vulnerable to padding-oracle attacks such as Lucky Thirteen and POODLE, which can decrypt traffic. Always combine CBC with a MAC in encrypt-then-MAC order, or prefer an AEAD mode such as AES-GCM.

Typical uses

Legacy protocol and file-format interoperabilityEncrypt-then-MAC constructions with HMAC

Variants in NextSSL

3
AlgorithmTierSizes (bytes)StandardsAPI
AES-128-CBC
aes-128-cbc
standard FIPS key 16 · nonce 16 · block 16 NIST SP 800-38A safe
AES-192-CBC
aes-192-cbc
standard FIPS key 24 · nonce 16 · block 16 NIST SP 800-38A safe
AES-256-CBC
aes-256-cbc
standard FIPS key 32 · nonce 16 · block 16 NIST SP 800-38A safe

Frequently asked questions

Which AES-CBC variants does NextSSL include?

NextSSL registers 3 AES-CBC variants: aes-128-cbc, aes-192-cbc, aes-256-cbc.