@@ -56,7 +56,7 @@ Use a 'go' that was recently built by the current branch to ensure stable result
5656 .../github.com/golang-fips/openssl/v2/hash.go | 502 ++++
5757 .../golang-fips/openssl/v2/hashclone.go | 14 +
5858 .../golang-fips/openssl/v2/hashclone_go125.go | 9 +
59- .../github.com/golang-fips/openssl/v2/hkdf.go | 443 ++++
59+ .../github.com/golang-fips/openssl/v2/hkdf.go | 455 ++++
6060 .../github.com/golang-fips/openssl/v2/hmac.go | 282 ++
6161 .../github.com/golang-fips/openssl/v2/init.go | 156 ++
6262 .../golang-fips/openssl/v2/init_cgo_unix.go | 31 +
@@ -172,7 +172,7 @@ Use a 'go' that was recently built by the current branch to ensure stable result
172172 .../go-crypto-darwin/xcrypto/hash.go | 320 +++
173173 .../go-crypto-darwin/xcrypto/hashclone.go | 17 +
174174 .../xcrypto/hashclone_go125.go | 12 +
175- .../go-crypto-darwin/xcrypto/hkdf.go | 98 +
175+ .../go-crypto-darwin/xcrypto/hkdf.go | 103 +
176176 .../go-crypto-darwin/xcrypto/hmac.go | 119 +
177177 .../go-crypto-darwin/xcrypto/mlkem.go | 261 ++
178178 .../go-crypto-darwin/xcrypto/pbkdf2.go | 68 +
@@ -192,7 +192,7 @@ Use a 'go' that was recently built by the current branch to ensure stable result
192192 .../microsoft/go-crypto-winnative/cng/hash.go | 327 +++
193193 .../go-crypto-winnative/cng/hashclone.go | 18 +
194194 .../cng/hashclone_go125.go | 13 +
195- .../microsoft/go-crypto-winnative/cng/hkdf.go | 128 +
195+ .../microsoft/go-crypto-winnative/cng/hkdf.go | 133 +
196196 .../microsoft/go-crypto-winnative/cng/hmac.go | 70 +
197197 .../microsoft/go-crypto-winnative/cng/keys.go | 220 ++
198198 .../go-crypto-winnative/cng/mlkem.go | 405 +++
@@ -208,7 +208,7 @@ Use a 'go' that was recently built by the current branch to ensure stable result
208208 .../internal/subtle/aliasing.go | 32 +
209209 .../internal/sysdll/sys_windows.go | 55 +
210210 src/vendor/modules.txt | 20 +
211- 200 files changed, 28365 insertions(+), 7 deletions(-)
211+ 200 files changed, 28387 insertions(+), 7 deletions(-)
212212 create mode 100644 src/cmd/internal/telemetry/counter/deps_ignore.go
213213 create mode 100644 src/cmd/vendor/github.com/microsoft/go-infra/telemetry/LICENSE
214214 create mode 100644 src/cmd/vendor/github.com/microsoft/go-infra/telemetry/README.md
@@ -2062,7 +2062,7 @@ index 00000000000000..ae4055d2d71303
20622062+// that are used by the backend package. This allows to track
20632063+// their versions in a single patch file.
20642064diff --git a/src/go.mod b/src/go.mod
2065- index e6cb3d5b43dbd3..74e965e12bc51c 100644
2065+ index e6cb3d5b43dbd3..2e0ae71f40ce7d 100644
20662066--- a/src/go.mod
20672067+++ b/src/go.mod
20682068@@ -11,3 +11,9 @@ require (
@@ -2071,29 +2071,29 @@ index e6cb3d5b43dbd3..74e965e12bc51c 100644
20712071 )
20722072+
20732073+require (
2074- + github.com/golang-fips/openssl/v2 v2.0.4-0.20251121170104-ee24449e9207
2075- + github.com/microsoft/go-crypto-darwin v0.0.3-0.20251125163641-ab43fa145f25
2076- + github.com/microsoft/go-crypto-winnative v0.0.0-20251123214300-4a3429a42859
2074+ + github.com/golang-fips/openssl/v2 v2.0.4-0.20251202083346-9b5f537f54f7
2075+ + github.com/microsoft/go-crypto-darwin v0.0.3-0.20251202082849-356ad09993bc
2076+ + github.com/microsoft/go-crypto-winnative v0.0.0-20251202082756-9cab7d2d4a79
20772077+)
20782078diff --git a/src/go.sum b/src/go.sum
2079- index fe184a864718af..66edcf6139c842 100644
2079+ index fe184a864718af..2009043843940c 100644
20802080--- a/src/go.sum
20812081+++ b/src/go.sum
20822082@@ -1,3 +1,9 @@
2083- +github.com/golang-fips/openssl/v2 v2.0.4-0.20251121170104-ee24449e9207 h1:TsTK3Sg1Yf16FxSWpS1CLG09+nAz3EMCyzd5yENO/Ac =
2084- +github.com/golang-fips/openssl/v2 v2.0.4-0.20251121170104-ee24449e9207 /go.mod h1:EtVnMfLGkB4pihGOH+tXEV0WlXxewWdT1n3GLJEHvpw=
2085- +github.com/microsoft/go-crypto-darwin v0.0.3-0.20251125163641-ab43fa145f25 h1:R/RbMmI+Vs521m63ALMrClhcgU8NxuZSBdsV87LtdO8 =
2086- +github.com/microsoft/go-crypto-darwin v0.0.3-0.20251125163641-ab43fa145f25 /go.mod h1:MTii5PQwRlfUjYpGoF8CPLGwXSHTbLHGRN9FVNML5N0=
2087- +github.com/microsoft/go-crypto-winnative v0.0.0-20251123214300-4a3429a42859 h1:CYCuHvY592PLaJFC2eaxyf9dS0dU2CTFJJyFSXLdpOI =
2088- +github.com/microsoft/go-crypto-winnative v0.0.0-20251123214300-4a3429a42859 /go.mod h1:gD686525Li/blRSYwSzFJ6/LJQVFJp7Y0MKp+dmqFbc=
2083+ +github.com/golang-fips/openssl/v2 v2.0.4-0.20251202083346-9b5f537f54f7 h1:uRbVHzfzuY0m6zgFv0032WsSmYbM9dcZFtoXV5f1NRk =
2084+ +github.com/golang-fips/openssl/v2 v2.0.4-0.20251202083346-9b5f537f54f7 /go.mod h1:EtVnMfLGkB4pihGOH+tXEV0WlXxewWdT1n3GLJEHvpw=
2085+ +github.com/microsoft/go-crypto-darwin v0.0.3-0.20251202082849-356ad09993bc h1:bz/6zng2sakr1ETJsKnGoHooH6sBKbQNxk9aeH5tRt0 =
2086+ +github.com/microsoft/go-crypto-darwin v0.0.3-0.20251202082849-356ad09993bc /go.mod h1:MTii5PQwRlfUjYpGoF8CPLGwXSHTbLHGRN9FVNML5N0=
2087+ +github.com/microsoft/go-crypto-winnative v0.0.0-20251202082756-9cab7d2d4a79 h1:u3ZftMj7JpCAl4Ku8LUngqfn7pNuQG9mAsNMlSjBvDI =
2088+ +github.com/microsoft/go-crypto-winnative v0.0.0-20251202082756-9cab7d2d4a79 /go.mod h1:gD686525Li/blRSYwSzFJ6/LJQVFJp7Y0MKp+dmqFbc=
20892089 golang.org/x/crypto v0.43.0 h1:dduJYIi3A3KOfdGOHX8AVZ/jGiyPa3IbBozJ5kNuE04=
20902090 golang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0=
20912091 golang.org/x/net v0.46.0 h1:giFlY12I07fugqwPuWJi68oOnpfqFnJIJzaIIm2JVV4=
20922092diff --git a/src/go/build/deps_test.go b/src/go/build/deps_test.go
2093- index 5f95535ed949d3..30ed09b5f755ac 100644
2093+ index 8d5e11ec4e472b..00f53f3a181855 100644
20942094--- a/src/go/build/deps_test.go
20952095+++ b/src/go/build/deps_test.go
2096- @@ -532 ,6 +532 ,27 @@ var depsRules = `
2096+ @@ -533 ,6 +533 ,27 @@ var depsRules = `
20972097 < crypto/internal/fips140/rsa
20982098 < FIPS < crypto/fips140;
20992099
@@ -2121,7 +2121,7 @@ index 5f95535ed949d3..30ed09b5f755ac 100644
21212121 crypto !< FIPS;
21222122
21232123 # CRYPTO is core crypto algorithms - no cgo, fmt, net.
2124- @@ -543 ,13 +564 ,12 @@ var depsRules = `
2124+ @@ -544 ,13 +565 ,12 @@ var depsRules = `
21252125 FIPS, internal/godebug, embed,
21262126 crypto/internal/boring/sig,
21272127 crypto/internal/boring/syso,
@@ -2139,7 +2139,7 @@ index 5f95535ed949d3..30ed09b5f755ac 100644
21392139 < crypto/internal/boring
21402140 < crypto/boring
21412141 < crypto/aes,
2142- @@ -570 ,6 +590 ,10 @@ var depsRules = `
2142+ @@ -571 ,6 +591 ,10 @@ var depsRules = `
21432143
21442144 # CRYPTO-MATH is crypto that exposes math/big APIs - no cgo, net; fmt now ok.
21452145
@@ -2150,7 +2150,7 @@ index 5f95535ed949d3..30ed09b5f755ac 100644
21502150 CRYPTO, FMT, math/big, internal/saferio
21512151 < crypto/internal/boring/bbig
21522152 < crypto/internal/fips140cache
2153- @@ -907 ,7 +931 ,7 @@ var buildIgnore = []byte("\n//go:build ignore")
2153+ @@ -908 ,7 +932 ,7 @@ var buildIgnore = []byte("\n//go:build ignore")
21542154
21552155 func findImports(pkg string) ([]string, error) {
21562156 vpkg := pkg
@@ -2159,7 +2159,7 @@ index 5f95535ed949d3..30ed09b5f755ac 100644
21592159 vpkg = "vendor/" + pkg
21602160 }
21612161 dir := filepath.Join(Default.GOROOT, "src", vpkg)
2162- @@ -917 ,7 +941 ,7 @@ func findImports(pkg string) ([]string, error) {
2162+ @@ -918 ,7 +942 ,7 @@ func findImports(pkg string) ([]string, error) {
21632163 }
21642164 var imports []string
21652165 var haveImport = map[string]bool{}
@@ -2235,13 +2235,13 @@ index 00000000000000..97e85154015761
22352235\ No newline at end of file
22362236diff --git a/src/vendor/github.com/golang-fips/openssl/v2/README.md b/src/vendor/github.com/golang-fips/openssl/v2/README.md
22372237new file mode 100644
2238- index 00000000000000..f63cf39e70c064
2238+ index 00000000000000..0a6d0d0ef2c0c6
22392239--- /dev/null
22402240+++ b/src/vendor/github.com/golang-fips/openssl/v2/README.md
22412241@@ -0,0 +1,66 @@
22422242+# Go OpenSSL bindings for FIPS compliance
22432243+
2244- +[](https://pkg.go.dev/github.com/golang-fips/openssl)
2244+ +[](https://pkg.go.dev/github.com/golang-fips/openssl/v2 )
22452245+
22462246+The `openssl` package implements Go crypto primitives using OpenSSL shared libraries and cgo. When configured correctly, OpenSSL can be executed in FIPS mode, making the `openssl` package FIPS compliant.
22472247+
@@ -5798,10 +5798,10 @@ index 00000000000000..f1f2364c7246d4
57985798+type HashCloner = hash.Cloner
57995799diff --git a/src/vendor/github.com/golang-fips/openssl/v2/hkdf.go b/src/vendor/github.com/golang-fips/openssl/v2/hkdf.go
58005800new file mode 100644
5801- index 00000000000000..3aeff4f917fdde
5801+ index 00000000000000..5574cef3032db4
58025802--- /dev/null
58035803+++ b/src/vendor/github.com/golang-fips/openssl/v2/hkdf.go
5804- @@ -0,0 +1,443 @@
5804+ @@ -0,0 +1,455 @@
58055805+//go:build !cmd_go_bootstrap && (cgo || goexperiment.ms_nocgo_opensslcrypto)
58065806+
58075807+package openssl
@@ -6012,6 +6012,12 @@ index 00000000000000..3aeff4f917fdde
60126012+ return nil, err
60136013+ }
60146014+ defer ossl.EVP_PKEY_CTX_free(ctx)
6015+ + if len(out) == 0 {
6016+ + // Nothing to do, so exit early.
6017+ + // We also can't call EVP_PKEY_derive because some engines error on zero-length output.
6018+ + // We can only exit after calling newHKDFCtx1 because we still need it to validate the parameters.
6019+ + return out, nil
6020+ + }
60156021+ keylen := keyLength
60166022+ if _, err := ossl.EVP_PKEY_derive(ctx, base(out), &keylen); err != nil {
60176023+ return nil, err
@@ -6022,6 +6028,12 @@ index 00000000000000..3aeff4f917fdde
60226028+ return nil, err
60236029+ }
60246030+ defer ossl.EVP_KDF_CTX_free(ctx)
6031+ + if len(out) == 0 {
6032+ + // Nothing to do, so exit early.
6033+ + // We also can't call EVP_PKEY_derive because some engines error on zero-length output.
6034+ + // We can only exit after calling newHKDFCtx3 because we still need it to validate the parameters.
6035+ + return out, nil
6036+ + }
60256037+ if _, err := ossl.EVP_KDF_derive(ctx, base(out), keyLength, nil); err != nil {
60266038+ return nil, err
60276039+ }
@@ -26175,10 +26187,10 @@ index 00000000000000..a4b0c717ef5e38
2617526187+type HashCloner = hash.Cloner
2617626188diff --git a/src/vendor/github.com/microsoft/go-crypto-darwin/xcrypto/hkdf.go b/src/vendor/github.com/microsoft/go-crypto-darwin/xcrypto/hkdf.go
2617726189new file mode 100644
26178- index 00000000000000..e8fcbec33aaa66
26190+ index 00000000000000..f6183de583d9ac
2617926191--- /dev/null
2618026192+++ b/src/vendor/github.com/microsoft/go-crypto-darwin/xcrypto/hkdf.go
26181- @@ -0,0 +1,98 @@
26193+ @@ -0,0 +1,103 @@
2618226194+// Copyright (c) Microsoft Corporation.
2618326195+// Licensed under the MIT License.
2618426196+
@@ -26254,6 +26266,11 @@ index 00000000000000..e8fcbec33aaa66
2625426266+
2625526267+ // Allocate buffer for derived key
2625626268+ expandedKey := make([]byte, keyLength)
26269+ + if len(expandedKey) == 0 {
26270+ + // Nothing to do, and CryptoKit may error on zero-length output.
26271+ + // We do need to validate the inputs for consistency, though.
26272+ + return expandedKey, nil
26273+ + }
2625726274+
2625826275+ result := cryptokit.ExpandHKDF(swiftHash, pseudorandomKey, info, expandedKey)
2625926276+ if result != 0 {
@@ -29212,10 +29229,10 @@ index 00000000000000..f86a9e9bfd47a9
2921229229+type HashCloner = hash.Cloner
2921329230diff --git a/src/vendor/github.com/microsoft/go-crypto-winnative/cng/hkdf.go b/src/vendor/github.com/microsoft/go-crypto-winnative/cng/hkdf.go
2921429231new file mode 100644
29215- index 00000000000000..2647c6bc06cd57
29232+ index 00000000000000..aa48b084d708da
2921629233--- /dev/null
2921729234+++ b/src/vendor/github.com/microsoft/go-crypto-winnative/cng/hkdf.go
29218- @@ -0,0 +1,128 @@
29235+ @@ -0,0 +1,133 @@
2921929236+// Copyright (c) Microsoft Corporation.
2922029237+// Licensed under the MIT License.
2922129238+
@@ -29244,7 +29261,7 @@ index 00000000000000..2647c6bc06cd57
2924429261+ })
2924529262+}
2924629263+
29247- +func newHKDF(h func() hash.Hash, secret, salt []byte, info []byte ) (bcrypt.KEY_HANDLE, error) {
29264+ +func newHKDF(h func() hash.Hash, secret, salt []byte) (bcrypt.KEY_HANDLE, error) {
2924829265+ ch := h()
2924929266+ hashID := hashToID(ch)
2925029267+ if hashID == "" {
@@ -29281,7 +29298,7 @@ index 00000000000000..2647c6bc06cd57
2928129298+ // Replicate x/crypto/hkdf behavior.
2928229299+ salt = make([]byte, h().Size())
2928329300+ }
29284- + kh, err := newHKDF(h, secret, salt, nil )
29301+ + kh, err := newHKDF(h, secret, salt)
2928529302+ if err != nil {
2928629303+ return nil, err
2928729304+ }
@@ -29311,12 +29328,17 @@ index 00000000000000..2647c6bc06cd57
2931129328+
2931229329+// ExpandHKDF derives a key from the given hash, key, and optional context info.
2931329330+func ExpandHKDF(h func() hash.Hash, pseudorandomKey, info []byte, keyLength int) ([]byte, error) {
29314- + kh, err := newHKDF(h, pseudorandomKey, nil, info )
29331+ + kh, err := newHKDF(h, pseudorandomKey, nil)
2931529332+ if err != nil {
2931629333+ return nil, err
2931729334+ }
2931829335+ defer bcrypt.DestroyKey(kh)
2931929336+ out := make([]byte, keyLength)
29337+ + if len(out) == 0 {
29338+ + // Nothing to do, and CNG doesn't like zero-length output buffers.
29339+ + // Call newHKDF, though, to validate parameters.
29340+ + return out, nil
29341+ + }
2932029342+ var params *bcrypt.BufferDesc
2932129343+ if len(info) > 0 {
2932229344+ params = &bcrypt.BufferDesc{
@@ -31947,24 +31969,24 @@ index 00000000000000..1722410e5af193
3194731969+ return getSystemDirectory() + "\\" + dll
3194831970+}
3194931971diff --git a/src/vendor/modules.txt b/src/vendor/modules.txt
31950- index bf7a797966088f..7f126bacec3e31 100644
31972+ index bf7a797966088f..ab59dd4cf3dc4a 100644
3195131973--- a/src/vendor/modules.txt
3195231974+++ b/src/vendor/modules.txt
3195331975@@ -1,3 +1,23 @@
31954- +# github.com/golang-fips/openssl/v2 v2.0.4-0.20251121170104-ee24449e9207
31976+ +# github.com/golang-fips/openssl/v2 v2.0.4-0.20251202083346-9b5f537f54f7
3195531977+## explicit; go 1.24
3195631978+github.com/golang-fips/openssl/v2
3195731979+github.com/golang-fips/openssl/v2/bbig
3195831980+github.com/golang-fips/openssl/v2/internal/fakecgo
3195931981+github.com/golang-fips/openssl/v2/internal/ossl
31960- +# github.com/microsoft/go-crypto-darwin v0.0.3-0.20251125163641-ab43fa145f25
31982+ +# github.com/microsoft/go-crypto-darwin v0.0.3-0.20251202082849-356ad09993bc
3196131983+## explicit; go 1.24
3196231984+github.com/microsoft/go-crypto-darwin/bbig
3196331985+github.com/microsoft/go-crypto-darwin/internal/commoncrypto
3196431986+github.com/microsoft/go-crypto-darwin/internal/cryptokit
3196531987+github.com/microsoft/go-crypto-darwin/internal/security
3196631988+github.com/microsoft/go-crypto-darwin/xcrypto
31967- +# github.com/microsoft/go-crypto-winnative v0.0.0-20251123214300-4a3429a42859
31989+ +# github.com/microsoft/go-crypto-winnative v0.0.0-20251202082756-9cab7d2d4a79
3196831990+## explicit; go 1.24
3196931991+github.com/microsoft/go-crypto-winnative/cng
3197031992+github.com/microsoft/go-crypto-winnative/cng/bbig
0 commit comments