thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Security Fundamentals & Crypto · Intermediate

Message Authentication Code (MAC)

Short tag computed with a shared secret key that verifies a message's integrity and origin.

Definition

A MAC proves that a message came from someone with the shared key and was not modified. Constructions include HMAC (hash-based), CMAC (block-cipher-based), and Poly1305. Because both parties hold the key, a MAC cannot provide non-repudiation.

Example

An API request includes an HMAC-SHA256 tag computed over the request body with a shared secret.

Exam tip

MAC = integrity + authenticity, not non-repudiation. Don't confuse with MAC address or mandatory access control.

Related terms