]> Cypherpunks repositories - gostls13.git/commit
crypto/internal/fips140test: add entropy SHA2-384 testing
authorDaniel McCarney <daniel@binaryparadox.net>
Fri, 3 Oct 2025 15:20:48 +0000 (11:20 -0400)
committerGopher Robot <gobot@golang.org>
Thu, 23 Oct 2025 00:59:18 +0000 (17:59 -0700)
commit02728a2846f94f87a8a8505b1993dfb60d13960e
treeea1db2d6c3b6dd8150334ae1c543d38dda0683d1
parentf92e01c117bf7d115a97229d4b4f81c91faf0f7b
crypto/internal/fips140test: add entropy SHA2-384 testing

The crypto/internal/fips140/entropy package vendors a minimal
implementation of SHA2-384 to insulate it from changes in the FIPS
module implementation. This means it also requires ACVP testing separate
from the FIPS module implementation. This commit implements the
required ACVP testing support.

There's no way via the ACVP protocol, or acvptool, to specify that we
want to test a specific SHA2-384 implementation compared to normal. We
use a new environment variable (GOENTROPYSOURCEACVP=1) to make that
distinction.

The capabilities we advertise when testing the entropy SHA2-384
implementation are limited to something that best describes the
input sizes that the entropy module's implementation supports within the
requirements imposed by ACVP. We allow 144 byte messages (3*digest size)
to support MCT and in particular the "standard" MCT algorithm, and allow
1024 byte messages as the production supported message size used by the
entropy module itself.

Change-Id: I6e693a3fa23efba35d8a7d029ddf0b11036621c3
Reviewed-on: https://go-review.googlesource.com/c/go/+/711740
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Daniel McCarney <daniel@binaryparadox.net>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
src/crypto/internal/fips140test/acvp_capabilities.entropy.json [new file with mode: 0644]
src/crypto/internal/fips140test/acvp_test.go