nx_p256_solinas_timing.nx
buildroot/runtime/nx_p256_solinas_timing.nx
about
nx_p256_solinas_timing.nx -- honest FAST(Solinas) vs SLOW(bit-serial)
timing for the P-256 field multiply used by TLS ECDSA cert verify.
The Solinas fast reduction is ALREADY the production path (p256_field_mul);
the bit-serial p256_field_mul_slow is the retained oracle == the "naive
reduction" baseline. Timing both on the SAME workload quantifies the
reduction speedup that Solinas already delivers. Seeds from a runtime
clock and chains a=mul(a,b) (data-dependent) so the optimizer cannot
const-fold the field arithmetic away. No correctness claim here -- see
nx_p256_solinas_difftest.nx for the bit-identical proof.
license_tier: ORIGINAL
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_u256.nxnx_p256_field.nxnx_p256_field_mul.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 18 | const K_MAGIC_2654435761: i64 = 2654435761 |
| 19 | const K_MAGIC_40503: i64 = 40503 |
| 20 | const K_MAGIC_30000: i64 = 30000 |
functions
| 22 | func _tm_print_dec(n: i64) -> i64 |
| 48 | func _tm_seed(a: *i64, b: *i64, seed: i64) -> i64 called by 1: main |
| 58 | func main() -> i64 |