aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/json/decode_test.go
diff options
context:
space:
mode:
authorDaniel McCarney <daniel@binaryparadox.net>2025-01-02 13:27:09 -0500
committerGopher Robot <gobot@golang.org>2025-01-10 14:12:31 -0800
commit19e923182e590ae6568c2c714f20f32512aeb3e3 (patch)
tree4aa86ee471e48f07e3247317c650071afa50e426 /src/encoding/json/decode_test.go
parent7255b949202bb752b6525aa24cb636ceaf24e4d1 (diff)
downloadgo-19e923182e590ae6568c2c714f20f32512aeb3e3.tar.xz
crypto/internal/fips140test: add hmac DRBG ACVP tests
Adds ACVP test coverage for the hmacDRBG algorithm based on the NIST spec: https://pages.nist.gov/ACVP/draft-vassilev-acvp-drbg.html#section-7.2 The HMAC DRBG algorithm in our fips module is a minimal implementation tailored for use for generating ECDSA nonces and so lives in crypto/internal/fips140/ecdsa. In order to be testable by crypto/internal/fips140test this changeset exports a ecdsa.TestingOnlyNewDrbg() constructor to support the ACVP use-case. All FIPS-compatible SHA2 and SHA3 digests are tested. The ACVP capability registration is customized to match the limited capabilities of our ecdsa-focused impl. Most notably: * reseedImplemented is false - we expect this impl to be invoked only once or twice per instantiation and do not support explicit reseeding. * predResistanceEnabled is false - this requires reseeding. * Per mode: * derFuncEnabled is always false - this is only used by ctrDRBG. * additionalInputLen is 0 for all modes - this is only used with preResistanceEnabled. The other capability values are chosen based on Table 4: https://pages.nist.gov/ACVP/draft-vassilev-acvp-drbg.html#section-7.4 Updates #69642 Change-Id: Ia58979d691f912e2ed739a05efb719f580fbbf89 Reviewed-on: https://go-review.googlesource.com/c/go/+/639775 Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Filippo Valsorda <filippo@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Filippo Valsorda <filippo@golang.org>
Diffstat (limited to 'src/encoding/json/decode_test.go')
0 files changed, 0 insertions, 0 deletions