Skip to content

Add support for xwing kem#81

Merged
rozbb merged 27 commits intorozbb:mainfrom
quexten:feat/xwing
Feb 3, 2026
Merged

Add support for xwing kem#81
rozbb merged 27 commits intorozbb:mainfrom
quexten:feat/xwing

Conversation

@quexten
Copy link
Copy Markdown
Contributor

@quexten quexten commented Oct 24, 2025

Adds feature flagged support for x-wing as per https://datatracker.ietf.org/doc/draft-connolly-cfrg-xwing-kem/.

Note: This needs testvectors and has not been tested against other implementations yet.

@quexten quexten changed the title Add support for xwing kem [WIP] Add support for xwing kem Oct 24, 2025
@quexten
Copy link
Copy Markdown
Contributor Author

quexten commented Oct 24, 2025

I wanted to use the other rust HPKE implementation, but it looks like it does not have the correct KEM ID / differs from the IANA assignment: cryspen/libcrux#1215 (comment)

@quexten
Copy link
Copy Markdown
Contributor Author

quexten commented Oct 24, 2025

@rozbb I know the existing tests are against the reference go implementation (https://github.com/cisco/go-hpke) which does not implement the x-wing extension to hpke.

How would you prefer the test-vectors to be integrated here? An entirely separate file and implementation, such as libcrux (assuming the bug I link is resolved)?

@rozbb
Copy link
Copy Markdown
Owner

rozbb commented Jan 10, 2026

Thank you for this! I rebased and made some updates. Namely I needed to:

  1. Fix DeriveKeyPair, because the one in the Conelly draft spec is NOT the one being standardized. This was helpful filippo.io/hpke-pq
  2. Implement SHAKE256 as a KDF, which necessitated a refactor, since so many hashing functions relied on the KDF being an extract-and-expand-type KDF

@rozbb
Copy link
Copy Markdown
Owner

rozbb commented Jan 10, 2026

I still need to clean up a bit, but this is quite close to being ready. Let me know what you think!

Comment thread Cargo.toml Outdated
@rozbb rozbb marked this pull request as ready for review January 24, 2026 05:18
@rozbb rozbb changed the title [WIP] Add support for xwing kem Add support for xwing kem Jan 24, 2026
@rozbb rozbb merged commit 7620fa7 into rozbb:main Feb 3, 2026
14 checks passed
@quexten
Copy link
Copy Markdown
Contributor Author

quexten commented Feb 4, 2026

Apologies, I meant to get back to this and review it, but thank you so much @rozbb for continuing the work on this~!

@rozbb
Copy link
Copy Markdown
Owner

rozbb commented Feb 4, 2026

Absolutely no worries. Thank you for providing such a nice first draft

This was referenced Feb 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants