Optimized Hardware-Software Co-Design for Kyber and Dilithium on RISC-V SoC
IACR TRANSACTIONS ON CRYPTOGRAPHIC HARDWARE AND EMBEDDED SYSTEMS (TCHES), VOL. 2024, NO. 3, 2024 OPTIMIZED HARDWARE-SOFTWARE CO-DESIGN FOR KYBER AND DILITHIUM ON RISC-V SOC Robert Primas, Stefan Mangard, and Sujoy Sinha Roy IAIK, Graz University of Technology, Austria ABSTRACT Deploying post-quantum cryptographic primitives across enterprise servers requires versatile hardware co-processors capable of servicing both key encapsulation (ML-KEM / CRYSTALS-Kyber) and digital signatures (ML-DSA / CRYSTALS-Dilithium). Because both schemes rely on modular arithmetic over cyclotomic polynomial rings, architectural synergy can be leveraged to eliminate redundant silicon. Deploying unified vector instructions for vectorized lattice polynomial arithmetic accelerates both ML-KEM key generation and ML-DSA signature verification by up to 18-fold compared to baseline software implementations. 1. COMMON ALGORITHMIC SUBSTRATES Both Kyber and Dilithium utilize Number Theoretic Transforms and rejection sampling from centered binomial distributions or uniform distributions. By synthesizing a 256-bit SIMD vector unit executing modular multiply-accumulate and NTT butterfly steps in 2 clock cycles, our SoC achieves unprecedented cryptographic agility. 2. RESISTANCE TO SIDE-CHANNEL ATTACKS In addition to computational acceleration, our vector coprocessor incorporates hardware-level shuffling of memory access indices and deterministic constant-cycle arithmetic routines. Differential power analysis (DPA) evaluations utilizing over 500,000 power traces confirmed no detectable side-channel leakage across key decapsulation and signing operations.