]> Cypherpunks repositories - gostls13.git/commit
crypto: drop pre-AVX2 SHA assembly implementations
authorRoland Shoemaker <roland@golang.org>
Fri, 14 Mar 2025 00:04:30 +0000 (17:04 -0700)
committerGopher Robot <gobot@golang.org>
Wed, 21 May 2025 19:10:59 +0000 (12:10 -0700)
commit272262750fe70b4c0694fbc0459caf4810b0336b
tree2d2752b9801b60048cf20db337dcb440cbf4135e
parent919d9858bc77592e161eea9180e0d4a95759124e
crypto: drop pre-AVX2 SHA assembly implementations

Drop the entire pre-AVX2 assembly implementation of SHA-1, SHA-256, and
SHA-512. This also technically impacts the SHA-1 AVX2 implementation,
since it previously called the pre-AVX2 implementation for the last
block if the number of blocks wasn't a multiple of 2.

Instead of keeping the entire implementation just for that case, we
just call the generic implementation for the last block. This will be a
little slower, but still seems like a win.

Updates #69587

Change-Id: Id5234c42910d8c6ec6b8df700a721c0953dff02b
Reviewed-on: https://go-review.googlesource.com/c/go/+/657716
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: Roland Shoemaker <roland@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
src/crypto/internal/fips140/sha256/_asm/sha256block_amd64_asm.go
src/crypto/internal/fips140/sha256/sha256block_amd64.go
src/crypto/internal/fips140/sha256/sha256block_amd64.s
src/crypto/internal/fips140/sha512/_asm/sha512block_amd64_asm.go
src/crypto/internal/fips140/sha512/sha512block_amd64.go
src/crypto/internal/fips140/sha512/sha512block_amd64.s
src/crypto/sha1/_asm/sha1block_amd64_asm.go
src/crypto/sha1/sha1block_amd64.go
src/crypto/sha1/sha1block_amd64.s