Unreviewed changes
4 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: src/crypto/cipher/gcm_test.go
Insertions: 2, Deletions: 2.
@@ -762,10 +762,10 @@
})
}
-func TestGCMNonces(t *testing.T) {
+func TestGCMNoncesFIPSV1(t *testing.T) {
cryptotest.MustSupportFIPS140(t)
if !fips140.Enabled {
- cmd := testenv.Command(t, testenv.Executable(t), "-test.run=^TestGCMNonces$", "-test.v")
+ cmd := testenv.Command(t, testenv.Executable(t), "-test.run=^TestGCMNoncesFIPSV1$", "-test.v")
cmd = testenv.CleanCmdEnv(cmd)
cmd.Env = append(cmd.Env, "GODEBUG=fips140=on")
out, err := cmd.CombinedOutput()
```
Change information
Commit message:
crypto/internal/fips140/aes/gcm: don't panic on bad nonces out of FIPS 140-3 mode
The enforcement is good beyond compliance if it is correct, but I am
more nervous about accidental DoS due to mismatches between how the
caller calculates a nonce and how the enforcement expects it to be
calculated.
We need to have this enforcement in FIPS 140-3 mode, but no need to blow
ourselves up when it's off.
If all goes well, this code is unreachable anyway.
Change-Id: If73ec59ebbd283b0e5506354961a87a06a6a6964
Files:
- M src/crypto/cipher/gcm_fips140v2.0_test.go
- M src/crypto/cipher/gcm_test.go
- M src/crypto/internal/fips140/aes/gcm/gcm_nonces.go
Change size: M
Delta: 3 files changed, 80 insertions(+), 43 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Code-Review: +2 by Roland Shoemaker, +1 by David Chase
TryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI