Aayush Bankar
← Back to Field Notes
Verifiable Systems•

SPECTRE-PRISM: Architecting a 5-Plane High-Throughput Log Platform with Sub-Millisecond Merkle Transparency

Architecture breakdown of SPECTRE-PRISM: zero-copy SIMD ingestion hitting 13,247 events/s per core, RFC 6962 verifiable transparency ledgers with BLAKE3, Ed25519 quorum attestations, OCSF normalization, and Ratatui TUI with Chain Inspector.

VERIFICATION LEDGER ACTIVE
Inspect Source Artifacts ↗

SPECTRE-PRISM: High-Throughput Verifiable Log Platform

Modern enterprise log ingestion pipelines suffer from a fundamental architectural flaw: unverifiable telemetry. Once an attacker compromises a logging server, historical records can be pruned, reordered, or modified without leaving mathematical evidence of tampering.

SPECTRE-PRISM was architected to solve this problem by establishing a 5-Plane High-Throughput Execution Architecture that generates RFC 6962-compliant Merkle transparency proofs at runtime. Engineered for SIH 2026 (Smart India Hackathon) — cleared internal college round, active in national screening.

The 5-Plane Architectural Blueprint

┌────────────────────────────────────────────────────────────────┐
│  Plane 1: INGESTION (Zero-Copy SIMD Ring Buffer)               │
│  • 13,247 events/s/core sustained                                │
│  • AVX2 SIMD delimiter scan • lock-free MPSC • mmap-backed      │
└────────────────────────────┬───────────────────────────────────┘
                             ▼
┌────────────────────────────────────────────────────────────────┐
│  Plane 2: PARSING (OCSF 1.2.0 Schema Normalization)            │
│  • WASM-embeddable parsers • 2.1µs/event                       │
│  • Structured field extraction without heap allocation         │
└────────────────────────────┬───────────────────────────────────┘
                             ▼
┌────────────────────────────────────────────────────────────────┐
│  Plane 3: NORMALIZATION (Entity Resolution & Enrichment)       │
│  • Streaming join on 50M entity index                          │
│  • Tagging, correlation, geo-IP, threat intel enrichment       │
└────────────────────────────┬───────────────────────────────────┘
                             ▼
┌────────────────────────────────────────────────────────────────┐
│  Plane 4: PROVENANCE (RFC 6962 BLAKE3 Merkle + Ed25519 Quorum) │
│  • Logarithmic inclusion proofs O(log N)                       │
│  • 2-of-3 Ed25519 quorum attestations                          │
│  • Immutable append-only tree heads                            │
└────────────────────────────┬───────────────────────────────────┘
                             ▼
┌────────────────────────────────────────────────────────────────┐
│  Plane 5: PRESENTATION (TUI + Chain Inspector + WebSocket)     │
│  • Ratatui terminal UI • real-time + historical graph explore  │
│  • Export: JSONL, Parquet, CEF, Sigma                          │
└────────────────────────────────────────────────────────────────┘

Plane 1: Zero-Copy SIMD Ingestion Mechanics

To sustain 13,247 events per second per core on consumer hardware (i5-8350U), the ingestion plane completely avoids heap allocation during parsing:

  • AVX2 SIMD vector instructions scan incoming byte streams for delimiter boundaries (\n, \r, \0, custom). 32-byte vector loads process 32 bytes per instruction.
  • Token string views are passed by reference (offset + length) rather than copied into heap strings. Zero allocations per event.
  • Lock-free MPSC ring buffer backed by mmap shared memory prevents GC pauses and thread contention. Producer (network receiver) → Consumer (parser) with cache-line-aligned head/tail pointers.
  • SIMD delimiter scan kernel (pseudocode):
// AVX2: find newline positions in 32-byte chunks
__m256i chunk = _mm256_loadu_si256((__m256i*)ptr);
__m256i newline_mask = _mm256_cmpeq_epi8(chunk, _mm256_set1_epi8('\n'));
__m256i cr_mask = _mm256_cmpeq_epi8(chunk, _mm256_set1_epi8('\r'));
__m256i combined = _mm256_or_si256(newline_mask, cr_mask);
uint32_t bitmask = _mm256_movemask_epi8(combined);
// bitmask bits = delimiter positions

Benchmarks (i5-8350U, 4C/8T, EndeavourOS / Linux 7.1):

Metric Value
Sustained EPS/core 13,247
p99 Latency 840µs
Memory/core 240 MB
CPU utilization 68% (4 cores)

Plane 2: OCSF Schema Normalization

Open Cybersecurity Schema Framework (OCSF) 1.2.0 compliance. Every event is normalized to a canonical schema before entering the transparency ledger:

{
  "class_uid": 1001,
  "class_name": "System Activity",
  "category_uid": 1,
  "category_name": "System",
  "time": 1728931200000,
  "device": { "uid": "host-42", "ip": "10.0.0.42" },
  "actor": { "user": { "uid": "1000", "name": "root" } },
  "process": { "pid": 4102, "name": "epoll_spray", "cmdline": "./exploit" },
  "event_type": "start",
  "message": "epoll UAF triggered",
  "severity_id": 8,
  "metadata": { "version": "1.2.0", "product": "SPECTRE-PRISM" }
}

WASM-embeddable parsers: Each log format (syslog, json, cef, leef, windows evt) has a dedicated parser compiled to WebAssembly. Parsers run in isolated linear memory — 2.1µs/event parsing overhead, sandboxed from the host process.

Plane 3: Entity Resolution & Enrichment

Streaming join against a 50M entity index (IP → ASN, geo, reputation; user → roles, groups; process → MITRE ATT&CK tags):

  • Bloom-filter pre-check (99.7% hit rate) avoids index lookup for unknown entities
  • Roaring bitmap entity sets for fast intersection (correlation queries)
  • Threat intel enrichment from local cve_aggregator database (NVD v2.0 + CISA KEV)

Plane 4: Cryptographic Transparency (RFC 6962 + BLAKE3)

Every batch of N normalized events is committed into a Merkle tree using BLAKE3 (single-threaded 5.2 GB/s, SIMD-optimized):

Merkle Tree Construction:
  Leaf_i = BLAKE3(OCSF_event_i || timestamp_i || prev_leaf_hash)
  Parent = BLAKE3(left_child || right_child)
  Root = BLAKE3(root_left || root_right)

RFC 6962 compliance:

  • Tree heads signed by quorum of authorized verifier nodes via Ed25519 (2-of-3 threshold)
  • Any auditor can request a logarithmic-size inclusion proof (O(log N)) verifying that a specific security event was recorded at timestamp T without trusting the central storage cluster
  • Consistency proofs between tree heads enable detection of fork/tampering

Verification flow:

Auditor requests proof for event at index i
    │
    ▼
Server returns: leaf_hash, sibling_hashes[0..log2(N)], root_hash, signatures
    │
    ▼
Auditor verifies:
  1. Root hash matches signed tree head
  2. Signatures valid under quorum public keys
  3. Merkle path reconstructs root from leaf
  4. Event hash matches provided leaf

Plane 5: Presentation Layer — Ratatui TUI + Chain Inspector

Interactive terminal UI built with Ratatui (Rust):

  • Real-time event stream with syntax-highlighted OCSF fields
  • Chain Inspector tab: historical process graph exploration (nodes = processes/files/sockets, edges = Binder IPC/syscalls). Timeline scrubber with microsecond resolution.
  • WebSocket push from ingestion plane → TUI (sub-second latency)
  • Export formats: JSONL (streaming), Parquet (analytical), CEF (SIEM), Sigma (detection rules)

SIH 2026 Status & Verification Ledger

Metric Value
Status National screening phase (internal round cleared)
Problem Statement NTRO PS-26156: Universal Log Pre-processing Framework
Empirical Claims 42 verifiable claims in ledger
Benchmarks 13,247 EPS/core, 840µs p99, 240 MB/core
Codebase Rust (spectre-agent, spectre-graph, spectre-rules), eBPF-C

Verification artifacts:

  • PROJECT_SUMMARY.md + analyzer.py + eBPF probes in ebpf-c/
  • report.md with 42-claim ledger mapping to benchmarks
  • TUI demo video + Chain Inspector walkthrough

Cross-references: GitHub: spectre-prism · Systems Spec Sheet · SIH 2026 Screening Track