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



