Post-Quantum Cryptography

How Realm achieves quantum-resistant security

Why Post-Quantum?

Traditional cryptocurrencies use ECDSA or EdDSA signatures, which will be broken by quantum computers running Shor's algorithm. Realm uses lattice-based cryptography that remains secure even against quantum attacks.

Dilithium-3 Signatures

Realm uses ML-DSA-65 (Dilithium-3), a NIST-standardized post-quantum signature scheme. It provides 128-bit security against both classical and quantum adversaries.

dilithium-specstext
// Key sizes
Public Key: 1,952 bytes
Private Key: 4,000 bytes
Signature: 3,309 bytes
// Performance (on modern CPU)
Key Generation: ~0.1ms
Sign: ~0.3ms
Verify: ~0.1ms

BLAKE3 Hashing

All hashes in Realm use BLAKE3, a cryptographic hash function that's:

  • Fast - 4x faster than SHA-256
  • Secure - 256-bit security
  • Parallelizable - Scales with CPU cores

Address Derivation

address-derivation.tstypescript
// Address = BLAKE3(public_key)[0:32]
// Displayed as 0x-prefixed hex (66 characters)
const pubkey = await wallet.getPublicKey();
const address = blake3(pubkey).slice(0, 32);
// 0x2ef98ffc7ba9431f67e611bb6e425cdcccb1a60c...

Transaction Signing

Every transaction is signed with Dilithium-3. The signature covers:

  • Transaction type and parameters
  • Sender address (derived from pubkey)
  • Nonce (replay protection)
  • Chain ID (cross-chain protection)