code wiki / _hdl_build / nx_cenc_gate.nx

nx_cenc_gate.nx

buildroot/runtime/_hdl_build/nx_cenc_gate.nx

4800 B77 linesdepth 6pulls 10 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

dependencies 7 imports · 0 importers

nx_gate_gn.nx nx_gate_base.nx nx_syscalls.nx nx_aes.nx nx_aes_ctr.nx base64.nx nx_cenc.nx nx_cenc_gate.nx

imports: nx_gate_gn.nxnx_gate_base.nxnx_syscalls.nxnx_aes.nxnx_aes_ctr.nxbase64.nxnx_cenc.nx

imported by: nobody (leaf or entry point)

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

main gw sys_write sys_mmap hx hexval aes128_expand_key _aes_sbox _aes_rcon cenc_decrypt_subsamples sys_mmap ↻ cenc_ctr_iv16 aes128_ctr_xor sys_mmap ↻ aes128_encrypt_block _aes_ctr_inc grow gw ↻ beq clearkey_first_key sys_mmap ↻ cenc_json_str cenc_slen cenc_b64url_decode sys_mmap ↻ b64_decode b64_grab b64_dec_char gsl gn sys_exit

structs

none

consts

none

functions

12func grow(name: *u8, ok: i64) -> i64 { if ok==1 { gw(" PASS " as *u8) } else { gw(" FAIL " as *u8) } gw(name); gw("
called by 1: main calls 1: gw
14func hexval(c: i64) -> i64 { if c>=48 { if c<=57 { return c-48 } } if c>=97 { if c<=102 { return c-87 } } if c>=65 { if c<=70 { return c-55 } } return 0 }
called by 1: main calls 1: hexval
15func hx(s: *u8, out: *u8) -> i64 { var i: i64=0; var o: i64=0; while (s[i]&0xff)!=0 { let hi: i64=hexval(s[i]&0xff); let lo: i64=hexval(s[i+1]&0xff); out[o]=(hi*16+lo) as u8; o=o+1; i=i+2 } return o }
called by 1: main
16func beq(a: *u8, b: *u8, n: i64) -> i64 { var i: i64=0; while i<n { if (a[i]&0xff)!=(b[i]&0xff){ return 0 } i=i+1 } return 1 }
called by 1: main
17func gsl(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
19func main() -> i64