code wiki / (root) / nx_p384_scalar_mul_gate.nx

nx_p384_scalar_mul_gate.nx

buildroot/runtime/nx_p384_scalar_mul_gate.nx

5126 B74 linesdepth 10pulls 12 transitivereach 0 importersview sourcekind gate/prooftopic p384
docsdependenciesstructsconstsfunctions

about

nx_p384_scalar_mul_gate.nx -- DIFFERENTIAL referee: the new 4-bit windowed p384_scalar_mul MUST equal the trusted double-and-add p384_scalar_mul_dbladd for k*G across edge, limb/nibble-boundary, and spread scalars. p384_point_eq normalizes to affine so the two algorithms' different projective representations don't false-fail. A wrong scalar-mul diverges from the trusted oracle -> RED. GREEN + exit 0 iff every case matches. license_tier: ORIGINAL expect_exit: 0

dependencies 4 imports · 0 importers

nx_p384_scalar_mul.nx nx_p384_point.nx nx_syscalls.nx nx_gate_verdict.nx nx_p384_scalar_mul_gate.nx

imports: nx_p384_scalar_mul.nxnx_p384_point.nxnx_syscalls.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

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

main pg_puts sys_write p384_point_alloc nx_u384_scratch nx_u384_scratch_init sys_mmap sys_write ↻ sys_exit sys_mmap ↻ u384_alloc nx_u384_scratch ↻ p384_field_one u384_one u384_zero p384_field_zero u384_zero ↻ p384_point_load_g p384_field_one ↻ sys_mmap ↻ pg_zero12 pg_match p384_point_alloc ↻ p384_scalar_mul nx_u384_scratch_save nx_u384_scratch_init ↻ p384_point_alloc ↻ p384_point_copy u384_copy sys_mmap ↻ p384_point_zero p384_field_one ↻ p384_field_zero ↻ p384_point_double p384_point_is_infinity u384_is_zero p384_point_zero ↻ u384_is_zero ↻ u384_alloc ↻ u384_copy ↻

structs

none

consts

none

functions

11func pg_puts(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
12func pg_putn(v: i64) -> i64
called by 1: main calls 2: sys_writesys_mmap
21func pg_zero12(k: *i64) -> i64 { var i: i64 = 0; while i < 12 { k[i] = 0; i = i + 1 } return 0 }
called by 1: main
23func pg_match(g: *P384Point, k: *i64) -> i64
31func main() -> i64