code wiki / _hdl_build / nx_bip39_kat.nx

nx_bip39_kat.nx

buildroot/runtime/_hdl_build/nx_bip39_kat.nx

7121 B127 linesdepth 7pulls 10 transitivereach 0 importersview sourcekind tooltopic bip39
docsdependenciesstructsconstsfunctions

about

nx_bip39_kat.nx -- ENGINEER gate: BIP39 vs the standard's own vectors (trezor/python-mnemonic vectors.json, the reference suite the BIP-0039 spec links). 8x 24-word + 3x 12-word vectors: encode(entropy) must equal the published mnemonic STRING byte-exact; decode(mnemonic) must return the entropy and round-trip. Negatives: swapped word -> BAD_CHECKSUM, alien word -> UNKNOWN_WORD, truncated phrase -> BAD_WORD_COUNT. Plus generate_24 self-round-trip. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_bip39.nx nx_syscalls.nx nx_bip39_kat.nx

imports: nx_bip39.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main bk_vec sys_mmap bk_hex bk_nib bk_z nx_bip39_encode sys_mmap ↻ _b39_bit_at nx_b39_word_at _b39_chunk _b39_c0 _b39_c1 _b39_c2 _b39_c3 _b39_c4 _b39_c5 _b39_c6 _b39_c7 _b39_c8 _b39_c9 _b39_c10 _b39_c11 _b39_c12 _b39_c13 _b39_c14 _b39_c15 _b39_c16 _b39_c17 _b39_c18 _b39_c19 _b39_c20 _b39_c21 _b39_c22 _b39_c23 _b39_c24 _b39_c25 _b39_c26 _b39_c27 _b39_c28

structs

none

consts

none

functions

10func bk_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: bk_vecmain calls 1: sys_write
11func bk_z(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 2: bk_vecmain
12func bk_nib(c: i64) -> i64
called by 1: bk_hex
17func bk_hex(hexs: *u8, out: *u8) -> i64
called by 1: bk_vec calls 1: bk_nib
25func bk_eq(a: *u8, b: *u8, n: i64) -> i64
called by 2: bk_vecmain
32func bk_vec(ent_hex: *u8, want_str: *u8) -> i64
55func main() -> i64