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 nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ c_hex c_w ↻ sys_mmap ↻ sys_write ↻ ntor_client_init nt_cat ntor_server_respond sys_mmap ↻ nt_is_zero ntor_build_secret_input nt_cat ↻ nt_slen ntor_kdf_seed_verify hmac_sha256 sys_mmap ↻ sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_seed_allocated sha256_update sha256_compress_ni_blocks

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