]> Cypherpunks repositories - gostls13.git/commitdiff
crypto: rename fips140v2.0 to fips140v1.26
authorFilippo Valsorda <filippo@golang.org>
Wed, 17 Dec 2025 16:50:07 +0000 (17:50 +0100)
committerGopher Robot <gobot@golang.org>
Wed, 17 Dec 2025 17:29:08 +0000 (09:29 -0800)
Turns out we can't use non-v1 versions for the FIPS 140-3 module, so we
decided to match the versioning of the Go release the module is frozen
from.

Change-Id: Ib5c13511a51f9930fcde86cd7e8bd39c6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/730740
Auto-Submit: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/crypto/cipher/gcm_fips140v1.26_test.go [moved from src/crypto/cipher/gcm_fips140v2.0_test.go with 97% similarity]
src/crypto/hpke/aead_fips140v1.0.go [moved from src/crypto/hpke/aead_fipsv1.0.go with 100% similarity]
src/crypto/hpke/aead_fips140v1.26.go [moved from src/crypto/hpke/aead_fipsv2.0.go with 100% similarity]
src/crypto/internal/fips140test/acvp_capabilities_fips140v1.26.json [moved from src/crypto/internal/fips140test/acvp_capabilities_fips140v2.0.json with 100% similarity]
src/crypto/internal/fips140test/acvp_fips140v1.26_test.go [moved from src/crypto/internal/fips140test/acvp_fips140v2.0_test.go with 97% similarity]
src/crypto/internal/fips140test/acvp_test_fips140v1.26.config.json [moved from src/crypto/internal/fips140test/acvp_test_fips140v2.0.config.json with 100% similarity]
src/crypto/internal/fips140test/cast_fips140v1.0_test.go
src/crypto/internal/fips140test/cast_fips140v1.26_test.go [moved from src/crypto/internal/fips140test/cast_fips140v2.0_test.go with 91% similarity]
src/crypto/internal/fips140test/cast_test.go
src/crypto/internal/rand/rand_fips140v1.0.go [moved from src/crypto/internal/rand/rand_fipsv1.0.go with 100% similarity]
src/crypto/internal/rand/rand_fips140v1.26.go [moved from src/crypto/internal/rand/rand_fipsv2.0.go with 100% similarity]

similarity index 97%
rename from src/crypto/cipher/gcm_fips140v2.0_test.go
rename to src/crypto/cipher/gcm_fips140v1.26_test.go
index d3a8ea5c63bb826a4d6418a36aedf405bc9a37fa..9f17a497cabea3412acbf8a82707f83cbccbe778 100644 (file)
@@ -18,10 +18,10 @@ import (
        "testing"
 )
 
-func TestGCMNoncesFIPSV2(t *testing.T) {
+func TestGCMNoncesFIPSV126(t *testing.T) {
        cryptotest.MustSupportFIPS140(t)
        if !fips140.Enabled {
-               cmd := testenv.Command(t, testenv.Executable(t), "-test.run=^TestGCMNoncesFIPSV2$", "-test.v")
+               cmd := testenv.Command(t, testenv.Executable(t), "-test.run=^TestGCMNoncesFIPSV126$", "-test.v")
                cmd.Env = append(cmd.Environ(), "GODEBUG=fips140=on")
                out, err := cmd.CombinedOutput()
                t.Logf("running with GODEBUG=fips140=on:\n%s", out)
similarity index 97%
rename from src/crypto/internal/fips140test/acvp_fips140v2.0_test.go
rename to src/crypto/internal/fips140test/acvp_fips140v1.26_test.go
index e9ef91537a90c0412a08749d36e51368353481c2..10a44f1492bbf1d95ddacfc44430dab6dde147e0 100644 (file)
@@ -12,10 +12,10 @@ import (
        "fmt"
 )
 
-//go:embed acvp_capabilities_fips140v2.0.json
+//go:embed acvp_capabilities_fips140v1.26.json
 var capabilitiesJson []byte
 
-var testConfigFile = "acvp_test_fips140v2.0.config.json"
+var testConfigFile = "acvp_test_fips140v1.26.config.json"
 
 func init() {
        commands["ML-DSA-44/keyGen"] = cmdMlDsaKeyGenAft(mldsa.NewPrivateKey44)
index 4780966208961193dbca2998e61037b1d98302bd..b9ddfe4d8b49b689bb867ca10a9a4df2db5dcc3c 100644 (file)
@@ -6,4 +6,4 @@
 
 package fipstest
 
-func fips140v2Conditionals() {}
+func fips140v126Conditionals() {}
similarity index 91%
rename from src/crypto/internal/fips140test/cast_fips140v2.0_test.go
rename to src/crypto/internal/fips140test/cast_fips140v1.26_test.go
index 06e0513a7fde7b32945db36fa0282c7ceef428ee..ef79068c38d26b46bc8e3600f009d34d0c19f9cf 100644 (file)
@@ -8,7 +8,7 @@ package fipstest
 
 import "crypto/internal/fips140/mldsa"
 
-func fips140v2Conditionals() {
+func fips140v126Conditionals() {
        // ML-DSA sign and verify PCT
        kMLDSA := mldsa.GenerateKey44()
        // ML-DSA-44
index 5a80006622c4c2b30fe1116822b98e7990453af4..817dcb9a35a79349d47cffd14ee66994d9afb330 100644 (file)
@@ -115,7 +115,7 @@ func TestAllCASTs(t *testing.T) {
 
 // TestConditionals causes the conditional CASTs and PCTs to be invoked.
 func TestConditionals(t *testing.T) {
-       fips140v2Conditionals()
+       fips140v126Conditionals()
        // ML-KEM PCT
        kMLKEM, err := mlkem.GenerateKey768()
        if err != nil {