Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ falcon = ["fn-dsa-comm"]
slh-dsa = ["dep:slh-dsa", "rand_core_010", "getrandom_v04"]
ml-dsa = ["dep:ml-dsa", "rand_core_010", "getrandom_v04"]
mayo = ["dep:pq-mayo", "dep:signature", "rand_core_010", "getrandom_v04"]
mceliece = ["dep:classic-mceliece-rust", "rand_core", "rand_core/getrandom", "rand_chacha", "zeroize"]
mceliece = ["dep:pq-mceliece", "rand_core_010", "getrandom_v04"]
ml-kem = ["dep:ml-kem"]
sntrup = ["dep:sntrup", "rand_core_010", "getrandom_v04"]
xmss = ["dep:xmss", "rand_core_010", "getrandom_v04", "zeroize"]
Expand Down Expand Up @@ -63,13 +63,13 @@ signature = { version = "3", optional = true }
rand_core_010 = { package = "rand_core", version = "0.10", optional = true }
getrandom_v04 = { package = "getrandom", version = "0.4", features = ["sys_rng"], optional = true }

[dependencies.classic-mceliece-rust]
version = "3.1.0"
[dependencies.pq-mceliece]
version = "0.2.1"
default-features = false
features = [
"iso",
"kem",
"mceliece348864",
"alloc",
"zeroize",
]
optional = true

Expand Down
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,14 @@ Two security levels following NIST standards:

### Classic McEliece (Key Encapsulation)

- **ClassicMcEliece-348864** (NIST Level 1) - Default when only `mceliece` feature enabled
- **ClassicMcEliece-348864** (legacy NIST Level 1; not part of ISO)
- **ClassicMcEliece-460896** (NIST Level 3) - Default when only `mceliece` is enabled
- **ClassicMcEliece-6688128** (NIST Level 5)
- **ClassicMcEliece-6960119** (NIST Level 5)
- **ClassicMcEliece-8192128** (NIST Level 5)

The four larger sizes are ISO standardized; 348864 remains available for legacy
interoperability. Every size supports deterministic key generation from a 32-byte seed.

### X-Wing (Hybrid Key Encapsulation)

Expand Down Expand Up @@ -183,10 +190,8 @@ anything that may already have used these schemes a clear, actionable migration
instead of a silent or confusing failure. The discriminants are never reassigned to other
schemes.

> **Note:** exclusion applies only to the weakest ML-KEM / ML-DSA lattice sets. Level 1
> parameter sets from other families — FN-DSA-512, MAYO-1, MAYO-2, and
> ClassicMcEliece-348864 — remain available, since their security margins and intended
> use cases differ.
> **Note:** ClassicMcEliece-348864 remains available for legacy interoperability; new
> applications should select one of the ISO-standardized sizes.

## API Reference

Expand Down Expand Up @@ -413,7 +418,7 @@ assert_eq!(shared_secret_sender.as_ref(), shared_secret_receiver.as_ref());
use bedrock::kem::KemScheme;

// Use Classic McEliece for code-based KEM
let scheme = KemScheme::ClassicMcEliece348864;
let scheme = KemScheme::ClassicMcEliece6960119;
let (ek, dk) = scheme.keypair()?;
let (ct, ss) = scheme.encapsulate(&ek)?;
let ss2 = scheme.decapsulate(&ct, &dk)?;
Expand Down Expand Up @@ -521,4 +526,4 @@ Unless you explicitly state otherwise, any contribution intentionally submitted
- [ML-KEM (FIPS 203)](https://csrc.nist.gov/pubs/fips/203/final)
- [ETHFALCON Specification](https://github.com/zknoxhq/ETHFALCON)
- [X-Wing (IETF Draft)](https://datatracker.ietf.org/doc/draft-connolly-cfrg-xwing-kem/)
- [classic-mceliece-rust](https://github.com/Colfenor/classic-mceliece-rust)
- [pq-mceliece](https://github.com/mikelodder7/pq-mceliece)
Loading