Code-based cryptography is failing users. It forces users to understand complex transaction mechanics like gas management and slippage tolerance, creating a hostile UX that limits adoption.
Why Code-Based Cryptography Is Fading for Blockchain Use
An analysis of why code-based schemes, despite NIST approval, are being sidelined by blockchain architects in favor of lattice-based and hash-based alternatives due to fundamental performance constraints.
Introduction
Code-based cryptography is being displaced by intent-based architectures as the primary paradigm for user-centric blockchain applications.
Intent abstraction is the new standard. Protocols like UniswapX and CowSwap let users declare what they want, not how to achieve it, outsourcing execution to a competitive solver network.
This is a fundamental architectural pivot. It moves trust from perfect code execution to economic security and competition, a model proven by Across Protocol and intent-centric rollups like Anoma.
The Post-Quantum Consensus Landscape
Classic code-based schemes, once a post-quantum frontrunner, are being abandoned by blockchain architects due to fundamental incompatibilities with decentralized systems.
The Key Size Catastrophe
Code-based schemes like Classic McEliece require megabyte-sized public keys, making on-chain storage and transaction overheads economically impossible. This clashes with the need for light clients and efficient state management.
- Public Key Size: ~1 MB vs. ECDSA's 33 bytes
- State Bloat: Incompatible with EVM gas economics and zk-rollup proof sizes
The Performance Wall
Encryption/decryption in code-based cryptography is orders of magnitude slower than lattice-based alternatives like Kyber (ML-KEM). For consensus and high-frequency DeFi settlements, latency is a non-negotiable constraint.
- Signing Latency: ~10s of ms for Dilithium vs. ~100s of ms for Classic McEliece
- Throughput: Cripples TPS targets for L1s like Solana and Avalanche
The Agility & Standardization Trap
Blockchains require cryptographic agility to respond to breaks. Code-based schemes lack the small, composable primitives that lattice-based cryptography provides, which are essential for zk-SNARKs and FHE. NIST's standardization of CRYSTALS-Dilithium and Falcon sealed its fate.
- Agility: Lattice schemes enable STARKs and Bulletproofs
- Momentum: Ethereum, Algorand, and Polkadot are all evaluating lattice-based PQCs
The Fatal Flaws: Key Size and Latency
Code-based cryptography fails in blockchain due to massive key sizes and slow operations, making it impractical for real-time systems.
Key sizes are untenable. A McEliece public key is 1MB, while an RSA-2048 key is 0.256KB. This makes key distribution and on-chain storage for protocols like Ethereum or Solana economically impossible.
Verification latency kills UX. Signing and verification take milliseconds for ECDSA but seconds for code-based schemes. This breaks high-frequency DeFi applications on Uniswap or dYdX that require sub-second finality.
The trade-off is asymmetric. Post-quantum security is achieved by making classical computers suffer. This creates a dead zone where systems are quantum-resistant but unusable for modern blockchain throughput.
Evidence: The NIST PQC finalist Classic McEliece requires ~1MB keys, while lattice-based CRYSTALS-Dilithium uses ~2KB. The industry standard is shifting toward lattices, not codes, for this exact reason.
Post-Quantum Algorithm Performance Matrix
A direct comparison of post-quantum cryptographic candidates for blockchain use, highlighting the practical trade-offs that make code-based schemes like Classic McEliece non-viable.
| Feature / Metric | Code-Based (Classic McEliece) | Lattice-Based (Kyber/Dilithium) | Hash-Based (SPHINCS+) |
|---|---|---|---|
Public Key Size | 1 MB | 1.3 KB | 1 KB |
Signature Size | ~200 bytes | 2.5 KB | 41 KB |
Verification Speed | < 1 ms | < 1 ms | ~10 ms |
On-Chain Gas Cost (Est.) |
| $5-10 per tx | $20-30 per tx |
NIST Standardization Status | Primary (KEM) | Primary (KEM & Sig) | Primary (Sig) |
Resilient to Side-Channel Attacks | |||
Smart Contract Integration Feasibility | |||
Key Generation Time | ~100 ms | < 10 ms | < 10 ms |
The Steelman: What If Keys Don't Matter?
The dominance of private key management is the primary barrier to mainstream blockchain adoption, forcing a shift towards code-based authentication.
Private keys are a UX dead-end. They demand perfect user custody for a system designed for imperfect humans, creating an insurmountable adoption barrier.
Code-based cryptography replaces key custody. Systems like ERC-4337 account abstraction and MPC wallets (e.g., Safe) delegate signing logic to smart contracts or distributed services.
The model shifts from 'what you have' to 'what you do'. Authentication uses social recovery, biometrics, or device clusters, mirroring Web2 logins without central data silos.
Evidence: The $1B+ in user funds lost annually to key mismanagement proves the current model is unsustainable for mass adoption.
Who's Building What: The Post-Quantum Pipeline
Code-based cryptography, once a leading post-quantum candidate, is being abandoned by blockchain builders due to fundamental incompatibilities with decentralized systems.
The Problem: Gigantic Keys Break Consensus
Classic McEliece keys are ~1MB, making them impossible for on-chain verification or consensus messaging. This breaks the core assumption that all nodes can cheaply verify all signatures, a requirement for networks like Ethereum or Solana.
- State Bloat: Storing public keys would dominate chain storage.
- Network Overhead: Propagating signatures would cripple block propagation times.
The Solution: Lattice-Based Cryptography Dominates
Projects like QANplatform and SandboxAQ are standardizing on lattice-based schemes (e.g., CRYSTALS-Dilithium). These offer ~2KB keys/signatures, making them viable for blockchains. The NIST standardization process has cemented this as the industry's path forward.
- Performance: Verification is fast enough for high-TPS chains.
- Agility: Supports signature aggregation, crucial for rollups like Arbitrum and Optimism.
The Pragmatic Bridge: Hybrid Schemes
Protocols aren't waiting for a full transition. Chainlink's CCIP and cross-chain bridges like LayerZero are deploying hybrid signatures, combining classical ECDSA with post-quantum algorithms. This provides quantum resistance today without breaking existing infrastructure.
- Backwards Compatible: Works with current wallets and tools.
- Risk Mitigation: Protects against 'harvest now, decrypt later' attacks on sensitive data.
The Hidden Cost: Signature Aggregation Dies
Post-quantum signatures kill a key scaling primitive. BLS signatures, used by Ethereum for consensus and rollups like zkSync for cheap batch verification, rely on pairing-friendly curves with no known PQ equivalent. This forces a trade-off between quantum security and scalability.
- Scalability Hit: Rollup proof aggregation becomes more expensive.
- Research Gap: New math is needed to reconcile PQ security with efficient aggregation.
The Roadmap: Hybrid Schemes and Specialized Hardware
Post-quantum cryptography for blockchains is abandoning pure code-based systems in favor of hybrid schemes and hardware-accelerated lattice cryptography.
Hybrid schemes dominate adoption. Projects like NIST's ML-KEM (Kyber) and ML-DSA (Dilithium) are being deployed in hybrid mode, combining classical ECDSA with new PQC algorithms. This provides a safety net against algorithmic breaks in either system, a critical hedge for high-value, immutable ledgers.
Code-based cryptography is fading. Its massive key and signature sizes create prohibitive on-chain bloat. A single Classic McEliece signature is ~1MB, dwarfing a 64-byte ECDSA sig. This directly contradicts blockchain's need for state efficiency, unlike the batched, off-chain verification used in Across Protocol or LayerZero messages.
Lattice cryptography wins for hardware. Algorithms like Falcon and Dilithium are optimized for fast verification, a perfect fit for consensus nodes and validators. Their structure allows for efficient FPGA and GPU acceleration, making them the only viable path for maintaining high TPS in a post-quantum world.
Evidence: Ethereum's PQC R&D efforts explicitly prioritize lattice-based and multivariate schemes, while dismissing code-based and hash-based signatures for general transaction use due to their size and verification overhead.
TL;DR for the Time-Poor CTO
Code-based cryptography, once a promising post-quantum candidate, is being abandoned by blockchain due to fundamental incompatibilities with decentralized systems.
The Problem: Gigantic Keys & Signatures
Code-based schemes like Classic McEliece produce signatures in the megabyte range and public keys in hundreds of kilobytes. This is untenable for blockchains where every node must store and verify every signature, bloating state and crippling throughput.\n- State Bloat: A single signature can be larger than an entire block.\n- Network Overhead: Propagating transactions becomes a bandwidth DoS attack.
The Solution: Lattice-Based Cryptography
Schemes like CRYSTALS-Dilithium (NIST-standardized) and FALCON offer compact signatures (~2-4KB) and fast verification, aligning with blockchain's resource constraints. Projects like QANplatform and SandboxAQ are pioneering integrations.\n- Compact Footprint: Keys and signatures are orders of magnitude smaller.\n- Performance: Verification is fast enough for high-TPS environments.
The Problem: Lack of Aggregation & Composability
Blockchain scaling relies on signature aggregation (BLS in Ethereum, EdDSA in Solana) and smart contract composability. Code-based schemes are mathematically opaque and cannot be efficiently aggregated or easily used in ZK-SNARK circuits.\n- No BLS-Like Magic: Kills layer-2 and rollup efficiency gains.\n- ZK-Unfriendly: Hinders privacy-preserving applications.
The Pragmatic Path: Hybrid Schemes & Phased Migration
The industry consensus is to use hybrid signatures (e.g., ECDSA + Dilithium) during transition, as seen in proposals from the PQShield and Cloudflare research. This preserves current security while adding quantum resistance.\n- Backwards Compatibility: No breaking changes to existing wallets/transactions.\n- Risk Mitigation: Defends against both classical and quantum adversaries.
The Ultimate Benchmark: On-Chain Gas Cost
The final arbiter is gas. Early benchmarks show lattice-based verification at ~500k gas vs. ECDSA's ~3k gas. Code-based would be prohibitively expensive (>10M gas), making simple transfers economically impossible.\n- Economic Viability: Lattice is expensive but feasible; code-based is not.\n- Optimization Frontier: Dedicated precompiles (like EIP-7212) are essential.
Entity Spotlight: QANplatform & The Pragmatists
While theoretical papers still explore code-based crypto, real-world blockchain builders have unanimously pivoted. QANplatform launched the first quantum-resistant L1 with lattice-based sigs. Ethereum, Algorand, and Polkadot ecosystems are all researching lattice/ZKP hybrids, not code-based.\n- Market Signal: Builders vote with their code.\n- Future-Proofing: Lattice schemes are agile and can be upgraded as math advances.
Get In Touch
today.
Our experts will offer a free quote and a 30min call to discuss your project.