Divide and Surrender: Exploiting Variable Division Instruction Timing in HQC Key Recovery Attacks

Robin Leander Schröder*, Stefan Gast, Qian Guo

*Corresponding author for this work

Research output: Chapter in Book/Report/Conference proceedingConference paperpeer-review

Abstract

We uncover a critical side-channel vulnerability in the Hamming Quasi-Cyclic (HQC) round 4 optimized implementation arising due to the use of the modulo operator. In some cases, compilers optimize uses of the modulo operator with compile-time known divisors into constant-time Barrett reductions. However, this optimization is not guaranteed: for example, when a modulo operation is used in a loop the compiler may emit division (div) instructions which have variable execution time depending on the numerator. When the numerator depends on secret data, this may yield a timing side-channel. We name vulnerabilities of this kind Divide and Surrender (DaS) vulnerabilities.

For processors supporting Simultaneous Multithreading (SMT) we propose a new approach called DIV-SMT which enables precisely measuring small division timing variations using scheduler and/or execution unit contention. We show that using only 100 such side-channel traces we can build a Plaintext-Checking (PC) oracle with above 90% accuracy. Our approach might also prove applicable to other instances of the DaS vulnerability, such as KyberSlash. We stress that exploitation with DIV-SMT requires co-location of the attacker on the same physical core as the victim.

We then apply our methodology to HQC and present a novel way to recover HQC secret keys faster, achieving an 8-fold decrease in the number of idealized oracle queries when compared to previous approaches. Our new PC oracle attack uses our newly developed Zero Tester method to quickly determine whether an entire block of bits contains only zero-bits. The Zero Tester method enables the DIV-SMT powered attack on HQC-128 to complete in under 2 minutes on our targeted AMD Zen2 machine.
Original languageEnglish
Title of host publicationProceedings of the 33rd USENIX Security Symposium
Place of PublicationPhiladelphia, PA
PublisherUSENIX Association
Pages6669-6686
Number of pages18
ISBN (Electronic)978-1-939133-44-1
Publication statusPublished - Aug 2024
Event33rd USENIX Security Symposium: USENIX Security 2024 - Philadelphia Marriott Downtown, Philadelphia, United States
Duration: 14 Aug 202416 Aug 2024
https://www.usenix.org/conference/usenixsecurity24

Conference

Conference33rd USENIX Security Symposium: USENIX Security 2024
Abbreviated titleUSENIX
Country/TerritoryUnited States
CityPhiladelphia
Period14/08/2416/08/24
Internet address

ASJC Scopus subject areas

  • Computer Science (miscellaneous)

Fields of Expertise

  • Information, Communication & Computing

Fingerprint

Dive into the research topics of 'Divide and Surrender: Exploiting Variable Division Instruction Timing in HQC Key Recovery Attacks'. Together they form a unique fingerprint.

Cite this