Skip to main content
attest

Own what you buy. The seller signs a receipt, you hold the file, anyone can verify it offline — even after the store is gone.

Looking for the CI step that signs build artifacts? That is actions/attest, an unrelated project. This attest is about what you buy, not what you build.

You don't own your movies. Not your games, your music or your ebooks either. You clicked "buy", you paid real money, and what you got is a permission slip that lives on someone else's server and can be revoked at any moment. The store folds, an algorithm flags your account, a licensing deal expires — and a library you spent years paying for evaporates. Nobody broke into your house. One click on a machine you'll never see, and it's gone.

None of this was ever a secret: it's in the terms of service nobody reads. But with physical media all but gone, the fine print is starting to bite. Sony mailed account holders a copy of its terms this August; the UK software terms say it outright, in clause 4: "The Software is licenced to you, not sold." Users across Europe and the UK had already been told what that means in practice. PlayStation's own video-content terms say it plainly: "From September 1, 2026, due to our content licensing agreements, you will no longer be able to access your previously purchased content from Studio Canal, and it will be removed from your video library." Films people had paid for — Terminator 2, Total Recall, Paddington — gone, because a licensing deal expired; the notice lists 551 titles by name. No refund was offered, and it was the second time with the same supplier: purchased StudioCanal content was removed once before, in August 2022, and that removal was never reversed. Who gives me back the money I paid for those movies? Who decides whether I keep watching what I legitimately bought? Today the answer is: they do. And Sony is no exception. Weeks earlier, Xbox had pulled three games not just from the store but from the libraries of everyone who'd bought them. Microsoft shut its ebook store in 2019: refunds went out, and every book it had ever sold stopped opening anyway. Amazon once deleted 1984, of all titles, straight off people's Kindles. When Yahoo closed its music store in 2008 it switched off the DRM servers, and songs people had paid for stopped working on any new device. Different store, different medium, same click.

Digital was supposed to set content free. A handful of stores sell honest, DRM-free files; everywhere else it got rebuilt into an instrument of control. attest is the counterattack. It can't win back the libraries already lost; nothing can. But it's built so the next purchase doesn't end the same way: every future purchase gets the one thing every physical purchase always had, a piece that's yours — on your own disk, cryptographically provable, out of reach of anyone's click. "Forever" holds against the store disappearing, not against a live store declaring its own signing key compromised: that declaration invalidates the receipts signed with that key. v0.2 defines a rescue for a receipt logged and anchored before the declaration, and both verifier implementations evaluate that evidence; what is missing sits upstream of them. A verifier looks for it only once it has been given trusted log keys and an anchor policy, and attest issue --log-dir appends a receipt's entry to the issuer's own log as it signs; the bridge does not. What changed is that deriving the entry no longer means writing code — attest log entry --type receipt computes it from the signed envelope, always by rehashing the document rather than trusting a hash it declares, and attest log append takes it from there (or, with issue --log-dir, both in the one command). The log commands can produce an inclusion proof under a signed checkpoint, by receipt or by index. An operator must still obtain an external timestamp and supply the evidence and matching trusted log keys and anchors to a capable verifier. A receipt with qualifying anchored standing can be rescued; an unlogged one cannot. The bridge does not automate these steps, and attest issue automates only the logging half, and the browser and desktop currently pin no block headers. And ok never includes trust (v0.1 §11.1, conformance vector 14b): a verifier that must refuse a receipt reached through a discontinuous key rotation has to name that level itself, with attest verify --reject-trust, which takes the exact values to refuse rather than a threshold. Here's how:

What attest is

When you buy something digital, the seller signs a receipt and hands it to you. That's the whole mechanism. The receipt is a small file: keep it on a disk, in cloud storage, in a backup — anywhere you keep files that matter. Anyone can check it's genuine with free tools, offline, no account needed. If the store closes tomorrow, the receipt still verifies twenty years from now. It's the part of your purchase that survives the store.

This works today wherever files are sold without DRM: GOG-style stores, itch.io, independent publishers selling directly. A seller could start signing this afternoon, without asking anyone's permission. Buy there, download, and keep the file next to the receipt: content plus proof, both in your hands. No store does it yet. The standard, two implementations and the conformance suite exist; the first pilot doesn't.

Closed platforms are the second track. In the EU a trader selling at a distance already has to confirm the contract on a durable medium — Article 8(7) of the Consumer Rights Directive (2011/83/EU, 25 October 2011) — and that confirmation has to carry the information Article 6(1) lists. Article 2(10) defines the medium as one that stores information addressed personally to the consumer, keeps it accessible for as long as it's needed, and reproduces it unchanged. Today that's the receipt email in your inbox. attest is not that confirmation, and the law asks for nothing a machine can verify: a receipt carries only part of what Article 6(1) lists, signed. What attest offers is a format that confirmation could include or travel in — one you keep, that anyone can check unchanged, still valid when the seller is no longer around to ask. That gives regulators a concrete format to point to, and the standard is built for exactly that.

Where this goes: receipts you can pass on to someone else where the rights holder allows it; transfer authority that can outlive the original seller, the hardest open problem on the roadmap; records witnessed by independent parties, so nobody can quietly rewrite them; and publishers signing a pledge, today, that if they ever shut down, their content becomes redistributable and your receipt preserves exactly what the seller signed. Owning digital things the way you own physical ones. That's the destination. The receipt is the first brick.

One thing a receipt is not, and this matters: it is not a backup. If a store dies and you never downloaded the DRM-free file, no signature can conjure it back off a dead server. What survives is the proof — see the FAQ for exactly what that's worth in each case.

There is a way to change that answer, and it now runs rather than being planned: a rights holder can sign a preservation pledge when they sell, and once that pledge fires, an archive holding its own copy can hand the file to whoever proves possession of the private key named in the receipt — and to nobody else. python -m demo.pledge_dies does exactly that, end to end, on your machine. What is missing is not the mechanism: it is a publisher who has signed one, an archive that holds anything, and prose written by a lawyer instead of the placeholder the demo carries. The archive gate the demo runs against is a non-normative reference, not a production gate; it names the three things it does not do in demo/README.md.

attest-receipts on PyPI (issue and verify) and attest-verifier on npm (verify only) are independent Python and TypeScript implementations. Their published self-certification claims are recorded in docs/conformance.md; the corpus now contains 226 leaves, and a release may claim the §20-expanded corpus only once both implementations reproduce all 226. Try it in your browser: https://attest-receipts.org/ — drop a .attest bundle (or the built-in sample) and watch it verify entirely client-side. Be clear about the status: no store issues attest receipts in production yet, and there are no external reviews. The package version and the wire format are different things — receipts declare attest_version 0.1 or 0.2, and old receipts keep verifying under every later release, by design.

If you sell digital files, this is the part that concerns you: signing receipts costs one small self-hosted service next to your existing checkout, and what your customer ends up holding is a receipt file on their own disk — one that verifies offline, with no account and no server, and keeps verifying after your shop is gone. Two packages, and only one of them is published: attest-receipts is on PyPI and gives you the attest command; attest-bridge, the service that turns a paid order into a signed receipt, is not published — its package metadata is marked Private :: Do Not Upload — so never run pip install attest-bridge: that name could resolve to something unrelated. You clone this repository and install from the checkout with pip install ./bridge, which pulls in attest-receipts as a dependency; both need Python 3.12 or newer. Start with bridge/, or tell me what would stop you: GitHub Discussions or bernalli@proton.me. A first seller is worth more to this project than another feature.

Start here

Depending on why you landed on this page:

  • Someone sent you a receipt file and you have no idea what it is. Read Start here. Plain language, no terminal, and it does not assume you have heard of any of this before.
  • You want to see whether it actually works. Open the verifier and drop the built-in sample on it. It takes about thirty seconds, installs nothing, and you can disconnect from the network first — that is the whole point of the thing.
  • You want to know whether any of this concerns you. Read the FAQ. It answers the questions a sceptical person asks first, including the ones where the answer is no.
  • You want the standard. docs/spec/attest-v0.1.md is the normative specification, attest-v0.2.md the additive delta, and docs/spec/vectors/ the conformance corpus every implementation is measured against.
  • You'd be on the verifying end — a marketplace, a successor honouring old purchases, an archive: anyone who will one day have to decide whether a receipt is genuine with no seller left to ask. Discussions is where to say what you'd need from the format.

How it works, for humans

At checkout, the store signs a receipt and hands the buyer an .attest bundle — a small file the buyer keeps anywhere: disk, cloud, USB, wherever. There is no account to keep alive and nothing to sync. Later, anyone with a verifier — a friend, a marketplace, the buyer themself — can check that bundle's signature offline against the issuer's published key material and confirm it is genuine; whether it has since been revoked is only as good as the status material that verifier has, and with none it reports revocation as unknown rather than guessing. If a presenter needs to prove possession of the receipt's binding secret, they can disclose a salt or answer a key challenge. This identifies possession of issuer-recorded material, not the buyer. Nothing in this loop requires a server: there is no central attest authority, no registry that must exist, and no phone-home — a verifier needs only the receipt bytes, the issuer's key material, and, optionally, a revocation feed.

What it is / is not

attest is a normative specification for a signed receipt envelope, a restricted JSON canonicalization profile, a pinned Ed25519 signing/verification ruleset, issuer key/artifact manifests with rotation and compromise handling — including a compromise that is absorbing for whoever has seen it, and time-boxed against anchored evidence rather than retroactive without limit — a layered offline verification algorithm, revocation-by-class semantics, and buyer-binding proof — plus a Python reference implementation and an independent TypeScript verifier.

It is not a DRM-stripping tool, a content host, an index of content, a marketplace, a general resale right (v0.1 defines no transfer at all; v0.2 §17 adds it only where the issuer mediates it), a blockchain or NFT product, or a payment instrument. A receipt is evidence of a license grant, not the artifact itself and not the transaction that paid for it.

None of this bypasses an unwilling seller: a receipt is issuer-signed, and attest cannot conjure a valid one out of a store that refuses to sign. A seller that never issues receipts leaves nothing for a later gate to check, and no amount of protocol fixes that.

Status

Spec v0.1 is complete and v0.2 is specified, with two independent implementations — a Python reference implementation and a TypeScript verifier — measured by the shared conformance corpus, now 226 leaves across 47 groups: 67 of them the v0.1 corpus, the rest exercising v0.2's hybrid signature profile, transparency/anchoring behaviour, the upgrade-policy hardening (mixed-keyset prohibition, artifact-manifest currency, anchor profile v2, logged revocation deadlines), Stage 3 issuer-mediated transfer, Stage 4 preservation pledge, the time-boxed compromise rescue, and publisher authorization. (A v0.1-only verifier is required to reject v0.2 envelopes, so it is measured against the 67-leaf subset.) There are also two end-to-end demos: one deletes a store's entire infrastructure mid-lifecycle and proves the receipt still verifies, and one carries that a step further — a rights holder's preservation pledge fires and an archive hands the file back, but only against the receipt.

The published packages ship all of v0.2: Stages 1 and 2 (hybrid signatures; transparency and anchoring), Stage 3 issuer-mediated transfer (§17), Stage 4 the preservation pledge (§18), the time-boxed compromise rescue (§19) and publisher authority (§20).

Eight pieces of work go beyond what a test suite can show. All of them are on main, and they are linked here rather than left invisible:

  • Formal verification. A Tamarin model of the wire protocol: machine-checked theorems that acceptance implies an issuer signature, that a rotation is accepted only when the previous active key signed it or it carries an explicit compromise flag, and that the reason a revoked key is rejected cannot itself be forged — soundness, not liveness — plus attack exhibits proved reachable rather than argued in prose, plus negative controls that must falsify. Each theorem states its own scope in the theory file; nothing is claimed more broadly there than the prover checked, and a CI checker pins those statements so the claims cannot drift from the proofs.
  • Threat model. 78 attacks catalogued across the whole receipt lifecycle, each either mitigated or recorded as out of scope with a reason, a traceability matrix, and the protocol gaps the exercise found left tracked in the open instead of quietly fixed.
  • Incident runbook. What an issuer does the day a signing key is stolen or lost, in a shopkeeper's language rather than a cryptographer's: why the two cases call for opposite messages to buyers, why securing the domain comes before rotating a stolen key, how to back up the seed, and what one signing key per period can and cannot protect. Read before it is needed, not during.
  • Privacy considerations. Every field classified by what it reveals to which observer, twenty testable privacy claims, and a GDPR annex covering what a receipt deliberately does not record.
  • Transfer economics (non-normative). The market and legal context behind Stage 3's transfer profile — resale velocity, the issuer-royalty incentive, and the CJEU case law (UsedSoft, Tom Kabinet) that makes transfer issuer-mediated rather than a general resale right.
  • Internet-Draft. A snapshot-profile mirror of this specification was submitted to the IETF Datatracker on 2026-08-06 and accepted as an individual submission (Informational, expires 2027-02-07) — it declares that it mirrors v0.1 revision 5 and v0.2 revision 6, so the specification in this repository, not the draft, remains normative, and the published snapshot is several amendments behind it. On the Datatracker that first submission is filed as draft-martinalli-open-purchase-receipts-00. The XML source lives here under the maintainer's current handle and builds clean to txt/html in CI; the next revision will go out under that name, declaring the first as the document it replaces. Being an I-D means the document exists and can be cited as work in progress, nothing more: it is not endorsed by the IETF and has no formal standing in the standards process.
  • Standards-relationship annex. Documents attest's boundary against every adjacent standard people compare it to — W3C Verifiable Credentials, eIDAS 2.0/the EUDI Wallet, JOSE/JWS and COSE, RFC 8785 (JCS), C2PA, SCITT/RFC 9943, and RATS (RFC 9334) — so each comparison is answered once instead of re-argued per issue.
  • Conformance program. One documented command, run with a third party's own adapter against the vector corpus, produces a pass/fail report and a self-certification claim; the recorded pass counts live in that document and must be updated only from a fresh runner report.

Quickstart

Install the reference implementation from PyPI (the distribution is named attest-receipts; the import package and the CLI are both attest):

pip install attest-receipts
attest --help

The TypeScript verifier is on npm as attest-verifier:

npm install attest-verifier

Or work from a checkout of this repo:

uv venv --python 3.12 .venv && uv pip install --python .venv -e '.[dev]'
# or: pip install -e .
.venv/bin/attest --help
.venv/bin/python -m demo.store_dies
.venv/bin/python -m demo.pledge_dies
.venv/bin/pytest --cov=attest --cov-report=term-missing

and a TypeScript verifier quickstart:

cd verifiers/ts && npm install && npm test

See demo/README.md for what each step of the demos proves, and docs/spec/attest-v0.1.md plus its companion JSON Schema for the normative specification. docs/spec/vectors/ holds the conformance corpus every implementation is checked against.

For merchants who'd rather not hand-sign anything, see bridge/README.md.

For anyone wanting to run a witness — the component that cosigns a log's checkpoints so a verifier can tell that somebody else saw the same tree — see witness/README.md. Like the bridge, it is a reference implementation for operators and is not published to any package registry.

docs/spec/attest-v0.2.md is an additive delta specification defining the v0.2 hybrid Ed25519+ML-DSA-65 signature profile (post-quantum-resistant receipts, attest_version: "0.2"); v0.1 receipts remain verifiable forever; later compromise declarations or applicable revocation records can still make them invalid. That profile was Stage 1; Stage 2 — issuer key transparency and timestamp anchoring, where a log corroborates a receipt's existence without ever being able to make an unsigned receipt look authentic — is specified in the same document. Stage 3 — issuer-mediated transfer, giving license.transferable its first real meaning, layered on top of the Stage 2 log — is specified there too (§17); business economics around resale are deliberately out of protocol and live in the non-normative transfer-economics annex.

docs/spec/attest-versioning.md is the normative upgrade policy governing both specifications above: the additive pattern new extensions must follow, the eternal-verifiability guarantee (deprecation may degrade how a conforming receipt's result is classified, never the ability to verify its bytes — verifiable forever is not valid forever), the three-state algorithm lifecycle (active / deprecated / unsafe), the amendment procedure, and the signature-suite, payload-field, revocation-class, log-entry-type, and transfer-type registries.

docs/spec/attest-threat-model.md is the maintained threat model behind the two specifications above — a living normative companion that analyzes their mechanisms rather than imposing requirements of its own — and docs/spec/attest-privacy.md is its privacy-considerations sibling.

The core protocol properties are machine-checked in Tamarin: formal/ holds the model, the property↔lemma↔spec map, and the honest scope of what is and is not proved, gated in CI by a statement-pinning checker.

docs/spec/attest-standards-relationship.md (non-normative) is the boundary annex: in terms an expert in each standard would accept, it states attest's relationship to W3C Verifiable Credentials, eIDAS 2.0/the EUDI Wallet, JOSE/JWS and COSE, RFC 8785 (JCS), C2PA, SCITT (RFC 9943), and RATS (RFC 9334) — including what a future bridge to one of them could look like, where one exists.

Roadmap / north star

Non-normative, and deliberately undated — these are directions, not commitments:

The preservation pledge described under "What attest is" is not listed here: it already runs end to end (python -m demo.pledge_dies) and is part of the standard, not a future direction. What follows is genuinely speculative.

  • Evidence capture for non-cooperating stores. A research track into TLS-session-proof techniques (the zkTLS/TLSNotary class) that could let a buyer capture their own evidence of a purchase from a store that never signs anything, at weaker-than-issuer-signed trust. Legal review is required before any of this is built.
  • Registry / replication layer. An optional layer for replicating verification material, with optional Merkle-root transparency anchoring — separate from the shipped §17.5 chain-of-title audit surface, and still strictly optional.

Licensing, contributing, contact

License. Code is licensed Apache-2.0; the specification and other documentation are licensed CC BY 4.0 — reuse and derivatives of the spec must credit the original author, since attribution is a condition of that license, not a courtesy. NOTICE and AUTHORS carry the required attribution.

Naming. The name attest identifies this project and implementations that actually conform to it; forks are welcome to use the technology but not the name for a divergent derivative. This paragraph is a naming norm, not a trademark registration — real trademark enforcement would require actually registering the mark, which has not happened. Conformance claims follow the self-certification process in docs/conformance.md.

Contributing. See CONTRIBUTING.md. Implementation pull requests must pass all 226 conformance vector leaves and keep both the Python and TypeScript suites green.

Contact. Use GitHub Issues for technical bugs, GitHub Discussions for everything else, or email bernalli@proton.me. Security issues follow a different path — see SECURITY.md, and do not open a public issue for a vulnerability.

Skeptical about any of this? docs/faq.md answers the first questions a reasonable person asks.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

attest_receipts-0.9.4.tar.gz (4.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

attest_receipts-0.9.4-py3-none-any.whl (314.0 kB view details)

Uploaded Python 3

File details

Details for the file attest_receipts-0.9.4.tar.gz.

File metadata

  • Download URL: attest_receipts-0.9.4.tar.gz
  • Upload date:
  • Size: 4.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for attest_receipts-0.9.4.tar.gz
Algorithm Hash digest
SHA256 eceef7916da46be023525677d58a9c8d007a34f755bf82c288a813839b4caeaa
MD5 c16c3e1a26cc44e6c540b06c38af0659
BLAKE2b-256 a3117b3eaf4c52110af8e8d518b85df8565671b652e5879d87effca256ffe07f

See more details on using hashes here.

Provenance

The following attestation bundles were made for attest_receipts-0.9.4.tar.gz:

Publisher: release.yml on bernalli/attest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file attest_receipts-0.9.4-py3-none-any.whl.

File metadata

  • Download URL: attest_receipts-0.9.4-py3-none-any.whl
  • Upload date:
  • Size: 314.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for attest_receipts-0.9.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b98a36b5edb5f66748e3f7b7b75b72aad8d4143ea21c9001c5e57f28894a84cb
MD5 c15968d17e6bb8320cc8158dcefa5d58
BLAKE2b-256 dee9f177f0428d119299f086ad2c550056d6a8c57904c4bac85e3a6c1a8bb53e

See more details on using hashes here.

Provenance

The following attestation bundles were made for attest_receipts-0.9.4-py3-none-any.whl:

Publisher: release.yml on bernalli/attest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.9.7

2 files

0.9.6

2 files

0.9.5

2 files

This release

0.9.4 This release

2 files

0.9.3

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

2 files

0.8.1

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.2

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page