1. Executive Synthesis & The 2027 Threat Landscape

The global technological architecture is undergoing its most profound cryptographic restructuring in half a century. The mathematical assumptions underpinning modern security—namely, the intractability of integer factorization (RSA) and discrete logarithms over elliptic curves (ECDSA, Ed25519)—will be decisively compromised by Cryptanalytically Relevant Quantum Computers (CRQCs) running Shor's algorithm.

While fault-tolerant quantum computers capable of breaking RSA-2048 in polynomial time remain a multi-year engineering challenge, the security threshold for long-lived sensitive communications has already expired. Financial contracts, corporate IP, sensitive customer records, and regulatory archives carry legal lifespans ranging from 10 to 30 years. Any encrypted message transmitted over public networks today is subject to exfiltration and archival.


2. Threat Modeling: Harvest Now, Decrypt Later (HNDL)

Under the Harvest Now, Decrypt Later (HNDL) attack paradigm, adversary intelligence agencies and sophisticated cyber syndicates intercept encrypted high-value enterprise traffic today, storing the raw ciphertext in petabyte-scale data repositories. Once a CRQC becomes operational, all historic key exchanges (such as Diffie-Hellman and ECDH) are trivially broken, exposing:

  • Encrypted database backups, customer records, and long-term transaction ledgers.
  • Sovereign credentials, API secrets, and cloud infrastructure keys.
  • Institutional master key derivation material and long-term root secrets.
  • Customer personally identifiable information (PII) subject to GDPR, HIPAA, and financial secrecy mandates.

Consequently, US National Security Memorandum 10 (NSM-10) directs federal agencies to inventory and migrate quantum-vulnerable cryptography, and the ICT risk management requirements of the EU Digital Operational Resilience Act (DORA) lead many financial institutions to plan a transition to hybrid or post-quantum algorithms for long-lived data.


3. Mathematical Foundations of Lattice Cryptography

NIST's standardized post-quantum algorithms (FIPS 203, FIPS 204, and FIPS 205) are founded on the geometric hardness of high-dimensional lattices. Unlike RSA and ECC, lattice problems have no known sub-exponential quantum algorithms.

Module Learning With Errors (M-LWE)

The core mathematical engine of ML-KEM (FIPS 203). Operates over polynomial rings $R_q = \mathbb{Z}_q[X]/(X^n + 1)$, where $n = 256$ and $q = 3329$. Provides worst-case to average-case hardness reductions to standard lattice problems such as SIVP (Shortest Independent Vectors Problem).

Number Theoretic Transform (NTT)

Polynomial multiplications in $R_q$ are computed in $O(n \log n)$ time using negative wrapped convolution via NTT. Crypto Service does not implement this arithmetic itself: crypto-lib calls @noble/post-quantum, which is not independently audited and does not guarantee constant-time execution.

Module Short Integer Solution (M-SIS)

The security foundation of ML-DSA (FIPS 204). Guarantees unforgeability against chosen-message attacks under the hardness of finding short vectors in a random module lattice, with rejection sampling ensuring signatures leak no secret state.

Stateless Hash-Based Signatures (SLH-DSA)

Standardized in FIPS 205. Rely exclusively on the collision-resistance of cryptographic hash functions (SHAKE-256 and SHA-2). Acts as a conservative fallback if unexpected structural breakthroughs occur in lattice theory.


4. Sizes and Benchmarks

The main cost of moving to lattice-based algorithms is size: ML-KEM ciphertexts and ML-DSA signatures are much larger than their elliptic-curve counterparts. The sizes below are fixed by the standards. Timing figures previously shown here did not come from committed benchmark code and have been withdrawn; run node benchmarks/crypto-bench.ts from the repository to measure on your own hardware.

Algorithm Type NIST Level Ciphertext / Sig Size
ML-KEM-768 PQ Lattice KEM Level 3 (AES-192) 1,088 bytes
RSA-3072 Classical Factorization Level 3 Equivalent 384 bytes
X25519 Classical Curve Level 1 Equivalent 32 bytes
Hybrid KEM (X25519 + ML-KEM-768, library-specific combiner) Dual-Key Hybrid Dual Classical + PQ 1,120 bytes
ML-DSA-65 PQ Lattice Signature Level 3 (AES-192) 3,309 bytes
Ed25519 Classical Curve Signature Level 1 Equivalent 64 bytes

Sizes in bytes as specified by FIPS 203, FIPS 204, RFC 7748 and RFC 8032; the hybrid ciphertext is the X25519 public value plus the ML-KEM-768 ciphertext.


5. Side-Channel & Fault-Injection Countermeasures

Software implementations of lattice cryptography are particularly susceptible to physical and microarchitectural side-channel attacks, notably cache-timing leaks during polynomial division and power analysis during rejection sampling.

What Crypto Service Suite does and does not provide

  • No constant-time guarantee: Lattice arithmetic comes from @noble/post-quantum, which does not guarantee constant-time execution. The suite has not been evaluated against timing, power or fault-injection attacks.
  • Secret comparisons: crypto-lib exports a constant-time timingSafeEqual, used by the PAKE (OPAQUE) MAC checks; not every internal comparison has been audited for constant-time behaviour.
  • Limited zeroization: wipeMemory() and SecureBuffer are available to callers, but crypto-lib's own APIs do not call them, and keys handled as hex strings cannot be wiped.

6. Strategic 2025–2027 Institutional Transition Roadmap

Institutions must execute a structured, multi-phase migration to avoid operational disruption across critical infrastructure:

PHASE 1 // 2025

Cryptographic Discovery & Automated CBOM

Audit and inventory every algorithmic dependency across your codebases and pipelines. Generate CycloneDX 1.6 CBOM artifacts using @sebastienrousseau/crypto-cbom as input to DORA ICT risk work.

PHASE 2 // 2026

Dual-Key Hybrid Enclaves & Gateway Upgrades

Deploy RFC 10024 hybrid key encapsulation (X25519 + ML-KEM-768) alongside existing TLS 1.3 infrastructure. Manage key-encryption keys through a KMS (crypto-kms implements AWS KMS today).

PHASE 3 // 2027

Pure Post-Quantum Consensus & CNSA 2.0 Compliance

Transition high-value communication and data-at-rest stores to pure FIPS 203 (ML-KEM) and FIPS 204 (ML-DSA) primitives ahead of CNSA 2.0 enforcement deadlines.


7. Post-Quantum Migration Architecture & Interbank Rails

Interbank settlement, payment messaging networks, and digital asset custody rails require deterministic, backwards-compatible upgrade paths to post-quantum algorithms without disrupting live transactional SLAs.

Transport Layer Security (TLS 1.3)

Deploy hybrid key encapsulation (X25519 + ML-KEM-768) within interbank gateways. The session key stays secure as long as either component remains unbroken.

Data-at-Rest & Field Encryption

Transparent database envelope encryption via @sebastienrousseau/crypto-prisma and crypto-typeorm protects customer records and sensitive account numbers prior to persistence.

Transaction Signing & Non-Repudiation

High-value transaction payloads are signed using ML-DSA-65 (FIPS 204), delivering post-quantum non-repudiation and deterministic verification across wholesale banking rails.

Key Management

@sebastienrousseau/crypto-kms offers one interface for key management backends. AWS KMS is implemented; GCP, Azure and Vault providers are stubs, and there is no HSM or PKCS#11 integration.