Cryptography is the foundation of security in modern digital systems, but advances in research in the field of quantum computers represent a threat to most of the cryptographic systems currently in use. The NIST (National Institute of Standards and Technology) started in 2016 a standardization process aimed at selecting post-quantum cryptographic algorithms, i.e., resistant to attacks carried out by adversaries equipped with quantum computers. This process is still ongoing and saw its most recent phase at the beginning of 2025, when its fourth round reconfirmed the post-quantum algorithm HQC (Hamming Quasi-Cyclic) as one of the most promising candidates. However, the mathematical robustness against the proposed attacks is not enough: practical implementation must also be secure against physical attacks, the so-called Side-Channel Attacks, which exploit secondary channels to obtain secret information such as cryptographic keys, especially in embedded environments where resources are limited. In this context fits the present thesis work, which proposes an automated countermeasure, implemented at the compiler level, leveraging the potential of the LLVM framework, to strengthen the security of HQC algorithm implementations against attacks based on statistical analysis of device consumption. The introduction of controlled randomness in the HQC scheme during decoding operations aims to guarantee greater resistance against Side-Channel attacks, without requiring manual interventions on the source code. The solution was tested on an ARM Cortex-M4 platform, showing the possibility to integrate protection techniques directly into the compiler toolchain, maintaining a good balance between security and performance. This work is therefore placed within a still little explored research area, showing how the development and extension of compilers can have an active role in the security of post-quantum implementations, helping to bridge the gap between the theoretical security of algorithms and their effective practical robustness.
La crittografia è alla base della sicurezza nei sistemi digitali moderni, ma i progressi nella ricerca nel campo dei computer quantistici rappresenta una minaccia per la maggior parte dei sistemi crittografici attualmente adottati. Il NIST (National Institute of Standards and Technology) ha avviato nel 2016 un processo di standardizzazione volto a selezionare algoritmi crittografici post-quantistici, ovvero resistenti ad attacchi condotti da avversari dotati di computer quantistici. Questo processo è tuttora in corso e ha visto la sua fase più recente all’inizio del 2025, quando il suo quarto round ha riconfermato l’algoritmo post-quantistico HQC (Hamming Quasi-Cyclic) come uno dei candidati più promettenti. Tuttavia, la sola robustezza matematica degli attacchi proposti non è sufficiente: l’implementazione pratica deve essere sicura anche contro attacchi fisici, i cosiddetti attacchi Side-Channel, che sfruttano canali secondari per ottenere informazioni segrete quali chiavi crittografiche, soprattutto in ambienti dedicati dove le risorse sono limitate. In questo contesto si inserisce il presente lavoro di tesi, che propone una contromisura automatizzata, implementata a livello di compilatore, sfruttando le potenzialità del framework LLVM, per rafforzare la sicurezza delle implementazioni dell’algoritmo HQC contro attacchi basati sull’analisi statistica del consumo del dispositivo. L’introduzione di casualità controllata nello schema HQC durante operazioni di decodifica, si pone l’obiettivo di garantire una maggiore resistenza contro attacchi Side-Channel, senza richiedere interventi manuali sul codice sorgente. La soluzione è stata testata su piattaforma ARM Cortex-M4, mostrando la possibilità di integrare tecniche di protezione direttamente nella toolchain del compilatore, mantenendo un buon compromesso tra sicurezza e prestazioni. Questo lavoro si inserisce quindi in un ambito di ricerca ancora poco approfondito, mostrando come lo sviluppo e l’estensione dei compilatori possano avere un ruolo attivo nella sicurezza delle implementazioni post-quantistiche, contribuendo a colmare il divario tra la sicurezza teorica degli algoritmi e la loro effettiva robustezza pratica.
Protecting a post-quantum cryptographic algorithm against side-channel attacks: an LLVM-based approach for HQC decoding
Pesenti, Sarah
2024/2025
Abstract
Cryptography is the foundation of security in modern digital systems, but advances in research in the field of quantum computers represent a threat to most of the cryptographic systems currently in use. The NIST (National Institute of Standards and Technology) started in 2016 a standardization process aimed at selecting post-quantum cryptographic algorithms, i.e., resistant to attacks carried out by adversaries equipped with quantum computers. This process is still ongoing and saw its most recent phase at the beginning of 2025, when its fourth round reconfirmed the post-quantum algorithm HQC (Hamming Quasi-Cyclic) as one of the most promising candidates. However, the mathematical robustness against the proposed attacks is not enough: practical implementation must also be secure against physical attacks, the so-called Side-Channel Attacks, which exploit secondary channels to obtain secret information such as cryptographic keys, especially in embedded environments where resources are limited. In this context fits the present thesis work, which proposes an automated countermeasure, implemented at the compiler level, leveraging the potential of the LLVM framework, to strengthen the security of HQC algorithm implementations against attacks based on statistical analysis of device consumption. The introduction of controlled randomness in the HQC scheme during decoding operations aims to guarantee greater resistance against Side-Channel attacks, without requiring manual interventions on the source code. The solution was tested on an ARM Cortex-M4 platform, showing the possibility to integrate protection techniques directly into the compiler toolchain, maintaining a good balance between security and performance. This work is therefore placed within a still little explored research area, showing how the development and extension of compilers can have an active role in the security of post-quantum implementations, helping to bridge the gap between the theoretical security of algorithms and their effective practical robustness.| File | Dimensione | Formato | |
|---|---|---|---|
|
PESENTI_SARAH_tesi_magistrale.pdf
solo utenti autorizzati a partire dal 26/06/2026
Descrizione: Protecting a Post-Quantum Cryptographic Algorithm Against Side-Channel Attacks: An LLVM-Based Approach for HQC Decoding
Dimensione
1.44 MB
Formato
Adobe PDF
|
1.44 MB | Adobe PDF | Visualizza/Apri |
I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.
https://hdl.handle.net/10589/240616