Lux Precompiles

Cryptography Precompiles

Post-quantum and threshold signature precompiles

Cryptography Precompiles

Native implementations of post-quantum cryptography and threshold signature schemes.

Address Range

Cryptography precompiles occupy addresses 0x0200...0005 through 0x0200...000D.

Precompiles

Post-Quantum Signatures

AddressPrecompileGasDescription
0x...0005PQCryptoVariableMulti-algorithm PQ operations
0x...0006ML-DSA100,000FIPS 204 post-quantum signatures
0x...0007SLH-DSA150,000Stateless hash-based signatures
0x...0009ML-KEM50,000FIPS 203 key encapsulation
0x...000AQuasarVariableQuantum consensus operations

Threshold Signatures

AddressPrecompileGasDescription
0x...000BRingtail150,000Post-quantum threshold signatures
0x...000CFROST50,000Schnorr threshold signatures
0x...000DCGGMP2175,000ECDSA threshold signatures

Cross-Chain

AddressPrecompileGasDescription
0x...0008Warp120,000Cross-chain BLS messaging

Usage

import {IMLDSA} from "@luxfi/precompile/mldsa/IMLDSA.sol";

contract QuantumSafeContract {
    IMLDSA constant MLDSA = IMLDSA(0x0200000000000000000000000000000000000006);

    function verifySignature(
        bytes calldata publicKey,
        bytes calldata message,
        bytes calldata signature
    ) external view returns (bool) {
        return MLDSA.verify(publicKey, message, signature);
    }
}

Security Levels

AlgorithmClassical SecurityQuantum Security
ML-DSA-44128-bitNIST Level 2
ML-DSA-65192-bitNIST Level 3
ML-DSA-87256-bitNIST Level 5
SLH-DSAVariableNIST Level 1-5
Ringtail128-bitQuantum-resistant

On this page