Metadata-Version: 2.4
Name: attest-receipts
Version: 0.9.4
Summary: attest reference implementation: durable, portable proof of purchase you hold — the seller signs a receipt, you keep the file, anyone verifies it offline after the store is gone.
Project-URL: Homepage, https://attest-receipts.org/
Project-URL: Repository, https://github.com/bernalli/attest
Project-URL: Documentation, https://github.com/bernalli/attest/blob/main/docs/spec/attest-v0.2.md
Project-URL: Issues, https://github.com/bernalli/attest/issues
Project-URL: Funding, https://github.com/sponsors/bernalli
Author: Samuele Martinalli
License: 
                                         Apache License
                                   Version 2.0, January 2004
                                http://www.apache.org/licenses/
        
           TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
        
           1. Definitions.
        
              "License" shall mean the terms and conditions for use, reproduction,
              and distribution as defined by Sections 1 through 9 of this document.
        
              "Licensor" shall mean the copyright owner or entity authorized by
              the copyright owner that is granting the License.
        
              "Legal Entity" shall mean the union of the acting entity and all
              other entities that control, are controlled by, or are under common
              control with that entity. For the purposes of this definition,
              "control" means (i) the power, direct or indirect, to cause the
              direction or management of such entity, whether by contract or
              otherwise, or (ii) ownership of fifty percent (50%) or more of the
              outstanding shares, or (iii) beneficial ownership of such entity.
        
              "You" (or "Your") shall mean an individual or Legal Entity
              exercising permissions granted by this License.
        
              "Source" form shall mean the preferred form for making modifications,
              including but not limited to software source code, documentation
              source, and configuration files.
        
              "Object" form shall mean any form resulting from mechanical
              transformation or translation of a Source form, including but
              not limited to compiled object code, generated documentation,
              and conversions to other media types.
        
              "Work" shall mean the work of authorship, whether in Source or
              Object form, made available under the License, as indicated by a
              copyright notice that is included in or attached to the work
              (an example is provided in the Appendix below).
        
              "Derivative Works" shall mean any work, whether in Source or Object
              form, that is based on (or derived from) the Work and for which the
              editorial revisions, annotations, elaborations, or other modifications
              represent, as a whole, an original work of authorship. For the purposes
              of this License, Derivative Works shall not include works that remain
              separable from, or merely link (or bind by name) to the interfaces of,
              the Work and Derivative Works thereof.
        
              "Contribution" shall mean any work of authorship, including
              the original version of the Work and any modifications or additions
              to that Work or Derivative Works thereof, that is intentionally
              submitted to Licensor for inclusion in the Work by the copyright owner
              or by an individual or Legal Entity authorized to submit on behalf of
              the copyright owner. For the purposes of this definition, "submitted"
              means any form of electronic, verbal, or written communication sent
              to the Licensor or its representatives, including but not limited to
              communication on electronic mailing lists, source code control systems,
              and issue tracking systems that are managed by, or on behalf of, the
              Licensor for the purpose of discussing and improving the Work, but
              excluding communication that is conspicuously marked or otherwise
              designated in writing by the copyright owner as "Not a Contribution."
        
              "Contributor" shall mean Licensor and any individual or Legal Entity
              on behalf of whom a Contribution has been received by Licensor and
              subsequently incorporated within the Work.
        
           2. Grant of Copyright License. Subject to the terms and conditions of
              this License, each Contributor hereby grants to You a perpetual,
              worldwide, non-exclusive, no-charge, royalty-free, irrevocable
              copyright license to reproduce, prepare Derivative Works of,
              publicly display, publicly perform, sublicense, and distribute the
              Work and such Derivative Works in Source or Object form.
        
           3. Grant of Patent License. Subject to the terms and conditions of
              this License, each Contributor hereby grants to You a perpetual,
              worldwide, non-exclusive, no-charge, royalty-free, irrevocable
              (except as stated in this section) patent license to make, have made,
              use, offer to sell, sell, import, and otherwise transfer the Work,
              where such license applies only to those patent claims licensable
              by such Contributor that are necessarily infringed by their
              Contribution(s) alone or by combination of their Contribution(s)
              with the Work to which such Contribution(s) was submitted. If You
              institute patent litigation against any entity (including a
              cross-claim or counterclaim in a lawsuit) alleging that the Work
              or a Contribution incorporated within the Work constitutes direct
              or contributory patent infringement, then any patent licenses
              granted to You under this License for that Work shall terminate
              as of the date such litigation is filed.
        
           4. Redistribution. You may reproduce and distribute copies of the
              Work or Derivative Works thereof in any medium, with or without
              modifications, and in Source or Object form, provided that You
              meet the following conditions:
        
              (a) You must give any other recipients of the Work or
                  Derivative Works a copy of this License; and
        
              (b) You must cause any modified files to carry prominent notices
                  stating that You changed the files; and
        
              (c) You must retain, in the Source form of any Derivative Works
                  that You distribute, all copyright, patent, trademark, and
                  attribution notices from the Source form of the Work,
                  excluding those notices that do not pertain to any part of
                  the Derivative Works; and
        
              (d) If the Work includes a "NOTICE" text file as part of its
                  distribution, then any Derivative Works that You distribute must
                  include a readable copy of the attribution notices contained
                  within such NOTICE file, excluding those notices that do not
                  pertain to any part of the Derivative Works, in at least one
                  of the following places: within a NOTICE text file distributed
                  as part of the Derivative Works; within the Source form or
                  documentation, if provided along with the Derivative Works; or,
                  within a display generated by the Derivative Works, if and
                  wherever such third-party notices normally appear. The contents
                  of the NOTICE file are for informational purposes only and
                  do not modify the License. You may add Your own attribution
                  notices within Derivative Works that You distribute, alongside
                  or as an addendum to the NOTICE text from the Work, provided
                  that such additional attribution notices cannot be construed
                  as modifying the License.
        
              You may add Your own copyright statement to Your modifications and
              may provide additional or different license terms and conditions
              for use, reproduction, or distribution of Your modifications, or
              for any such Derivative Works as a whole, provided Your use,
              reproduction, and distribution of the Work otherwise complies with
              the conditions stated in this License.
        
           5. Submission of Contributions. Unless You explicitly state otherwise,
              any Contribution intentionally submitted for inclusion in the Work
              by You to the Licensor shall be under the terms and conditions of
              this License, without any additional terms or conditions.
              Notwithstanding the above, nothing herein shall supersede or modify
              the terms of any separate license agreement you may have executed
              with Licensor regarding such Contributions.
        
           6. Trademarks. This License does not grant permission to use the trade
              names, trademarks, service marks, or product names of the Licensor,
              except as required for reasonable and customary use in describing the
              origin of the Work and reproducing the content of the NOTICE file.
        
           7. Disclaimer of Warranty. Unless required by applicable law or
              agreed to in writing, Licensor provides the Work (and each
              Contributor provides its Contributions) on an "AS IS" BASIS,
              WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
              implied, including, without limitation, any warranties or conditions
              of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
              PARTICULAR PURPOSE. You are solely responsible for determining the
              appropriateness of using or redistributing the Work and assume any
              risks associated with Your exercise of permissions under this License.
        
           8. Limitation of Liability. In no event and under no legal theory,
              whether in tort (including negligence), contract, or otherwise,
              unless required by applicable law (such as deliberate and grossly
              negligent acts) or agreed to in writing, shall any Contributor be
              liable to You for damages, including any direct, indirect, special,
              incidental, or consequential damages of any character arising as a
              result of this License or out of the use or inability to use the
              Work (including but not limited to damages for loss of goodwill,
              work stoppage, computer failure or malfunction, or any and all
              other commercial damages or losses), even if such Contributor
              has been advised of the possibility of such damages.
        
           9. Accepting Warranty or Additional Liability. While redistributing
              the Work or Derivative Works thereof, You may choose to offer,
              and charge a fee for, acceptance of support, warranty, indemnity,
              or other liability obligations and/or rights consistent with this
              License. However, in accepting such obligations, You may act only
              on Your own behalf and on Your sole responsibility, not on behalf
              of any other Contributor, and only if You agree to indemnify,
              defend, and hold each Contributor harmless for any liability
              incurred by, or claims asserted against, such Contributor by reason
              of your accepting any such warranty or additional liability.
        
           END OF TERMS AND CONDITIONS
        
           APPENDIX: How to apply the Apache License to your work.
        
              To apply the Apache License to your work, attach the following
              boilerplate notice, with the fields enclosed by brackets "[]"
              replaced with your own identifying information. (Don't include
              the brackets!)  The text should be enclosed in the appropriate
              comment syntax for the file format. We also recommend that a
              file or class name and description of purpose be included on the
              same "printed page" as the copyright notice for easier
              identification within third-party archives.
        
           Copyright [yyyy] [name of copyright owner]
        
           Licensed under the Apache License, Version 2.0 (the "License");
           you may not use this file except in compliance with the License.
           You may obtain a copy of the License at
        
               http://www.apache.org/licenses/LICENSE-2.0
        
           Unless required by applicable law or agreed to in writing, software
           distributed under the License is distributed on an "AS IS" BASIS,
           WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
           See the License for the specific language governing permissions and
           limitations under the License.
License-File: AUTHORS
License-File: LICENSE
License-File: LICENSE-docs
License-File: NOTICE
Keywords: consumer-protection,digital-goods,digital-ownership,drm-free,ed25519,offline-verification,purchase-receipts,receipts
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Security :: Cryptography
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: jsonschema>=4.21
Requires-Dist: pqcrypto==0.4.0
Requires-Dist: pynacl>=1.5
Provides-Extra: dev
Requires-Dist: dilithium-py>=1.4; extra == 'dev'
Requires-Dist: hypothesis>=6; extra == 'dev'
Requires-Dist: mypy; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: pyyaml>=6; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Description-Content-Type: text/markdown

<img src="https://raw.githubusercontent.com/bernalli/attest/main/logo/banner.png" alt="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`](https://github.com/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](docs/faq.md) 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`](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`](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/`](bridge/README.md), or tell me
what would stop you: [GitHub Discussions](https://github.com/bernalli/attest/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](https://attest-receipts.org/start-here.html). 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](https://attest-receipts.org/) 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](docs/faq.md). 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`](docs/spec/attest-v0.1.md) is the normative
  specification, [`attest-v0.2.md`](docs/spec/attest-v0.2.md) the additive delta,
  and [`docs/spec/vectors/`](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](https://github.com/bernalli/attest/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](formal/attest.spthy).** 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](docs/spec/attest-threat-model.md).** 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](docs/incident-runbook.md).** 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](docs/spec/attest-privacy.md).** 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](docs/spec/attest-transfer-economics.md)**
  (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](ietf/draft-martinalli-open-purchase-receipts.xml) 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](docs/spec/attest-standards-relationship.md).**
  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](docs/conformance.md).** 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`):

```sh
pip install attest-receipts
attest --help
```

The TypeScript verifier is on npm as
[`attest-verifier`](https://www.npmjs.com/package/attest-verifier):

```sh
npm install attest-verifier
```

Or work from a checkout of this repo:

```sh
uv venv --python 3.12 .venv && uv pip install --python .venv -e '.[dev]'
# or: pip install -e .
```

```sh
.venv/bin/attest --help
```

```sh
.venv/bin/python -m demo.store_dies
.venv/bin/python -m demo.pledge_dies
```

```sh
.venv/bin/pytest --cov=attest --cov-report=term-missing
```

and a TypeScript verifier quickstart:

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

See [demo/README.md](demo/README.md) for what each step of the demos proves, and
[docs/spec/attest-v0.1.md](docs/spec/attest-v0.1.md) plus its companion
[JSON Schema](docs/spec/schema/attest-receipt.schema.json) for the normative
specification. [docs/spec/vectors/](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](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](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](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-transfer-economics.md).

[docs/spec/attest-versioning.md](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](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](docs/spec/attest-privacy.md) is its
privacy-considerations sibling.

The core protocol properties are machine-checked in Tamarin: [formal/](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](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](LICENSE); the specification and other
documentation are licensed [CC BY 4.0](LICENSE-docs) — reuse and derivatives of
the spec must credit the original author, since attribution is a condition of
that license, not a courtesy. [`NOTICE`](NOTICE) and [`AUTHORS`](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](docs/conformance.md).

**Contributing.** See [`CONTRIBUTING.md`](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`](SECURITY.md), and
do not open a public issue for a vulnerability.

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