Metadata-Version: 2.4
Name: proofloop-verify
Version: 0.1.0
Summary: Check PROOFLOOP proofs yourself: offline, open source, no account, no trust in the issuer.
Author: FIRME AI CORPORATION
License: Apache-2.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Security :: Cryptography
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Provides-Extra: crypto
Requires-Dist: cryptography>=41; extra == "crypto"
Dynamic: license-file

# proofloop-verify

**Check a PROOFLOOP proof yourself, offline, without trusting the company that issued it.**

PROOFLOOP finds security bugs, proves each one by running the attack in a sandbox, proves a fix holds, and signs the
result. This package is the other half: small, readable programs that re-check those signed results on your own
machine. They import nothing from PROOFLOOP or CAIN-42, make no network calls (except `sample`, which downloads the
public sample), and exit 0 only when every check passes.

```
pip install proofloop-verify[crypto]        # or: no install, run any file with python3 -I
```

| Command | What it checks |
|---|---|
| `proofloop-verify-pr envelope.json [--commit SHA]` | A pull-request proof (in-toto Statement v1 in a DSSE envelope): pinned key, Ed25519 signature, predicate type, that the findings hash to the signed digest, and optionally the commit |
| `proofloop-verify-eval record.json` | A signed evaluation record; recomputes the headline numbers from the per-finding table instead of trusting the summary |
| `proofloop-verify-precision record.json` | A signed precision-ledger record, same rules |
| `proofloop-verify-pure record.json` | Ed25519 in pure Python (RFC 8032): **no dependencies at all**, runs on Termux/Android or a bare container |
| `proofloop-verify-seal inclusion.json --pinned-pub KEY` | That one record is inside a signed RFC 6962 Merkle tree, and whether that tree head is anchored on the CAIN-42 quorum |
| `proofloop-verify-sample` | Downloads the public sample bundle from three mirrors and runs seven checks, including that a one-byte change is rejected |

Try it on the real records in `samples/`:

```
proofloop-verify-eval samples/fresh-eval-record.json
proofloop-verify-pure samples/fresh-eval-record.json
proofloop-verify-seal samples/seal-inclusion.json --pinned-pub b6hfA2rpAdV29FOdhNXGkk4t91mCV0AnfFYwq0HO0R8=
```

## Pin the key yourself
Every program has the PROOFLOOP public key built in, with its fingerprint
`SHA256:2232b4add9b35d4016e5be270df4ed56e0dc9b39a0530ac69891073253aae90d`. Do not take our word for it: compare it
with the fingerprint published at https://cainstudio.online and pass `--public-key` / `--fingerprint` to use a key
you obtained another way.

## What a PASS means, and what it does not
- **It means** the record was signed by the holder of that key, has not changed by one byte since, and that its
  numbers follow from its own data.
- **It does not mean** the finding is important, that the engine is free of bugs, or that a third party has audited
  PROOFLOOP (none has yet). A signature proves who said it and that it was not altered, not that it is true.
- A record anchored on the CAIN-42 quorum was notarized by a 3-of-4 Byzantine cluster at a point in time;
  consensus notarizes a result, it never changes one.

## Licence
Apache-2.0. Copyright 2026 FIRME AI CORPORATION. "PROOFLOOP" and "CAIN-42" are names of FIRME AI CORPORATION and
are not licensed by the Apache licence. Contributions welcome under the Developer Certificate of Origin; see
CONTRIBUTING.md. Security issues: see SECURITY.md.
