code wiki / _hdl_build / nx_infra_control.nx
nx_infra_control.nx
buildroot/runtime/_hdl_build/nx_infra_control.nx
about
nx_infra_control.nx -- sovereign INFRA-HOST control posture model (operator: "sovereign control of
NAS / router / west-server"). Operationalizes the Trusting-Trust defense at the infra layer: a host is
NOT trusted by NAME ("I am the NAS") but by BEHAVIOR matching spec, and a claim of sovereign control is
REFUSED unless the control path is actually sovereign (not vendor DSM / router firmware / 3rd-party
OpenSSH). Pure logic; the census is DATA (knowledge/registry/infra_hosts.tsv); the gate proves it with a
liar-kill (a false-sovereign claim is caught). NO fabricated exceed -- vendor-dependence today is the
honest BEHIND. license_tier: ORIGINAL Composes the trust-by-behavior law + the sovereign nx_ssh_client.
dependencies 1 imports · 3 importers
imports: nx_syscalls.nx
imported by: nx_host_attest.nxnx_infra_control_test.nxnx_infra_reconcile.nx
structs
| none |
consts
| 11 | const TP_NAME_TRUSTED: i64 = 1 // trusted because it claims an identity (the Thompson danger) |
| 12 | const TP_BEHAVIOR_ATTESTED: i64 = 2 // trusted only by proving behavior matches spec |
| 15 | const CP_VENDOR: i64 = 0 // DSM / router web UI / vendor firmware -- NOT operator-fixable |
| 16 | const CP_OPENSSH: i64 = 1 // 3rd-party OpenSSH transport -- better, still not operator-owned |
| 17 | const CP_SOVEREIGN: i64 = 2 // nx_ssh_client / sovereign organ -- operator-owned bits-up |
| 20 | const SC_NONE: i64 = 0 |
| 21 | const SC_PARTIAL: i64 = 1 // sovereign organ can reach/recon; vendor still owns config/firmware |
| 22 | const SC_FULL: i64 = 2 // driven end-to-end by sovereign organs, no vendor trust-root |
functions
| 25 | func ic_is_sovereign(cp: i64) -> i64 { if cp == CP_SOVEREIGN { return 1 } return 0 } called by 1: main |
| 29 | func ic_false_sovereign(sc: i64, cp: i64) -> i64 { if sc == SC_FULL { if cp != CP_SOVEREIGN { return 1 } } return 0 } |
| 32 | func ic_gap(tp: i64) -> i64 { if tp == TP_NAME_TRUSTED { return 1 } return 0 } called by 1: main |
| 35 | func ic_posture_clean(sc: i64, cp: i64) -> i64 { if ic_false_sovereign(sc, cp) == 1 { return 0 } return 1 } |
| 38 | func ic_coverage_permil(sovereign_hosts: i64, total: i64) -> i64 { if total == 0 { return 0 } return (sovereign_hosts * 1000) / total } called by 1: main |