06 address formats

This page explains the different address formats used by each account type in the Konet PQC Wallet.

Address Format Overview

Account Type
Primary Format
Alternative Format
Length

ECDSA

0x... (hex)

N/A

20 bytes

PQC

pqc1p... (Bech32m)

0x... (legacy)

32 bytes

Hybrid

0x... (hex)

pqch1p... (Bech32m)

20 bytes

ECDSA Address Format

Standard Format

0x742d35Cc6634C0532925a3b844Bc9e7595f8b2a1

Characteristics:

  • Prefix: 0x (hexadecimal indicator)

  • Length: 40 hex characters (20 bytes)

  • Case: Case-insensitive (checksummed addresses use mixed case)

  • Encoding: Hexadecimal

  • Derivation: keccak256(PublicKey)[12:32]

Checksummed Format (EIP-55)

Purpose:

  • Error detection for typos

  • Mixed case provides checksum validation

  • Recommended for user-facing displays

Example

PQC Address Format

Structure:

Characteristics:

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

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

  • Length: ~62 characters

  • Address Bytes: 32 bytes (256 bits)

  • Encoding: Bech32m (BIP-350)

  • Derivation: keccak256(DilithiumPublicKey) (full 32 bytes)

Security:

  • ✅ Quantum-safe (256-bit classical / ~128-bit quantum)

  • ✅ Recommended for all new PQC accounts

Legacy Bech32 Format (Version 0 - Deprecated)

Structure:

Characteristics:

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

  • Version: q (version 0, legacy)

  • Length: ~42 characters

  • Address Bytes: 20 bytes (160 bits)

  • Encoding: Bech32 (BIP-173)

  • Derivation: keccak256(DilithiumPublicKey)[12:32] (last 20 bytes)

Security:

  • ❌ Not quantum-safe (160-bit classical / ~80-bit quantum)

  • ⚠️ Deprecated - use Version 1 instead

Algorithm-Specific HRPs

For explicit algorithm identification:

Algorithm
HRP
Example

ML-DSA-44

mld44

mld441p5cyxnuxmeuwuvkwfem96lqzszee2rssamrj7zc4uy5sw8hgctyq...

ML-DSA-65

mld65

mld651p5cyxnuxmeuwuvkwfem96lqzszee2rssamrj7zc4uy5sw8hgctyq...

ML-DSA-87

mld87

mld871p5cyxnuxmeuwuvkwfem96lqzszee2rssamrj7zc4uy5sw8hgctyq...

Testnet Variants:

  • tmld44, tmld65, tmld87 (testnet)

Legacy Hex Formats (Deprecated)

Warning: These formats are deprecated and should not be used for new addresses.

Hybrid Address Format

Standard Format (ECDSA-Compatible)

Characteristics:

  • Format: Standard Ethereum address (0x-prefixed hex)

  • Length: 40 hex characters (20 bytes)

  • Derivation: keccak256(ECDSAPublicKey)[12:32]

  • Compatibility: Full Ethereum ecosystem compatibility

Purpose:

  • Maintains backward compatibility with existing Ethereum infrastructure

  • Works with all standard Ethereum tools and dApps

Bech32m Format (PQC-Enabled)

Structure:

Characteristics:

  • HRP: pqch (mainnet) or tpqch (testnet)

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

  • Length: ~62 characters

  • Address Bytes: 32 bytes (256 bits)

  • Encoding: Bech32m (BIP-350)

  • Derivation: keccak256(ECDSAPublicKey || DilithiumPublicKey) (full 32 bytes)

Note: The wallet primarily uses ECDSA address format for Hybrid accounts to maintain compatibility.

Address Derivation Details

1

ECDSA Address

2

PQC Address (Version 1)

3

PQC Address (Version 0 - Legacy)

4

Hybrid Address

Address Validation

ECDSA Address Validation

  • ✅ Starts with 0x

  • ✅ Exactly 40 hex characters after 0x

  • ✅ Valid hexadecimal characters (0-9, a-f, A-F)

  • ✅ Optional: EIP-55 checksum validation

PQC Address Validation

  • ✅ Valid HRP (pqc, tpqc, mld44, mld65, mld87, etc.)

  • ✅ Contains exactly one 1 separator

  • ✅ Valid Bech32/Bech32m character set

  • ✅ Valid checksum (Bech32 for v0, Bech32m for v1+)

  • ✅ Correct payload length (20 bytes for v0, 32 bytes for v1)

Hybrid Address Validation

  • ✅ ECDSA format: Same as ECDSA validation

  • ✅ Bech32m format: Same as PQC validation with pqch/tpqch HRP

Address Conversion

PQC: Legacy to Bech32m

Hybrid: ECDSA to Bech32m

Best Practices

  • Use Version 1 Addresses: Always use 32-byte Bech32m addresses for PQC accounts

  • Validate Before Use: Always validate address format before transactions

  • Display Checksummed: Use EIP-55 checksummed format for ECDSA addresses

  • Preserve Format: Maintain address format when copying/storing

  • Network Awareness: Use correct HRP for mainnet vs testnet

  • ECDSA Accounts - ECDSA account details

  • PQC Accounts - PQC account details

  • Hybrid Accounts - Hybrid account details

  • Account Comparison - Compare all account types