Join our Newsletter — 33% off our NHI Course
Home› FAQ› Foundations & NHI Taxonomy› How does Galois Message Authentication Code (GMAC) work?
Foundations & NHI Taxonomy

How does Galois Message Authentication Code (GMAC) work?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated October 19, 2026 Domain: Foundations & NHI Taxonomy

Galois Message Authentication Code provides message authentication with a block cipher in Galois/Counter Mode, producing a tag that proves integrity and authenticity for data covered by the tag. It does not encrypt by itself. Defenders must never reuse nonces with the same key and should verify tags before accepting the message or related metadata.

What GMAC is actually doing under the hood

GMAC is a message authentication code built from the Galois field arithmetic used in GCM. It takes a key, a nonce, and the authenticated data, then computes a short tag that lets the receiver check that the data has not been altered and that it came from someone who knows the key. Because it is authentication only, it is commonly paired with encryption rather than used alone. The cryptographic foundation is covered well in NHIMG’s Cryptography Basics Guide, which places AES-GCM and related modes in their broader context.

The core security property is integrity plus authenticity, not secrecy. In practice, that means GMAC protects the tag-covered message fields, headers, or protocol metadata from undetected tampering. If a system needs confidentiality too, GMAC must sit alongside encryption, because an authenticated-but-plain message is still readable by anyone who can see it. That separation is a frequent source of design mistakes when teams assume “authenticating” data also hides it.

Nonce handling is part of the security boundary, not an implementation footnote. Reusing a nonce with the same key can break the tag’s safety guarantees and can make authentication appear valid when the construction is no longer trustworthy. The receiver also needs to verify the tag before acting on the message or consuming related metadata, because accepting unauthenticated inputs first can expose downstream parsers, routing logic, or authorization decisions to tampered data.

Where GMAC fits in protocols and implementations

GMAC is most useful where systems need a compact integrity check over structured data, such as control messages, API metadata, or transport headers. It can authenticate additional data that is not encrypted, which is often why it appears in network and systems protocols. When the same key and nonce discipline is enforced correctly, the tag gives the receiver a fast yes or no answer on whether the covered bytes are intact.

Because GMAC is derived from a block-cipher mode, its security depends on using the mode exactly as specified. The authenticated data must be byte-for-byte identical on both sides, and any variation in encoding, canonicalisation, or field ordering can produce a different tag. That is one reason protocol designers are careful about what is included as authenticated data versus what is left outside the tag.

For practitioners choosing or reviewing an implementation, the important question is not whether the algorithm is “strong” in the abstract, but whether the surrounding system enforces the rules that make the tag meaningful. The choice of nonce source, tag verification point, and key separation matters as much as the primitive itself. If those controls are weak, the security claim around GMAC weakens with them.

Common failure modes and what they mean operationally

The most dangerous failure mode is nonce reuse under a single key, because it undermines the assumptions that keep tags unpredictable and reliable. A second common issue is treating GMAC as if it were encryption, which can leave sensitive content exposed while giving a false sense of protection. A third is accepting the message before tag verification, which turns malformed or malicious inputs into a control-flow problem instead of a rejected packet.

GMAC also becomes risky when metadata is left outside the authenticated set. If the tag covers only part of a request, an attacker may not need to change the payload to cause harm, they may only need to alter a signed header, target, or routing value. That is why the authenticated scope must match the security decision the receiver is going to make.

Risk and Threat Considerations

GMAC failures usually show up as trust failures, not just cryptographic failures. If nonce discipline is weak, or if verification happens after parsing and processing, an attacker may be able to tamper with messages, replay valid traffic, or steer systems using authenticated-looking but unsafe metadata.

Failure mechanism: Key and nonce misuse, partial authentication, or late tag checking can allow forged or altered inputs to pass far enough into the system to influence routing, state changes, or downstream authorization.

Impact: The result can be silent integrity loss, protocol abuse, replay acceptance, or business logic acting on data that should have been rejected before use.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

NIST SP 800-57 and NIST SP 800-53 Rev 5 set the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.

FrameworkControl / ReferenceRelevance
NIST SP 800-57Key ManagementGMAC depends on careful key and nonce lifecycle handling.
Recommendation — Enforce unique nonces per key and rotate or retire keys when nonce discipline cannot be assured.
NIST SP 800-53 Rev 5IA-5 — Authenticator ManagementGMAC tags function as authenticators for message integrity and origin assurance.
SC-13 — Cryptographic ProtectionGMAC is a cryptographic integrity mechanism used to protect data against undetected modification.
Recommendation — Manage authentication material so tag generation and verification remain trustworthy. Use approved cryptographic protections to provide integrity for the data that must be trusted.
ISO/IEC 27001:2022A.8.24 — Use of cryptographyGMAC is a cryptographic control whose safe use depends on correct implementation and parameter handling.
Recommendation — Specify and operate GMAC with approved cryptographic settings and verified implementation constraints.

Practitioner Guidance

What to verify: Confirm that every GMAC use has a unique nonce strategy per key, and that the implementation rejects any message whose tag does not verify before the message is parsed or trusted.

Common mistake: Do not assume GMAC provides confidentiality, and do not let teams authenticate only the payload while leaving security-sensitive headers, counters, or destination fields outside the tag.

Practitioner takeaway: GMAC is only as strong as the surrounding protocol discipline, so the real control objective is correct nonce management, full coverage of the decision-bearing fields, and strict fail-closed verification before use.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 19, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org