nx_p256_solinas_fast.nx
buildroot/runtime/nx_p256_solinas_fast.nx
about
nx_p256_solinas_fast.nx -- a FASTER NIST P-256 Solinas reducer, bit-exact with the production
_p256_solinas_reduce. The production version issues ~60 _r_addw FUNCTION CALLS, each propagating
a carry up a 9-limb memory accumulator on every word add. This version DEFERS the carry: it sums
each limb as a wide 64-bit value (max ~6*(2^32-1) < 2^35, no overflow) with plain array adds (no
calls, no per-add carry loop), then does ONE normalization pass before the identical reduce/subtract
tail. Same S-term table, same _r_reduce9 / _r_cmp8 helpers, same final POS-NEG mod p -> the result
is identical (proven by nx_p256_solinas_fast_difftest). Uses NO compiler intrinsic, so it builds
with the live compiler; kept SEPARATE so the production reducer is untouched until measured+greenlit.
license_tier: ORIGINAL
dependencies 1 imports · 4 importers
imports: nx_p256_field_mul.nx
imported by: nx_p256_fieldmul_3way_bench.nxnx_p256_fieldmul_full_bench.nxnx_p256_solinas_fast_bench.nxnx_p256_solinas_fast_difftest.nx
structs
| none |
consts
| none |
functions
| 12 | func _p256_solinas_reduce_fast(out8: *i64, c: *i64) -> i64 |
| 114 | func p256_field_reduce_solinas_fast(out_8: *i64, c_16: *i64) -> i64 |