QAN
  • QAN
  • What is QAN?
    • Overview of QAN
    • Connect to QAN
  • Solutions
  • Phases
  • Main Features
    • Quantum-Resistant Cryptography
    • Enhanced Data Security
    • Fraud Detection and Prevention
    • Faster Transaction Speeds
    • Energy Efficiency
    • Scalability
    • Future-Proofing
  • Technology Overview
    • Quantum-Resistant Algorithms
    • Quantum Key Distribution (QKD)
    • Smart Contract Capabilities
  • QUANTUM-PROOF ONCHAIN
    • Dilithium5
    • MLDSA-87
    • Input Format for Precompiled Function Calls
  • Use Cases
    • Finance and Banking
    • Healthcare
    • Supply Chain
    • Gaming and NFTs
    • Government and Public Sector
  • FAQ
Powered by GitBook
On this page
  • 1. Input Format Specification
  • 2. Precompiled Contract Addresses
  • 3. Verification Logic
  • 4. Use Cases
  1. QUANTUM-PROOF ONCHAIN

Input Format for Precompiled Function Calls

1. Input Format Specification

When invoking precompiled contracts for Dilithium5 or MLDSA-87 verification, the input must follow this structured byte format:

Copy

[...PUBLIC_KEY...MESSAGE...SIGNATURE]

Field Definitions

Field
Description

PUBLIC_KEY

The public key (Dilithium5: 1,312 bytes / MLDSA-87: ~3 KB)

MESSAGE

Original message (arbitrary length) that was signed

SIGNATURE

Cryptographic signature (Dilithium5: 2.8 KB / MLDSA-87: 2.5 KB)


2. Precompiled Contract Addresses

// Precompiled Contract Addresses
address constant DILITHIUM_VERIFIER = 0x0000000000000000000000000000000000000012;
address constant MLDSA_VERIFIER = 0x0000000000000000000000000000000000000013;

3. Verification Logic

The precompiled contracts:

  1. Validate that SIGNATURE matches MESSAGE when signed by PUBLIC_KEY.

  2. Return 1 (success) or 0 (failure) as a 32-byte word.


4. Use Cases

4.1 Post-Quantum Secure Authentication

  • Verify off-chain signatures before executing sensitive transactions.

4.2 Decentralized Identity

  • Validate quantum-proof credentials in DID (Decentralized Identifiers) systems.

4.3 Gas Optimization

  • 30-50% cheaper than equivalent EVM-based signature verification.

PreviousMLDSA-87NextFinance and Banking

Last updated 1 month ago