VERIFY.md - the zero-trust byte recipe
This document lets a third party verify a NeuroCrypt proof-of-presence bundle
with NO trust in this site or this codebase: every check re-derives from the
bytes alone. It is the externalization of src/world/vault/ (the code remains
authoritative; this is its specification).
What a passing verification MEANS (read this first)
A bundle that passes is INTERNALLY CONSISTENT: every brick signature verifies, every hash link holds, the checkpoint matches and is signed. It does NOT mean authentic, unique, or human: the scheme proves PRESENCE only ("a browser session held and signed at time T with an ephemeral key it then discarded"), has ZERO Sybil resistance, and anyone can fabricate a fully-verifying bundle of their own. A bundle is someone's because it lives in their browser, not because the math says who they are.
Canonicalization (JCS-style; applied before any hash or signature)
JSON, serialized deterministically:
- Object keys sorted by UTF-16 code unit, recursively.
- No insignificant whitespace.
- Strings: minimal escaping (the JSON.stringify defaults).
- Numbers: shortest round-trippable decimal form;
-0normalized to0; non-finite numbers are rejected outright. - The result is encoded as UTF-8 bytes.
The brick
{
"v": 2,
"pubkey": "<64 lowercase hex chars: ephemeral Ed25519 public key>",
"created_at": "2026-06-10T12:00:00.000Z",
"depth01": 0,
"prev_receipt_hash": "<64 hex chars or null for genesis>",
"sig": "<128 lowercase hex chars: Ed25519 signature>"
}
Signable view (the exact bytes sig covers), canonicalized per above:
- v2:
{ "created_at": ..., "depth01": ..., "domain": "neurocrypt:rip", "prev_receipt_hash": ..., "v": 2 }(keys shown sorted). - v1 (legacy): the same WITHOUT the
domainmember andv: 1.
The pubkey is deliberately NOT inside the signed view: it is authenticated
by being the very key the signature verifies under.
Receipt hash: SHA-256 over the canonical bytes of the ENTIRE signed brick
(all six fields, sig included), lowercase hex. The next brick's
prev_receipt_hash must equal it. The human-readable id is
RIP- + the first 8 hex chars.
Signature verification: strict RFC 8032 Ed25519 (non-canonical point
encodings rejected; this implementation passes zip215: false).
The chain
Bricks in order, genesis first. Check per brick i:
depth01is a finite number in [0, 1].created_atmatchesYYYY-MM-DDTHH:MM:SS.mmmZand round-trips through the date parser unchanged.prev_receipt_hashequals the receipt hash of brick i-1 (null for i=0).- The Ed25519 signature verifies over the version's signable view.
The checkpoint
{
"head_receipt_hash": "<hex or null>",
"brick_count": 3,
"deepest_depth": 0.2,
"pubkey": "<64 hex>",
"sig": "<128 hex>"
}
Signed payload (the members below are then CANONICALIZED per the rules above before hashing/verifying: keys are re-sorted by UTF-16 code unit and all whitespace removed, so the member order you write them in does not matter, only the canonical output does):
- Bundle v2:
{ "brick_count": ..., "deepest_depth": ..., "domain": "neurocrypt:checkpoint", "head_receipt_hash": ..., "max_depth_reached": <the bundle's maxDepthReached>, "v": 2 }. - Bundle v1 (legacy):
{ "brick_count": ..., "deepest_depth": ..., "head_receipt_hash": ... }only.
Checks: head_receipt_hash equals the last brick's receipt hash;
brick_count equals the chain length; deepest_depth equals the maximum
depth01 present; the signature verifies over the payload above. NOTE the
checkpoint key is itself ephemeral: it proves the SUMMARY matches the chain,
not who produced it.
The bundle
{
"v": 2,
"kind": "neurocrypt-proof-of-presence",
"chain": [ ...bricks... ],
"maxDepthReached": 0.2,
"checkpoint": { ... }
}
- v2:
maxDepthReachedis BOUND into the signed checkpoint (a forged figure breaks the checkpoint signature). - v1:
maxDepthReachedis only lower-bounded by the chain's deepest brick; treat it as self-reported. - Fields outside this schema are unsigned riders: a verifier should disclose
their presence (this implementation reports
no_unknown_fields), though they do not flip the verdict.
Reference verifier
verifyVault(bundleJsonString) in src/world/vault/vault.ts implements all
of the above and returns the per-check breakdown the Verify Anywhere panel
renders. The frozen test vector at src/world/vault/golden.fixture.ts is a
known-good v1 bundle; hostile.test.ts pins the attack surface (downgrade,
forged depth, smuggled fields, hostile JSON shapes).
This document is not just prose: src/world/vault/conformance.test.ts is a
SECOND, independent verifier that transcribes the recipe above (its own
canonicalizer, signable views, receipt hashing, and checkpoint payload),
depends on nothing in src/world/vault/ except the standard @noble
primitives, and asserts it reaches the same verdict and the same receipt hashes
as verifyVault on the golden bundle. If this document ever drifts from the
code, that test breaks - so "verify us without trusting us" is a checked claim,
not a description.