Build

Security model and limits

What Mitome protects against, how, and the trade-offs and unfinished parts, stated plainly.

What holds even if Mitome's API and database are compromised

This assumes the checker's signing key stays safe; what the checker is trusted with comes next. It also assumes the browser reads Midnight itself: On Preview, browsers read Midnight's indexer directly. On Preprod they read it through a read-only window on Mitome's server (Preprod's indexer needs a Blockfrost key), so there these checks also trust Mitome's server to pass Midnight's replies on unchanged.

A compromised server can'tBecause
Read answers or filesThey're sealed in the person's browser to the team's keys, which are read from the chain
Swap in its own key to read future answersThe keys answers are sealed to come from the form's contract, and changing them needs the workspace's signature (as long as the page reads the form's real contract: its address is on the Share tab and every receipt)
Change a stored answer, or drop one without it showingEach answer is signed by a one-time key recorded on Midnight; owners' browsers check them all against the chain
Pause, close or change who can read a formOwner actions need the workspace key, which only members hold (and former members who kept a copy: it isn't rotated when someone leaves)
Open owners' vaultsThey're sealed with recovery keys Mitome never sees

What you do trust Mitome with

  • The checker tells the truth. The contract only records answers that carry a pass from the checker, and refuses a repeated nullifier. But the checker makes both: a compromised checker could sign passes for people who didn't pass, or give one identity several passes and so several answers. It still couldn't read answers.
  • Who sends answers to a form without checks. The integrity check proves each answer is exactly what was sent, not who sent it; anyone with the link, Mitome included, can send answers to an open form.
  • The checker and sponsor see identities and timing. See Who sees what.
  • Availability. Mitome stores the sealed answers. If it lost them, the receipts on Midnight would show what's missing, but the answers would be gone.
  • The response limit is enforced when Mitome pays, not on chain.
  • The door. The phone checks a ticket's signature against the entry's key on Midnight, but Mitome's server records each use and checks entries newer than the phone's copy on its own.
  • The web app itself. People load the form from Mitome, so a malicious build of the page could leak what they type. That's true of every web form; the respondent page sends no cookies and loads no third-party scripts.

Hardening in the code

  • Public routes never send or read cookies; embeds get no answer data or receipts.
  • Redirect endings, logos, background images and question media accept only http and https links; redirects are checked again before the page navigates.
  • In production, webhook URLs are refused if they point at private, loopback or internal addresses, at save and at each delivery.
  • X-Forwarded-For is trusted only as far as TRUST_PROXY_HOPS says, so rate limits can't be dodged with a fake header.
  • One live answer per nullifier is enforced by a unique database index as well as the chain.
  • A rebuilt proof must be signed by the original answer's key; the browser won't rebuild under a different nullifier, and Mitome only records one whose receipt matches the original.
  • The CSV export escapes cells a spreadsheet would run as formulas.
  • Door links are stored only as hashes; the link itself is shown once.
  • Rate limits per address: 240 indexer reads a minute, 120 ticket scans a minute, 30 reminder sign-ups an hour, 20 OAuth client registrations an hour, 5 guest workspaces an hour.
  • Dependencies install only versions at least 7 days old.

Trade-offs we chose

  • Poseidon in the answer circuit keeps proofs fast in a browser, but transientHash may change between compiler versions, so each form stays on the toolchain it was deployed with.
  • Passes don't expire. An expiry would be compared to block time, which is public and could date the check.
  • Answers stay off chain. Public ciphertext would be permanent, and large transactions cost more.

Not built yet

Not built yetWhere it stands
A domain of its ownMitome runs on one self-hosted server, on that server's addresses; Dockerfiles for every part are in the repository; sign-in emails come from a borrowed sending domain for now
Reading Preprod without MitomeBrowsers read Preprod's indexer through Mitome's read-only window (its indexer needs a Blockfrost key)
A second checkerThe contract accepts two checker keys; the app fills one
Paying your own feePossible on Midnight; the app always uses Mitome's sponsor
Shared rate limitsRate limits live in each server's memory
Resuming a deployA deploy interrupted by a server restart is marked failed; publish again
Wallets on phonesWallet checks need a wallet in the browser; no WalletConnect yet
Owners deleting answersOwners can star and archive single answers; only senders delete one. Deleting a whole form for good (from the trash) deletes all its sealed answers

On this page