Update README.md
Browse files
README.md
CHANGED
|
@@ -12,52 +12,87 @@ short_description: Ed25519-signed receipts-hash-chained runs-replay-drift diffs
|
|
| 12 |
thumbnail: >-
|
| 13 |
https://cdn-uploads.huggingface.co/production/uploads/685edcb04796127b024b4805/ZH0Us3iUhibRFp7Ct89Bk.png
|
| 14 |
---
|
|
|
|
| 15 |
# AuditPlane — Institution-Grade LLM Decision Proofs
|
| 16 |
|
| 17 |
Ed25519-signed receipts + hash-chained runs + replay + drift diffs + Merkle proofs
|
| 18 |
|
| 19 |
-
Most “LLM firewall”
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
-
What this Space
|
| 22 |
|
| 23 |
-
|
|
|
|
|
|
|
| 24 |
|
| 25 |
-
|
| 26 |
|
| 27 |
-
|
| 28 |
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
-
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
-
|
|
|
|
| 34 |
|
| 35 |
-
|
| 36 |
-
Paste a JSONL prompt suite with one {"text":"..."} per line. Click Generate baseline. Save the baseline receipts JSONL, merkle.json, and proofs.jsonl. This becomes your cryptographic baseline.
|
| 37 |
|
| 38 |
-
|
| 39 |
-
Paste the same suite and the baseline receipts. Click Replay and Diff. You get action drift (ALLOW, CLARIFY, REFUSE), reason code drift, check score and fired drift, and pipeline or configuration drift.
|
| 40 |
|
| 41 |
-
|
| 42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
-
|
| 45 |
|
| 46 |
-
|
| 47 |
|
| 48 |
-
|
| 49 |
|
| 50 |
-
RP_SIGNING_PRIVKEY_B64
|
| 51 |
-
RP_TRUSTED_PUBKEY_B64
|
| 52 |
-
RP_KEY_ID is optional and is just a label for the signing key.
|
| 53 |
|
| 54 |
-
|
|
|
|
| 55 |
|
|
|
|
|
|
|
|
|
|
| 56 |
py -3 -m pip install -U cryptography
|
| 57 |
py -3 -c "import base64; from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey; from cryptography.hazmat.primitives import serialization; priv=Ed25519PrivateKey.generate(); priv_raw=priv.private_bytes(encoding=serialization.Encoding.Raw, format=serialization.PrivateFormat.Raw, encryption_algorithm=serialization.NoEncryption()); pub_raw=priv.public_key().public_bytes(encoding=serialization.Encoding.Raw, format=serialization.PublicFormat.Raw); print('RP_SIGNING_PRIVKEY_B64='+base64.b64encode(priv_raw).decode()); print('RP_TRUSTED_PUBKEY_B64='+base64.b64encode(pub_raw).decode())"
|
| 58 |
|
| 59 |
-
|
| 60 |
-
|
| 61 |
python3 -m pip install -U cryptography
|
| 62 |
python3 - <<'PY'
|
| 63 |
import base64
|
|
@@ -68,16 +103,26 @@ priv_raw = priv.private_bytes(encoding=serialization.Encoding.Raw, format=serial
|
|
| 68 |
pub_raw = priv.public_key().public_bytes(encoding=serialization.Encoding.Raw, format=serialization.PublicFormat.Raw)
|
| 69 |
print("RP_SIGNING_PRIVKEY_B64=" + base64.b64encode(priv_raw).decode())
|
| 70 |
print("RP_TRUSTED_PUBKEY_B64=" + base64.b64encode(pub_raw).decode())
|
| 71 |
-
PY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
|
| 73 |
-
|
| 74 |
|
| 75 |
-
|
| 76 |
|
| 77 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
-
|
| 80 |
|
| 81 |
-
|
| 82 |
|
| 83 |
-
|
|
|
|
| 12 |
thumbnail: >-
|
| 13 |
https://cdn-uploads.huggingface.co/production/uploads/685edcb04796127b024b4805/ZH0Us3iUhibRFp7Ct89Bk.png
|
| 14 |
---
|
| 15 |
+
|
| 16 |
# AuditPlane — Institution-Grade LLM Decision Proofs
|
| 17 |
|
| 18 |
Ed25519-signed receipts + hash-chained runs + replay + drift diffs + Merkle proofs
|
| 19 |
|
| 20 |
+
Most “LLM firewall” projects are easy to argue about and hard to verify. AuditPlane is the verification plane: it turns safety and policy decisions into cryptographically verifiable artifacts that anyone can replay, diff, and falsify. This is not “another detector”. This is a proof layer for whatever detectors you already run.
|
| 21 |
+
|
| 22 |
+
## What this Space does
|
| 23 |
+
|
| 24 |
+
AuditPlane turns LLM decisioning into an auditable ledger:
|
| 25 |
+
|
| 26 |
+
- Generates decision receipts for every prompt in a suite (JSONL)
|
| 27 |
+
- Ed25519-signs each receipt (integrity / non-repudiation)
|
| 28 |
+
- Hash-chains receipts (tamper-evident continuity)
|
| 29 |
+
- Binds receipts to a suite via suite_digest + stable case_id
|
| 30 |
+
- Enforces baseline validation (export is blocked if invalid)
|
| 31 |
+
- Replays the same suite later and produces drift diffs
|
| 32 |
+
- Emits a Merkle root + inclusion proofs
|
| 33 |
+
- Exports a ZIP bundle containing:
|
| 34 |
+
- suite.jsonl
|
| 35 |
+
- baseline_receipts.jsonl
|
| 36 |
+
- merkle.json
|
| 37 |
+
- proofs.jsonl
|
| 38 |
+
- verify_bundle.py (offline verifier)
|
| 39 |
+
|
| 40 |
+
Anyone can take your exported bundle, run verify_bundle.py, and independently confirm signature validity, receipt hash integrity, chain continuity, suite binding, and Merkle inclusion proofs. No Hugging Face trust required.
|
| 41 |
|
| 42 |
+
## What this Space is not
|
| 43 |
|
| 44 |
+
- Not a complete safety solution by itself
|
| 45 |
+
- Not a benchmark leaderboard
|
| 46 |
+
- Not a policy engine
|
| 47 |
|
| 48 |
+
The value here is the receipt contract + replay + drift diff + cryptographic proof layer. Plug your real detector stack into the layer registry.
|
| 49 |
|
| 50 |
+
## How to use
|
| 51 |
|
| 52 |
+
### Baseline
|
| 53 |
+
1) Paste a JSONL prompt suite: one {"text":"..."} per line
|
| 54 |
+
2) Click Generate baseline
|
| 55 |
+
3) Save: baseline receipts (JSONL), merkle.json, proofs.jsonl
|
| 56 |
|
| 57 |
+
### Replay + Diff
|
| 58 |
+
1) Paste the same suite + the baseline JSONL
|
| 59 |
+
2) Click Replay + diff
|
| 60 |
+
3) Inspect action drift, reason-code drift, check drift, and pipeline/config drift
|
| 61 |
|
| 62 |
+
### Export offline bundle
|
| 63 |
+
Export is blocked unless baseline validation passes. The ZIP contains verify_bundle.py so third parties can verify offline.
|
| 64 |
|
| 65 |
+
## Layer contract (what your layers must emit)
|
|
|
|
| 66 |
|
| 67 |
+
Each detector layer/check only needs to output:
|
|
|
|
| 68 |
|
| 69 |
+
- name
|
| 70 |
+
- version
|
| 71 |
+
- score
|
| 72 |
+
- threshold
|
| 73 |
+
- fired
|
| 74 |
+
- optional evidence
|
| 75 |
+
- latency_ms
|
| 76 |
|
| 77 |
+
You can keep detector internals private while still producing verifiable outputs.
|
| 78 |
|
| 79 |
+
## Required Hugging Face Secrets
|
| 80 |
|
| 81 |
+
Set these in the Space settings:
|
| 82 |
|
| 83 |
+
- RP_SIGNING_PRIVKEY_B64 — base64 of 32 raw bytes (Ed25519 private key)
|
| 84 |
+
- RP_TRUSTED_PUBKEY_B64 — base64 of 32 raw bytes (Ed25519 public key)
|
|
|
|
| 85 |
|
| 86 |
+
Optional:
|
| 87 |
+
- RP_KEY_ID — label for the signing key id
|
| 88 |
|
| 89 |
+
## Generate keys (copy-paste)
|
| 90 |
+
|
| 91 |
+
### Windows PowerShell
|
| 92 |
py -3 -m pip install -U cryptography
|
| 93 |
py -3 -c "import base64; from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey; from cryptography.hazmat.primitives import serialization; priv=Ed25519PrivateKey.generate(); priv_raw=priv.private_bytes(encoding=serialization.Encoding.Raw, format=serialization.PrivateFormat.Raw, encryption_algorithm=serialization.NoEncryption()); pub_raw=priv.public_key().public_bytes(encoding=serialization.Encoding.Raw, format=serialization.PublicFormat.Raw); print('RP_SIGNING_PRIVKEY_B64='+base64.b64encode(priv_raw).decode()); print('RP_TRUSTED_PUBKEY_B64='+base64.b64encode(pub_raw).decode())"
|
| 94 |
|
| 95 |
+
### Linux / macOS
|
|
|
|
| 96 |
python3 -m pip install -U cryptography
|
| 97 |
python3 - <<'PY'
|
| 98 |
import base64
|
|
|
|
| 103 |
pub_raw = priv.public_key().public_bytes(encoding=serialization.Encoding.Raw, format=serialization.PublicFormat.Raw)
|
| 104 |
print("RP_SIGNING_PRIVKEY_B64=" + base64.b64encode(priv_raw).decode())
|
| 105 |
print("RP_TRUSTED_PUBKEY_B64=" + base64.b64encode(pub_raw).decode())
|
| 106 |
+
PY
|
| 107 |
+
|
| 108 |
+
## Key hygiene (non-negotiable)
|
| 109 |
+
|
| 110 |
+
- Treat RP_SIGNING_PRIVKEY_B64 as production signing material.
|
| 111 |
+
- Never paste it into issues/logs/screenshots/chat.
|
| 112 |
+
- If it leaks: rotate immediately (new keys → update HF secrets → restart Space → regenerate baselines).
|
| 113 |
|
| 114 |
+
## Offline verification (what the verifier checks)
|
| 115 |
|
| 116 |
+
The exported bundle can be verified without Hugging Face. The offline verifier checks:
|
| 117 |
|
| 118 |
+
- Ed25519 signature validity
|
| 119 |
+
- receipt hash integrity
|
| 120 |
+
- hash-chain continuity (tamper evidence)
|
| 121 |
+
- suite binding (suite_digest + case_id)
|
| 122 |
+
- Merkle root + inclusion proofs
|
| 123 |
|
| 124 |
+
## Deployment rule
|
| 125 |
|
| 126 |
+
No receipt → no claim.
|
| 127 |
|
| 128 |
+
If a system cannot produce signed, chained, Merkle-anchored receipts with replay and diff, its safety claims are not auditable.
|