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

Pull out libcrux::kem into a standalone crate #304

Merged
merged 31 commits into from
Jun 13, 2024
Merged

Conversation

jschneider-bensch
Copy link
Collaborator

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

This PR pulls out the KEM module from libcrux into a standalone crate in the workspace.

For now, I have changed visibility to pub of any pub (crate) items the module depended on in libcrux and libcrux-ml-kem. I have not yet re-exported the standalone KEM API in libcrux to avoid cyclic dependency, since the standalone crate still depends on the ecdh module in libcrux.

I've also changed the naming from Kyber to ML-KEM in the standalone crate.

libcrux-kem/src/kem.rs Show resolved Hide resolved
libcrux-ml-kem/src/mlkem768.rs Outdated Show resolved Hide resolved
libcrux-ml-kem/src/types.rs Outdated Show resolved Hide resolved
src/ecdh.rs Outdated Show resolved Hide resolved
@franziskuskiefer franziskuskiefer self-requested a review June 12, 2024 04:50
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.

Thanks, generally looks good to me with a few nits.

libcrux-kem/src/kem.rs Show resolved Hide resolved
libcrux-ecdh/src/ecdh.rs Outdated Show resolved Hide resolved
.github/workflows/kem.yml Outdated Show resolved Hide resolved
src/signature.rs Outdated Show resolved Hide resolved
src/hpke/hpke.rs Outdated Show resolved Hide resolved
@jschneider-bensch
Copy link
Collaborator Author

I'm not sure about the tests for libcrux-kem: I've moved some tests for ML-KEM from the top-level tests directory into the crate, in the process also removing some that were duplicated in libcrux-ml-kem. Those tests seem to actually test a re-exportet libcrux-ml-kem API though, so might be better placed in there? Other KEM related tests in the top-level seem to test hpke APIs.

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.

Thanks, lgtm with a few nits.

Can we keep a version of the implementation notes PDF from the old kyber folder?

libcrux-ecdh/src/hacl/p256.rs Outdated Show resolved Hide resolved
src/hacl.rs Outdated Show resolved Hide resolved
src/kem.rs Outdated Show resolved Hide resolved
@jschneider-bensch
Copy link
Collaborator Author

Can we keep a version of the implementation notes PDF from the old kyber folder?

I put a copy in libcrux-ml-kem (where the path was already excluded from packaging in Cargo.toml).

@jschneider-bensch jschneider-bensch merged commit 52af832 into dev Jun 13, 2024
47 of 48 checks passed
@jschneider-bensch jschneider-bensch deleted the jonas/kem-crate branch June 13, 2024 13:36
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.

2 participants