code wiki / _hdl_build / nx_modauth_arm_vault.nx
nx_modauth_arm_vault.nx
buildroot/runtime/_hdl_build/nx_modauth_arm_vault.nx
about
nx_modauth_arm_vault.nx -- PRODUCTION arming: provision an admin with the passphrase sourced from the
SEALED VAULT (the documented machine-key vault, the same one nx_aw_push uses for the NAS password), NOT a
plaintext file. Flow (mirrors nx_aw_push): run nx_machine_key (writes the machine-derived unseal key to
/tmp/nxpass) -> nx_vault open <pw-vault.nv> (decrypts -> /tmp/nxsecret.out, 0600, AES-128-GCM authenticated)
-> read the passphrase -> register -> SHRED /tmp/nxsecret.out immediately. The passphrase never persists as
plaintext; at rest it lives only inside the AES-GCM-sealed .nv. Idempotent (re-run supersedes).
Operator seals their passphrase once (out-of-band): stage it to /tmp/nxsecret.in -> nx_machine_key ->
nx_vault seal <pw-vault.nv>. The keys-bundle + store live in the documented secrets dir (~/.nishi/secrets/).
MUST run with CWD = the nxc2 repo root (the _offc/ helper paths are relative, like nx_aw_push).
argv: [1]=pw-vault.nv [2]=auth-keysfile [3]=auth-storefile [4]=realm [5]=handle [6]=mnemonic-outfile
Sovereign: nx_modern_auth_flow + nx_machine_key.elf + nx_vault.elf + nx_syscalls. license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_modern_auth_flow.nxnx_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
| 15 | const AV_MAGIC_8192: i64 = 8192 |
| 17 | const AV_NXPASS: *u8 = "/tmp/nxpass" |
| 18 | const AV_SECRET_OUT: *u8 = "/tmp/nxsecret.out" |
functions
| 20 | func av_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 21 | func av_w(s: *u8) -> i64 { sys_write(1, s, av_len(s)); return 0 } |
| 22 | func av_unlink(path: *u8) -> i64 { __syscall(263, AT_FDCWD, path, 0, 0, 0, 0) return 0 } called by 1: main |
| 25 | func av_run(path: *u8, a1: *u8, a2: *u8) -> i64 |
| 45 | func main(argc: i64, argv: *i64) -> i64 |