Skip to content

Add XWingDraft06 KEM support to hpke-rs, and replace evercrypt provider with new libcrux provider #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 57 commits into from
Apr 16, 2025

Conversation

wysiwys
Copy link
Contributor

@wysiwys wysiwys commented Apr 14, 2025

This PR adds support to the hpke-rs and hpke-rs-crypto crates for XWingDraft06 KEM, and includes updates to the HpkeCrypto trait that take this change into account.

It also replaces the Evercrypt provider crate (hpke-rs-evercrypt) with a new Libcrux provider crate (hpke-rs-libcrux), which is built on pure Rust dependencies.

Additionally, this PR upgrades rand=0.8->rand=0.9 for all crates in the project (with the exception that, for the Rust crypto provider hpke-rs-rust-crypto, the rand=0.8 traits are implemented, for compatibility with dependencies)

Currently, this branch depends on new versions of libcrux dependencies in the main branch.

Clippy lints are also applied.

Resolves #71

@wysiwys wysiwys self-assigned this Apr 14, 2025
@wysiwys wysiwys changed the title Add XWingDraft06 KEM support to hpke-rs, and replace evercrypt_provider with new libcrux_provider Add XWingDraft06 KEM support to hpke-rs, and replace evercrypt provider with new libcrux provider Apr 14, 2025
Copy link
Member

@keks keks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it goes in exactly the right direction! I left a few comments, including an idea where the CI failure might come from.

@wysiwys wysiwys force-pushed the wysiwys/hpke-rs-libcrux branch from a934060 to 323f152 Compare April 15, 2025 13:29
@wysiwys wysiwys requested a review from keks April 16, 2025 10:53
@wysiwys wysiwys marked this pull request as ready for review April 16, 2025 11:28
@franziskuskiefer
Copy link
Member

Looks like coverage fails because of rust-lang/rust#131829

@keks
Copy link
Member

keks commented Apr 16, 2025

In OpenMLS we use the new cli options, they should work here, too: https://github.com./openmls/openmls/blob/main/.github/workflows/coverage.yml

@wysiwys
Copy link
Contributor Author

wysiwys commented Apr 16, 2025

The coverage.yml workflow now uses the correct flags (updated in #74)

@codecov-commenter
Copy link

codecov-commenter commented Apr 16, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 78.31633% with 85 lines in your changes missing coverage. Please review.

Project coverage is 44.32%. Comparing base (2460bab) to head (7688297).

Files with missing lines Patch % Lines
libcrux_provider/src/lib.rs 81.39% 40 Missing ⚠️
rust_crypto_provider/src/lib.rs 50.00% 24 Missing ⚠️
src/kem.rs 74.19% 8 Missing ⚠️
src/lib.rs 82.75% 5 Missing ⚠️
traits/src/error.rs 0.00% 5 Missing ⚠️
traits/src/types.rs 66.66% 3 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #72      +/-   ##
==========================================
- Coverage   44.65%   44.32%   -0.33%     
==========================================
  Files          15       16       +1     
  Lines        3630     4708    +1078     
==========================================
+ Hits         1621     2087     +466     
- Misses       2009     2621     +612     
Files with missing lines Coverage Δ
src/dh_kem.rs 92.30% <100.00%> (-0.12%) ⬇️
src/kdf.rs 100.00% <100.00%> (ø)
src/test_aead.rs 100.00% <100.00%> (ø)
src/test_kdf.rs 100.00% <100.00%> (ø)
src/util.rs 48.33% <100.00%> (-35.01%) ⬇️
tests/test_hpke.rs 100.00% <100.00%> (ø)
tests/test_hpke_kat.rs 91.75% <100.00%> (+1.22%) ⬆️
traits/src/lib.rs 96.29% <ø> (ø)
traits/src/types.rs 57.30% <66.66%> (-1.19%) ⬇️
src/lib.rs 37.76% <82.75%> (-0.52%) ⬇️
... and 4 more

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@franziskuskiefer
Copy link
Member

Can you add the changes from here to the changelog?

Copy link
Member

@keks keks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good!

@wysiwys wysiwys enabled auto-merge April 16, 2025 15:12
@wysiwys wysiwys merged commit 7346c4b into main Apr 16, 2025
17 checks passed
@wysiwys wysiwys deleted the wysiwys/hpke-rs-libcrux branch April 16, 2025 16:00
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.

Add X-Wing ciphersuite
4 participants