Skip to content
QORECHAIN
Register

Encrypted Apps

Cista

Sealed payroll on QoreChain: everyone gets paid, only you see your payslip.

Share on X

About

Cista is payroll on QoreChain where payslips stay private but pay can still be proven. A payslip is one of the most sensitive files a company holds. On a public chain, paying salaries normally publishes them; encrypting them with today's cryptography only delays that, because anything copied now can be opened once quantum computers break the key exchange. And confidential payroll creates a new problem: employees still have to prove their income, and a hidden salary is one nobody can verify. How Cista works: - Sealed payslips. Each payslip is sealed in the employer's browser with ML-KEM-1024 + X25519 (QoreSeal) to the employee and the employer. Cista's server stores ciphertext only. Employees publish their keys in a key card signed with their ML-DSA-87 key, so a server can't swap in its own key. - Signed once, paid once. The employer signs the pay run's fingerprint in QoreX with ML-DSA-87. One hybrid-signed multi-send pays the whole team in fUSD and carries that fingerprint in its memo. Next month, the employer starts from any earlier run: their key opens their own sealed copy and fills the team in. Year-to-date totals add themselves up. - Proof of pay, without the payslip. The employee picks a standard proof type (employment, income above an amount, income in a range, earned this year, exact pay) or a custom set of lines, names who it's for and until when, and signs it. Whoever receives it opens a link and checks it with no wallet: the fields are unchanged, both signatures verify against keys registered on chain, and the chain paid that run. - On-chain proof of income. The CistaVerifier contract checks the same proof with QoreChain's own PQC precompiles, so another contract can trust it without trusting Cista. - Keys and recovery. Keys come from a 24-word recovery phrase, checked back before set-up finishes. The key is locked with Argon2id or unlocked with a passkey. The employer can re-seal past payslips for an employee who loses their key. Proven on testnet: pay runs in QOR and fUSD paid by QoreX, proofs checked, and a team of three paid in one transaction with every payslip and an "earned this year" proof checked (16 of 16). CistaVerifier at 0xF26924d19029d1F1A253a3e079b16fD68B8519d8 verifies a real QoreX signature on chain. In a Q-Day drill, an attacker with only a stolen classical key tried 8 attacks on the chain, the server, a forged proof and the contract: all 8 were refused (audit.md). Honest limits: payment amounts are public, like every transfer, so each person's net pay is visible in the payment. Who is paid, gross pay, tax, deductions and role stay sealed.

How it's made

TypeScript monorepo: a core library (payslip model, salted SHA-256 field commitments in two Merkle trees, QoreSeal sealing, signature and payment checks, the full proof check, an Argon2id key vault), a Hono + SQLite server on my VPS (sign-in by QoreX signature, key cards, ciphertext-only payslips, pay runs, payments), a React web app (light and dark themes, passkey unlock with WebAuthn PRF), and a Solidity contract (CistaVerifier, solc 0.8.28) that calls the PQC Key Status (0x…0a02) and PQC Verify (0x…0a01) precompiles. QoreChain features used: QoreX signArbitrary (hybrid ML-DSA-87 text signatures for sign-in, pay runs, key cards and proofs) and signAndBroadcast (one MsgMultiSend paying fUSD's native denom to the whole team); hybrid ML-DSA-87 transactions; the PQC key registry (every signature is checked against the registered key, never one the signature brings along); QoreSeal ML-KEM-1024 + X25519 and its recipient cards; an EVM window and the PQC precompiles for the contract. What was hard: - QoreX refuses MsgRegisterKEMKey from websites, so the ML-KEM key travels in a QoreSeal card signed with the account's ML-DSA-87 key instead. - Making the contract rebuild, byte for byte, the exact text QoreX signs, and keeping Solidity and TypeScript in step with shared test values. - Recovery without a backdoor: a recovery phrase for the employee (checked back before set-up finishes), and employer re-sealing. - Next month's run and year-to-date totals without storing the team in the clear: the employer's key reopens its own sealed copies of earlier runs in the browser. New payslip fields were added so that older payslips keep exactly the same fingerprints and proofs. 239 automated tests, a browser check of the proof page, a live check of the contract against a real QoreX-signed run, a live team pay run (three people paid in one transaction, 16 of 16 checks), and the live Q-Day drill (8 of 8 attacks refused). No accessibility issues found by axe-core (WCAG 2.1 AA) in either theme. Built AI-natively with Claude; AI_USAGE.md has the details.

Timeline

CistaEncrypted Apps

Pushed 1 commit to main

  • f545c82 audit.md: "verifier" for the party a proof is sent to · phoenix-2203
CistaEncrypted Apps

Pushed 1 commit to main

  • 4d79b35 README: neutral wording for who checks a proof · phoenix-2203
CistaEncrypted Apps

Pushed 1 commit to main

  • a68aeed web: a neutral example for who a proof is for · phoenix-2203
CistaEncrypted Apps

Pushed 1 commit to main

  • 60db6a7 web: the landing page speaks of whoever checks a proof, not lenders and landlords · phoenix-2203
CistaEncrypted Apps

Pushed 1 commit to main

  • 456b979 AI_USAGE: design research and the redo, product decisions, the live team run · phoenix-2203
CistaEncrypted Apps

Pushed 1 commit to main

  • 95b9657 README: try-it steps with the phrase check, passkeys, next month's run and the year-so-far proof; the team-run script; fonts in the credits · phoenix-2203
CistaEncrypted Apps

Pushed 1 commit to main

  • 46a9aef web: deep oxblood buttons with cream text in dark mode, and a stronger red accent · phoenix-2203
CistaEncrypted Apps

Pushed 1 commit to main

  • a4ef847 audit.md: the live team pay run in the summary · phoenix-2203
CistaEncrypted Apps

Pushed 1 commit to main

  • 0e10ee1 README: a team of three paid in one transaction, proven on testnet · phoenix-2203
CistaEncrypted Apps

Pushed 1 commit to main

  • 4bfdb17 docs: the live team pay run, 16 of 16 · phoenix-2203
CistaEncrypted Apps

Pushed 1 commit to main

  • c8ff41c contracts: team-run compares the verifier's 0x answer with each account's 0x address · phoenix-2203
CistaEncrypted Apps

Pushed 1 commit to main

  • e2b2d5b web: the landing page shows next month's run, passkeys and the "Earned this year" proof · phoenix-2203
CistaEncrypted Apps

Pushed 1 commit to main

  • 09c6a9c docs: the team-run script; current test counts · phoenix-2203
CistaEncrypted Apps

Pushed 1 commit to main

  • f545a98 contracts: a live team pay run script, three people paid in one transaction · phoenix-2203
CistaEncrypted Apps

Pushed 1 commit to main

  • 80a0896 contracts: CistaVerifier checks a year-to-date band, and refuses one flipped from no to yes · phoenix-2203
CistaEncrypted Apps

Pushed 1 commit to main

  • 3127e50 AI_USAGE: current test count · phoenix-2203
CistaEncrypted Apps

Pushed 1 commit to main

  • 58f30c3 audit.md: Argon2id vault, phrase check, password strength, passkey unlock, accessibility; current test counts · phoenix-2203
CistaEncrypted Apps

Pushed 1 commit to main

  • 8534759 README: next month's run, the year so far, passkeys and Argon2id; the honest trade-off with Zama's FHE payroll; limits · phoenix-2203
CistaEncrypted Apps

Pushed 1 commit to main

  • 2f382ea web: robots.txt and a sitemap · phoenix-2203
CistaEncrypted Apps

Pushed 1 commit to main

  • 4019545 web: the app's pages load on first use, so the landing page stays light · phoenix-2203

Comments and questions

  • No comments yet.