code wiki / _hdl_build / nx_tor_ntor_cli.nx

nx_tor_ntor_cli.nx

buildroot/runtime/_hdl_build/nx_tor_ntor_cli.nx

3511 B52 linesdepth 8pulls 14 transitivereach 0 importersview sourcekind tooltopic tor
docsdependenciesstructsconstsfunctions

about

nx_tor_ntor_cli.nx -- CLI/demo for the sovereign Tor ntor handshake. Runs ONE full handshake with FIXED deterministic keys and prints every wire artifact as hex: the client onion skin (CREATE2 HDATA), the server reply Y|AUTH (CREATED2 HDATA), KEY_SEED, and the 92-byte circuit keys. Purpose: this is the harness that CLOSES the remaining interop gap -- feed the SAME fixed inputs to a reference Tor ntor (e.g. tor's ntor_ref.py) offline and diff the hex; equality == byte-exact interop. No network, no args. license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_x25519_ephemeral.nx nx_tor_ntor.nx nx_tor_ntor_cli.nx

imports: nx_syscalls.nxnx_x25519_ephemeral.nxnx_tor_ntor.nx

imported by: nobody (leaf or entry point)

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

main c_w sys_write sys_mmap x25519_keypair_public sys_mmap ↻ x25519_base_point x25519 nx_scratch_save nx_scratch_init sys_mmap ↻ nx_scratch nx_scratch_init ↻ nx_scratch_oom sys_write ↻ sys_exit sys_mmap ↻ fe_alloc nx_scratch ↻ fe_from_bytes fe_one fe_zero fe_zero ↻ fe_copy x25519_ladder_step fe_cswap nx_scratch_save ↻ fe_alloc ↻ fe_add fe_sq fe_mul fe_sub fe_mul ↻ fe_mul_a24 nx_scratch_save ↻ fe_alloc ↻ fe_mul ↻ nx_scratch_restore nx_scratch_restore ↻ fe_cswap ↻

structs

none

consts

none

functions

11func c_w(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 2: c_hexmain calls 1: sys_write
13func c_hex(label: *u8, buf: *u8, n: i64) -> i64
called by 1: main calls 3: c_wsys_mmapsys_write
24func main() -> i64