code wiki / _hdl_build / nx_profile_backup_gate.nx
nx_profile_backup_gate.nx
buildroot/runtime/_hdl_build/nx_profile_backup_gate.nx
about
nx_profile_backup_gate.nx -- gate for the ENCRYPTED PROFILE BACKUP (R5, "two is one one is none").
Proves on /tmp fixtures with a FIXED test ikm (mechanism proof; the runner uses /etc/machine-id):
T1 backup-with-built-in-roundtrip returns 0 (a backup that doesn't restore is not a backup)
T2 restore to a new file is BYTE-IDENTICAL to the source (binary-safe incl NUL bytes)
T3 NEG: one flipped ciphertext byte -> restore MUST fail (Poly1305 auth = tamper-evident)
T4 NEG: wrong ikm (another machine) -> restore MUST fail (machine-bound)
T5 encrypted-at-rest: the blob must NOT contain the known plaintext marker (it is really encrypted)
expect_exit: 0 license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_profile_backup.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
| none |
functions
| 11 | func t_pw(s: *u8) -> i64 { sys_write(1, s, pb_slen(s)); return 0 } |
| 12 | func t_pn(v: i64) -> i64 called by 1: main |
| 16 | func chk(name: *u8, ok: i64, pass: *i64) -> i64 |
| 21 | func t_contains(hay: *u8, n: i64, needle: *u8) -> i64 |
| 27 | func main() -> i64 |