Technology

The cryptography, with its costs on the table.

Quoriel verifies post-quantum signatures in ordinary Solidity on Elysium. Here is which schemes it supports, what each costs, and what is implemented versus planned.

Supported schemes

One interface, several algorithms.

Status is literal. Experimental means an onchain verifier exists in this repository and is tested but unaudited. Local only means the browser can generate keys and sign, but no vault can verify them yet.

SchemeStandardStatusPublic keySignatureEVM verificationStateful
Lamport-Keccak256
Hash-based, one-time
Lamport (1979); not a NIST standardExperimental16 KiB16 KiB≈85k execution gas, measured with Foundry, plus calldataYes, one-time
ML-DSA-65
Lattice-based (Module-LWE)
NIST FIPS 204Local only1.9 KiB3.2 KiBPublic Solidity verifiers exist for ML-DSA-44 only (≈1.2M–8.1M gas); none integrated hereNo
SLH-DSA-SHA2-128s
Hash-based, stateless
NIST FIPS 205Local only32 B7.7 KiBNo production EVM verifier known; SHA-256 precompile makes it feasible but heavyNo
ML-DSA-44
Lattice-based (Module-LWE)
NIST FIPS 204Planned1.3 KiB2.4 KiB≈1.2M gas (Fireblocks, 2026) to ≈8.1M gas (ZKNoX ETHDILITHIUM), as publishedNo

Sizes for ML-DSA and SLH-DSA are FIPS 204 and FIPS 205 parameter-set sizes, confirmed against @noble/post-quantum. Third-party gas figures are as published by their authors.

Try it

Generate a key in this tab.

Real key generation and a sign-then-verify self-test, using the same libraries as the app. The secret is discarded immediately.

Lamport-Keccak256Experimental

Security rests only on the preimage resistance of Keccak-256. Each key signs exactly one authorization; the vault consumes it and moves to the next key committed in the same signature.

Onchain verifier in this repo, tested. Experimental, unaudited, not deployed.

@noble/hashes keccak_256 · contracts/src/verifiers/LamportKeccakVerifier.sol

Generates a real key pair in this tab, signs a test message, verifies it, and discards the secret.
Authorization digest

Everything a signature commits to.

The vault computes the digest itself. The browser signs exactly what the contract will check, and nothing the owner did not intend can be substituted.

DOMAIN_TAGbytes32keccak256("QVAULT_AUTHORIZATION_V1"). Separates these digests from any other use of the key. The tag keeps its original name so existing signatures and tests stay valid.
block.chainiduint256Elysium mainnet 99901. A signature for testnet is useless on mainnet.
address(this)addressThe vault. A signature for one vault cannot be replayed on another.
actionuint8Withdraw, GrantPermission, UpdatePermission, RotateKey or CancelRecovery.
payloadHashbytes32keccak256 of the action's parameters: token, recipient, amount, limits…
nonceuint256Increments on every authorization. Replays fail.
deadlineuint256Unix time after which the signature is rejected.
nextKeyCommitmentbytes32Commitment to the key that replaces the one being consumed.
Architecture

Components and trust boundaries.

03

Smart Contract Vault

Holds the assets. Stores a 32-byte commitment to the current post-quantum key, an authorization nonce, the permission table and any pending recovery.

Holds
  • Native HYPE and ERC-20 balances
  • keyCommitment, nonce, consumed commitments
  • Permissions and recovery state
Trust assumption

The contract code. It is tested (37 Foundry tests) but not audited and not deployed by the project.

contracts/src/QVault.sol
contracts/src/QVaultFactory.sol
Engineering constraints

How each constraint is handled.

Signature size

Lamport signatures are 16,384 bytes. Calldata, not computation, dominates cost, which is part of why Elysium's AnyTrust data availability matters.

Verification gas

≈85k execution gas for the Lamport verifier and ≈188k for a full withdrawal, measured with Foundry, excluding calldata.

EVM limits

No post-quantum precompiles exist on Elysium. Everything runs as ordinary Solidity using the native Keccak-256 opcode.

Key storage

Vaults store a 32-byte commitment. Full public keys never touch storage. Seeds stay in the browser.

Reuse prevention

Each authorization marks its key's commitment as consumed and requires a different next commitment. Consumed commitments can never return.

Replay protection

Chain ID, vault address, nonce and deadline are bound into every digest. Tests cover cross-chain, replay and expiry.

Algorithm versioning

Verifiers expose algorithmId(). Vaults point at a verifier address and can migrate with rotateKey.

Key rotation

Automatic for one-time keys. rotateKey also moves a vault to a fresh seed or a different verifier.

Recovery

A time-locked ECDSA path replaces a lost key after a delay of at least two days, cancellable with the current post-quantum key.