03 pqc accounts

PQC (Post-Quantum Cryptography) accounts use ML-DSA-65 (Dilithium3) to provide quantum-resistant security against future quantum computing attacks.

Overview

PQC accounts are designed for long-term security in the quantum computing era. They use ML-DSA-65 (Module-Lattice Digital Signature Algorithm), which is standardized in NIST FIPS 204.

Technical Specifications

Key Sizes

Component
Size
Format

Private Key

4,032 bytes (32,256 bits)

Hex string (8,064 characters)

Public Key

1,952 bytes (15,616 bits)

Binary/Hex format

Address

32 bytes (256 bits)

Bech32m format (pqc1p...)

Signature

3,309 bytes (26,472 bits)

Binary format

ML-DSA-65 Details

  • Algorithm: ML-DSA-65 (CRYSTALS-Dilithium3)

  • NIST Level: Level 3

  • Classical Security: ~192 bits

  • Quantum Security: ~128 bits

  • Standard: NIST FIPS 204

Address Derivation

Version 1 (Recommended - Quantum-Safe):

  • Uses full 32-byte hash

  • Provides 256-bit classical / ~128-bit quantum security

  • Format: pqc1p... (Bech32m)

circle-exclamation

Version 0 (Legacy - Not Quantum-Safe):

  • Uses last 20 bytes of hash

  • Provides 160-bit classical / ~80-bit quantum security

  • Format: pqc1q... (Bech32)

  • ⚠️ Not recommended for new accounts

Signature Format

Component
Size
Description

Public Key

1,952 bytes

Included in transaction (non-recoverable)

Signature

3,309 bytes

Dilithium signature

Total Overhead

~5,261 bytes

Per transaction

Key Difference from ECDSA:

  • ECDSA signatures are recoverable (public key derived from signature)

  • PQC signatures are non-recoverable (public key must be included)

Address Formats

  • HRP: pqc (mainnet) or tpqc (testnet)

  • Version: p (version 1, quantum-safe)

  • Length: ~62 characters

  • Encoding: Bech32m (BIP-350)

Legacy Bech32 Format (Version 0 - Deprecated)

  • HRP: pqc (mainnet) or tpqc (testnet)

  • Version: q (version 0, legacy)

  • Length: ~42 characters

  • Encoding: Bech32 (BIP-173)

  • ⚠️ Not quantum-safe - use Version 1 instead

Algorithm-Specific HRPs

Algorithm
HRP
Example

ML-DSA-44

mld44

mld441p...

ML-DSA-65

mld65

mld651p...

ML-DSA-87

mld87

mld871p...

When to Use PQC Accounts

1

Use PQC When

  • Long-Term Security Required

    • Storing high-value assets for extended periods

    • Planning for quantum computing era (10-30 years)

    • Need quantum-resistant cryptography

  • PQC-Enabled Networks

    • Networks that support PQC transactions

    • Networks that prioritize quantum security

    • Future-proof blockchain infrastructure

  • Maximum Quantum Security

    • Defense against quantum attacks

    • Regulatory compliance requiring quantum resistance

    • Critical infrastructure protection

  • New Account Creation

    • Creating accounts from scratch

    • No need for ECDSA compatibility

    • PQC-native applications

2

Don't Use PQC When

  • Maximum Compatibility Required

    • Need to interact with standard Ethereum dApps

    • Using tools that don't support PQC

    • Deploying to Ethereum mainnet (ECDSA-only)

  • Gas Cost Optimization

    • High-frequency transactions

    • Cost-sensitive operations

    • PQC signatures are ~80x larger than ECDSA

  • Existing Infrastructure

    • Migrating existing ECDSA accounts

    • Using existing smart contracts expecting ECDSA

    • Maintaining backward compatibility

  • Short-Term Use

    • Temporary accounts

    • Test accounts

    • When quantum threat is not immediate

Security Considerations

Quantum Resistance

  • Grover's Algorithm: Address provides ~128-bit quantum pre-image resistance

  • Shor's Algorithm: ML-DSA-65 is resistant to Shor's algorithm

  • Security Level: NIST Level 3 (~128-bit quantum security)

Classical Security

  • Security Level: ~192-bit classical security

  • Attack Resistance: Resistant to all known classical and quantum attacks

  • Longevity: Designed to remain secure for decades

Best Practices

  1. Use Version 1 Addresses: Always use 32-byte Bech32m addresses (pqc1p...)

  2. Secure Key Storage: Private keys are large (4KB) - ensure secure storage

  3. Backup Recovery: Maintain secure backups of private keys and recovery phrases

  4. Network Compatibility: Verify network supports PQC before using

Account Creation

From Random Generation

From Mnemonic

From Key Import

Transaction Signing

PQC transactions use DilithiumTx format:

  • Transaction Type: Type 2 (DilithiumTx)

  • Signature Format: Public key + signature included

  • Gas Cost: Higher due to larger signature size (~5KB overhead)

Gas Cost Considerations

PQC transactions have higher gas costs:

Component
Size
Approximate Gas Cost

Public Key

1,952 bytes

~31,232 gas

Signature

3,309 bytes

~52,944 gas

Total Overhead

~5,261 bytes

~84,176 gas

Compare to ECDSA: ~65 bytes = ~1,040 gas

Gas Cost Ratio: PQC is approximately 80x more expensive than ECDSA.

Limitations

  1. Larger Transaction Size: ~5KB overhead per transaction

  2. Higher Gas Costs: Significantly more expensive than ECDSA

  3. Limited Compatibility: Not all networks/tools support PQC

  4. Non-Recoverable Signatures: Public key must be included in transaction

Migration Considerations

If you need ECDSA compatibility:

  1. Create Hybrid Account: Generate account with both ECDSA and PQC keys

  2. Transfer Funds: Move funds from PQC to Hybrid account

  3. Maintain Security: Hybrid provides both quantum resistance and compatibility

See Hybrid Accounts for details.

  • Account Comparison - Compare all account types

  • ECDSA Accounts - Legacy compatible accounts

  • Hybrid Accounts - Combined ECDSA + PQC

  • Address Formats - Detailed address format guide

  • When to Use Each Account Type - Decision guide