crypto/tls: support RA-TLS challenge extension in ClientHello#77714
Draft
bfoing wants to merge 1 commit intogolang:release-branch.go1.25from
Draft
crypto/tls: support RA-TLS challenge extension in ClientHello#77714bfoing wants to merge 1 commit intogolang:release-branch.go1.25from
bfoing wants to merge 1 commit intogolang:release-branch.go1.25from
Conversation
Parse the RA-TLS challenge from the ClientHello extensions (extension code temporarily set to 0xffbb) and expose it via ClientHelloInfo.RATLSChallenge, allowing server-side callbacks (GetConfigForClient, GetCertificate) to access the attestation challenge during the TLS handshake. The extension is optional and server-side only (unmarshal only, no marshal). The challenge payload is validated to be between 8 and 64 bytes; malformed or out-of-range values cause the handshake to fail. Concept: https://www.rfc-editor.org/rfc/rfc9334.html
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
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.
This PR should only be considered once the real IANA value is assigned for the RA-TLS extension. See the TODO comment on
extensionRATLSinsrc/crypto/tls/common.goI open it so that early adopters of RA-TLS can look at / use the fork in the mean time.
Summary
This adds server-side support for the Remote Attestation TLS (RA-TLS) challenge extension, as defined in the RFC-9334.
When a TLS client includes the RA-TLS extension in its ClientHello, the server can read the challenge bytes and use them to generate a platform-specific attestation evidence (e.g. an Intel TDX) that is bound to the TLS handshake.
Changes
src/crypto/tls/common.goextensionRATLSconstant (0xffbb) andRATLSChallenge []bytefield toClientHelloInfosrc/crypto/tls/handshake_messages.goraTLSChallengefield toclientHelloMsgand unmarshal logic with 8–64 byte length validationsrc/crypto/tls/handshake_server.goraTLSChallengefromclientHelloMsgintoClientHelloInfosrc/crypto/tls/handshake_messages_test.goTestRATLSChallengeExtension(8 subtests)Design decisions
need to send this extension; it is consumed by the server to produce
attestation evidence via
GetConfigForClientorGetCertificatecallbacks.out-of-range payloads are rejected during unmarshal (handshake fails).
0xffbb: Temporary private-use value. Will bereplaced with the IANA-assigned code once the draft is finalized.
ClientHelloInfo.RATLSChallengeis
niland the handshake proceeds normally.Test coverage
TestRATLSChallengeExtensioncovers:ClientHelloInfo.RATLSChallengeReferences