Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Compile: g++ examples/main.cpp -Iinclude -lcryptopp -o mlkem.exe

Medium:text SHAKE: text

Why use noexcept? Exceptions are avoided because they: break constant-time guarantees introduce timing side channels make control flow harder to audit reduce performance predictability

On running examples/naive_vs_ntt.cpp following results were obtained: // Running benchmark (100 iterations)...

Results: Naive: 0.130817 sec NTT : 0.0088718 sec

Speedup: 14.7452x

On running precompute_zeta.cpp file following results were obtained Running full NTT multiplication benchmark...

Results: With tables : 0.0402558 sec Without : 0.0531028 sec

Speedup: 1.31913x

Known Answer Tests (KAT): Download the official NIST ML-KEM KAT files and write a wrapper to verify that your keygen, encaps, and decaps functions produce the exact same outputs given the same seeds.

Unit Tests for Primitives: Add specific tests for the Number Theoretic Transform (NTT) and the Centered Binomial Distribution (CBD) sampling to prove each component functions as specified in FIPS 203. Parameter Agnosticism: Currently, your code is hardcoded for ML-KEM-512 ($k=2$). Refactor the Matrix and KPKE classes to use template parameters for $k$, $\eta_1$, and $\eta_2$. This would allow your library to support ML-KEM-768 and ML-KEM-1024 easily.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages