authentication tag
A short value, 16 bytes for AES-GCM, produced with the ciphertext that lets the receiver check nothing was changed.
In more detail
It is not secret and is sent alongside the ciphertext. If even one bit of the ciphertext or tag is altered, decryption fails instead of returning wrong data.
Related terms
- authenticated encryption — Encryption that also proves the data has not been changed, by producing an authentication tag checked during decryption.
- Galois/Counter Mode — A mode of using a block cipher such as AES that both encrypts data and produces an authentication tag to detect any tampering.
- createCipheriv() — The node:crypto functions that encrypt (createCipheriv) and decrypt (createDecipheriv) data with a given algorithm, key and initialization vector.
Taught in
- Cryptographic Primitives: node:crypto & Ciphers — Node.js Internals & Backend Services