Single trace HQC shared key recovery with SASCA

Authors

  • Guillaume Goy XLIM, University of Limoges, Limoges, France; Univ. Grenoble Alpes, CEA, Leti, MINATEC Campus, F-38054 Grenoble, France
  • Julien Maillard XLIM, University of Limoges, Limoges, France; Univ. Grenoble Alpes, CEA, Leti, MINATEC Campus, F-38054 Grenoble, France
  • Philippe Gaborit XLIM, University of Limoges, Limoges, France
  • Antoine Loiseau Univ. Grenoble Alpes, CEA, Leti, MINATEC Campus, F-38054 Grenoble, France

DOI:

https://doi.org/10.46586/tches.v2024.i2.64-87

Keywords:

Soft Analytical Side-Channel Attack (SASCA), Belief Propagation (BP), Hamming Quasi-Cyclic (HQC), Post-Quantum Cryptography (PQC), Single Trace, Shared key recovery, Reed-Solomon (RS) codes

Abstract

This paper presents practicable single trace attacks against the Hamming Quasi-Cyclic (HQC) Key Encapsulation Mechanism. These attacks are the first Soft Analytical Side-Channel Attacks (SASCA) against code-based cryptography. We mount SASCA based on Belief Propagation (BP) on several steps of HQC’s decapsulation process. Firstly, we target the Reed-Solomon (RS) decoder involved in the HQC publicly known code. We perform simulated attacks under Hamming weight leakage model, and reach excellent accuracies (superior to 0.9) up to a high noise level (σ = 3), thanks to a re-decoding strategy. In a real case attack scenario, on a STM32F407, this attack leads to a perfect success rate. Secondly, we conduct an analogous attack against the RS encoder used during the re-encryption step required by the Fujisaki-Okamoto-like transform. Both in simulation and practical instances, results are satisfactory and this attack represents a threat to the security of HQC. Finally, we analyze the strength of countermeasures based on masking and shuffling strategies. In line with previous SASCA literature targeting Kyber, we show that masking HQC is a limited countermeasure against BP attacks, as well as shuffling countermeasures adapted from Kyber. We evaluate the “full shuffling” strategy which thwarts our attack by introducing sufficient combinatorial complexity. Eventually, we highlight the difficulty of protecting the current RS encoder with a shuffling strategy. A possible countermeasure would be to consider another encoding algorithm for the scheme to support a full shuffling. Since the encoding subroutine is only a small part of the implementation, it would come at a small cost.

Downloads

Published

2024-03-12

How to Cite

Goy, G., Maillard, J., Gaborit, P., & Loiseau, A. (2024). Single trace HQC shared key recovery with SASCA. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2024(2), 64–87. https://doi.org/10.46586/tches.v2024.i2.64-87

Issue

Section

Articles