]> Cypherpunks repositories - gostls13.git/commitdiff
crypto: fix dead links and correct SHA-512 algorithm comment
authorNeal Patel <nealpatel@google.com>
Wed, 8 Oct 2025 18:13:56 +0000 (14:13 -0400)
committerNeal Patel <nealpatel@google.com>
Tue, 25 Nov 2025 19:18:36 +0000 (11:18 -0800)
Change-Id: I71d63b0b78a9fc4895574f6df465e22c9585e77c
Reviewed-on: https://go-review.googlesource.com/c/go/+/710196
Reviewed-by: 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>

src/crypto/internal/fips140/sha256/_asm/sha256block_amd64_avx2.go
src/crypto/internal/fips140/sha512/_asm/sha512block_amd64_asm.go
src/crypto/sha1/_asm/sha1block_amd64_asm.go

index 0e6f1c74cf5ff7d64ddbbbed868500ecafe125dd..c82baf9c8e5661ee7238bc201f10c0c1603c86fd 100644 (file)
@@ -15,7 +15,7 @@ import (
 // To find it, surf to http://www.intel.com/p/en_US/embedded
 // and search for that title.
 // AVX2 version by Intel, same algorithm as code in Linux kernel:
-// https://github.com/torvalds/linux/blob/master/arch/x86/crypto/sha256-avx2-asm.S
+// https://github.com/torvalds/linux/blob/master/lib/crypto/x86/sha256-avx2-asm.S
 // by
 //     James Guilford <james.guilford@intel.com>
 //     Kirk Yap <kirk.s.yap@intel.com>
index 7e7572cb1eea4e799251cc242f032383b66c0160..bc6b38decaa2c168b41aa622087749c10dc7c942 100644 (file)
@@ -21,7 +21,7 @@ import (
 //  https://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf
 //
 // Wt = Mt; for 0 <= t <= 15
-// Wt = SIGMA1(Wt-2) + SIGMA0(Wt-15) + Wt-16; for 16 <= t <= 79
+// Wt = SIGMA1(Wt-2) + Wt-7 + SIGMA0(Wt-15) + Wt-16; for 16 <= t <= 79
 //
 // a = H0
 // b = H1
@@ -154,7 +154,7 @@ func main() {
 // Architecture Processors" White-paper
 // https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/fast-sha512-implementations-ia-processors-paper.pdf
 // AVX2 version by Intel, same algorithm in Linux kernel:
-// https://github.com/torvalds/linux/blob/master/arch/x86/crypto/sha512-avx2-asm.S
+// https://github.com/torvalds/linux/blob/master/lib/crypto/x86/sha512-avx2-asm.S
 
 // James Guilford <james.guilford@intel.com>
 // Kirk Yap <kirk.s.yap@intel.com>
index dbd171c08bd772a45f5fe6abf26988a798be237a..12eb4dee4a706fe05d0dbaed2079c51f5e1ca54a 100644 (file)
@@ -13,7 +13,7 @@ import (
 //go:generate go run . -out ../sha1block_amd64.s -pkg sha1
 
 // AVX2 version by Intel, same algorithm as code in Linux kernel:
-// https://github.com/torvalds/linux/blob/master/arch/x86/crypto/sha1_avx2_x86_64_asm.S
+// https://github.com/torvalds/linux/blob/master/lib/crypto/x86/sha1-avx2-asm.S
 // Authors:
 // Ilya Albrekht <ilya.albrekht@intel.com>
 // Maxim Locktyukhin <maxim.locktyukhin@intel.com>