RFTSystems commited on
Commit
0df42c7
·
verified ·
1 Parent(s): eb89536

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +75 -30
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” systems are easy to argue about and impossible to verify. AuditPlane is the missing verification layer: 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 plane for whatever detectors you run.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
 
21
- What this Space does
22
 
23
- AuditPlane turns LLM decisioning into an auditable ledger.
 
 
24
 
25
- It generates decision receipts for every prompt in a suite, Ed25519-signs each receipt for non-repudiation, hash-chains receipts for tamper evidence, binds receipts to a suite via suite_digest and stable case_id, enforces baseline validation so export is blocked if invalid, replays the same suite later and produces drift diffs, emits a Merkle root and inclusion proofs, and exports a ZIP bundle with an offline verifier.
26
 
27
- Anyone can take your bundle, run verify_bundle.py, and independently confirm signatures, hashes, chain integrity, suite binding, and Merkle proofs without trusting Hugging Face or the Space.
28
 
29
- What this Space is not
 
 
 
30
 
31
- It is not a complete safety system, not a classifier benchmark, and not a policy engine. The product here is the receipt contract, replay system, diff engine, and cryptographic proof layer. You plug your own detectors into it.
 
 
 
32
 
33
- How to use
 
34
 
35
- Baseline
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
- Replay and Diff
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
- Export
42
- Export is blocked unless all signatures, hashes, chain links, and suite bindings are valid. The ZIP contains suite.jsonl, baseline_receipts.jsonl, merkle.json, proofs.jsonl, and verify_bundle.py so anyone can verify offline.
 
 
 
 
 
43
 
44
- Layer contract
45
 
46
- Each detection layer only needs to emit name, version, score, threshold, fired, optional evidence, and latency_ms. You can keep all internal logic private while still producing fully auditable outputs.
47
 
48
- HF Secrets required
49
 
50
- RP_SIGNING_PRIVKEY_B64 is base64 of 32 raw bytes for the Ed25519 private key.
51
- RP_TRUSTED_PUBKEY_B64 is base64 of 32 raw bytes for the Ed25519 public key.
52
- RP_KEY_ID is optional and is just a label for the signing key.
53
 
54
- Generate keys on Windows PowerShell
 
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
- Generate keys on Linux or macOS
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
- Key hygiene
74
 
75
- RP_SIGNING_PRIVKEY_B64 is production signing material. Never paste it into logs, issues, screenshots, or chat. If it leaks, rotate immediately by generating new keys, updating HF secrets, and regenerating baselines.
76
 
77
- Offline verification
 
 
 
 
78
 
79
- The exported bundle can be verified without Hugging Face. The verifier checks Ed25519 signatures, receipt hash integrity, hash-chain continuity, suite binding using suite_digest and case_id, and Merkle root inclusion proofs.
80
 
81
- Deployment rule
82
 
83
- No receipt means no claim. If a system cannot produce signed, chained, Merkle-anchored receipts with replay and diff, its safety claims are not auditable.
 
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.