#post-quantum-cryptography #security

no-std pqcrypto-classicmceliece

Post-Quantum Key-Encapsulation Mechanism classicmceliece

9 releases

0.2.1 Aug 5, 2025
0.2.0 Oct 16, 2023
0.1.7 Apr 14, 2022
0.1.6 Nov 25, 2021
0.1.0 Feb 11, 2020

#2494 in Cryptography

Download history 204/week @ 2025-07-25 162/week @ 2025-08-01 264/week @ 2025-08-08 215/week @ 2025-08-15 341/week @ 2025-08-22 362/week @ 2025-08-29 411/week @ 2025-09-05 393/week @ 2025-09-12 375/week @ 2025-09-19 402/week @ 2025-09-26 287/week @ 2025-10-03 2109/week @ 2025-10-10 1768/week @ 2025-10-17 417/week @ 2025-10-24 431/week @ 2025-10-31 314/week @ 2025-11-07

2,972 downloads per month
Used in 9 crates (via pqcrypto)

MIT/Apache

22MB
475K SLoC

GNU Style Assembly 279K SLoC // 0.0% comments C 184K SLoC // 0.3% comments Bitbake 7.5K SLoC // 0.0% comments Rust 3K SLoC // 0.0% comments Python 1.5K SLoC // 0.1% comments Jinja2 202 SLoC INI 5 SLoC

Contains (Mach-o exe, 130KB) pqclean/bin/functest_kyber1024_aarch64, (Mach-o exe, 130KB) pqclean/bin/functest_kyber512_aarch64, (Mach-o exe, 130KB) pqclean/bin/functest_kyber768_aarch64, (Mach-o exe, 110KB) pqclean/bin/functest_kyber768_clean, (Mach-o exe, 130KB) testvectors_kyber1024_aarch64, (Mach-o exe, 130KB) pqclean/bin/testvectors_kyber512_aarch64 and 76 more.

classicmceliece

This crate contains bindings to the C implementations of the following schemes, from PQClean.

This project packages Post-Quantum cryptographic algorithms that participate in the NIST PQC standardization effort. It is currently a collection of wrappers around C implementations from the PQClean project.

Serialization

If you want serde support, enable the serialization feature.

Included implementations from PQClean

Below is a list of the included schemes and the corresponding implementations sourced from PQClean. The "default" implementation is used in the Rust-friendly interface, alternative implementations are exposed as ffi methods only.

  • mceliece348864
    • clean
    • avx2 (if supported)
  • mceliece348864f
    • clean
    • avx2 (if supported)
  • mceliece460896
    • clean
    • avx2 (if supported)
  • mceliece460896f
    • clean
    • avx2 (if supported)
  • mceliece6688128
    • clean
    • avx2 (if supported)
  • mceliece6688128f
    • clean
    • avx2 (if supported)
  • mceliece6960119
    • clean
    • avx2 (if supported)
  • mceliece6960119f
    • clean
    • avx2 (if supported)
  • mceliece8192128
    • clean
    • avx2 (if supported)
  • mceliece8192128f
    • clean
    • avx2 (if supported)

Notes

This implementation requires a lot of stack space. You need to specify RUST_MIN_STACK=800000000, probably.

License

The wrappers and wrapper generation scripts in this project are covered by the MIT or Apache 2.0 licenses, at your choice.

The implementations we link to are not, however. Please see the PQClean project for the appropriate licenses.

Dependencies