crypto/tls: add support for RA-TLS 0xFFBB custom extension for SGX attestation#78247
Draft
bfoing wants to merge 2 commits intogolang:release-branch.go1.25from
Draft
crypto/tls: add support for RA-TLS 0xFFBB custom extension for SGX attestation#78247bfoing wants to merge 2 commits intogolang:release-branch.go1.25from
bfoing wants to merge 2 commits intogolang:release-branch.go1.25from
Conversation
Add support for carrying an RA-TLS challenge nonce in ClientHello and CertificateRequest TLS extensions using extension type 0xFFBB. This enables remote attestation flows where: - The TLS client sends a challenge nonce in the ClientHello. - The TLS server (e.g. an SGX/TDX enclave) binds the nonce into the attestation report_data via SHA-512(pubkey_sha256 || nonce). - The verifier confirms the quote was freshly generated for that specific TLS session. Changes: - Config.RATLSChallenge field and ClientHelloInfo.RATLSChallenge - ClientHello marshal/unmarshal for extensionRATLS - CertificateRequest marshal/unmarshal for extensionRATLS - Propagation through handshake_client, handshake_server paths - Unit tests for marshal round-trip, boundary lengths, and omission - GitHub Actions workflow for CI build and test
|
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. |
- actions/checkout v4 → v6 - actions/setup-go v5 → v6 - actions/upload-artifact v4 → v7
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.
Summary
This PR adds support for a custom TLS extension (type 0xFFBB) to the Go standard library's
crypto/tlspackage. The extension enables Remote Attestation TLS (RA-TLS) for Intel SGX enclaves, allowing the TLS handshake to carry attestation challenges and quotes.Motivation
In confidential computing environments, the TLS handshake is a natural place to perform remote attestation. The RA-TLS protocol uses a custom TLS extension to:
This allows clients to verify they are communicating with a genuine SGX enclave before exchanging any application data, without requiring a separate attestation protocol.
Changes
RATLSChallengefield totls.Configfor clients to specify a challengeGetRATLSResponsecallback totls.Configfor servers to generate attestation quotesPeerRATLSResponsefield totls.ConnectionStatefor clients to retrieve the server's quotePeerRATLSChallengefield totls.ConnectionStatefor servers to retrieve the client's challengeRelated
Compatibility
RATLSChallengeorGetRATLSResponseis set