liveBook · Manning

Authenticated encryption with associated data

As explained in Secure APIs

Authenticated encryption is encryption that provides confidentiality and integrity for ciphertext and optionally associated unencrypted data.

Authenticated encryption encrypts plaintext into ciphertext while producing an authentication tag. The tag protects both the ciphertext and additional data that remains unencrypted. section 7.2.2

This is useful when data must remain confidential but selected metadata must stay readable. In JWE, the JOSE protected header serves as associated data: the tag validates that neither the ciphertext nor protected header was modified. section 7.2.2

A JWE representation includes:

  • A protected JOSE header describing the encryption. section 7.2.2
  • An encrypted key, initialization vector, ciphertext, and authentication tag. section 7.2.2
{
  "protected":"<the integrity-protected JOSE header>",
  "encrypted_key":"<the encrypted key>",
  "iv":"<the initialization vector>",
  "ciphertext":"<the ciphertext>",
  "tag":"<the authentication tag>"
}

Inspect the structured JWE object and identify its protected header, encrypted key, initialization vector, ciphertext, and tag. section 7.2.2

How Secure APIs covers it

How deep it goes
Defines ciphertext, authentication tags, associated data, and JWE components without detailing encryption algorithms or implementation steps.
Examples
Uses a JWE object containing a protected header, encrypted key, initialization vector, ciphertext, and authentication tag.
What you can do after
Evaluate how encrypted token structures preserve confidentiality and authenticate ciphertext plus protected metadata.
How it connects
Connects authenticated encryption with JWE, JOSE headers, JWTs, confidentiality, and integrity.

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 Secure APIs. The section links point to the parts of the book it draws on.