#73110·Go

proposal: crypto/cipher: expose NewGCMWithCounterNonce

Author: wadeyCreated Mar 31, 2025Updated Sep 17, 2026
LabelsProposalProposal-CryptoLibraryProposal

Proposal Details

The internal method crypto.internal.fips140.aes.gcm.NewGCMWithCounterNonce was added in go1.24. This method would be nice to expose for users that want to use it for FIPS-140 compliance reasons.

Outside of FIPS reasons, this method is also nice because it asserts your GCM nonces are non-repeating (when you are using a counter).

NewGCMWithRandomNonce was exposed in crypto/cipher with #69981, so I imagine it could be exposed in a similar way.