code wiki / (root) / nx_vitals.nx

nx_vitals.nx

buildroot/runtime/nx_vitals.nx

10784 B263 linesdepth 2pulls 2 transitivereach 2 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_vitals.nx -- metabolic-signature attestation via external instrumentation. Per META-CARDINAL feedback-ecosystem-defense-risk-register-three-fears ยง2.7: external sensors (power / thermal / EM / acoustic / mass / network- tap) compare observed device metabolic signatures against expected envelopes derived from device's Bill-of-Materials. Detects hidden silicon + tampered firmware + Hezbollah-pager-class trigger circuits + supply-chain modifications -- physics doesn't lie. Biology anchor: vital signs (pulse / breath / temperature / blood pressure) are externally-measurable indicators of metabolic state. Predators detect prey via metabolic signatures all the time (pit vipers IR; mosquitoes CO2 plumes; owls heartbeat-through-snow; sharks bioelectric). The active organism cannot fully hide its metabolism from a properly- instrumented observer. The positive-security hardware model: enumerate every legitimate electronic component + its expected power+mass+thermal+RF profile = expected envelope. Any deviation = unaccounted-for component = possible compromise. Physics doesn't lie. Composes: nx_attest_silicon -- vitals-clean elevates trust on commodity host nx_thymus_audit_report -- aggregated vitals metrics + alerts nx_immune -- runtime anomaly fires lysis pathway nx_provenance_chain -- every vitals reading + alert chain-logged V1 ships: - sealed enum of measurement sources (DC_RAIL / AC_WALL / THERMAL / SDR_RF / NETWORK_TAP / ACOUSTIC / MASS) - BOM-envelope struct + per-source expected window (min, max, units) - reading struct + deviation predicate - aggregator across sources + verdict Gap list (V1 honest perf verdict): - per-host BOM is operator-attested + community-maintained; vendor BOMs incomplete; reverse-engineering expensive - statistical-envelope thresholds are caller-supplied (V2 makes per-niche policy from accumulated baseline readings)

dependencies 2 imports · 2 importers

nx_syscalls.nx nx_tier.nx nx_vitals.nx nx_tier2_immune_compose_test.nx nx_vitals_test.nx

imports: nx_syscalls.nxnx_tier.nx

imported by: nx_tier2_immune_compose_test.nxnx_vitals_test.nx

structs

102struct NxVitalsEnvelope
117struct NxVitalsReading

consts

65const NX_VS_DC_RAIL: nx_int = 0
66const NX_VS_AC_WALL: nx_int = 1
67const NX_VS_THERMAL: nx_int = 2
68const NX_VS_SDR_RF: nx_int = 3
69const NX_VS_NETWORK_TAP: nx_int = 4
70const NX_VS_ACOUSTIC: nx_int = 5
71const NX_VS_MASS: nx_int = 6
72const NX_VS_N_SOURCES: nx_int = 7
79const NX_VS_STATE_OFF: nx_int = 0
80const NX_VS_STATE_STANDBY: nx_int = 1
81const NX_VS_STATE_IDLE: nx_int = 2
82const NX_VS_STATE_TYPICAL_LOAD: nx_int = 3
83const NX_VS_STATE_HEAVY_LOAD: nx_int = 4
84const NX_VS_STATE_N_STATES: nx_int = 5
88const NX_VV_WITHIN_ENVELOPE: nx_int = 0
89const NX_VV_LOW_DEVIATION: nx_int = 1
90const NX_VV_HIGH_DEVIATION: nx_int = 2
91const NX_VV_CRITICAL_DEVIATION: nx_int = 3
92const NX_VV_INVALID: nx_int = 99
93const NX_VV_N_VERDICTS: nx_int = 4
113const NX_VS_ENV_BYTES: nx_int = 64
124const NX_VS_RD_BYTES: nx_int = 32

functions

128func nx_vs_source_is_valid(s: nx_int) -> nx_int
called by 1: main
136func nx_vs_state_is_valid(s: nx_int) -> nx_int
called by 1: main
144func nx_vv_verdict_is_valid(v: nx_int) -> nx_int
155func nx_vv_is_concerning(v: nx_int) -> nx_int
called by 2: mainmain calls 1: nx_vv_verdict_is_valid
163func nx_vs_envelope_new(source: nx_int,
185func nx_vs_reading_new(source: nx_int,
204func _vs_deviation(value: nx_size, min_v: nx_size, max_v: nx_size) -> nx_size
called by 1: nx_vs_classify
221func nx_vs_classify(reading: *NxVitalsReading,
241func nx_vs_verdict_priority(v: nx_int) -> nx_int
called by 1: main calls 1: nx_vv_verdict_is_valid
254func nx_vs_classify_off_state_active_ME(dc_rail_ma: nx_size) -> nx_int