Repository navigation
config/tls: add X25519MLKEM768 to the curves directive name table, with tests - #912
Open
reservoir-cmyk wants to merge 3 commits into
Open
reservoir-cmyk wants to merge 3 commits into
reservoir-cmyk wants to merge 3 commits into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the direction asked about in #910. I prepared this ahead of any reply on the issue, purely as material for consideration — if you would rather settle the direction on #910 first, that is entirely fine, and no prompt decision is being asked for here.
Change
framework/config/tls/general.go: add"X25519MLKEM768"→tls.X25519MLKEM768tostrCurvesMap. The name follows the existingX25519entry, which uses the Go identifier as-is (tls.X25519MLKEM768.String()returns the same string).framework/config/tls/general_test.go(new — the package had no test files): pins downTLSCurvesDirectiveinterpretation:tls.CurveID,curves X25519MLKEM768 X25519yields[X25519MLKEM768, X25519]in order, i.e. a user who pins curves can keep the post-quantum hybrid in the list,unknown curveerror,curvesdirective without arguments is rejected.docs/reference/tls.md: list the new name in bothcurvessections (server and client).Verification (local, go1.26.10 against go.mod's go 1.26.0)
unknown curve: X25519MLKEM768; the rejection tests already pass, confirming the directive is fail-closed today.go test ./framework/config/...passes (including the 5 new tests), andgo vetandgofmtare clean.go build ./...fails in my environment atcmd/maddy-pam-helper, which needs libpam development headers (security/pam_appl.h) that are not installed here — an environment limitation unrelated to this change. I have not separately build-verified every remaining package; the confirmed scope is the test run above.Scope / not verified
This pins the configuration interpretation only. I have not dynamically verified that a handshake negotiated through a maddy server/client config with
curves X25519MLKEM768set actually selects the hybrid group end-to-end; that run is the next step and I am happy to add it if you would like it covered here. golangci-lint has not been run. Nothing else in the TLS configuration surface is changed.— Tomoki Murota