
Post-Quantum dApp
QNS - Qore Name Service
.qore names whose transfers and address changes need a post-quantum ML-DSA-87 signature
About
QNS gives QoreChain accounts readable names like okafor.qore, the way ENS does on Ethereum. On ENS, whoever holds your ECDSA key owns your name. Once a quantum computer can recover that key from a public signature, it can take the name and redirect every payment sent to it. On QNS, the actions a thief wants need two signatures: the owner's wallet signature on the transaction, and an ML-DSA-87 signature from the name's guardian key, checked inside the contract by the pqcVerify precompile (0x0a01). Guarded by post-quantum signatures: - Changing where a name points (setAddr) - Transferring a name - Replacing the guardian key (old key authorises, new key proves possession) - Admin fee withdrawal, price changes and admin transfer Text records, primary name and renewals stay classical, so everyday use stays cheap. The web app works like the ENS app: search a name, pick years, register, then manage profile, records and ownership. Connect QoreX, unlock a guardian key in the browser (it never leaves the tab), and sign guarded actions with ML-DSA-87 locally.
How it's made
Contracts: Solidity 0.8.28, Hardhat 3, viem, scaffolded from create-qorechain-dapp and the Build Before Q-Day workshop apps. - QNS.sol is a registry and resolver. Each name stores its owner, address, expiry, a per-name nonce and only the keccak256 hash of its guardian's ML-DSA-87 public key. - Guarded calls pass the 2,592-byte public key and the 4,627-byte signature. The contract checks the key against the stored hash, rebuilds the signed message and calls pqcVerify at 0x0a01. The message binds chain id, contract, action, name, owner, nonce, deadline (max 1 hour) and the new values, so signatures can't be replayed or reused for another action, name or deployment. - Registration can instead use the account's own on-chain PQC key, read through pqcKeyStatus at 0x0a02 and accepted only with a proven possession. - Fails closed: if the precompile returns no data, every guarded action reverts. - Registration is commit-reveal (60 s to 1 day), so nobody can front-run a name from the mempool. - Names are not ERC-721 on purpose, so there is no classical-only transferFrom that skips the guardian. - CLI scripts register the account's ML-DSA-87 key with proof of possession, send hybrid transactions, and open an EVM window scoped to the QNS contract (allowedTargets). Tests: 22 tests use real ML-DSA-87 keys and signatures from @qorechain/sdk. Hardhat has no QoreChain precompiles, so a stand-in at 0x0a01/0x0a02 only accepts (key, signature, message) triples the real verifier accepted first. Covered: the Q-Day scenario (attacker with the owner's wallet key can't redirect the name), replay, cross-action reuse, deadlines, transfers, guardian rotation, expiry, fail-closed, admin actions, front-running and admin signature replay. Audit: QCAI stage 1 scored 78. The one real finding (front-running) is fixed in v2 (0x6f23Dc0Ab6CB9dbE24dcf068b3ae424d8Be19c3E) with commit-reveal. Stage 2 on v2 scored 82, with no new real issues. Both reports and our responses are in audits/ in the repo. Web: Vite, React, wagmi, RainbowKit with @qorechain/qorex-rainbowkit. Guardian keys are derived from a QRC1 code and sign in the browser. Built with Claude as a pair programmer, documented in AI_USAGE.md.
Timeline
Pushed 1 commit to main
- c6404be Add QCAI stage 2 audit (score 82) · Robotmac01
Pushed 1 commit to main
- 47af8ae Audit fixes: commit-reveal registration, 22 tests, v2 deploy · Robotmac01
Earned a Ship Weeks badge.
Newly verified on chain: EVM window (incl. scoped)
New project.
Comments and questions
- No comments yet.