[WIP] feat(auth): expand ECP custom TLS signer signature buffer for PQC#17656
Draft
ohmayr wants to merge 3 commits into
Draft
[WIP] feat(auth): expand ECP custom TLS signer signature buffer for PQC#17656ohmayr wants to merge 3 commits into
ohmayr wants to merge 3 commits into
Conversation
Contributor
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
Contributor
Author
|
/gemini review |
Contributor
There was a problem hiding this comment.
Code Review
This pull request increases the signature buffer size from 2000 to 16384 bytes in the custom TLS signer to accommodate Post-Quantum Cryptography (PQC) signatures, and adds a corresponding unit test. The reviewer recommends dynamically sizing the allocated buffer array in the new test to match the mocked signature length of 3309 bytes, ensuring consistency and robustness.
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 expands the Enterprise Certificate Proxy (ECP) custom TLS signer signature buffer (
sig_holder_len) ingoogle.auth.transport._custom_tls_signerfrom 2,000 bytes to 65,536 bytes (64 KiB) and adds a defensive bounds check to gracefully handle invalid signature lengths. Legacy 2,000-byte allocations were designed for classical RSA/ECDSA signatures (256–512 B) and caused C-callback IndexError exceptions during mTLS handshakes when offloading Post-Quantum Cryptography (PQC) client certificates under NIST FIPS 204 (ML-DSA-65 at 3,309 B; ML-DSA-87 at 4,627 B) and FIPS 205 (SLH-DSA-128f at 17,088 B; SLH-DSA-256f at 49,856 B). The new 64 KiB buffer size aligns with the maximum signature payload permitted by the TLS 1.3 specification (RFC 8446 Section 4.4.3), ensuring full future-proof compatibility across all FIPS-standardized PQC parameter sets without breaking or modifying non-mTLS authentication flows.