code wiki / (root) / nx_rsa4096_mont_gate.nx

nx_rsa4096_mont_gate.nx

buildroot/runtime/nx_rsa4096_mont_gate.nx

2023 B39 linesdepth 6pulls 7 transitivereach 0 importersview sourcekind gate/prooftopic rsa4096
docsdependenciesstructsconstsfunctions

about

nx_rsa4096_mont_gate.nx -- correctness KAT: the new Montgomery rsa4096_mod_exp_mont MUST equal the trusted bit-by-bit rsa4096_mod_exp byte-for-byte on s^65537 mod n. This is what makes wiring the fast path SAFE-BY-GATE (a wrong Montgomery goes RED, never a silent cert-validation bug). Mirrors nx_rsa2048_mont_gate. license_tier: INDEPENDENT_REDERIVE

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_u4096.nx nx_rsa4096_mod_exp.nx nx_rsa4096_mont.nx nx_rsa4096_mont_gate.nx

imports: nx_syscalls.nxnx_u4096.nxnx_rsa4096_mod_exp.nxnx_rsa4096_mont.nx

imported by: nobody (leaf or entry point)

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

main g_p sys_write u4096_alloc sys_mmap rsa4096_mod_exp u4096_cmp rsa4096_highbit_i64 u4096_one u4096_zero u4096_alloc ↻ u4096_copy rsa4096_mul_mod u4096_wide_alloc sys_mmap ↻ u4096_mul_wide rsa4096_mod u4096_alloc ↻ u4096_zero ↻ u4096_shl1 u4096_wide_get_bit u4096_sub_with_borrow u4096_cmp ↻ u4096_copy ↻ rsa4096_mod_exp_mont u4096_cmp ↻ u4096_one ↻ rsa4096_mont_n0inv u4096_alloc ↻ rsa4096_mont_r2 sys_mmap ↻ u4096_alloc ↻ rsa4096_mod ↻ rsa4096_mul_mod ↻ sys_munmap u4096_free sys_munmap ↻ rsa4096_mont_mul sys_mmap ↻ u4096_cmp ↻

structs

none

consts

none

functions

10func g_p(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 main() -> i64