code wiki / (root) / nx_p256_wnaf_difftest.nx

nx_p256_wnaf_difftest.nx

buildroot/runtime/nx_p256_wnaf_difftest.nx

2919 B75 linesdepth 9pulls 14 transitivereach 0 importersview sourcekind tooltopic p256
docsdependenciesstructsconstsfunctions

about

nx_p256_wnaf_difftest.nx -- prove p256_scalar_mul_wnaf == p256_scalar_mul (generic double-and-add, the proven reference) over random scalars + edge cases (0, 1, small, high-bit-set). Compares in AFFINE form (Jacobian reps of the same point differ in x/y/z but are equal after to_affine). expect_exit: 0 license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_csprng.nx nx_p256_scalar_mul_wnaf.nx nx_p256_scalar_mul.nx nx_p256_wnaf_difftest.nx

imports: nx_syscalls.nxnx_csprng.nxnx_p256_scalar_mul_wnaf.nxnx_p256_scalar_mul.nx

imported by: nobody (leaf or entry point)

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

main dp sys_write p256_point_alloc nx_scratch nx_scratch_init sys_mmap nx_scratch_oom sys_write ↻ sys_exit sys_mmap ↻ u256_alloc nx_scratch ↻ p256_field_one u256_one u256_zero p256_field_zero u256_zero ↻ p256_point_load_g p256_field_one ↻ u256_alloc ↻ sys_mmap ↻ chk p256_point_alloc ↻ p256_scalar_mul_wnaf nx_scratch_save nx_scratch_init ↻ p256_point_alloc ↻ p256_point_copy u256_copy p256_point_double p256_point_is_infinity u256_is_zero p256_point_zero p256_field_one ↻ p256_field_zero ↻ u256_is_zero ↻ nx_scratch_save ↻ u256_alloc ↻ u256_copy ↻

structs

none

consts

none

functions

10func 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 calls 1: sys_write
11func dn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
19func chk(k: *i64, g: *P256Point) -> i64
33func main() -> i64