agentic402

Timestamp a hash with a signed statement: attest

Published 3 December 2026 ยท Updated 3 December 2026

Timestamp a hash in one call: POST https://agentic402.dev/v1/attest with {"sha256": "<64 hex characters>"} returns, at once, a statement signed with agentic402's Ed25519 key saying that hash was shown to us at that moment. It costs $0.005, paid in USDC over HTTP 402.

Only the hash leaves your machine. Anyone can check the signature offline with our public key, or online for free.

# example (values illustrative)
$ sha256sum report.pdf
64c4e4c4be82de856bd4330cc841b960abfd294995c3a420889ec1ba764c033f  report.pdf

POST /v1/attest   {"sha256": "64c4e4c4be82de856bd4330cc841b960abfd294995c3a420889ec1ba764c033f"}
201 {"statement": {"id": "76e52594ae0513b676b2c936018e9352",
                "sha256": "64c4e4c4be82de856bd4330cc841b960abfd294995c3a420889ec1ba764c033f",
                "issued_at": "2026-12-03T14:52:05.679Z",
                "issuer": "agentic402.dev", "key_id": "b5aa8b858fda5eb5"},
     "statement_json": "<the exact string that was signed>",
     "signature": "<Ed25519 signature, base64url>"}

Why a third party has to sign the time

A file's modified date, a log line, an agent's own note saying "I wrote this at 14:00": all of these are claims the author can change. Nobody else has a reason to believe them. A timestamp means something only when someone other than the author records it and can't be pushed to record a different time.

That is especially true for AI agents. An agent can't vouch for itself, and the people or agents that rely on its work can't see inside its run. A signed statement from an outside service gives them something to check: this exact hash existed no later than this moment, according to a key they can look up.

Typical uses: proving that a report, a dataset or a model output existed before a deadline. Proving an agent committed to an answer or a bid before the result was known. Recording what an agent read before it acted, together with fetch. And keeping an audit trail of an agent's work without uploading the work itself.

How attest compares with other timestamping methods

Trusted timestamping is old. Wikipedia's article describes the classic scheme, in which a Time Stamping Authority "concatenates a timestamp to the hash and calculates the hash of this concatenation" and signs the result, following the RFC 3161 standard. Newer schemes anchor hashes in a blockchain instead of trusting one authority. The table compares the approaches that come up for this search.

Ways to timestamp a hash. Sources: Wikipedia (Trusted timestamping; OpenTimestamps) and EBSI's timestamping docs, read on 3 December 2026.
MethodProof is readyTo verify you needAccess
RFC 3161 Time Stamping AuthorityWhen the TSA repliesThe TSA's public keyVaries by TSA
OpenTimestampsAfter a later "upgrade" step, once the Bitcoin record exists"an up-to-date Bitcoin node on their own machine"Free
EBSI timestampingAfter waiting "at least TIMESTAMP_COMMITMENT_MATURITY blocks (currently 5)"The EBSI ledgerAn access token with scope timestamp:write
agentic402 attestAt once, in the responseOur Ed25519 public key (one HTTP GET, or a saved copy)$0.005 over x402. No account

The trade-off is trust. A blockchain anchor doesn't depend on any one company staying honest. Attest does, in the same way a classic TSA does. In exchange you get the proof in the same response, a statement format any JSON library can read, and a signature check that is a few lines of standard code in most languages. The honest limits are set out further down.

What the signed statement contains

Each statement is a small JSON object with five fields:

Fields of an attest statement
FieldMeaning
id32 random hex characters. Look the statement up later at GET /v1/attest/{id}.
sha256The hash you sent, in lowercase.
issued_atOur clock at the moment of signing, ISO 8601 in UTC with milliseconds.
issuerAlways agentic402.dev.
key_idFirst 16 hex characters of the SHA-256 of the public key's base64url text. Tells you which key signed it.

The signature covers statement_json, the exact string we signed, and the response gives you that string alongside the parsed object. Verify against the string, not against your own re-serialisation of the object. JSON libraries disagree about spacing and key order, and a single changed byte makes a valid signature look invalid. Returning the signed bytes removes that whole class of bug.

The signature is Ed25519, encoded as base64url without padding. Node.js's built-in crypto module, the Web Crypto API and Python's cryptography package all support Ed25519; a Node example and a Python outline follow.

Hashing the thing you want to timestamp

attest takes a SHA-256 hash as 64 hexadecimal characters, upper or lower case. Compute it locally. The file or text never needs to leave your machine.

# Linux
sha256sum report.pdf
# macOS
shasum -a 256 report.pdf
# Windows PowerShell (prints upper case; attest accepts it)
Get-FileHash report.pdf -Algorithm SHA256
# Node.js, for text or a buffer
crypto.createHash("sha256").update(text, "utf8").digest("hex")

When you hash text, decide the exact bytes first and keep them. "The same text" with a different line ending, a trailing newline or another Unicode normalisation is a different hash. For anything you may need to prove later, store the exact bytes you hashed next to the statement, for example in memory.

Input that isn't 64 hex characters is rejected with 400 before payment, so a typo costs nothing. A hash of an empty file or an empty string is accepted like any other, so check that you hashed the bytes you meant to.

Verifying a statement offline

Verification needs three things: the statement_json, the signature and our public key. Fetch the key once from GET /v1/attest/key, which returns it as base64url text and as a JWK, along with its key_id. Then check the signature anywhere, with no call to us:

import { createPublicKey, verify, createHash } from "node:crypto";

const { jwk } = await (await fetch("https://agentic402.dev/v1/attest/key")).json();
const key = createPublicKey({ key: jwk, format: "jwk" });

const signed = verify(null, Buffer.from(rec.statement_json, "utf8"), key,
                      Buffer.from(rec.signature, "base64url"));
const stmt = JSON.parse(rec.statement_json);
const myHash = createHash("sha256").update(fileBytes).digest("hex");

console.log(signed && stmt.sha256 === myHash ? `existed by ${stmt.issued_at}` : "does not match");

Both checks matter. A valid signature proves we signed that statement. The hash comparison proves the statement is about your file. A checker that skips the second step would accept any genuine statement for any file.

Verifying online, and looking a statement up

Two free endpoints save callers from writing crypto code. POST /v1/attest/verify with {"statement_json": "...", "signature": "..."} answers {"valid": true, "statement": {...}} when the signature is good and the statement's key_id matches our current key. A statement edited after signing, such as one with an earlier issued_at, returns "valid": false.

GET /v1/attest/{id} returns the stored record (statement, statement_json and signature) for a statement we issued. The code sets no expiry on these records, but don't make a proof depend on our storage: keep your own copy. While the record is there, a third party who only has the ID can fetch the full statement and check it themselves. The record shows what we signed; it doesn't hold your file, because we never had it.

Stamping many files for one price

Each statement covers one hash, but that hash can stand for as many files as you like. Write a manifest: a text file listing each file's SHA-256 and name, one per line, in a fixed order. Hash the manifest and stamp that. One $0.005 statement then proves every file in the list existed by issued_at, because changing any file changes its line, which changes the manifest's hash.

To prove one file later, show the file, the manifest and the statement. The checker hashes the file, finds that hash in the manifest, hashes the manifest and compares it with the statement. Keep the manifest's exact bytes, since a reordered or re-spaced manifest has a different hash.

For very large sets, a Merkle tree lets you prove one file without revealing the whole list, but a plain manifest is simpler and enough for most audit trails.

Committing to an answer before the result is known

Sometimes an agent needs to show it decided something before it could have known the outcome: a forecast, a bid, a pick in a contest, the answer to a test whose key is published later. Stamp a commitment instead of the answer itself.

The agent writes its answer, adds a random value (a nonce, say 32 random bytes in hex) and hashes the two together. It stamps that hash and publishes only the statement. Later, it reveals the answer and the nonce. Anyone can hash them, compare with the stamped hash, and see that the answer was fixed by issued_at. The nonce stops others from guessing the answer by hashing likely candidates while it's still secret.

An audit trail of an agent's run

For a long-running agent, stamp the output of each important step: the pages it read, the plan it made, the result it returned. To make the trail tamper-evident as a whole, include the previous statement's id in the bytes you hash at each step. Each statement then points back at the one before it, so a step can't be removed or reordered later without breaking the chain of hashes.

Ten stamped steps cost $0.05. Store each step's bytes and statement in memory under keys such as proofs/step-01, so the whole trail can be handed to a reviewer with one token.

A proof that outlives the service

Everything needed to check a statement fits in one small bundle: the original bytes (or the file), statement_json, signature and the public key as a JWK. Keep the four together and a reviewer can verify the proof in ten years with any Ed25519 library, whether or not agentic402 still exists.

In Python, the check uses the cryptography package: load the key with Ed25519PublicKey.from_public_bytes from the base64url-decoded x value of the JWK, then call verify(signature_bytes, statement_json.encode()), which raises an exception if the signature is wrong. Compare the statement's sha256 with your own hash afterwards, as in the Node example above.

What a statement proves, and what it doesn't

A statement proves that agentic402 saw this hash no later than issued_at, by our clock, and signed that claim with the key identified by key_id. It doesn't prove who made the file, that its contents are true, or that it didn't exist earlier. It shows the latest moment the file can have been created, not the first.

It also rests on trusting agentic402. If our signing key leaked, or if we were dishonest, statements with false times could be made. Today there is no public log of all statements and no blockchain anchor to rule that out. Two ways to add one are on our list, publishing a daily Merkle root of every statement and anchoring that root on a public chain, but neither exists yet and this page will say so until one does.

For most agent uses, such as showing a reviewer what an agent had read or that a draft existed before a deadline, a signature from an independent service is enough. Where the stakes are legal, ask a lawyer what evidence your jurisdiction accepts, and consider stamping the same hash with more than one service; Wikipedia's article notes that "Multiple TSAs can be used to increase reliability and reduce vulnerability."

Mistakes that make a valid proof fail

Most failed checks come from hashing different bytes the second time. Opening and re-saving a PDF or Word file changes its internal metadata, and so its hash, even when the visible text is identical: keep the original file untouched. Copying text through a chat window or an editor can change line endings or quotes. Hashing a whole JSON response instead of one field inside it ties the proof to timestamps and other fields that will differ next time.

The other common failure is on the statement side: parsing statement_json, then serialising it again before verifying. Pass the string through untouched. And keep the public key with the proof, so a later key change can't strand it.

Key changes

There is one signing key today. Statements carry a key_id so that, if the key ever had to be replaced, a reader could tell which key signed what. After a replacement the new key would have a new ID, and old statements would verify only against the old public key. /v1/attest/verify checks against the current key, so it would report old statements as invalid.

The safe habit is to save the public key, or its JWK, next to any statement you might need years from now. With the key, the statement, the signature and the original bytes, anyone can verify the proof without agentic402 being online at all.

attest over MCP

The MCP server offers attest ($0.005, takes sha256), attest_verify (free, takes statement_json and signature) and attest_public_key (free). Payment is settled only after the statement has been signed and stored; see how agentic402 settles payments.

Questions about hash timestamps

Can I timestamp a file without uploading it?
Yes, that's the only way attest works. You send the SHA-256 hash, 64 characters, and keep the file. A hash doesn't reveal the contents, but a short or guessable text, such as "yes" or a phone number, can be found by hashing candidates until one matches. Add a random salt to bytes like that before hashing, and keep the salt.
Does attest accept other hash algorithms?
No, only SHA-256. Anything other than 64 hex characters is rejected with 400 before payment.
How do I prove what a web page said at a certain time?
Fetch the page, hash the returned text, stamp the hash and store all three. The recipe for proving what a page said walks through it, including which bytes to hash.

Cite this page: agentic402, "Timestamp a hash with a signed statement: attest", https://agentic402.dev/tools/attest/, published 3 December 2026. Statement format and endpoints are taken from src/attest.js as of that date.