code wiki / (root) / nx_rsa2048_mont_gate.nx

nx_rsa2048_mont_gate.nx

buildroot/runtime/nx_rsa2048_mont_gate.nx

2732 B82 linesdepth 6pulls 7 transitivereach 0 importersview sourcekind gate/prooftopic rsa2048
docsdependenciesstructsconstsfunctions

about

nx_rsa2048_mont_gate.nx -- correctness gate: Montgomery modexp MUST equal the trusted bit-by-bit modexp for the same (s, e, n). Pins rsa2048_mod_exp_mont before it replaces the slow path in TLS cert verification. expect_exit: 0

dependencies 6 imports · 0 importers

nx_syscalls.nx nx_u2048.nx nx_u2048_mul.nx nx_rsa2048_mod.nx nx_rsa2048_mod_exp.nx nx_rsa2048_mont.nx nx_rsa2048_mont_gate.nx

imports: nx_syscalls.nxnx_u2048.nxnx_u2048_mul.nxnx_rsa2048_mod.nxnx_rsa2048_mod_exp.nxnx_rsa2048_mont.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap one_case u2048_alloc sys_mmap ↻ mk_n mk_s rsa2048_mod_exp u2048_cmp rsa2048_highbit_i64 u2048_one u2048_zero u2048_alloc ↻ u2048_copy rsa2048_mul_mod u2048_wide_alloc sys_mmap ↻ u2048_mul_wide rsa2048_mod u2048_alloc ↻ u2048_zero ↻ u2048_shl1 u2048_wide_get_bit u2048_sub_with_borrow u2048_cmp ↻ u2048_copy ↻ rsa2048_mod_exp_mont u2048_cmp ↻ u2048_one ↻ rsa2048_mont_n0inv u2048_alloc ↻ rsa2048_mont_r2 u2048_wide_alloc ↻ u2048_alloc ↻ rsa2048_mod ↻ rsa2048_mul_mod ↻ rsa2048_mont_mul sys_mmap ↻ u2048_cmp ↻ u2048_sub_with_borrow ↻

structs

none

consts

none

functions

14func g_ps(s: *u8, n: i64) -> i64 { sys_write(1, s, n); return 0 }
called by 2: one_casemain calls 1: sys_write
15func g_pn(v: i64) -> i64
called by 2: one_casemain calls 2: sys_mmapsys_write
27func mk_n(n: *i64, seed: i64) -> i64
called by 1: one_case
39func mk_s(s: *i64, seed: i64) -> i64
called by 1: one_case
49func one_case(seed: i64, e: i64) -> i64
61func main() -> i64