Security, and what it rests on
Grantstamp records who claims to own what, so it has to be harder to cheat than to trust. This page says what holds today, what is planned, and what the design cannot do. It was last revised for version 0.3.
Can the registry change its own records?
Not without being caught, and not at all for a stamp's contents. You do not need to take that on trust.
Stamps are signed by their owners
The owner's client signs the title, version, policy and the list of file hashes. The registry stores that signature and publishes it. To invent or alter a stamp, the registry would need the owner's private key, which never leaves the owner's machine.
History is chained and witnessed
Every change is an entry in a log where each entry seals the one before. A job outside the registry saves the signed head to a public repository each day and anchors it to Bitcoin, so rewriting history afterwards would be detected.
The owner's key is tied to their domain
The DNS record that verifies an owner contains the id of the owner's key. Anyone can read it from DNS, which the registry does not control.
pip install grantstamp
grantstamp audit stamp_m6q21daksxa188bx
That command checks all of it and exits with an error if anything is off. What it checks, step by step
What this does not cover yet
- Fingerprints are never published, so nobody outside can confirm that none were removed. An owner can check their own stamp at any time by checking their own build.
- Stamps registered with version 0.1 carry no owner signature until their owner adds one with
grantstamp attest. - An owner who loses their key can replace it with
grantstamp owner recover, but only after a week's wait in which the current key can cancel. Several keys per owner, which would make the wait unnecessary, are planned. - The daily witness is kept in the project's own repository. The Bitcoin timestamp and the public archives make a rewrite detectable, and anyone can keep a witness file of their own.
Attacks we expect
A registry like this will be probed, flooded and lied to. Here is each attack and what stands in its way.
In place today Planned
Knocking the service offline
Flooding the registry with requests so that agents cannot check.
- Rate limits per caller In place
Anonymous callers get 30 requests a minute. The limit follows the caller's real network address (a whole /64 for IPv6), which cannot be forged by adding a header.
- Proof of work In place
A caller who hits the limit can earn more by solving a short puzzle. Occasional users pass; bulk traffic gets expensive.
- Agents say when they cannot check In place
If the registry is unreachable, the MCP server tells the model that ownership could not be checked and must not be assumed absent. The hook can be set to block.
- A shield and more than one server Planned
Today the public registry is one small server with a managed database. A determined flood would take it offline until it stopped. No stamp would be lost or changed.
Claiming what belongs to someone else
Registering a popular build first, or under a false name.
- Owners are on record In place
Nobody can stamp without an identity on record, a public contact and accepting the Terms. The stamp page says exactly what was checked: a LinkedIn sign-in, a check by the registry, or a publisher's code-signing certificate.
- No conflicting stamps In place
A registration that conflicts with an earlier stamp is refused before anything is stored, with the earlier owners and their contacts listed. Owners can share content only under the same policy.
- Publisher signatures In place
The registry verifies the signatures on signed Windows executables, including revocation, and shows who published them. A stamp held by someone else is marked, agents are told to ask, and the proven publisher can register over it.
- Proof by code-signing certificate In place
An owner can sign a challenge with the certificate that signs their builds. This is the strongest identity level.
- Domain age In place
A verified domain is shown with its registration date. Domains under 90 days old do not count yet, and free subdomains are refused.
- Cases and notices In place
Anyone can open a case. A person reviews it. Only a notice from the registry starts a deadline; an unanswered notice or an upheld case suspends the stamp. Every step is logged.
- Fair-use ceilings In place
Each owner has a ceiling on stored fingerprints, far lower before a domain is verified. Owners without a verified domain also share one pool, so opening many accounts gains nothing.
- Identity verified by a third party Planned
A one-time LinkedIn sign-in confirms an account, not a person. Stronger third-party identity checks will be added as they become available.
Probing until a copy stops matching
Editing a file and checking again and again to find what evades detection.
- Coarse answers for anonymous callers In place
Bands only, no scores, and low bands are hidden.
- Probing alerts In place
Five near-misses against one stamp from one caller within an hour alerts the owner.
- Fingerprints never leave In place
No endpoint returns them. Exact hashes can be looked up only by a five-character prefix.
- Per-stamp query budgets Planned
A ceiling on how often any one stamp can be tested by unidentified callers.
Stolen keys and forged requests
Taking over an owner's account, or imitating the registry.
- Signed requests In place
Every change is signed with Ed25519 (RFC 9421) over the method, host, path and body, valid for five minutes, with a nonce against replay.
- A stolen registry key cannot forge stamps In place
It could forge receipts and log heads until rotated, but not owner signatures. The key is kept outside the database.
- Suspension In place
The operator can suspend an owner or a stamp. The suspension is logged.
- Recovering a lost key In place
A new key takes over only after proof through the owner's verified domain, the LinkedIn account on record, or the operator, and after a week in which the current key is alerted and can cancel.
- Key rotation by owners Planned
Several keys per owner, and replacing a key without the waiting period while the old one still works.
Turning the registry against others
Using it to reach internal systems, or to trick agents into refusing lawful work.
- Outbound requests are fenced In place
Webhooks and domain checks must use HTTPS, must resolve to public addresses and never follow redirects. Lookups of a domain's age go to the public registration services, and revocation lists are fetched only from addresses named in certificates that chain to a trusted authority.
- A notice alone cannot block In place
A copied ownership notice in an unrelated file gives at most a medium match, which means ask, never deny.
- Shared code is discounted In place
Features held by three or more owners are ignored, and common runtimes are left out by default.
- Lawful uses have a path In place
Accepted purposes and licence tokens let researchers and licensees through.
- Owners' words are data In place
The guidance agents receive is in the registry's own wording. Titles, names and policy messages come in separate fields marked as written by owners, and are kept to one line.
- Questioned claims ask, not refuse In place
When a file's signer is not proven to be the stamp's owner, or a notice about the stamp is open, agents are told to ask their user instead of refusing.
Tampering with releases
Publishing a doctored client or server.
- No upload tokens to steal In place
Releases are built and published by CI through PyPI trusted publishing.
- Dated public archives In place
Every release is archived with a DOI and in Software Heritage, so a release can be compared with its archived copy.
- Signed release artefacts Planned
Build provenance attached to each package.
What the registry holds, and what it never sees
It holds
- Hashes of chunks, strings and code patterns from registered files
- Each stamp's title, version and policy
- Each owner's name, website, contact addresses and public key
- The identity each owner put on record, and the level at which it was checked. Names from a LinkedIn sign-in are seen only by the operator.
- The publisher named in the signature of each signed executable, and any fingerprint procedure an owner published
- For checks that match a stamp, an event with a caller id that differs for each owner and changes every day; events are deleted after a year
It never sees
- The files, in whole or in part
- The files a person checks, or their names: only hashes are sent, and the bundle is not kept
- Private keys of owners or agents
- Who a caller is, unless they choose to sign their requests
It runs no AI
Matching, policy decisions, signing and storage are ordinary deterministic code. No language model sits between a question and its answer, or has access to fingerprints or keys.
Withdrawing a stamp deletes its fingerprints. The record that it existed stays in the log.
Measured, not promised
Two benchmarks ship with the code. Anyone can rerun them. They are small, and the numbers say so.
Does it catch copies without catching strangers?
- Variants of a registered test game: other compilers and settings, stripped, patched, half the strings rewritten, ported, decompiled
- 11 of 11matched high or exact
- 400 unrelated programs checked against 60 registered ones
- 0matched at medium or above across different source packages
- The same 400, counting programs built from the same source
- 21matched at medium or high; they share real code
Full detection results. The test game is a small C program, so this shows the method works, not how it fares on a commercial title.
How fast, and how big?
On 27 November 2026, with version 0.3.1, 3,000 real executables and libraries (1.1 GB) were registered as 120 stamps on PostgreSQL 16. The registry, the database and the caller shared one 2-CPU machine. Requests were signed and sent over real HTTP.
| Request, one caller at a time | Median | 95th percentile | 99th percentile |
|---|---|---|---|
| Check a registered file | 12 ms | 66 ms | 161 ms |
| Check an unrelated file | 8 ms | 40 ms | 60 ms |
| Exact lookup by hash prefix | 1.0 ms | 1.5 ms | 2.3 ms |
| Search stamps by title | 1.7 ms | 2.2 ms | 2.5 ms |
- Fingerprinting a file before a check
- 14 msfor a typical 350 KB executable; 23 MB a second on one core
- Checks a second, one server process
- 65falling to 61 with 16 callers at once; checks run one at a time for now
- Registering
- 62 files a secondincluding the owner's signature and the check for conflicting stamps
- Verifying the whole log
- 0.01 sfor 160 entries
Full load results and method. Times are round trips on one machine; over the internet, add the network.
How far it scales, plainly
Tested
3,000 registered files holding 2.5 million fingerprint features, with one server process and one database connection.
What a stamp costs to keep
About 76 KB of database for each registered executable, or 92 bytes per feature. Art and data files cost much less per megabyte, because only their chunks are hashed: by the same arithmetic, roughly 16 MB of database per GB of content, which is an estimate and not a measurement. The status page shows the live database size.
Not tested
Anything beyond that. The current design is one database with one index entry per feature. It will serve thousands of stamps. It will not serve billions of files without the changes below.
The path from here
More of the same
A connection pool, more than one server, shared rate limits and a shield in front. Enough for thousands of stamps and steady traffic.
A smaller index
Fixed-size sketches per file in place of every feature, and tables partitioned by hash. Enough for millions of files.
A different store
The feature index moves to a key-value store sharded by hash prefix, and the log becomes a Merkle tree served as static files with inclusion proofs. That is the design for billions of files and beyond.
Steps two and three are plans. They will be described here as results once they exist and have been measured.
Found a hole?
Write to security@grantstamp.io. Please give me a chance to fix it before you publish. The security policy says what to include and what to expect, and the threat model lists every attack considered so far.