-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed as not planned
Closed as not planned
@smira Output of
Description
Go version
go version go1.25.0 linux/amd64
Output of go env
in your module/workspace:
AR='ar' CC='gcc' CGO_CFLAGS='-O2 -g' CGO_CPPFLAGS='' CGO_CXXFLAGS='-O2 -g' CGO_ENABLED='1' CGO_FFLAGS='-O2 -g' CGO_LDFLAGS='-O2 -g' CXX='g++' GCCGO='gccgo' GO111MODULE='' GOAMD64='v1' GOARCH='amd64' GOAUTH='netrc' GOBIN='' GOCACHE='/home/smira/.cache/go-build' GOCACHEPROG='' GODEBUG='' GOENV='/home/smira/.config/go/env' GOEXE='' GOEXPERIMENT='' GOFIPS140='off' GOFLAGS='' GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build2541632811=/tmp/go-build -gno-record-gcc-switches' GOHOSTARCH='amd64' GOHOSTOS='linux' GOINSECURE='' GOMOD='/home/smira/Documents/x25519-test/go.mod' GOMODCACHE='/home/smira/go/pkg/mod' GONOPROXY='' GONOSUMDB='' GOOS='linux' GOPATH='/home/smira/go' GOPRIVATE='' GOPROXY='https://proxy.golang.org,direct' GOROOT='/home/smira/sdk/go1.25.0' GOSUMDB='sum.golang.org' GOTELEMETRY='local' GOTELEMETRYDIR='/home/smira/.config/go/telemetry' GOTMPDIR='' GOTOOLCHAIN='auto' GOTOOLDIR='/home/smira/sdk/go1.25.0/pkg/tool/linux_amd64' GOVCS='' GOVERSION='go1.25.0' GOWORK='' PKG_CONFIG='pkg-config'
What did you do?
Run a simple program:
package main import ( "crypto/fips140" "log" "net/http" ) func main() { log.Printf("FIPS mode: %v", fips140.Enabled()) _, err := http.Get("https://golang.org/") if err != nil { log.Fatalf("http error: %s", err) } }
What did you see happen?
No FIPS mode, succeeds:
$ go run main.go
2025年08月27日 15:41:22 FIPS mode: false
FIPS strict, fails:
$ GODEBUG=fips140=only ~/go/bin/go1.24.0 run main.go
2025年08月27日 16:19:21 FIPS mode: true
2025年08月27日 16:19:21 http error: Get "https://golang.org/": crypto/ecdh: use of X25519 is not allowed in FIPS 140-only mode
exit status 1
The same program will run with go1.24 without errors.
If I add tlsmlkem=0
the program succeeds.
So I think the core issue is that X25519MLKEM768
Curve is selected for TLS handshake, but despite being whitelisted for FIPS140-3, it still leads to a failure.
What did you expect to see?
No failures.
Metadata
Metadata
Assignees
Labels
No labels