Files
opaque-lattice/src
Cole Leavitt 2d9559838c feat(oprf): add NTT for O(n log n) multiplication and pure constant-time sampling
Performance improvements:
- Replace O(n²) schoolbook multiplication with O(n log n) NTT using Cooley-Tukey/Gentleman-Sande
- ~4x speedup on polynomial multiplication (44ms -> 10ms in tests)

Security improvements:
- Replace branching normalization in sample_small/sample_random_small with ct_normalize
- Add ct_is_negative and ct_normalize constant-time primitives
- All coefficient normalization now uses constant-time operations

NTT implementation:
- Uses q=65537 Fermat prime with primitive 512th root of unity ψ=256
- Precomputed twiddle factors for forward and inverse transforms
- Iterative in-place butterfly with bit-reverse permutation
- Negacyclic convolution for Z_q[X]/(X^n+1)

All 219 tests passing
2026-01-07 13:33:35 -07:00
..
2026-01-06 12:49:26 -07:00
2026-01-06 12:49:26 -07:00
2026-01-06 12:49:26 -07:00
2026-01-06 12:49:26 -07:00
2026-01-06 12:49:26 -07:00