Skip to content
QORECHAIN
Register

Encrypted Apps

SealTender

Sealed supplier quotes, post-quantum end to end.

Share on X

About

SealTender is a sealed-bid RFQ dApp on QoreChain testnet (qorechain-diana, EVM 9800). A buyer publishes a request with a spec hash, deadline and up to four qor1 recipients. Suppliers seal a JSON quote to the recipients' registered ML-KEM-1024 keys in their own browser, sign the commitment with ML-DSA-87, and submit only the ciphertext. After the deadline the buyer decrypts locally, records each opening on chain and awards the cheapest opened quote. A read-only verifier recomputes the commitment from the stored envelope and lets a supplier compare their retained plaintext with the recorded hash — no wallet required. Architecture: React 18 + TypeScript + Vite; QoreX-only wallet integration (EIP-6963 discovery, window.qorex.evm, eth_sendTransaction, no window.ethereum); Solidity 0.8.24 SealedTender contract; Foundry tests; Node scripts for native key registration and EVM-window opening. Kits: @qorechain/sdk, @qorechain/qoreseal, @qorechain/pqc, viem. On-chain design: submitQuote requires keccak256(envelope) == commitment and calls the pqcVerify precompile (0x…0a01) over abi.encode(contract, chainid, requestId, commitment, msg.sender), so the signature is bound to the bidder and cannot be replayed. The buyer's ML-KEM key is registered with MsgRegisterKEMKey (algorithmId 2) inside a hybrid-signed native transaction; QoreX opens the per-transaction EVM authorization window for contract writes. What was hard: the EVM lane needs a hybrid-opened authorization window; the KEM registry is keyed by qor1 and resolved at seal time; @qorechain/sdk 0.14 changed the tx API (signAndBroadcast, sender required); QoreX does not inject window.ethereum and refuses wallet-only key management, so registration is a script; and the signed message had to include msg.sender to prevent cross-wallet replay. Honest limits: the buyer holds the KEM key (no threshold ML-KEM), the quote signing key is app-generated rather than the account's registered ML-DSA key, and QoreX browser E2E is not verified in this environment.

How it's made

SealTender started from a narrow question: how do you run a supplier quotation process where the buyer cannot peek and the supplier cannot change their price after submitting? The answer was a sealed-bid RFQ, which is also the brief's sealed-bid auction example. The design changed as QoreChain's constraints became clear. A CosmWasm-native contract was the first idea, but native contract upload is governance-only on testnet, so the app moved to QoreChain's EVM lane. The ML-KEM registry being keyed by account address then fixed the shape of the recipient list: every buyer registers a KEM key, and suppliers seal to that qor1 identity rather than to an arbitrary public key. The final architecture is deliberately small. A React 18 + TypeScript + Vite front end reads the chain through viem and writes only through QoreX. There is no backend and no server-side key. A Solidity 0.8.24 contract, SealedTender, stores requests, opaque envelopes, commitments, public keys, openings and the award. Foundry covers the contract logic. Two Node scripts handle the native-only steps: registering an ML-KEM-1024 key with MsgRegisterKEMKey (algorithmId 2) inside a hybrid-signed transaction, and opening an EVM authorization window. The crypto flow is split so no single layer has to be trusted. Suppliers build a JSON quote, seal it in the browser with @qorechain/qoreseal's sealToAddresses (ML-KEM-1024, resolved from the on-chain registry), then sign abi.encode(contract, chainid, requestId, commitment, msg.sender) with @qorechain/pqc's ML-DSA-87. The contract recomputes keccak256(envelope) and calls the pqcVerify precompile at 0x…0a01. Because msg.sender is inside the signed bytes, a signature cannot be replayed from another wallet or another request. Opening is creator-only and blocked until the deadline; the buyer decrypts locally with a seed file that never leaves the browser, then records the price and plaintext hash. The verifier is read-only and needs no wallet. What was hard: the EVM lane needs an authorization window opened by a hybrid ML-DSA-87 native signature, which is easy to miss when coming from a normal EVM chain; QoreX opens it per transaction but refuses wallet-only key-management messages, so KEM registration had to be a script. @qorechain/sdk 0.14 had moved from tx.send to TxClient.signAndBroadcast and required an explicit sender in registerKemKey, so the shipped example did not run until patched. @qorechain/qoreseal's network fetch failed in Node, so the live round trip used the SDK's fetchKemKey plus qoreseal seal, while the app keeps sealToAddresses for the browser. On the contract side, the first ABI treated Solidity's single struct return as a flat tuple, which broke viem decoding; it is now declared as one tuple. The Foundry test still mocks pqcVerify, so the precompile was proven separately with a live eth_call and a real submitQuote. Honest boundaries: no threshold ML-KEM, so the buyer can decrypt early if they choose; the quote signing key is generated in the browser and is separate from the account's registered ML-DSA-87 key; no QoreX-browser E2E in this environment; and no two-stage QCAI audit, which is why the project is entered under Encrypted Apps rather than Post-Quantum dApp.

Timeline

SealTenderEncrypted Apps

Pushed 16 commits to main

  • 4a2228b README: record browser offline open verification (2 Dec 2026) · Chidubemkingsley
  • 00b76d9 Add QoreChain build badge to README · Chidubemkingsley
  • 8c1516b UX: show 'Keys loaded' confirmation when keys file is uploaded · Chidubemkingsley
  • 1402ef7 Fix: gitignore sealtender-keys.json; register-kem skips broadcast if already registered · Chidubemkingsley
  • 5956c05 README: document envelope-text retrieval, keys-file regeneration, and per-seal uniqueness · Chidubemkingsley

and 11 more commits

SealTenderEncrypted Apps

New project.

Comments and questions

  • No comments yet.