code wiki / _hdl_build / nx_media_crypt_wasm_gate.nx
nx_media_crypt_wasm_gate.nx
buildroot/runtime/_hdl_build/nx_media_crypt_wasm_gate.nx
about
nx_media_crypt_wasm_gate.nx -- proves the sovereign ChaCha20 cipher runs CORRECTLY IN WASM: compile
nx_media_crypt_wasm.nx -> wat -> wasm (sovereign pipeline), load in nx_wasm_vm, run RFC 8439 sec2.4.2
encryption in the VM's linear memory, compare to the standard's ciphertext. This is the browser lane,
bit-identical to the native KAT. NISHI all the way (fork sovereign compilers -> nx_wasm_vm). ORIGINAL
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_gate_emit_lib.nxnx_wasm_vm.nxnx_media_crypt.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 10 | const CWAT: *u8 = "/tmp/nx_compile_wat.sov.elf" |
| 11 | const WATC: *u8 = "/tmp/nx_wat_compiler.sov.elf" |
| 12 | const SRCNX: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/runtime/nx_media_crypt_wasm.nx" |
| 13 | const OWAT: *u8 = "/tmp/mcw.wat" |
| 14 | const OWASM: *u8 = "/tmp/mcw.wasm" |
functions
| 16 | func run_elf(elf: *u8, a1: *u8, a2: *u8) -> i64 |
| 27 | func mw(mod: *WasmMod, addr: i64, byte: i64) -> i64 { let m: *u8 = ((mod.mem as i64)+addr) as *u8; m[0]=byte as u8; return 0 } called by 1: main |
| 28 | func mr(mod: *WasmMod, addr: i64) -> i64 { let m: *u8 = ((mod.mem as i64)+addr) as *u8; return m[0] & 0xff } called by 1: main |
| 29 | func hexdec(hex: *u8, nbytes: i64, out: *u8) -> i64 |
| 32 | func main() -> i64 |