Source File
gcm.go
Belonging Package
github.com/tmc/go-iroh/internal/itls/shim/fipsgcm
// Package fipsgcm is a shim for crypto/internal/fips140/aes/gcm, providing the// TLS GCM constructors the vendored crypto/tls uses. With FIPS mode disabled,// the upstream TLS-nonce wrappers are transparent passthroughs to standard GCM// (the nonce-prefix-stable / counter-increasing checks are FIPS-gated), so each// constructor returns a plain cipher.AEAD over the given block.package fipsgcmimport ()const gcmStandardNonceSize = 12const gcmTagSize = 16// NewGCMForTLS12 returns a standard AES-GCM AEAD for TLS 1.2 records.func ( *fipsaes.Block) (cipher.AEAD, error) {return cipher.NewGCMWithNonceSize(.Block, gcmStandardNonceSize)}// NewGCMForTLS13 returns a standard AES-GCM AEAD for TLS 1.3 records.func ( *fipsaes.Block) (cipher.AEAD, error) {return cipher.NewGCMWithNonceSize(.Block, gcmStandardNonceSize)}
![]() |
The pages are generated with Golds v0.8.4. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |