]> Cypherpunks repositories - gostls13.git/commit
crypto/internal/fips140/aes: mark AES-ECB as not approved
authorFilippo Valsorda <filippo@golang.org>
Mon, 16 Dec 2024 18:24:20 +0000 (19:24 +0100)
committerGopher Robot <gobot@golang.org>
Tue, 17 Dec 2024 16:02:39 +0000 (08:02 -0800)
commitdd7a7ba38f36dd6abc1e14b8d0e8bf05a5383161
tree2b16749fc19084ca7a5b84b23d0cf1662d27a959
parent427a2401af088716bf5b394156e45fb4de54dc5a
crypto/internal/fips140/aes: mark AES-ECB as not approved

NIST SP 800-131Ar3 ipd, scheduled for publication in 2025Q1, marks
AES-ECB as disallowed for encryption, and legacy use for decryption.

There are apparently no details on how the transition is going to work,
so to avoid surprises we just mark direct use of the Block as
non-approved.

We need to use Encrypt from higher level modes without tripping the
service indicator. Within the aes package, we just use the internal
function. For the gcm package we could do something more clever, but
this deep into the freeze, just make an exported function that we commit
to use nowhere else.

I could not figure out a decent way to block ECB on GODEBUG=fips140=only.

For #69536

Change-Id: I972a4b5da8efd0a0ab68d7dd509bec73aa2d6b68
Reviewed-on: https://go-review.googlesource.com/c/go/+/636775
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/crypto/internal/fips140/aes/aes.go
src/crypto/internal/fips140/aes/cbc.go
src/crypto/internal/fips140/aes/ctr.go
src/crypto/internal/fips140/aes/gcm/cmac.go
src/crypto/internal/fips140/aes/gcm/gcm_asm.go
src/crypto/internal/fips140/aes/gcm/gcm_generic.go