The Share Protocol is an open specification for consent that can be verified by someone who doesn't trust the party that issued it. It defines how a grant of personal data, or a certified consent record, is committed to with SHA-256 over canonical JSON, chained into an append-only audit log, and anchored in an independent ledger.
The specification lives at shareprotocol.org. This repository is the part that makes it a protocol rather than documentation:
vectors/sp1-vectors.json— machine-readable conformance vectors, generated from a running implementation, never hand-written.verifier-python/— an independent Class V verifier written from the published spec text, with zero dependencies.
36/36 checks passed
Conforms to SP/1 Class V.
That number is the point. The verifier in this repository was written from the specification rather than ported from the reference implementation, and it reproduces every digest the reference produces. A specification that only its author can implement is a file format. This one has two implementations that agree, in two languages, and you can run the proof yourself in about ten seconds.
No install, no dependencies, Python 3.9+:
git clone https://github.com/pryvcbits/share-protocol
cd share-protocol/verifier-python
python -m sp1verify vectors ../vectors/sp1-vectors.jsonCheck a real certificate issued by a live hub:
python -m sp1verify cert cc_uustoe13nr9l4tw99wVerify an exported slice of an audit chain:
python -m sp1verify chain exported-slice.jsonVerify an evidence pack completely offline — no network, no hub, no trust:
python -m sp1verify pack vectors/sample-evidence-pack.jsonOr install it: pip install ./verifier-python, then use sp1verify directly.
| Area | Checks |
|---|---|
| Canonical JSON | Recursive key sorting by UTF-16 code unit, array order preservation, literal UTF-8, control-character escaping, numeric forms |
| Rejections | Non-finite numbers, unsupported types, and cyclic structures must be refused rather than coerced |
| Share fingerprint | Composition and digest; fields order is significant |
| Certificate fingerprint | Composition and digest; entities are sorted, so presentation order is not significant; subject appears only as a hash |
| Audit chain | row_hash = SHA256(prev_hash ‖ canonical_json(event)), genesis rule, continuity, and tamper detection with the correct broken row index |
- Class V — Verifier. Recomputes fingerprints and chain hashes. Needs no account and no relationship with any hub. This repository ships one.
- Class R — Recipient. Receives shares or certificates and retains the evidence.
- Class H — Hub. Issues records, maintains the chain, and anchors it.
Claim conformance by stating class and version: "SP/1 Class V verifier."
| Implementation | Class | Language | Notes |
|---|---|---|---|
| PRYVC | H, R | TypeScript | Reference hub. Operates a consumer network, a browser extension, policy monitoring, revocation with tracked cease notices, and a public ledger. |
sp1verify (this repo) |
V | Python | Independent, zero-dependency auditor's toolkit. |
PRYVC is the most complete implementation and the one that runs a network. It is not the protocol. Anything in this repository can be used to check PRYVC's evidence against PRYVC, which is the entire design intent.
A certificate's public verification record deliberately withholds
business_id and the subject values, so the full fingerprint cannot be
recomputed from public data alone — only the disclosure_hash and the anchor
reference. That is a privacy decision, not an oversight: subject_hash is a
digest over low-entropy fields, and publishing it would let anyone who guesses
a person's details confirm them against it.
Full verification therefore uses an
evidence pack — a
self-contained JSON bundle carrying every committed fact, released to parties
already entitled to see them. vectors/sample-evidence-pack.json is a
conforming example; python -m sp1verify pack recomputes every hash in it
locally, requires no network access, and reports which evidence the pack does
not carry rather than printing a single green tick.
- Specification text and conformance vectors: CC BY 4.0.
- Verifier source: Apache-2.0.
- The protocol steward asserts no patent claims over independent implementations of this specification.
Independent implementations are the most valuable contribution — especially in
Go, Rust, Java, or C#. If your implementation passes vectors/sp1-vectors.json,
open a pull request adding it to the table above.
Errata, ambiguities, and disagreements about the spec text are equally welcome. If two implementers read a sentence differently, the sentence is wrong.
Contact: protocol@pryvc.com