liveBook · Manning

Message authentication code

As explained in Secure APIs

An authentication tag is cryptographic output used to verify the integrity and authenticity of authenticated-encrypted data.

A message authentication code is cryptographic output that lets a recipient verify that authenticated-encrypted data has not been modified. In authenticated encryption, the tag protects both the ciphertext and additional authenticated data, such as a JOSE header. section 7.2.2

An authentication tag helps verify:

  • The ciphertext was not modified. section 7.2.2
  • The plaintext represented by the ciphertext was not modified. section 7.2.2
  • Unencrypted additional authenticated data, including the JOSE header, was not modified. section 7.2.2

Authentication tag in a JWE

A JWE can represent the protected header, encrypted key, initialization vector, ciphertext, and authentication tag as separate fields. The tag is produced by the encryption algorithm and proves the JWE's integrity. section 7.2.2

How Secure APIs covers it

How deep it goes
Defines the tag and identifies protected JWE components, without deriving its cryptographic construction.
Examples
Uses JWE field layouts and a protected JOSE header to illustrate where the authentication tag appears.
What it assumes
Assumes basic encryption terminology such as plaintext and ciphertext while introducing authenticated data and tags.
What you can do after
Evaluate whether encrypted data and associated protected data retain their integrity.
How it connects
Connects authenticated encryption with ciphertext, plaintext, additional authenticated data, JOSE headers, and JWE.

Also explained in

Compare how 4 books explain message authentication code →

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.