An initialization vector (IV) is an extra input used with block-cipher encryption. In AES-CBC, it starts encryption alongside padded plaintext split into 16-byte blocks, helping prevent repeated plaintext blocks from producing revealing ciphertext patterns. section 4.3
Treat the IV as part of the encrypted message’s associated data:
- Generate an unpredictable IV for each encryption. section 4.4
- Transmit the IV with the ciphertext; it is public rather than secret. section 4.4
- Supply the associated IV during decryption. section 4.3
- Authenticate the IV together with the ciphertext, because an attacker can otherwise alter it and flip bits in the first plaintext block. section 4.4
A visible but dangerous input
In AES-CBC-HMAC, the transmitted result usually concatenates the public IV, ciphertext, and authentication tag. Verification must cover both the ciphertext and IV before decryption; otherwise, changing an IV bit can change a corresponding plaintext bit. section 4.4


