Skip to content

Scan lists X25519 as not probed under GODEBUG=fips140=on, and the handshake error names the groups the scanner left out (#15) - #45

Merged
thebenignhacker merged 1 commit into
mainfrom
integrate/2026-10-21-r2
Oct 21, 2026
Merged

thebenignhacker merged 1 commit into
mainfrom
integrate/2026-10-21-r2

Conversation

@thebenignhacker

Copy link
Copy Markdown
Member

This pull request lands 1 commit in internal/scanner and CHANGELOG.md.

Included

Verified on this exact tree

  • git ls-files --others -- '*_test.go': no output; git ls-files -- '*_test.go' | wc -l: 106
  • go mod verify: all modules verified
  • go build -v ./...: exit 0
  • go vet ./...: exit 0, no output
  • gofmt -s -l .: no output
  • golangci-lint run --timeout=5m --concurrency 4 ./... (golangci-lint 2.12.2, empty cache directory): 0 issues
  • go test -p 4 -race -count=1 -timeout 9m -json ./... (Go 1.26.3): packages ok 7, failed 0; top-level tests passed 434, failed 0, skipped 2; with subtests passed 977, failed 0, skipped 2
  • Skipped tests in that run, as printed: client_hello_written_test.go:106: runs in the child process that TestAFIPSBuildWithoutMLKEMNamesTheHybridGroupsItCannotOffer starts and fips_x25519_not_probed_test.go:98: runs in the child process that TestAFIPSBuildListsX25519AsNotProbed starts; both of those parent tests passed
  • Changelog tests in that run: TestVersionIsTheNewestChangelogRelease and TestTheChangelogGivesTheHandshakeFailureSizesThisTreeBuilds passed
  • GOTOOLCHAIN=go1.25.7 go test -p 4 -race -count=1 -timeout 9m -json ./internal/scanner/ (Go 1.25.7): packages ok 1, failed 0; top-level tests passed 155, failed 0, skipped 2 (the same two); with subtests passed 304, failed 0, skipped 2

Not included

None

Closes

Fixes #15

How to merge

Rebase and merge, so that each change stays its own commit on main.

…dshake error names the groups the scanner left out (#15)

The scan decided which key exchange groups it could probe by reading a
ClientHello written for the three hybrid groups only. FIPS 140-3 mode
also leaves X25519 out of the ClientHello, so with GODEBUG=fips140=on the
X25519 probe could only fail. Built with Go 1.26.3 and run against a
local server offering X25519MLKEM768 and X25519, the scan listed
X25519MLKEM768 alone, and its coverage note named SecP256r1MLKEM768 and
SecP384r1MLKEM1024 but not X25519. Against a local server offering only
X25519 it exited 1 with a handshake error that gave commands for those
two groups and none for X25519.

groupsNotOffered, which replaces hybridGroupsNotOffered, reads the
ClientHello for all seven groups the scan probes, and both the list of
groups not probed and the handshake error use it. Against the same
servers the note now names SecP256r1MLKEM768, SecP384r1MLKEM1024 and
X25519, the key exchanges found and the grade are unchanged, and the
error gives a third command, for X25519, in 487 bytes. Without GODEBUG,
and with GODEBUG=tlsmlkem=0 alone, the groups listed are unchanged.

With GODEBUG=fips140=on,tlsmlkem=0 the error names four groups. With the
commands introduced by "Check each group with its own command", the
error for a 47-byte IPv6 address and port gave no whole command after six
of the 256 TLS alert values and after an unexpected EOF. The words are
now "Check each group on its own", 10 bytes shorter, and the test finds a
whole command in every case it builds. The 0.5.0 changelog gave 495
bytes for the 127.0.0.1 error under that setting; that error now names
the four groups first and gives two of the four commands, in 488 bytes,
so the changelog gives the 495-byte figure for GODEBUG=tlsmlkem=0, which
leaves out the three hybrid groups and was measured at 495 bytes.

TestAFIPSBuildListsX25519AsNotProbed serves the issue's two servers from
a process outside FIPS mode and scans them from a child process started
with GODEBUG=fips140=on. TestGroupsNotOfferedMatchesAHandshake and
TestAGroupThisBuildCannotNegotiateIsReportedNotProbed now cover every
probed group, and both FIPS child processes run the first. Run against
the code before this change through a build overlay, the child tests
failed over X25519 and the 47-byte test failed with the old words; the
scanner package tests pass here with Go 1.26.3, and with Go 1.25.7 under
-race.

Fixes #15
@thebenignhacker
thebenignhacker merged commit f6d6238 into main Oct 21, 2026
2 checks passed
@thebenignhacker
thebenignhacker deleted the integrate/2026-10-21-r2 branch October 21, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scanner reports X25519 absent under GODEBUG=fips140=on instead of listing it as not probed

1 participant