code wiki / _hdl_build / nx_vault_selftest.nx
nx_vault_selftest.nx
buildroot/runtime/_hdl_build/nx_vault_selftest.nx
about
nx_vault_selftest.nx -- SECURITY SELF-TEST: the vault's three guarantees re-proven mechanically,
so they become a STANDING proof obligation under nx_prove_all (a security property is only real
if it is CONTINUOUSLY re-verified, not asserted once). Exercises the REAL bootstrap-built
_offc/nx_vault.elf via fork/exec (so this gate stays sovereign-buildable -- no crypto import that
hits the nxasm gap). Proves: (1) seal->open ROUNDTRIP recovers the secret; (2) the vault file
holds NO plaintext; (3) a WRONG passphrase FAILS CLOSED (no output). Exit 0 iff all three hold.
license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_syscalls.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
| 9 | const AT_MAGIC_65536: i64 = 65536 |
| 10 | const AT_FDCWD: i64 = 0 - 100 |
functions
| 11 | func _p(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 12 | func vs_run(path: *u8, a1: *u8, a2: *u8) -> i64 |
| 30 | func vs_write(path: *u8, s: *u8, n: i64) -> i64 |
| 37 | func vs_read(path: *u8, out: *u8, cap: i64, lenbox: *i64) -> i64 |
| 47 | func vs_contains(buf: *u8, n: i64, pat: *u8) -> i64 called by 1: main |
| 54 | func vs_unlink(path: *u8) -> i64 { __syscall(263, AT_FDCWD, path, 0, 0, 0, 0) return 0 } called by 1: main |
| 55 | func main() -> i64 |