LPsLux Proposals
EVM & Execution
LP-4005

Quantum VM

Final

The Q-Chain VM — an account model keyed by ML-DSA-65 public keys, a transaction format carrying ML-DSA signatures, and the network-wide post-quantum key registry every other chain reads through Warp

Category
Core
Created
2025-01-01

Normative topology + fee model: LP-5210. Q-Chain (quantumvm) has no user-payable blockspace — finality-cert aggregation is a validator obligation, not a fee-metered service. Q-Chain therefore does not fund a fee pool from X.

Abstract

The Quantum VM runs the Q-Chain, the chain dedicated to post-quantum cryptographic operations. Every Q-Chain transaction is signed with ML-DSA (FIPS 204) and keys are encapsulated with ML-KEM (FIPS 203). The Q-Chain is also the post-quantum key registry for the whole Lux network: any chain can verify a PQ signature by referencing Q-Chain state over Warp.

The chain-level specification — parameters, cross-chain integration, RPC surface — is LP-4000. This LP specifies the VM: how an account is shaped, what a transaction looks like, and what the registry holds.

Specification

Account model

Q-Chain accounts are keyed by ML-DSA-65 public keys (1,952 bytes) rather than ECDSA:

Account {
    pubkey      [1952]byte  // ML-DSA-65 public key
    nonce       uint64
    balance     uint256
    codeHash    [32]byte    // for PQ smart contracts
    storageRoot [32]byte
}

An address is keccak256(mldsaPubkey)[12:] — 20 bytes, so existing EVM tooling handles it unchanged.

Transaction format

QTx {
    nonce     uint64
    to        [20]byte
    value     uint256
    data      []byte
    gasLimit  uint64
    gasPrice  uint256
    signature [3309]byte  // ML-DSA-65 signature
}

Signature verification runs on the NTT-accelerated ML-DSA verifier (LP-4076).

Post-quantum key registry

The Q-Chain maintains a registry mapping an address on any Lux chain to its post-quantum public keys:

Registry {
    mapping(address => MLDSAPubkey) public pqKeys;
    mapping(address => MLKEMPubkey) public encryptionKeys;
}

Any user can register PQ keys on the Q-Chain. Other chains verify PQ signatures by querying this registry over Warp.

Precompiles

The canonical as-built addresses are the 0x0122xx post-quantum range in LP-1210. The gas schedule the Quantum VM charges:

AddressFunctionGas
0x012202ML-DSA-65 signature verification15,000
0x012201ML-KEM-768 key encapsulation10,000
0x012201ML-KEM-768 decapsulation10,000
Q-Chain localNTT forward transform5,000
Q-Chain localNTT inverse transform5,000

Migration path

A user moves to post-quantum security in three steps:

  1. Register an ML-DSA key on the Q-Chain, linked to the existing ECDSA address.
  2. Set the PQ key as a backup signer on multi-signature wallets.
  3. When ECDSA is retired, sign exclusively through the Q-Chain.

Security Considerations

  1. Key size. ML-DSA-65 keys are large — 1,952 bytes public, 3,309 bytes per signature. Block size limits account for this.
  2. Hybrid period. During the transition both ECDSA and ML-DSA signatures are accepted. A compromised ECDSA key cannot override a PQ-signed transaction once the PQ key is registered.
  3. Parameter agility. The Q-Chain VM can be upgraded to revised PQ parameter sets through L1 governance — see LP-4020.

Reference

ResourceLocation
Quantum VMgithub.com/luxfi/node/vms/qvm/
ML-DSA implementationgithub.com/luxfi/node/crypto/mldsa/
ML-KEM implementationgithub.com/luxfi/node/crypto/mlkem/
Q-Chain chain specLP-4000

Copyright and related rights waived via CC0.