liveBook · Manning

Authenticated encryption with associated data

As explained in Software Security for Developers

Authenticated encryption with associated data is an encryption technique that simultaneously protects ciphertext confidentiality and authenticates both ciphertext and associated plaintext data.

Authenticated encryption with associated data (AEAD) protects encrypted content from disclosure and tampering while authenticating related data that remains readable. A message header can stay plaintext, while the body is encrypted; changing either causes authentication to fail. This avoids separately combining AES encryption with HMAC and helps prevent message-swapping attacks. section 5.4

Use AEAD with these practical expectations:

  • Prefer AES-GCM, which produces ciphertext and an authentication tag from a secret key, random IV, plaintext, and optional associated data. section 5.4 section 5.7
  • Never reuse an IV with the same key; common guidance uses 256-bit keys, 96-bit IVs, and 128-bit authentication tags. section 5.7

How Software Security for Developers covers it

How deep it goes
Explains plaintext headers, encrypted bodies, authentication tags, IVs, and Java configuration, but avoids cryptographic internals.
Examples
Uses plaintext headers, encrypted message bodies, payment records, AES-GCM Java encryption, and matching decryption inputs.
What it assumes
Assumes basic encryption vocabulary but defines associated data, authentication, confidentiality, integrity, and authenticity practically.
What you can do after
Apply it via Java Cipher and AES-GCM while binding associated data and avoiding IV reuse.
How it connects
Connects confidentiality, integrity, authenticity, HMAC, AES, GCM, authentication tags, IVs, and associated data.

Also explained in

Compare how 3 books explain authenticated encryption with associated data →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Software Security for Developers. The section links point to the parts of the book it draws on.