liveBook · Manning

Initialization vector

As explained in Real-World Cryptography

An initialization vector is an input value that initializes a cryptographic encryption operation and is typically combined with a key to produce distinct ciphertexts.

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

How Real-World Cryptography covers it

How deep it goes
Connects IV generation, transmission, decryption, and authentication, but does not descend into implementation code.
Examples
Uses AES-CBC diagrams showing random IVs, required decryption inputs, and bit-flipping attacks against public IVs.
What it assumes
Assumes basic AES and block concepts while introducing padding, modes of operation, ciphertext, and decryption context.
What you can do after
Operate/configure AES-CBC by generating unpredictable IVs and authenticating them with ciphertext before decryption.
How it connects
Links initialization vectors to block ciphers, AES-CBC, ciphertext, decryption, message authentication codes, and HMAC.

Also explained in

Compare how 3 books explain initialization vector →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Real-World Cryptography. The section links point to the parts of the book it draws on.