Skip to Content
PoC BatteryP17 — Envelope + Crypto-Shred

P17 — Envelope Encryption + Crypto-Shredding of Weights

Status green · Claim PC15 · Corpus anchor matrix MM-E3; ch.7 decommissioning row · Effort S · Execution host external: omarchy

What it proves

Weights can be encrypted so that retiring them means destroying one small key, not scrubbing disks. You will encrypt a stand-in checkpoint with a random data key (DEK), wrap that key with a master key (KEK), then destroy the KEK and watch every wrong key fail the cryptographic check — the stored blob is inert. That is crypto-shredding: retirement proven by authentication failure, not by trusting a delete call.

Why it matters

Two corpus claims meet here. Encryption at rest is filed as commodity and user-runnable (matrix MM-E3), and ch.7’s decommissioning row demands that “retired bundles stop being recoverable”, with “key destruction records” as the evidence. If the envelope pattern were exotic or the shred unprovable, the textbook’s cheapest weight-protection advice would rest on faith.

Why this, not that

We do (Y)We don’t (X)Because
One-host DEK/KEK with AES-256-GCMRent a cloud KMSThe claim is that the pattern is commodity; a local KEK proves the crypto with no account, and a KMS is the same primitive with an API and an audit log
Prove irrecoverability at the wrap layerDelete files and call it shreddingSSD wear-leveling makes physical erasure unprovable from userspace; the crypto-shred guarantee survives that caveat — no KEK, no plaintext, whatever the flash retains

What you need

  • Python 3.9+ and pip install -r requirements.txt (cryptography). Runs anywhere.

How to run it

  1. pip3 install -r requirements.txt — installs the one dependency.
  2. python3 scripts/envelope_crypto_shred.py — encrypts, unwraps, shreds, and prints both gates.

What “done” looks like

python3 scripts/envelope_crypto_shred.py # MUST print: # POC-P17-OK-ENVELOPE-ROUNDTRIP: KEK unwrap + AES-256-GCM decrypt reproduced the weights # POC-P17-OK-SHRED-IRRECOVERABLE: KEK destroyed; wrapped DEK fails authentication for wrong keys; ciphertext inert

Where the evidence goes

  • evidence/run.log — full output; both gate lines.

What this does not prove

Last updated on
Superdefence II — defensive security research.