Skip to content

[DRAFT] PQC xwing (claude opus 4.6 generated) - #3211

Closed
dmihalcik-virtru wants to merge 4 commits into
mainfrom
post-quantum-hybrid-claudeopus46-2026-03-dm
Closed

[DRAFT] PQC xwing (claude opus 4.6 generated)#3211
dmihalcik-virtru wants to merge 4 commits into
mainfrom
post-quantum-hybrid-claudeopus46-2026-03-dm

Conversation

@dmihalcik-virtru

Copy link
Copy Markdown
Member
  • feat(kas): add ml-kem key wrapping support
  • feat(kas): add ml-kem-1024 support
  • feat(kas): add X-Wing hybrid PQ/T key wrapping support

@github-actions github-actions Bot added comp:db DB component comp:policy Policy Configuration ( attributes, subject mappings, resource mappings, kas registry) comp:sdk A software development kit, including library, for client applications and inter-service communicati comp:kas Key Access Server docs Documentation comp:lib:ocrypto labels Mar 26, 2026
@coderabbitai

coderabbitai Bot commented Mar 26, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 726b5fac-6f14-45a3-997e-c0fc6d6d91b3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch post-quantum-hybrid-claudeopus46-2026-03-dm

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly advances the cryptographic capabilities by integrating Post-Quantum Cryptography (PQC) algorithms. It introduces support for ML-KEM (Kyber) and the X-Wing hybrid key encapsulation mechanism, providing enhanced security against potential quantum computing threats. The changes involve fundamental updates to key management, encryption, and decryption processes, ensuring that the system can securely handle and protect data with these new, quantum-resistant primitives. This foundational work paves the way for a more secure future-proof cryptographic infrastructure.

Highlights

  • Post-Quantum Cryptography (PQC) Support: Introduced support for ML-KEM (Kyber) key wrapping, including ML-KEM-768 and ML-KEM-1024 algorithms, to enhance cryptographic resilience against future quantum attacks.
  • X-Wing Hybrid Key Wrapping: Added X-Wing hybrid Post-Quantum/Traditional (PQ/T) key wrapping support, combining ML-KEM-768 with X25519 for a robust, forward-looking key encapsulation mechanism.
  • Unified Key Management Interfaces: Refactored key decryption and encryption interfaces (PrivateKeyDecryptor, PublicKeyEncryptor) to accommodate the new ML-KEM and X-Wing key types, allowing for a more flexible and extensible cryptographic backend.
  • API and Documentation Updates: Updated internal APIs, SDK components, and gRPC documentation to recognize and utilize the newly integrated ML-KEM and X-Wing algorithms for key generation, wrapping, and unwrapping.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Ignored Files
  • Ignored by pattern: docs/openapi/**/* (12)
    • docs/openapi/authorization/authorization.openapi.yaml
    • docs/openapi/authorization/v2/authorization.openapi.yaml
    • docs/openapi/policy/actions/actions.openapi.yaml
    • docs/openapi/policy/attributes/attributes.openapi.yaml
    • docs/openapi/policy/kasregistry/key_access_server_registry.openapi.yaml
    • docs/openapi/policy/namespaces/namespaces.openapi.yaml
    • docs/openapi/policy/objects.openapi.yaml
    • docs/openapi/policy/obligations/obligations.openapi.yaml
    • docs/openapi/policy/registeredresources/registered_resources.openapi.yaml
    • docs/openapi/policy/resourcemapping/resource_mapping.openapi.yaml
    • docs/openapi/policy/subjectmapping/subject_mapping.openapi.yaml
    • docs/openapi/policy/unsafe/unsafe.openapi.yaml
  • Ignored by pattern: protocol/**/* (2)
    • protocol/go/policy/kasregistry/key_access_server_registry.pb.go
    • protocol/go/policy/objects.pb.go
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.


Quantum threats now loom, New keys, X-Wing, ML-KEM, Future's code secured.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

dmihalcik-virtru and others added 4 commits April 8, 2026 17:54
Signed-off-by: David Mihalcik <dmihalcik@virtru.com>
Signed-off-by: David Mihalcik <dmihalcik@virtru.com>
Add X-Wing (X25519 + ML-KEM-768) hybrid KEM as defined in
draft-connolly-cfrg-xwing-kem-10, providing defense-in-depth where
security holds if either the traditional or post-quantum component
remains secure.

New KeyType "hpqt:xwing" and SchemeType "hybrid" allow clients to wrap
DEKs using X-Wing encapsulation. Public keys, private keys, and
ciphertexts use ASN.1 encoding with OID 1.3.6.1.4.1.62253.25722,
fitting into existing KAO fields without schema changes.

Implemented using only Go stdlib (crypto/mlkem, crypto/ecdh, crypto/sha3).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Dave Mihalcik <dmihalcik@virtru.com>
@dmihalcik-virtru
dmihalcik-virtru force-pushed the post-quantum-hybrid-claudeopus46-2026-03-dm branch from 3f18b73 to c07ac79 Compare April 9, 2026 12:30
@github-actions

github-actions Bot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

⚠️ Govulncheck found vulnerabilities ⚠️

The following modules have known vulnerabilities:

  • examples
  • sdk
  • service
  • lib/fixtures
  • tests-bdd

See the workflow run for details.

@github-actions

github-actions Bot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 158.817237ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 80.488182ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 399.310787ms
Throughput 250.43 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 40.643662378s
Average Latency 404.561607ms
Throughput 123.02 requests/second

@dmihalcik-virtru

Copy link
Copy Markdown
Member Author

Merged in #3276

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:db DB component comp:kas Key Access Server comp:lib:ocrypto comp:policy Policy Configuration ( attributes, subject mappings, resource mappings, kas registry) comp:sdk A software development kit, including library, for client applications and inter-service communicati docs Documentation pqc size/xl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant