ZeroHour

How ZeroHour works

From the day keypers join to the fairness proof after the exam. Each step names the contract call or function that does it, so you can find it in the code.

The life of one exam

  1. Keypers join

    Each keyper registers with an ML-DSA-87 signature, bonds 1 QOR and commits two roots: the anchor of a hash chain of seeds, and a Merkle root of its per-round ML-KEM-1024 public keys.

    HourglassRegistry.register
  2. The board seals

    For every centre, the board shuffles questions and options with a secret per-centre seed, then seals that variant to two locks. It checks each keyper's round key against its on-chain Merkle root, and each centre's key against QoreChain's KEM registry.

    sealPaper
  3. The exam goes on chain

    createExam records the rounds, the keypers and the threshold. addCentre records each centre's ciphertext hash and a commitment to its permutation seed. All of it is signed with ML-DSA-87 by the board.

    ZeroHourExam.createExam / addCentre
  4. Ciphertexts are published

    The sealed papers are public files. Anyone can mirror them weeks in advance. Nobody can read them.

    deployments/…/sealed
  5. The bell

    When chain time passes the round, keyper daemons post their seeds. The contract hashes each one down to the keyper's anchor. With 2 of 3 seeds public, the time lock is open for everyone.

    HourglassRegistry.release
  6. Centres open

    Each centre checks its file against the on-chain hash, rebuilds the time key from public seeds, opens the QoreSeal envelope with its own key and decrypts. It files an ML-DSA-87 signed receipt.

    ZeroHourExam.recordOpening
  7. Leaks are traced

    If a copy surfaces, the Leak Hunter scores it against every centre's variant and files a signed report. The evidence is sealed to the board and only its hash goes on chain.

    ZeroHourExam.reportLeak
  8. Fairness is proven

    The board reveals the canonical paper and every permutation seed. Anyone can recompute each centre's variant and check it against the commitments made before the exam.

    ZeroHourExam.revealFairness

The cryptography

PiecePrimitiveHow it is used
Keyper round keysML-KEM-1024Derived from SHAKE256(seed[r]); public keys committed as a Merkle root
Seed chainkeccak256 hash chainseed[r-1] = keccak(seed[r]); posting round r reveals every earlier round, never a later one
Time key splitShamir 2-of-3Each share wrapped with AES-256-GCM under an ML-KEM shared secret
Centre envelopeQoreSeal (ML-KEM-1024 + X25519)Recipient key read from QoreChain's KEM registry, bound by a hybrid-signed card
PaperAES-256-GCMKey = keccak256("zerohour-v1" ‖ timeKey ‖ recipKey), header bound as AAD
SignaturesML-DSA-87 (+ ECDSA)Board actions, centre receipts, Leak Hunter reports, keyper registration
VariantsSHAKE256-driven Fisher-YatesPer-centre question and option order, committed before the exam

Who can do what

PartyCanCannot
Exam boardWrites and seals the paper, switches to the backup, reveals for fairnessOpen a centre's copy after sealing without that centre's key
KeyperPost its own seed at or after the roundOpen any paper alone, or post early without losing its bond
CentreOpen its own copy after the bellOpen before the bell, or open another centre's copy
Press, courier, strongroomHold and move ciphertextRead anything
Anyone watchingVerify every seed, hash, receipt and the fairness proofLearn the paper before the bell

See it happen on a real exam: board view of the demo exam.