IT lexicon › Security › Encrypt-then-MAC

Encrypt-then-MAC

Security På svenska → Updated: 2026-10-12

The ordering that decides whether encryption and integrity protection actually add up.

A cipher and a MAC can be combined in three orders. Encrypt-then-MAC encrypts first and then authenticates the ciphertext, so the receiver verifies the tag before touching decryption. MAC-then-encrypt and encrypt-and-MAC have produced a long list of vulnerabilities. Lucky Thirteen (2013) exploited timing differences in how TLS-CBC handled padding and the MAC, a direct consequence of computing the MAC before encryption.

Checking the tag first means a forged or wrongly padded ciphertext is rejected before any padding is examined, so a padding oracle has nothing to observe. It is the ordering most modern protocols choose, and the reason standards push toward AEAD rather than home-made combinations.

← Back to the lexicon