pq-code-package / mlkem-native

High-assurance, high-performance ML-KEM implementation for mobile, pc, and server targets
https://pq-code-package.github.io/mlkem-native/dev/bench/
Apache License 2.0
11 stars 9 forks source link

CI: Add test for non-standard values of GEN_MATRIX_NBLOCKS #416

Closed hanno-becker closed 2 days ago

hanno-becker commented 5 days ago

GEN_MATRIX_NBLOCKS is a heuristic value estimating the amount of rejection sampling input to sample 256 polynomial coefficients.

While this value is hardcoded to 3 by default, one should be able to set it to any positive value. Moreover, some code-paths are not as easily reached with the default value, and testing a lower value increases the chances of catching bugs in those.

This commit allows the user to specify GEN_MATRIX_NBLOCKS in the CFLAGS, and extends the CI to test the non-standard values 1,2, and 4.