Overview

QLOCK is an append-only, on-chain registry on Solana that binds a wallet's ed25519 address to a post-quantum public key. If ed25519 is ever broken, the record of which PQ key the real owner committed to, and when, is already on chain, signed by the original key, from before anyone could forge it.

How it works

  1. Your browser makes a PQ key from 32 bytes of fresh randomness. It is never derived from a wallet signature: whoever breaks ed25519 would then get the PQ key too.
  2. The PQ key signs the statement qlock:v1:bind\nwallet:<address>\nscheme:<id> with context qlock/v1. That is the post-quantum half of the proof.
  3. Your wallet signs a Solana transaction carrying the memo qlock:v1:<scheme>:<sha256(pq public key)>. That is the ed25519 half, fixed at a slot.
  4. Records are append-only. A new binding gets the next sequence number; old ones are never erased. Readers take the latest record at or before the slot they care about, so a forger after Q-Day can add records but can't rewrite anything before that day.

On-chain format

Each binding is one Solana mainnet transaction, signed by the wallet being bound:

Fee payer & signer
the wallet
Instruction
System transfer, 0.3 SOL → QLOCK vault set at launch
Instruction
SPL Memo (MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr), wallet as signer
Memo
qlock:v1:<scheme>:<64 hex chars of sha256(public key)>
Schemes
ml-dsa-44 · ml-dsa-65 · slh-dsa-sha2-128s

The full key doesn't fit: an ML-DSA-44 key is 1,312 bytes and its signature 2,420 bytes, while a Solana transaction is at most 1,232 bytes. The chain holds the 32-byte commitment; the key and its counter-signature are served by the API and pinned to IPFS. Anyone can hash the key and compare. Finding a SHA-256 preimage is not something quantum computers do.

Wallets may add instructions of their own (compute budget, transaction guards). A binding is valid when the transaction succeeded, the wallet is fee payer and signer, it carries exactly one qlock:v1 memo, and a top-level transfer of at least the seat fee goes from the wallet to the vault.

Keys & backup

The backup is the 32 random bytes, shown as 24 BIP-39 words. The signing key is HKDF-SHA256(entropy, info = "qlock/v1/keygen/<scheme>"), sized to the scheme's seed, fed into the NIST key generation of the chosen scheme (via @noble/post-quantum). The encrypted file is the same 32 bytes under AES-256-GCM with a PBKDF2-SHA256 key (600,000 rounds). The private key never leaves your browser.

ML-DSA-44
1,312 B key · 2,420 B signature · NIST FIPS 204
ML-DSA-65
1,952 B key · 3,309 B signature · NIST FIPS 204
SLH-DSA-SHA2-128s
32 B key · 7,856 B signature · NIST FIPS 205, hash-based only

Verify by hand

Don't trust us. For any record:

  1. Fetch the transaction from any Solana RPC node and read the memo. Check the wallet signed it and the transaction succeeded.
  2. Take publicKey from the API (or IPFS), base64-decode it and SHA-256 it. It must equal the commitment in the memo.
  3. Verify proof over the statement with that public key and context qlock/v1.

Or run the script, which does all three and reads the chain directly:

curl -O https://qlock.lol/qlock-verify.mjs
npm i @noble/post-quantum @noble/hashes
node qlock-verify.mjs <wallet> --api https://qlock.lol

qlock-verify.mjs → The registry page also checks any record in your browser.

API

Open, no key, CORS enabled.

GET/api/registry/<wallet>

Latest record and full history. Add ?slot=N for the latest record at or before slot N.

{
  "protocol": "qlock:v1",
  "wallet": "…",
  "bound": true,
  "current": {
    "n": 1, "seq": 1, "scheme": "ml-dsa-44",
    "commitment": "<sha256 hex>",
    "slot": 478204377, "signature": "<tx>",
    "memo": "qlock:v1:ml-dsa-44:<sha256 hex>",
    "statement": "qlock:v1:bind\nwallet:…\nscheme:ml-dsa-44",
    "status": "complete",
    "publicKey": "<base64>", "proof": "<base64>",
    "ipfs": "ipfs://…"
  },
  "history": [ … ]
}

status is commitment when the memo is on chain but the key hasn't been published yet (for example, the tab was closed before the last step).

GET/api/stats

Wallets and records on record, the latest bindings and the root.

GET/api/records?offset=0&limit=50

Every record, newest first.

GET/api/root

Merkle root of the whole registry.

GET/api/badge/<wallet>

SVG badge for READMEs and profiles.

Registry root

/api/root returns a Merkle root over every record in registry order (by slot). Leaf: sha256("qlock:v1:leaf|wallet|seq|scheme|commitment|slot|signature"); parent: sha256(left ‖ right); an odd node is carried up unchanged. Any snapshot of the registry can be checked against it.

FAQ

Why 0.3 SOL?

It pays for the inscription and for the infrastructure that serves and pins every key. Network fees on top are a fraction of a cent.

Can I rotate my key?

Yes. Get on record again: you get record #2 and #1 stays in history. Readers decide which slot they trust up to.

Lattices or hashes?

ML-DSA (lattices) is the NIST default and compact. If you'd rather rely on hash functions only, pick SLH-DSA: bigger signatures, same registry.

What if QLOCK disappears?

The memos stay on Solana forever. The key material is on IPFS and in every copy of the API anyone made. The verify script needs only an RPC node and the key.