code wiki / (root) / nx_p256_fieldmul_mulx_difftest.nx

nx_p256_fieldmul_mulx_difftest.nx

buildroot/runtime/nx_p256_fieldmul_mulx_difftest.nx

3122 B61 linesdepth 6pulls 7 transitivereach 0 importersview sourcekind tooltopic p256
docsdependenciesstructsconstsfunctions

about

nx_p256_fieldmul_mulx_difftest.nx -- prove the fused-intrinsic P-256 field multiply is bit-exact vs the production p256_field_mul over many random field elements. Since both reduce with the SAME _p256_solinas_reduce, this reduces correctness to the (already silicon-proven) 512-bit product -- but running the FULL field-mul path end-to-end is the real composition proof. expect_exit: 0 license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_p256_fieldmul_mulx.nx nx_p256_fieldmul_mulx_difftest

imports: nx_p256_fieldmul_mulx.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main dp lcg p256_field_mul nx_scratch_save nx_scratch_init sys_mmap u256_wide_alloc nx_scratch nx_scratch_init ↻ nx_scratch_oom sys_write sys_exit sys_mmap ↻ u256_mul_wide _p256_solinas_reduce u256_alloc nx_scratch ↻ p256_field_load_p nx_scratch ↻ _r_reduce9 _r_cmp8 nx_scratch_restore p256_field_mul_mulx fmx_pack64 fmx_split32 _p256_solinas_reduce ↻ dn dhex

structs

none

consts

7const K_MAGIC_6364136223846793005: i64 = 6364136223846793005
8const K_MAGIC_1442695040888963407: i64 = 1442695040888963407
9const K_MAGIC_4000: i64 = 4000

functions

11func dp(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main
12func dn(v: i64) -> i64
called by 1: main
18func dhex(v: i64) -> i64
called by 1: main
23func lcg(st: *i64) -> i64 { let x: i64 = st[0] * K_MAGIC_6364136223846793005 + K_MAGIC_1442695040888963407; st[0] = x; return x }
called by 1: main
25func main() -> i64