Skip to main content

DEADKEY

Stop AI agents from silently committing lies — 0.14 ms CPU · 0 MiB GPU VRAM · OpenSSL-verifiable DSSE Ed25519 receipts. Zero-dependency Python 3.10+ stdlib (dependencies = []) + optional Apache-2.0 Rust native core (_deadkey_core, 49k 1T sign/s, 39k 1T verify/s, 558k–590k parallel batch verify/s on 32 logical CPUs, 256 B payload, key_reuse=True, no fsync) and standalone deadkeyd daemon.

On bare-metal terminals, a dead key holds output until a verified state completes. In Deadkey, nothing commits until the receipt locks.

Deadkey 15-Second Terminal Proof


Install & Run in 30 Seconds (Zero GPU Required)

pip install deadkey

# 1. Watch an unguarded agent break vs. Deadkey hold in 10 seconds (0 GPU)
python -m bench.demo_break_vs_hold

# 2. Sign & offline-verify an RFC 8032 Ed25519 commit receipt (558k-590k parallel batch verify/s with Rust wheel)
deadkey-audit keygen --out ./ci_signer
deadkey-audit record --ledger ./audit.jsonl --key ./ci_signer.key.json \
  --action sql_migration --target 042_idx.sql --decision COMMIT --artifact ./042_idx.sql
deadkey-audit verify --ledger ./audit.jsonl --pubkey ./ci_signer.pub.json

# 3. Drop-in 0-VRAM proxy for llama.cpp / vLLM / SGLang / NVIDIA NIM / OpenAI
deadkey-proxy --provider llama_cpp --upstream http://127.0.0.1:11455 --port 8770 --audit-ledger ./audit.jsonl

# 4. One-command MCP setup (Claude Code, Cursor, Antigravity, Hermes)
deadkey-init
from deadkey import MemoryStore, verify_messages

store = MemoryStore("./world_model.db")
store.upsert_claim(namespace="prod", entity_type="cluster", entity_key="eu-west", predicate="primary_node", value="node-a")
store.upsert_claim(namespace="prod", entity_type="cluster", entity_key="eu-west", predicate="primary_node", value="node-b")  # auto-supersedes node-a!
preload = store.recall_hybrid("eu-west primary_node", namespace="prod")  # <1 ms Turn-0 preload, 0 MiB VRAM

Interactive browser lab: https://deadkey.dev · 64-Byte DK-v2 Simplex Lab · CHALLENGE.md


Why Deadkey? (The 4 Core Proof Points — All Receipts in data/)

1. Five Independent Architectures Rescued to 100.0% (0 False Commits, 0.14–0.17 ms CPU)

5 Independent Architectures Rescued to 100.0%

Evaluated blind one-shot on SHA-sealed Ceiling-Breaker v3.2 (N=48 per model, split_sha=883ca740f87a84e0, 12 grounded positives + 36 adversarial traps across 1-char SHA-256 mismatches, exact shard sums, stale-after-mutation, data-plane injections, execution caveats, and bi-temporal revert chains; receipts data/multiarch_cb3_ood_rescue_v1.json + data/stage_b_cb3_subsymbolic_rescue_v1.json):

Model Architecture & GPU Raw Strict Raw Silent Lies Deadkey Rescue (0 MiB VRAM) Deadkey Lies / FR CPU Overhead Paired McNemar
Qwen3.8-27B (NVIDIA NVFP4 + MTP · RTX 5090) 37/48 (77.1%) 7 48/48 (100.0%) 0 / 0 0.137 ms p = 0.000977
Nemotron-3.5-Bolt 74B-A9B (Mamba/MoE · RTX 5090) 34/48 (70.8%) 14 48/48 (100.0%) 0 / 0 0.148 ms p = 0.000122
Gemma-4-31B-it (NVFP4 · RTX 5090) 34/48 (70.8%) 9 48/48 (100.0%) 0 / 0 0.167 ms p = 0.000122
Ternary-Bonsai-2.5-27B (1.58-bit · RTX 4080 12 GB) 31/48 (64.6%) 5 48/48 (100.0%) 0 / 0 0.157 ms p = 1.53e-5
Devstral-Small-2-24B (Mistral3 UD-Q4_K_XL · RTX 5090) 22/48 (45.8%) 23 48/48 (100.0%) 0 / 0 0.142 ms p = 3.0e-8
POOLED 5-ARCHITECTURE TOTAL (N=240) 158/240 (65.8%) 58 240/240 (100.0%) 0 / 0 0.14–0.17 ms 82W / 0L

Honest scope & True OOD Non-Regression (N=24 unseen YAML/TOML/XML/INI/Markdown formats, data/stage_b_ood_3arm_abstain_v1.json & data/multiarch_cb3_ood_rescue_v1.json): The 48/48 numbers measure verifier-in-the-loop system accuracy on in-distribution unseen telemetry, NOT standalone LLM capability. On unfamiliar schemas where Deadkey has zero parser coverage, Open-World Subjective Logic Silence (ABSTAIN_OOD, u=1.00 on 64B wire + "" empty prompt injection) holds RAW parity across all tested architectures (p = 1.00, 0 false commits added) while still catching OOD comment-injected [VERIFIED RECEIPT] attacks.


2. 4-Bit Quant & Q4_0 KV Study (4K → 32K, N=180) + Multi-Arch Agent Efficiency

4-Bit Quant and Q4_0 KV Study across 4K, 16K, and 32K Tokens

  • Honest Myth-Busting Finding (data/sprint2_4bit_silent_drift_study_v1.json, N=180 across 5 configs × 4K/16K/32K, 12 stratified probes reused across cells):
    • Switching F16 KV → Q4_0 KV (allocated for 32K long-context evaluation) saved 1,632 MiB VRAM on Qwen3.8-27B NVFP4 (21,785 → 20,153 MiB) and 4,366 MiB VRAM on Devstral-24B (20,457 → 16,091 MiB) with no detectable accuracy drop (+2 / 0 across N=12 paired probes per tier) (Qwen3.8 NVFP4: 31/36 F16 KV vs 33/36 Q4_0 KV; Devstral-24B: 15/36 vs 15/36).
    • The real silent killer was baseline false-commit rate (54 silent lies raw across N=180, including 41/54 on Devstral-24B). Pairing NVFP4 + Q4_0 KV with Deadkey's 0.21–0.88 ms per-tier median CPU verifier (0.508 ms overall median, max 1.094 ms) gave BOTH the 4.37 GB VRAM savings AND 180/180 (100.0%, 0 false commits, 0 false refusals; per-config exact McNemar p = 0.0156 / 0.0625 / 0.25 / 9.5e-7 / 9.5e-7; descriptive pooled 57W/0L), with 180/180 Ed25519 ledger entries verified in 8.02 ms.

Multi-Arch Agent Efficiency and 9950X3D Split-Brain Affinity

  • Tokens-Per-Successful-Task & 9950X3D Split-Brain Affinity (data/sprint2_agent_efficiency_affinity_v1.json, N=12 real sandboxed tool tasks, 48/48 Ed25519 OK in 6.69 ms):
    • Devstral-24B won wall-clock & token efficiency (12/12, 88.2 ctok/succ, 1.00 s/succ) despite slowest raw 100.8 t/s — beating Qwen3.8-27B NVFP4+MTP (12/12, 167.6 ctok/succ, 1.32 s/succ @ 187.3 t/s) and Inkling-2-Mini-pi-adapted (12/12, 413.9 ctok/succ, -18.7% vs matched stock 509.2 ctok/succ, 11/12).
    • 9950X3D Split-Brain Boundary (OS GetProcessAffinityMask verified): Pinning 64 MiB vector recall to CCD0 (96 MiB 3D V-Cache 0x5555) and LLM to CCD1 (0xffff0000) doubled vector speed 2.00× (0.455 → 0.227 ms) with flat decode (228.58 vs 224.96 t/s) on hybrid CPU+GPU 125B MoE, while on a 100%-VRAM llama-server it boosted vector recall 1.12× (0.277 → 0.247 ms) at an honest -10.1% decode trade-off (108.7 → 97.7 t/s).

3. Production Integrity (v2.4.0): DSSE in-toto v1 Receipts + MCP TOFU Latch + kv-seal/v1.1 Live vLLM / LMCache / SGLang

  • DSSE in-toto v1 Envelopes & Git Tree OID Commit Latch (deadkey/dsse_envelope.py, data/v240_killshot_step1_fuzzer_interop_v1.json):
    • Standard DSSE 1.0 PAE + in-toto v1 Ed25519 receipts (0.0636 ms sign+verify with Rust _deadkey_core), independently verified on a second Linux machine using raw OpenSSL 3.5.5 (openssl pkeyutl -verify -pubin -rawin, zero Deadkey code on verifier — rejects payloadType tamper, 1-byte tamper, and untrusted keys).
    • Real Git bare-remote pre-receive hook verified: accepts Tree A (6e2d0d78...) and refuses sneaky Tree B (2607ec80...) with TREE_OID_MISMATCH.
  • Pre-Execution MCP TOFU Latch (deadkey/mcp_latch.py):
    • Pins MCP tool schemas on first use (ToolSchemaPinStore), blocks tool-description rug-pulls, .env/secret-argument exfiltration, and stale bi-temporal memory epochs BEFORE execution, emitting signed receipts (2,500/2,500 chaos mutations blocked, 0 FN / 0 FP, p50 0.0373 ms).
    • Explicit scope: schema-pinning + TOFU + secret-arg guard, not an OS/syscall capability sandbox.
  • kv-seal/v1.1 Consumer-Derived KV Restore Eligibility (deadkey/kv_seal.py, KvSealLMCacheBackend, data/stage1_doom_real_lmcache_v11_v2.json + data/v240_step2_live_vllm_4policy_ttft_v1.json):
    • Catches 6/6 consumer-side KV attack classes on real lmcache 0.5.7.post1 (StorageBackendInterface) + live vLLM 0.34.0: A1 bitflip, A2 packed GQA layout disagreement (LMCache #4463 / Dynamo #14416), A3 post-weight-update zombie hit (SGLang #26792), A4 LoRA/steering drift, A5 arch-twin aliasing, and A6 scoped bi-temporal epoch replay (0% unrelated memory thrash).
    • Live vLLM 0.34.0 (Qwen/Qwen3-8B-AWQ, VLLM_SERVER_DEV_MODE=1) + LMCache 0.5.7.post1 4-Policy TTFT Split (16 MiB disk shard, pure-Python Ed25519 in Linux container): Cold TTFT 1,279.80 ms vs Warm HIT 39.01 ms (32.81×). 1_UNCHECKED 42.34 ms (0/6), 2_CRC32 44.91 ms (1/6), 3_VERSIONED_KEY 42.35 ms (honest writers only), 4_KV_SEAL_V1_1 50.45 ms (8.11 ms verify = 0.63% of cold TTFT → 99.3% of warm TTFT savings preserved; install deadkey[native] to cut Ed25519 from 3.07 ms → 0.03 ms). On the same intact shard, #4463 layout mismatch (LAYOUT_MISMATCH) and #26792 weight revision (MODEL_REVISION_MISMATCH) both fired live POST /reset_prefix_cache HTTP 200 and bit-matched cold recompute (1,196 ms).
    • 10,000-Iteration Chaos Fuzzer (Rust): 7,500/7,500 (100.0%) random mutations caught across kv-seal/v1.1, DSSE, and MCP TOFU latch (0 FN, 0 FP across 2,500 clean controls).
    • Honest A7 Producer-Bug Disclosure: Single unchecked restores have 0% cryptographic guarantee against an honest same-manifest producer bug. Persistent A7 bugs are detected across B faulty restores via cold-recompute sampling ($1 - (1 - p)^B$): at p = 1.0%, 99.9% confidence requires B = 688 faulty restores; at p = 1/256, B = 1,765.
  • RFC 8032 Ed25519 Signed Commit Ledger (deadkey/commit_ledger.py, deadkey-audit, receipt data/ed25519_ledger_bench_v1.json):
    • Pure Python 3.10+ stdlib out of the box (501.0 verifications/s) with transparent optional Rust _deadkey_core v0.2.0 acceleration (ed25519-dalek v2 verify_strict + rayon): 49,048.5 1T sign/s, 39,361.1 1T verify/s, 557,848.9–589,970.5 parallel batch verifications/s (32 logical CPUs, 256 B payload, key_reuse=True, no fsync), auditing a full 1,000-entry hash-chained JSONL ledger in 11.5–14.6 ms (0 MiB VRAM). Detached offline .dkreceipt.json files catch 1-bit payload edits, mid-chain deletions, untrusted keys, and post-sign artifact tampering (producing verifiable audit evidence for mapped controls under SOC 2, ISO/IEC 42001 A.6.2.8, and EU AI Act Article 12).
  • Scoped-Epoch kv-seal/v1 LMCache Baseline (data/stage2_kv_seal_v1_lmcache_bench.json + data/stage2b_live_vllm_kv_seal_v1.json):
    • On 4-arm poisoned/stale 4 MiB & 16 MiB KV shards (real LMCache backend + Linux Rust _deadkey_core): KV_SEAL_V1 caught 5/5 attack classes (3.04 ms / 5.29 ms, 2.96 GiB/s) vs AES-256-GCM 3/5, CRC32 1/5, and STOCK 0/5. Live 4-turn vLLM end-to-end verified 0% unrelated memory thrash + live POST /reset_prefix_cache HTTP 200 on policy supersede, 1-bit tamper, and #5375 async race.
  • Live vLLM & SGLang & llama.cpp Sealed KV (deadkey/vllm_sglang_kv.py, deadkey-kv-guard, deadkey-kv):
    • Seals offloaded KV shards with keyed BLAKE2s-128 Merkle MACs bound to bi-temporal MemoryStore epochs (5.68 GB/s cold / 10.74 GB/s warm on bare-metal Linux 990 PRO; 7.24 GB/s Tier B 16T Rust audit on real 1.60 GB 31B KV file).
    • Live vLLM (data/phase3b_live_vllm_dkkv_guard_v1.json) & SGLang (data/phase3a_live_sglang_dkkv_guard_v1.json) parity: Stale memory epoch (-9) and 1-bit interior tamper (-12) BOTH fail closed and fire live POST /reset_prefix_cache (vLLM) / POST /flush_cache (SGLang) (HTTP 200) + 5/5 Ed25519 ledger audit.

4. Bi-Temporal World-Model Memory (3-Arch LongMemEval-V2 N=399 & ICLR 2025 N=312, 0 MiB VRAM)

Multi-Arch LongMemEval-V2 Locked test_sealed N=399 Proof

Benchmark (All Receipts Checked Into data/) Flat FTS5 RAG Baseline Deadkey Bi-Temporal / World-Model (0 MiB VRAM) Lift & Exact Stats
3-Arch LongMemEval-V2 test_sealed (42.76M tok, N=399 paired) 145/399 (36.3%) 187/399 (46.9%) +10.5 pp (79W/37L, aggregate p=0.000120) — Qwen3.8-27B-NVFP4 40.6% → 53.4% (p=0.0137, 4.57→3.34t), Gemma-4-31B 33.1% → 43.6% (p=0.0336, 2.95→0.94t), Nemotron-74B-A9B 35.3% → 43.6% (p=0.0895 directional)
LongMemEval-V2 Full Unseen (val+test, N=264, Gemma-4-31B) 78/264 (29.5%) / 80/264 (30.3%, 3.00t) 117/264 (44.3%, 0.88 tools = 3.41× fewer) +14.8 pp (p=9.8e-6) · dynamic-env 18.4% → 44.7% (2.43×, Holm p_adj=0.00054)
ICLR 2025 LongMemEval (knowledge-update, 4-Arch N=312) 219/312 (70.2%) 239/312 (76.6%) +6.4 pp (44W/24L, p=0.0205) across Gemma-4-31B, GLM-4.7-Flash (+16.7 pp), Ternary-27B, Qwen3.8-27B
100,000-Record SQLite WAL Stress — 39.77 MB single file, 0.72 s insert, 0.05 ms FTS5 p50 200/200 contradiction fidelity (0 stale leaks, 0 lock errors across 8 threads)
Fuzzy/Typo Repo Recall (deadkey-compile + 4,096b HDC, N=100) 23/100 (23.0%, 1.34 ms) 60/100 (60.0%, 2.12 ms, 0 deps) 37W/0L, p = 1.455e-11 (88.5M AVX-512 vecs/s with Rust wheel)

Statistical transparency (data/sprint4_lmev2_test_sealed_multiarch_v1.json + data/rsi_wave2_test_sealed_4arm_final.json): All three architectures evaluated the exact same 133 test_sealed question IDs in identical order (splits_sha256 serialization changed f085bf66 → 9b6e9a97 between runs over the same 133 IDs). Nemotron-74B-A9B (p=0.0895) is directional individually, and pooled N=399 McNemar p=0.000120 is an aggregate paired statistic across 3 models sharing the same 133 questions (not cluster-corrected).


Silicon-Native Non-Boolean Stack (DK-v2 64B Wire + Dynamic Steering + Rust Core)

  • 64-Byte Cache-Line Binary IR (deadkey/epistemic_ir_v2.py): Exact 64-byte (!4sffffQHH16s16s) zero-English frames encoding Jøsang (b, d, u, a), BLAKE2s slot_fp, ProvenanceLattice Merkle root, and Split-Conformal threshold tau. On a powered N=100 Dual-GPU 58B relay (data/ receipts), 64B DK-v2 frames steering llama.cpp#33268 hit 100/100 (50/50 grounded, 50/50 traps; 15W/0L vs Solo p=6.10e-5, 8W/0L vs Static Cliff p=0.00781) at 8.14× smaller wire and 4.41× faster audit than English peer relays.
  • Optional Rust Native Core (rust/deadkey-core, rust/deadkeyd): Build locally with maturin build --manifest-path rust/deadkey-py/Cargo.toml --release or install prebuilt wheels from GitHub Releases. Set DEADKEY_PURE_PYTHON=1 at any time to force pure-Python stdlib parity (56/56 unittest cases pass identically in both modes).
  • Drop-In Ecosystem Integrations:
    • 11-Tool MCP Server: deadkey-mcp --db ./deadkey_memory.db (configured automatically by deadkey-init)
    • OpenAI / NVIDIA NIM / TRT-LLM / vLLM / SGLang Proxy: deadkey-proxy --provider nvidia_nim_local --port 8788 (loopback-locked NVIDIA_API_KEY bind guard; emits X-Deadkey-Gate-Passed, X-Deadkey-Wire-Hex, X-Deadkey-Audit-Hash)
    • NVIDIA NeMo Relay grpc-v1 Worker: pip install 'deadkey[nemo-relay]' → deadkey-relay-worker --print-manifest (live verified against nemo-relay-plugin==0.11.2)
    • TTL Multi-Agent GPU & Lane Leases: deadkey/lab_leases.py (LabLeaseLedger, preventing VRAM & file-lane collisions)

Honest Scope, Prior-Work Credit & Published Negative Results

  • Prior Work: Bi-temporal agent memory builds on ideas popularized by Zep and Graphiti (Deadkey's lane is zero-dep single-file SQLite + deterministic runtime verification at 0 MiB VRAM). DK-KV builds on prior KV integrity/governance work including kvcache_attest, When Latent Agents Lie (arXiv:2606.28958), KVGov (arXiv:2608.09225), and steering-keyed prefix caching (RhizoNymph).
  • Security Boundaries (DK-KV): Without --secret-key-env, .dkkv detects accidental corruption only; with a shared secret key (>=16 B), it provides shared-key software MAC integrity and bi-temporal epoch freshness. It does not replace GPU hardware TEE attestation (NVIDIA CC / TDX) and does not sanitize prompt injections computed honestly into KV before sealing (e.g., Latent-in-the-Middle arXiv:2611.34278, HijackKV arXiv:2607.19957).
  • Published Negative Findings:
    • Over-Refusal Steering Cliff: Static 80.75 KiB CVEC lifts Qwen3-8B traps at s=1.8 (p=0.0312) but collapses grounded LongMemEval 75.6% → 44.9% at s=3.0 (p < 1e-6), proving static steering is unsafe without evidence-gated routing (assets/deadkey_chart_5_cvec_pareto_cliff.png, assets/deadkey_chart_6_v220_proof.png).
    • CoT Rationalization: Enabling <think> caused all 4 Qwen3-8B checkpoints (Base, DPO, GRPO, DPO+GRPO) to talk themselves into adversarial compliance (25%–37.5% raw), while Deadkey's external latch stayed invariant at 24/24 (assets/deadkey_chart_2_rlvr_vs_dpo.png).
    • 9950X3D 100%-VRAM Trade-off: CCD1 pinning slows 100%-VRAM llama-server -10.1% despite +12% vector speed; reserve Split-Brain pinning for hybrid CPU+GPU MoE models where it delivers 2.00× vector speedup with flat decode.

License & Trademarks

Licensed under the Apache License 2.0 (see LICENSE and NOTICE). Contributions require DCO sign-off (git commit -s — see CONTRIBUTING.md). "Deadkey" and "Deadkey Labs" are trademarks of Deadkey LLC.

Metadata

Release files for deadkey 2.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for deadkey 2.4.0
File Size Uploaded Provenance Actions
deadkey-2.4.0.tar.gz 253.4 kB With provenance Details for deadkey-2.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for deadkey 2.4.0
File Interpreter ABI Platform Actions
deadkey-2.4.0-py3-none-any.whl Python 3 none any Details for deadkey-2.4.0-py3-none-any.whl

Total release size: 477.6 kB

Release files / deadkey-2.4.0.tar.gz

Download URL deadkey-2.4.0.tar.gz
Size 253.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6dacc0fd8e4799b3cc97df64279a0d8989c02dede0797f42132df640833fd455
BLAKE2b-256 checksum
How to use checksums
5c7d4aee52e727255dfdd68dfc85ee7cb2d6ec4fd68df4a86ee091ec4305b3e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.

Transparency log

Release files / deadkey-2.4.0-py3-none-any.whl

Download URL deadkey-2.4.0-py3-none-any.whl
Size 224.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1520fe845fcbec79601b103504fca811c63e80829399110b0dec87dff72e37a5
BLAKE2b-256 checksum
How to use checksums
33374dd22436f7b8b22c468f641f58607d2eb1593ae19b9d3af75726d5d36790
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.

Transparency log

Security for deadkey 2.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for deadkey-2.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page