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

[PSQ] Introduce features classic-mceliece and non-pq #790

Merged
merged 9 commits into from
Feb 18, 2025

Conversation

jschneider-bensch
Copy link
Collaborator

@jschneider-bensch jschneider-bensch commented Feb 4, 2025

This PR introduces two new features to the libcrux-psq crate:

  • classic-mceliece: This makes the Classic McEliece implementation using classic-mceliece-rust available. The rationale is that we would like the default feature set to have as little dependencies as possible, so we introduce this feature until we eventually have Classic McEliece in libcrux.
  • non-pq: This makes the X25519 implementation available. We included this for testing and benchmarking against the fully PQ or hybrid KEMs, but it should not be availiable as a default feature, since it provides no PQ security.

To introduce these features I've restructured algorithm selection to using traits. Every PSQ implementation now implements the PSQ trait, which relies on an associated type InnerKEM that provides the interface for the underlying KEM. It should not be allowed for users of the crate to implement the PSQ trait, so I've sealed the underlying KEM interface.

Fixes #722

@jschneider-bensch jschneider-bensch requested a review from a team as a code owner February 4, 2025 08:27
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. Only a few thoughts and questions.

libcrux-psq/Cargo.toml Outdated Show resolved Hide resolved
libcrux-psq/README.md Show resolved Hide resolved
libcrux-psq/src/lib.rs Outdated Show resolved Hide resolved
libcrux-psq/src/psq_traits.rs Outdated Show resolved Hide resolved
libcrux-psq/src/psq_traits.rs Outdated Show resolved Hide resolved
libcrux-psq/src/psq_traits.rs Outdated Show resolved Hide resolved
libcrux-psq/src/psq_impls.rs Outdated Show resolved Hide resolved
libcrux-psq/src/psq_traits.rs Outdated Show resolved Hide resolved
libcrux-psq/src/psq_traits.rs Outdated Show resolved Hide resolved
libcrux-psq/src/psq_traits.rs Outdated Show resolved Hide resolved
@franziskuskiefer franziskuskiefer added the waiting-on-author Status: This is awaiting some action from the author. label Feb 5, 2025
jschneider-bensch and others added 4 commits February 12, 2025 11:32
Review: get rid of lifetimes in traits

Review: Use `libcrux_kem` types directly

Review: Add TODOs for `no_std` issues

Review: simplify return

Review: Keypair alias, keygen in KEM trait

Use `classic_mceliece_rust` types directly

Review: Move `KEM` trait to `libcrux-traits`

Review: Add todo for constant time ops
@jschneider-bensch jschneider-bensch removed the waiting-on-author Status: This is awaiting some action from the author. label Feb 12, 2025
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, let's get this in.

traits/src/kem.rs Show resolved Hide resolved
traits/Cargo.toml Show resolved Hide resolved
@jschneider-bensch jschneider-bensch merged commit 1dcf992 into main Feb 18, 2025
64 of 65 checks passed
@jschneider-bensch jschneider-bensch deleted the jonas/psq-mceliece-gate branch February 18, 2025 11:42
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.

[PSQ] Feature gate Classic McEliece
2 participants