Share

Hardware accelerator tightly coupled to a RISC-V core for post-quantum cryptography

image numérique
With the development of quantum computers—and their threat to modern cryptography—post-quantum cryptography is gradually making inroads into the industrial ecosystem. HQC (Hamming Quasi- Cyclic) is one of the post-quantum encryption algorithms recently standardized by NIST. The algorithm, based on a mathematical formalism derived from code theory, exhibits relatively high runtimes when deployed on the microcontrollers found in embedded systems. We developed TYRCA, an HQC accelerator designed specifically for RISC-V processors. A CV-X-IF interface is used to tightly couple the accelerator to the processor core. TYRCA sped up the algorithm’s runtime by 94% to 95 % and, on an FPGA implementation, obtained a beyond-state-of-the-art performance-to-area ratio.

Quantum computers, which have the potential to revolutionize medicine, materials science, and artificial intelligence, also represent a threat to the security of our communications. Cryptographic systems like RSA, Diffie-Hellman, and ECC have been shown to be vulnerable to quantum attacks. Post-quantum cryptography (PQC) aims to develop systems resistant to these attacks.

The HQC algorithm, which is based on error-correction codes, was selected as the standard by NIST in 2025. The proposed methods for HQC software implementation perform relatively poorly compared to alternative Euclidean-network-based solutions. Hardware implementations, while faster, rely on polynomial multiplication involving very large polynomials requiring a very large silicon area—the algorithm’s main bottleneck.

 


Architecture diagram of a system-on-chip with the TYRCA coprocessor coupled to the RISC-V CV32E40PX core. The coprocessor consists of a CV-X-IF controller and a set of hardware accelerators for specific HQC operations, including Keccak, polynomial multiplication (Karatsuba), and Reed-Solomon (RS) decoding.


 

Tightly-coupled acceleration, which encapsulates the algorithm’s recurring operations in custom instructions added to the processor instruction set, offers an alternative to conventional hardware acceleration methods. The accelerator can be tightly integrated into the RISC-V processor execution pipeline using the Core-V eXtension Interface(CV-X-IF). This solution offers transparent speed increases while overcoming the traditional hurdles to ISA extension.

 


Figure 1 : RISC-V pipeline integration strategy with CV-X-IF


 

We applied this new, tightly-coupled acceleration strategy and designed three dedicated hardware acceleration technologies targeting the HQC algorithm’s main bottlenecks. The first, R-Unit, uses a multi-level Karatsuba algorithm to speed up polynomial multiplication on 32-bit blocks with four custom instructions to ensure that the results are completely controlled. The second, RS-Decoder, contains several specialized instructions to eliminate loops and intermediate results, speeding up key Galois field operations like carry-free multiplication and final zero counting. The third, the Keccak accelerator, leverages a dedicated register and three custom instructions to ensure efficient loading, processing, and storage. This minimizes overhead compared to conventional loosely-coupled approaches, for effective management of the 1,600-bit permutation state.

TYRCA, with its tightly-coupled acceleration, delivers substantial performance improvements over the original HQC software implementation. The number of clock cycles in key generation (KeyGen) and encapsulation and decapsulation (Encaps, Decaps) operations is reduced by around 95% at all security levels (HQC-128/192/256). This approach also substantially reduces instruction memory use. Implemented on a Kintex-7 FPGA target, TYRCA occupies less than 26% of the total system-on-chip area. R-Unit, which delivers the highest performance improvement, takes up less than 10 % of the area. Normalized velocity metrics (velocity/surface) confirm that TYRCA outperforms the existing loosely-coupled approaches.


 

Figure 2 : Multi-level Karatsuba decomposition in R-unit
Figure 3 : Reduction in total number of cycles on HQC showing performance gains

 

Learn more

Flagship publication

  • « TYRCA: A RISC-V Tightly-coupled accelerator for Code-based Cryptography ». Dolmeta, A., Di Matteo, S.,Valea, E., Carmona, M., Loiseau, A., Martina, M., & Masera, G. (2025, March). In 2025 Design, Automation & Test in Europe Conference (DATE) (pp. 1-7). https://doi.org/10.23919/DATE64628.2025.10993202 This paper was selected as Best Paper Candidate at the DATE conference (12 papers selected out of 330 accepted at the conference and over 1,200 submissions). The results published show speeds 20 times faster than the reference software implementation of the HQC post-quantum cryptography algorithm.

 

Contributors to this article

  • Stefano Di Matteo, Research Engineer, CEA-List
  • Emanuele Valea, Research Engineer, CEA-List
  • IN PARTNERSHIP WITH CEA-LETI AND POLITECNICO DI TORINO