Skip to Content
PoC BatteryP16 — Model Signing

P16 — Model-Artifact Signing + Safe-Serialization Screening

Status green · Claim PC14 · Corpus anchor maturity matrix MM-E16 · Effort S · Execution host external: omarchy

What it proves

A model file can be signed so that any later tampering is caught at verify time, and a dangerous pickle file can be spotted without opening it. You will sign a stand-in weights file with Ed25519, watch a one-byte change get rejected, and statically flag a pickle that carries executable opcodes — the two halves of the corpus’s “model-artifact signing and safe serialization ship today” row.

Why it matters

The book’s attribution family rests on a simple claim: integrity tooling for model artifacts is not hypothetical — it is on PyPI today (matrix MM-E16). If a normal user could not sign a model and catch tampering on their own machine, the “exists today” column would be wrong and the textbook’s procurement advice with it. The pickle half is why the corpus recommends safetensors: pickle files are programs, and you can prove that to yourself without running one.

Why this, not that

We do (Y)We don’t (X)Because
Ed25519 sign/verify via the cryptography packageInstall the alpha model-signing wrapperThe load-bearing fact is that the primitive ships today; the wrapper’s alpha status is the row’s own stated gap, so depending on it would prove less
Screen the risky pickle statically with pickletoolsActually unpickle a hostile stand-inThe opcode shape (REDUCE, STACK_GLOBAL) is the evidence; running the payload adds risk and proves nothing extra

What you need

  • Python 3.9+ and pip install -r requirements.txt (cryptography). No network, no hardware — runs on the Linux server and on this Mac.

How to run it

  1. pip3 install -r requirements.txt — installs the one dependency.
  2. python3 scripts/sign_verify.py — runs both demos and prints all three gates.

What “done” looks like

python3 scripts/sign_verify.py # MUST print: # POC-P16-OK-SIGN-VERIFY: ed25519 signature over model artifact verifies # POC-P16-OK-TAMPER-REJECTED: single-byte modification rejected at verify # POC-P16-OK-PICKLE-FLAGGED: executable opcodes [...] flagged statically; payload never executed

Where the evidence goes

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

What this does not prove

  • Screening is detection, not a sandbox: pickletools catches known-executable opcodes. It is not a proof that every hostile pickle is caught — the fix is not loading pickle at all, which is the safetensors argument.
  • The upstream wrapper (model-signing on PyPI) is self-classified “Development Status :: 3 - Alpha” with no adoption record — this run proves the primitive layer only, exactly the gap the matrix row names.
Last updated on
Superdefence II — defensive security research.