crypto: rename fips140v2.0 to fips140v1.26

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>
This commit is contained in:
Filippo Valsorda 2025-12-17 17:50:07 +01:00 committed by Gopher Robot
parent 05e41225f6
commit eecdb61eeb
11 changed files with 7 additions and 7 deletions

View 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)

View 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)

View File

@ -6,4 +6,4 @@
package fipstest
func fips140v2Conditionals() {}
func fips140v126Conditionals() {}

View 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

View 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 {