nx_pamp_meta.nx
buildroot/runtime/nx_pamp_meta.nx
about
nx_pamp_meta.nx -- FALSE-pattern detection (deepest layer).
Per [[feedback-unified-immune-architecture-three-tier]] item 2.3:
"DEEPEST LAYER recognizing FALSE patterns themselves; deception
requires maintenance + maintenance leaves traces; statistical-
ensemble across byte+structural+behavioral+temporal+side-channel;
disguise can hide in one channel not all."
nx_pamp catches KNOWN attack patterns (NOP sled, homoglyph, etc).
nx_pamp_meta catches DECEPTION ITSELF -- the subtle inconsistencies
that arise when something is pretending to be what it's not. A
sophisticated mimic can fool one channel (byte pattern); few can
fool ALL channels (byte + timing + structure + entropy + relational).
THE STRATEGIC INSIGHT (per user 2026-05-19 mimicry directive,
applied INVERSELY here): if WE can fool vendor scanners through
mimicry, then ANY adversary trying to fool US faces the same
problem -- their disguise has to be consistent across multiple
orthogonal channels, and maintenance of multi-channel consistency
is exponentially harder than single-channel.
V1 channels measured:
1. BYTE_DISTRIBUTION -- chi-squared deviation from expected
distribution for declared content type
2. STRUCTURAL_SHAPE -- field count + nesting depth + size ratios
3. TIMING_VARIANCE -- inter-arrival timing of bytes in stream
(real systems have hardware-jitter
signature; emulated ones don't)
4. ENTROPY_PROFILE -- entropy at start vs middle vs end
(legitimate content has a profile;
packed/encrypted has different profile)
Cross-channel consistency check: each channel returns a per-channel
"looks legit" Q10 confidence; the META verdict is HIGH-DECEPTION
when channels DISAGREE strongly (one says legit, another says fake)
even if each individual channel passes its own threshold.
Composes:
nx_pamp -- shipped V1; meta layer LAYERS ATOP pamp
(pamp is single-channel; meta is multi-channel)
dependencies 3 imports · 4 importers
imports: nx_syscalls.nxnx_tier.nxnx_pamp.nx
imported by: nx_antibody.nxnx_pamp_meta_test.nxnx_tier1_immune_compose_test.nxnx_tier2_immune_compose_test.nx
structs
| 101 | struct NxChannelReading |
consts
| 79 | const NX_PCM_BYTE_DISTRIBUTION: nx_int = 0 |
| 80 | const NX_PCM_STRUCTURAL_SHAPE: nx_int = 1 |
| 81 | const NX_PCM_TIMING_VARIANCE: nx_int = 2 |
| 82 | const NX_PCM_ENTROPY_PROFILE: nx_int = 3 |
| 83 | const NX_PCM_N_CHANNELS: nx_int = 4 |
| 87 | const NX_PCM_CONSISTENT: nx_int = 0 // all channels agree |
| 88 | const NX_PCM_SUSPICIOUS: nx_int = 1 // mild disagreement |
| 89 | const NX_PCM_HIGH_DECEPTION: nx_int = 2 // strong disagreement |
| 90 | const NX_PCM_UNKNOWN: nx_int = 3 // insufficient data |
| 91 | const NX_PCM_N_VERDICTS: nx_int = 4 |
| 115 | const NX_PCM_VARIANCE_THRESHOLD_LOW: nx_int = 200 // < 200 = CONSISTENT |
| 116 | const NX_PCM_VARIANCE_THRESHOLD_HIGH: nx_int = 500 // > 500 = HIGH_DECEPTION |
functions
| 120 | func nx_pcm_channel_is_valid(c: nx_int) -> nx_int called by 1: main |
| 126 | func nx_pcm_verdict_is_valid(v: nx_int) -> nx_int called by 1: main |
| 138 | func nx_pcm_reading_new(byte_dist_q10: nx_int, |
| 162 | func _pcm_mean_q10(r: *NxChannelReading) -> nx_int called by 1: nx_pcm_max_disagreement_q10 |
| 174 | func _pcm_abs_diff(a: nx_int, b: nx_int) -> nx_int called by 1: nx_pcm_max_disagreement_q10 |
| 186 | func nx_pcm_max_disagreement_q10(r: *NxChannelReading) -> nx_int |
| 217 | func nx_pcm_verdict(r: *NxChannelReading) -> nx_int |
| 233 | func nx_pcm_deception_q10(r: *NxChannelReading) -> nx_int |