#ml-kem #mechanism #status

pqc-ml-kem

A library for Module-Lattice Key Encryption Mechanism (ML-KEM)

6 releases (breaking)

new 0.7.0 May 15, 2025
0.5.0 May 15, 2025
0.4.0 May 15, 2025
0.3.0 May 15, 2025
0.1.0 May 15, 2025

#588 in Cryptography

Download history 279/week @ 2025-05-10

279 downloads per month

MIT license

2.5MB
930 lines

Project Status

pqc-ml-kem.rs

A rust library for ML-KEM(Module-Lattice-Based Key-Encryption Mechanism)

🚧 Project Status

This project is currently under active development. Expect breaking changes and incomplete features.

Features

  • keygen() - generate a key pair (ek, dk)
  • encaps(ek) - generate a key and ciphertext pair (key, ciphertext)
  • decaps(dk, ciphertext)- generate the shared key key

How to Use

To install, use:

cargo add pqc-ml-kem

To use

use pqc_ml_kem::{ML_KEM_512, ML_KEM_768, ML_KEM_1024};

let (ek, dk) = ML_KEM_512.keygen();

let (key_1, ct) = ML_KEM_512.encaps(&ek);

let key_2 = ML_KEM_512.decaps(&dk, &ct);

assert_eq(key_1, key_2)

Acknowledgements

  • kyber.py for serving as an initial reference.

License

This project is licensed under the MIT license.

See LICENSE for more information.

Dependencies

~2.4–3MB
~52K SLoC