Releases that still verify after Q-Day. A post-quantum release and firmware signing log on QoreChain, verified on-chain by
pqcVerify.
Forrel lets software and firmware maintainers publish a record of each release: the file's SHA3-256 hash signed with an ML-DSA-87 key. Every record is checked on-chain by QoreChain's pqcVerify precompile (0x…0a01) before it is accepted, and public keys and signatures are stored in contract state via SSTORE2 so verification survives testnet log pruning. Anyone can drop a file into the web app or run forrel verify with no wallet required.
| Web app | https://forrelonq.vercel.app |
| ForrelRegistry (Diana, chain 9800) | 0xd438B0A22F2404C8f10c1dbBBA6cA56B391E997d |
| Deployed at block | 10,921,807 (deployments/diana.json) |
| On-chain gate | Signatures from @forrel/core verify through the real pqcVerify on Diana: docs/message-spec.md |
The CLI and the live web app default to this registry, so forrel verify needs no configuration.
- Open https://forrelonq.vercel.app/app/verify.
- Download
forrel-cli-v1.0.0.txt(use Download raw file) and drop it in → Revoked, reason "Key compromised". - Drop in
forrel-cli-v1.0.1.txt→ Verified, signed with the rotated key (epoch 2). - Drop in
forrel-cli-v1.0.0-tampered.txt, the same file with one word changed → Unknown. - Open /app/projects/forrel-demo: signing key epoch 2 (rotated), the release history, and each release's signed message. Use Re-check signature to run
pqcVerifylive. - Check the transactions in Proof on-chain.
All demo files, hashes and expected verdicts are in demo/.
QoreChain Diana (chain 9800), project forrel-demo, account 0xe777fe40Abb80F14DEDeCfFcD3D8c4063F766073 (qor1uamlus9thq83fhk7el7d8kxyqclhvcrnwp5s8v). All of the account's transactions on the explorer (switch to Testnet).
| Step | Transaction (EVM hash; links open the Cosmos tx) | What the contract checked |
|---|---|---|
Deploy ForrelRegistry |
0xcc64960c…2ff853 |
n/a |
Register forrel-demo |
0x7f1e4761…78dd1d |
Owner has a proven ML-DSA-87 key (pqcKeyStatus) |
| Publish v1.0.0 | 0x911eda94…32aa06 |
pqcVerify with the epoch 1 key |
| Revoke v1.0.0 | 0xfee38fb4…f27855 |
pqcVerify with the epoch 1 key |
| Rotate to epoch 2 | 0x1822912a…8122c5 |
pqcVerify with the epoch 1 key |
| Publish v1.0.1 | 0x08f197c1…15f966 |
pqcVerify with the epoch 2 key |
| Attack: publish signed by a stranger's ML-DSA-87 key | 0xed8f96c3…c80bb3 |
Rejected with SignatureInvalid: the EVM call reverted (ethereumTxFailed: execution reverted) and nothing was stored. Reproduce with npm --workspace=@forrel/contracts run attack |
The explorer, explore.qore.network, opens on mainnet: switch it to Testnet first. It lists transactions by their Cosmos hash, which the links above use; the EVM hash is shown as the link text. In the explorer, the attack transaction shows as included, with the EVM failure in its events.
Every EVM transaction on QoreChain needs an authorisation window. Opening one is a native-lane MsgOpenEVMWindow signed hybrid: secp256k1 plus an ML-DSA-87 signature carried in a PQCHybridSignature extension. Each Forrel write above was sent under one of these:
| Step | Cosmos transaction | Signed |
|---|---|---|
Register the account's ML-DSA-87 key (MsgRegisterPQCKeyV2) |
20BE9CF3… |
Classical, with proof of possession |
| Open window before the deploy | D4B5EC77… |
Hybrid, by the window script |
Open window before registering forrel-demo |
B170A019… (script), D80E7281… (QoreX) |
Hybrid |
| Open window before publish v1.0.0 | 4F3EF674… |
Hybrid, in QoreX |
| Open window before revoke | C15F302C… |
Hybrid, in QoreX |
| Open window before rotate | CA5E0752… |
Hybrid, in QoreX |
| Open window before publish v1.0.1 and the attack | 60897A1A… |
Hybrid, in QoreX |
The QoreX windows are the ones opened for 300 blocks with a 1,000,000 uqor budget; the script's are 600 blocks and 3,750,000 uqor. Each Forrel write was then approved in QoreX too.
Contract pages on the explorer show no transactions: it lists transactions by sender, and a contract never sends one. Use the account link above.
- ✅ Wallet-free verification — Drop any file in the browser (stream-hashed locally in a Web Worker) or run
forrel verifyvia read-onlyeth_call. - ✅ On-chain post-quantum verification —
ForrelRegistryverifies everypublish,rotateKey, andrevokesignature through QoreChain'spqcVerifyprecompile. - ✅ Offline-capable CLI — Generate encrypted keyfiles (
scrypt+AES-256-GCM), sign bundles offline (--seq), and submit separately from CI. - ✅ Durable state storage (SSTORE2) — Public keys (2,592 B), signatures (4,627 B), and rotation history live in contract state rather than pruned event logs.
- ✅ Key safety built in — Rotate signing keys via the active key or an offline recovery key, and revoke bad releases with a reason code.
- ✅ Deterministic mock & live modes — Switch between
MockChainClientandLiveChainClientviaNEXT_PUBLIC_CHAIN_MODE.
┌──────────────────────── Browser ────────────────────────┐
│ Landing (/) /app (verify, projects, publish) │
│ │ │ │
│ hash.worker (SHA3-256) @forrel/core (encode, sign) │
│ │ │ │
│ viem public client ──── eth_call ────┐ QoreX (tx) ───┼──┐
└────────────────────────────────────────┼─────────────────┘ │
▼ ▼
┌──────── QoreChain Diana (EVM, 9800) ─────────┐
│ ForrelRegistry │
│ ├─ pqcVerify 0x…0a01 (ML-DSA-87) │
│ ├─ pqcKeyStatus 0x…0a02 (owner check) │
│ └─ SSTORE2 blobs (pubkeys, signatures) │
└──────────────────────────────────────────────┘
▲
CI / offline machine: forrel sign → bundle.json → forrel publish
# 1. Clone and install dependencies
git clone https://github.com/Dominion116/forrel.git
cd forrel
npm install
# 2. Start the web app (defaults to NEXT_PUBLIC_CHAIN_MODE=mock)
npm run devOpen http://localhost:3000 for the landing page, http://localhost:3000/app for the registry app, and http://localhost:3000/docs for the full 3-column technical documentation.
- Node.js
>= 20.0.0 - npm
>= 10(uses npm workspaces) - Foundry (
forge,cast) — required only for building/testing/deployingcontracts/
forrel/
├── apps/web/ # Next.js App Router (/, /app/*, /docs, /privacy, /terms)
├── packages/core/ # @forrel/core — encoders, SHA3-256, keyfiles, Signer, ABI, vectors
├── packages/cli/ # @forrel/cli — `forrel` CLI
├── contracts/ # @forrel/contracts — ForrelRegistry.sol, PQC.sol, SSTORE2.sol, window.ts
├── demo/ # The exact demo release files, v1.0.1 publish script
└── docs/ # Message spec, threat model, scaffold notes, illustration brief
The @forrel/cli workspace shares @forrel/core with the web app so browser and CLI produce byte-identical signed messages.
The CLI is not published to npm. Run it from the root of a clone after npm install, as npx forrel … or node packages/cli/bin/forrel.mjs …. (Don't use npx --workspace: it runs inside the package folder, so relative file paths break.)
| Command | Description | Network |
|---|---|---|
forrel keygen --out <file> |
Generate an ML-DSA-87 keypair and save as an encrypted keyfile | Offline |
forrel hash <file> |
Print the SHA3-256 digest of a file | Offline |
forrel sign <file> --project <slug> --version <v> --key <keyfile> [--seq <n>] |
Sign a release into <file>.forrel.json |
Offline-capable |
forrel publish <bundle.json> |
Submit a signed bundle to ForrelRegistry |
Online |
forrel verify <file> [--project <slug>] [--json] |
Verify a file + live pqcVerify re-check (exit 0/1/2/3) |
Read-only |
forrel rotate --project <slug> --key <keyfile> [--recovery] --out <newkey> |
Rotate the project signing key | Online |
forrel revoke --project <slug> --version <v> --reason <0-3> --key <keyfile> |
Revoke an existing release | Online |
# Offline machine: generate keyfile and sign release
npx forrel keygen --out ./signing.forrel-key.json
npx forrel sign ./dist/firmware.bin \
--project acme-router \
--version 2.4.1 \
--key ./signing.forrel-key.json \
--seq 1
# Online CI runner: publish bundle and verify
export FORREL_SUBMITTER_KEY="0x..."
npx forrel publish ./dist/firmware.bin.forrel.json
npx forrel verify ./dist/firmware.bin --project acme-routerSee .github/workflows/forrel.yml for a GitHub Actions example (manual here; switch it to a tag trigger in your own repo).
Copy apps/web/.env.example to apps/web/.env.local:
| Variable | Description | Default |
|---|---|---|
NEXT_PUBLIC_CHAIN_MODE |
mock (deterministic fixtures) or live (QoreChain Diana) |
mock |
NEXT_PUBLIC_REGISTRY_ADDRESS |
Override the ForrelRegistry address |
the Diana deployment |
NEXT_PUBLIC_REGISTRY_DEPLOY_BLOCK |
Override the deploy block used for best-effort tx links | 10921807 |
NEXT_PUBLIC_SITE_URL |
Canonical URL for metadata, robots and sitemap | Vercel production domain |
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID |
Optional WalletConnect ID (not needed for QoreX) | — |
| Variable | Description | Required |
|---|---|---|
FORREL_RPC |
QoreChain Diana JSON-RPC URL (https://evm-testnet.qore.host) |
No |
FORREL_REGISTRY |
ForrelRegistry address. Optional: defaults to deployments/diana.json, then the Diana deployment above |
Online / Sign |
FORREL_SUBMITTER_KEY |
0x-prefixed secp256k1 key with an open Diana EVM window |
Write commands |
FORREL_PASSPHRASE |
Keyfile passphrase for non-interactive CI (prompts if omitted) | No |
| Layer | Status | Details |
|---|---|---|
| Release signatures | Post-quantum | ML-DSA-87 (FIPS 204 pure, empty context), verified on-chain via pqcVerify |
| Artifact & notes digests | Post-quantum safe | SHA3-256 (FIPS 202) |
| QoreChain account | Hybrid | eth_secp256k1 + registered ML-DSA-87 key (pqcKeyStatus) |
| EVM transaction transport | Classical gas payer | Submitter key only pays gas; cannot forge, rotate, or revoke releases |
| Deployment target | Testnet only | QoreChain Diana (chainId 9800); pqcVerify is not on mainnet yet |
contracts/ is a Foundry project adapted from create-qorechain-dapp@0.14.0:
# Install forge-std and run Foundry tests
npm --workspace=@forrel/contracts run forge-std
npm --workspace=@forrel/contracts run test
# Manage QoreChain PQC key & EVM authorisation window
npm --workspace=@forrel/contracts run window -- status
npm --workspace=@forrel/contracts run window -- open
# Run the live Diana pqcVerify gate (checks @qorechain/qoresign & @noble/post-quantum)
npm --workspace=@forrel/core run gate- Interactive Web Docs:
/docs(3-column reference),/app/how-it-works - Message Specification: docs/message-spec.md
- Threat Model: docs/THREAT_MODEL.md
- Demo files: demo/
- AI usage: AI_USAGE.md
- Product plan: PRD.md
- Scaffold Notes: docs/scaffold-notes.md
- Privacy & Terms:
/privacy,/terms
# Typecheck all workspaces
npm run typecheck
# Start Next.js dev server
npm run dev
# Format with Prettier
npm run formatNote: Per workspace rules in AGENTS.md, web lint, JS tests, and production Next.js builds run on Vercel CI rather than locally.
Questions, bugs and requests go to GitHub Issues. Issues are public: never post keys, keyfiles or passphrases.
Live deployment: https://forrelonq.vercel.app (connected to ForrelRegistry on QoreChain Diana, Chain ID 9800, at deployments/diana.json).
- Open
/appon the live site to browse registered projects, releases, key rotations, and revocations directly from QoreChain Diana. - Open
/app/verify, select a project/release (or upload an artifact), and verify its SHA3-256 fingerprint and ML-DSA-87 signature on-chain. - All read and verification paths work without connecting a wallet or opening an EVM window.
Because QoreChain blocks classical-only EVM writes by default, any wallet submitting on-chain transactions (registering a project, publishing a release, revoking, or rotating a key) needs a registered ML-DSA-87 PQC key and an active EVM authorization window:
- Connect QoreX on QoreChain Diana (Chain ID
9800) with testnetQOR. - Go to
/appand open the New project wizard. - Check the Key & EVM Window panel at the start of the wizard. If your account does not have an active window, open one in QoreX or from
contracts/:npm --workspace=@forrel/contracts run window -- status npm --workspace=@forrel/contracts run window -- register # if PQC key is not registered npm --workspace=@forrel/contracts run window -- open # opens a 600-block / 5-tx window
- Walk through the end-to-end flow: Register project → Publish release → Verify on
/app/verify→ Re-check → Revoke → Rotate key.
This project is licensed under the MIT License — see LICENSE.
Forrel started from create-qorechain-dapp 0.14.0 (notes):
| Template (command) | Where it lives now |
|---|---|
npx create-qorechain-dapp forrel --template foundry --network testnet |
contracts/: foundry.toml, .env.example and the EVM window helper scripts/window.ts |
npx create-qorechain-dapp forrel --template viem-wagmi --network testnet |
The QoreX connector, chain definitions, EVM window check and REST proxy were moved from its Vite app into Next.js: apps/web/lib/wallet/ and next.config.ts |
- QoreChain (
@qorechain/sdk,@qorechain/evm,@qorechain/qorex-rainbowkit,@qorechain/qoresign) - Noble Cryptography (
@noble/post-quantum,@noble/hashes,@noble/ciphers) - viem, wagmi, RainbowKit, Next.js, Tailwind CSS, shadcn/ui, and Foundry (with forge-std)
- next-themes, TanStack Query, Commander, and the Geist and IBM Plex Mono typefaces
- Visual direction: the landing page's layout and typography style were modelled on the KaneCLI hackathon website. The code, copy and artwork here are Forrel's own.
- Illustrations generated with Gemini 4 Hydrogen (prompts). AI coding tools were used throughout: AI_USAGE.md
