C11 FIPS 203 IPD v0.6

May 15, 2024

I just released v0.6 of fips203ipd.

fips203ipd is an embeddable, dependency-free, MIT-0 licensed, C11 implementation of the FIPS 203 initial public draft (IPD) with scalar, AVX-512, and Neon backends. The final version of FIPS 203 will become ML-KEM, NIST’s standarized post-quantum key encapsulation mechanism (KEM).

Git Repository, API Documentation, Original Announcement, pqc-forum Announcement

Changes in v0.6

  • Add Neon backend
  • Add MacOS support to test suite (thanks Rod!)
  • Add backend auto-detection, BACKEND command-line build parameter, and fips203ipd_backend() function
  • Add Raspberry Pi 5 (Cortex-A76) benchmarks
  • Add “Backends” documentation section with brief notes about each backend

Benchmarks

Here are median cycle count as measured by the included bench tool for each parameter set, function, compiler, and backend from several of my systems.

For context, the results below are competitive with the eBATS results (kyber512, kyber768, kyber1024), although the comparison is inexact because the results were measured with different tools and because Kyber and ML-KEM differ slightly.

Lenovo ThinkPad X1 Carbon, 6th Gen (x86-64 i7-1185G7)

Median cycles by backend, Lenovo ThinkPad X1 Carbon, 6th Gen (i7-1185G7).

Median cycles by backend, Lenovo ThinkPad X1 Carbon, 6th Gen (i7-1185G7).

SetFunctionScalar (GCC)Scalar (Clang)AVX-512 (GCC)
kem512keygen1187337077017448
kem512encaps1261598271321474
kem512decaps1854269772225685
kem768keygen17244611019229334
kem768encaps18461413238532528
kem768decaps23456414842538184
kem1024keygen26832717625639914
kem1024encaps27079320649745268
kem1024decaps37053322468652523

Download CSV

Raspberry Pi 5 (ARM Cortex-A76)

Median cycles by backend, Raspberry Pi 5 (Cortex-A76).

Median cycles by backend, Raspberry Pi 5 (Cortex-A76).

SetFunctionScalar (GCC)Scalar (Clang)Neon (GCC)
kem512keygen1274037703053667
kem512encaps1324329033561321
kem512decaps17662010786873647
kem768keygen19726811400992471
kem768encaps205189140042104842
kem768decaps265442162514121529
kem1024keygen292543180492140220
kem1024encaps298150212488155127
kem1024decaps376114242303176042

Download CSV

Odroid N2L (ARM Cortex-A73)

Median cycles by backend, Odroid N2L (Cortex-A73).

Median cycles by backend, Odroid N2L (Cortex-A73).

SetFunctionScalar (GCC)Scalar (Clang)Neon (GCC)
kem512keygen21090012367589625
kem512encaps216750143325101550
kem512decaps298050173550122475
kem768keygen325050179025153525
kem768encaps331725219900173325
kem768decaps444600259350201900
kem1024keygen482625285375234075
kem1024encaps475500335025256650
kem1024decaps619725384825293250

Download CSV

Update (2024-05-16): Added cycle counts for scalar backend (clang and gcc), added bar charts, added downloadable CSVs. The CSVs and SVGs generated by the Python scripts in the scripts/bench-chart/ directory of the Git repository.