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.2.
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 history cannot be rewritten afterwards.
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 cannot yet rotate it themselves; the operator has to step in.
- 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.
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.
- Domain verification In place
Owners prove control of a domain. Unverified owners are labelled as such and rank below verified ones.
- Conflict detection In place
A registration that overlaps an existing stamp at high or exact is marked as a conflict, and both owners are alerted.
- Disputes In place
Anyone can dispute a stamp. A person reviews it, and the decision is logged.
- Fair-use ceilings In place
Each owner has a ceiling on stored fingerprints, far lower before a domain is verified. Unverified owners also share one pool, so opening many accounts gains nothing.
- Proof by code-signing certificate Planned
Signing a challenge with the certificate that already signs the owner's builds, for organisations where changing DNS is slow.
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.
- Key rotation by owners Planned
Several keys per owner, and revocation without the operator.
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.
- 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.
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 address and public key
- A count of checks, with each caller reduced to a salted hash
It never sees
- The files, in whole or in part
- The files a person checks: 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 26 November 2026, with version 0.2.0, 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 | 15 ms | 87 ms | 221 ms |
| Check an unrelated file | 12 ms | 63 ms | 81 ms |
| Exact lookup by hash prefix | 1.5 ms | 2.0 ms | 2.5 ms |
| Search stamps by title | 2.3 ms | 3.1 ms | 4.0 ms |
- Fingerprinting a file before a check
- 16 msfor a typical 350 KB executable; 18 MB a second on one core
- Checks a second, one server process
- 58falling to 44 with 16 callers at once; checks run one at a time for now
- Registering
- 46 files a secondincluding the owner's signature and the conflict check
- Verifying the whole log
- 0.02 sfor 221 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 us 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.