Skip to main content
QUICK REVIEW

[Paper Review] Code-based Cryptography in IoT: A HW/SW Co-Design of HQC

Maximilian Schöffel, Johannes Feldmann|arXiv (Cornell University)|Jan 12, 2023
Cryptographic Implementations and SecurityComputer Science3 citations
TL;DR

This paper presents the first ASIC and FPGA implementation of the code-based Hamming Quasi-Cyclic Key Encapsulation Mechanism (HQC), a post-quantum cryptographic primitive from the NIST PQC standardization process. By combining software optimizations, custom RISC-V instruction set extensions, and loosely coupled hardware accelerators, the authors achieve energy efficiency and performance comparable to state-of-the-art lattice-based schemes, demonstrating that HQC is a viable alternative for low-power IoT applications with significantly reduced hardware overhead.

ABSTRACT

Recent advances in quantum computing pose a serious threat on the security of widely used public-key cryptosystems. Thus, new post-quantum cryptographic algorithms have been proposed as part of the associated US NIST process to enable secure, encrypted communication in the age of quantum computing. Many hardware accelerators for structured lattice-based algorithms have already been published to meet the strict power, area and latency requirements of low-power IoT edge devices. However, the security of these algorithms is still uncertain. Currently, many new attacks against the lattice structure are investigated to judge on their security. In contrast, code-based algorithms, which rely on deeply explored security metrics and are appealing candidates in the NIST process, have not yet been investigated to the same depth in the context of IoT due to the computational complexity and memory footprint of state-of-the-art software implementations. In this paper, we present to the best of our knowledge the first HW/SW co-design based implementation of the code-based Hamming Quasi Cyclic Key-Encapsulation Mechanism. We profile and evaluate this algorithm in order to explore the trade-off between software optimizations, tightly coupled hardware acceleration by instruction set extension and modular, loosely coupled accelerators. We provide detailed results on the energy consumption and performance of our design and compare it to existing implementations of lattice- and code-based algorithms. The design was implemented in two technologies: FPGA and ASIC. Our results show that code-based algorithms are valid alternatives in low-power IoT from an implementation perspective.

Motivation & Objective

  • To evaluate the feasibility of code-based post-quantum cryptography, specifically HQC, in low-power IoT environments where hardware efficiency is critical.
  • To address the high computational and memory overhead of software-only HQC implementations by exploring hardware-software co-design strategies.
  • To compare HQC’s energy efficiency, latency, and resource utilization against state-of-the-art lattice-based and code-based PQC schemes.
  • To demonstrate that HQC can be implemented efficiently in hardware with minimal area and power consumption, making it a strong candidate for IoT deployment.

Proposed method

  • The authors developed a custom RISC-V processor with instruction set extensions to accelerate frequently used operations in HQC, such as finite field arithmetic and error-correcting code operations.
  • They implemented a loosely coupled hardware accelerator for the core HQC operations, including the syndrome computation and error correction decoding, using a modular design to reduce area overhead.
  • Software optimizations were applied to the NIST reference implementation of HQC, focusing on loop unrolling, memory access reduction, and efficient use of the RISC-V instruction set.
  • The system was co-designed for both FPGA (Xilinx Artix-7) and ASIC (22nm) technologies to evaluate performance, area, and energy trade-offs.
  • A DMA-based data transfer mechanism was integrated to offload memory bandwidth pressure and improve throughput.
  • The final design was evaluated using metrics such as clock cycles, energy consumption, and resource utilization, with direct comparison to existing lattice- and code-based implementations.

Experimental results

Research questions

  • RQ1Can code-based post-quantum cryptography, specifically HQC, be efficiently implemented in low-power IoT devices using hardware-software co-design?
  • RQ2What is the optimal trade-off between software optimization, instruction set extension, and dedicated hardware acceleration for HQC in terms of energy, latency, and area?
  • RQ3How does the energy efficiency and performance of HQC compare to state-of-the-art lattice-based KEMs like Kyber and NewHope in hardware-accelerated IoT systems?
  • RQ4Can HQC be implemented with comparable area and power consumption to lattice-based schemes while maintaining competitive performance and security?

Key findings

  • The proposed HW/SW co-design reduces the number of clock cycles for HQC key generation to 56k, encapsulation to 131k, and decapsulation to 557k at 700 MHz on 22nm ASIC, outperforming software-only HQC on Cortex M4.
  • The ASIC implementation consumes only 1.02 μJ for key generation, 2.41 μJ for encapsulation, and 7.1 μJ for decapsulation—significantly lower than the 500 μJ, 1184 μJ, and 1872 μJ consumed by the software-only HQC on Cortex M4.
  • The design achieves comparable performance to the low-latency HQC hardware implementation but with 58% less LUTs and 85% less registers, demonstrating superior area efficiency.
  • Compared to Kyber’s ASIC implementation, the proposed HQC design consumes 83% less energy for key generation, 74% less for encapsulation, and 37% less for decapsulation, despite being fabricated on a smaller process node.
  • The use of instruction set extensions and modular accelerators provides measurable performance gains with minimal area overhead, validating the co-design approach.
  • The FPGA prototype achieves 700 MHz operation with 8k LUTs and 2.4k registers, showing that the design is scalable and suitable for prototyping and deployment in resource-constrained environments.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.