Use a unique nonce for every encryption under the same key, because nonce reuse can expose plaintext and authentication material. Keep keys tightly controlled, verify ciphertext integrity on decryption, and rotate keys according to policy. Prefer library defaults that handle the mode correctly, and reject implementations that reuse nonces or bypass authentication checks.
Nonce discipline is the core AES-GCM rule
AES-GCM is designed to give confidentiality and integrity together, but only if each encryption under a key uses a unique nonce. Reusing a nonce with the same key can leak information about the plaintext and can undermine authentication. That makes nonce generation, storage, and reuse prevention the first thing to get right in any implementation.
Libraries that expose low-level control need extra care because the mode will not save you from bad inputs. If the nonce comes from application code, from storage, or from a retry path, treat it as security-critical state, not a cosmetic parameter.
What safe use of AES-GCM actually requires
Safe AES-GCM use is not just “encrypt and decrypt.” You need correct key separation, nonce uniqueness, and authenticated decryption. The receiver should reject any ciphertext whose authentication tag fails, and applications should treat failed verification as a hard security event rather than a recoverable formatting issue.
It also helps to keep the encryption boundary narrow. If one component is responsible for key handling, nonce assignment, and tag verification, it is easier to reason about failures than when those duties are split across callers, wrappers, and transport code.
When teams want broader background on mode selection, authenticated encryption, and nonce handling, the Cryptography Basics Guide is the better anchor point for the underlying primitives, while the Encryption Guide covers how AES-GCM fits into real encryption patterns.
Key control, rotation, and implementation hygiene
Keys should be tightly scoped, protected in storage, and rotated according to policy, especially when the same key is used across many records or sessions. The practical goal is to reduce the blast radius if a key is exposed and to ensure old ciphertext can still be handled safely during a controlled transition.
Prefer well-reviewed library defaults over handwritten cryptographic glue. A correct default is usually better than a custom wrapper that tries to be “helpful” by reusing nonces, silently skipping tag checks, or translating decryption failure into partial output.
Teams that manage application secrets should also align the operational side of encryption with broader credential hygiene, and the API Key Management Guide is useful where the same discipline is needed for rotation, revocation, and exposure response.
Risk and Threat Considerations
Nonce reuse is the most important failure mode because it can turn a secure authenticated-encryption scheme into one that leaks structure and weakens integrity guarantees. The danger is often operational, not theoretical: retries, bad random-number handling, state loss after restart, or duplicated message construction can all create repeated nonces under the same key.
Failure mechanism: Reusing a nonce with AES-GCM under the same key breaks the assumptions behind the mode, allowing attackers or accidental analysts to derive information from repeated ciphertexts and potentially exploit the authentication construction.
Impact: The result can be plaintext exposure, loss of ciphertext integrity, and a need to treat the affected key as compromised until you can bound the exposure and re-encrypt or reissue the protected data.
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, NIST SP 800-53 Rev 5 and CIS Controls v8 set the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST SP 800-57 | Key Management | AES-GCM depends on disciplined key lifecycle and rotation. |
| Recommendation — Manage AES-GCM keys with defined cryptoperiods and controlled rotation. | ||
| NIST SP 800-53 Rev 5 | IA-5 — Authenticator Management | Keys, nonces, and related secret material require strict lifecycle and protection. |
| SC-13 — Cryptographic Protection | AES-GCM is a cryptographic protection mechanism whose correct use matters here. | |
| Recommendation — Protect cryptographic secret material and rotate it under defined policy. Use approved cryptography and enforce authenticated encryption on protected data. | ||
| ISO/IEC 27001:2022 | A.8.24 — Use of cryptography | AES-GCM best practices are directly about correct cryptographic use. |
| Recommendation — Apply cryptographic controls that require secure use and handling of encryption. | ||
| CIS Controls v8 | CIS-3 — Data Protection | AES-GCM protects data confidentiality and integrity, which this control family addresses. |
| Recommendation — Encrypt sensitive data and verify that encryption is implemented correctly. | ||
Practitioner Guidance
What to verify: Confirm that nonce generation is unique per key, survives process restarts safely, and cannot be overridden by callers unless there is a documented and tested reason. Also verify that decryption failures are hard failures, not warnings or partial-data paths.
Common mistake: Do not assume “using AES-GCM” is enough. The mode is secure when implemented correctly, but a single nonce collision or skipped authentication check can negate the protection you thought you had.
Decision rule: If you cannot prove nonce uniqueness and tag verification, treat the implementation as unsafe and fix the control path before relying on the ciphertext for confidentiality or integrity.
Practitioner takeaway: AES-GCM is a strong default only when nonce uniqueness, authenticated decryption, and disciplined key handling are all enforced together, because weakening any one of them can break the protection model.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
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.
Reviewed and updated by the NHIMG editorial team on October 18, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org