Skip to content
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

Make verified ML-KEM available in libcrux-ml-kem #329

Merged
merged 62 commits into from
Jul 1, 2024

Conversation

jschneider-bensch
Copy link
Collaborator

@jschneider-bensch jschneider-bensch commented Jun 21, 2024

This PR integrates the version of ML-KEM into libcrux-ml-kem that was verified and previously lived in the kem module of libcrux. I've also introduced a pre-verification feature gate in libcrux-ml-kem and libcrux-kem for code that is not verified, yet.

Fixes #326

@franziskuskiefer franziskuskiefer added the waiting-on-author Status: This is awaiting some action from the author. label Jun 24, 2024
Copy link
Member

@franziskuskiefer franziskuskiefer left a comment

Choose a reason for hiding this comment

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

waiting for the code updates, please re-request review.

Copy link
Member

@franziskuskiefer franziskuskiefer left a comment

Choose a reason for hiding this comment

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

lgtm with a few nits and one bigger issue below.

Looks like I didn't feature guard tests, example etc. in #333. Now things fail when running without default features.

You can run cargo hack test --each-feature (excluding things like simd128 on x64 machines with --exclude-features) to see what happens. In particular cargo test --no-default-features seems to fail already. We should get that on CI.

So broken combinations are at least

  • --no-default-features
  • --no-default-features --features kyber

Especially the second one should work.

But we can do that in a follow up if you want.

libcrux-ml-kem/src/lib.rs Outdated Show resolved Hide resolved
libcrux-ml-kem/src/lib.rs Show resolved Hide resolved
libcrux-ml-kem/src/lib.rs Outdated Show resolved Hide resolved
libcrux-ml-kem/src/types.rs Outdated Show resolved Hide resolved
libcrux-ml-kem/src/kem.rs Outdated Show resolved Hide resolved
libcrux-kem/src/kem.rs Outdated Show resolved Hide resolved
libcrux-ml-kem/Cargo.toml Outdated Show resolved Hide resolved
libcrux-ml-kem/src/kem/kyber/helper.rs Show resolved Hide resolved
@jschneider-bensch
Copy link
Collaborator Author

I added more feature gates, so cargo test --no-default-features at least should work now.

Copy link
Member

@franziskuskiefer franziskuskiefer left a comment

Choose a reason for hiding this comment

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

I did a pass and fixed all the remaining issues (that I found, there may be more).
I also added more docs and regenerated F* and C code. I think this is good to go.

@jschneider-bensch jschneider-bensch merged commit ea4bd36 into dev Jul 1, 2024
47 checks passed
@jschneider-bensch jschneider-bensch deleted the jonas/restore-verified-mlkem branch July 1, 2024 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Offer verified ML-KEM API in libcrux-ml-kem
2 participants