Modern cryptographic algorithms are designed to be mathematically secure and unbreakable in a human reasonable time. The mathematical correctness, however, is only a part of the extit{chain-of-trust} that guarantees that the whole system is secure. These algorithms, in fact, are executed on real hardware which could, in some way, leak information about the data it is processing. The so-called extit{side-channel} attacks allow, for example analyzing the sound emitted or the power consumed by the device, to extract relevant information; for example, it is possible to infer what the processor (CPU) is doing, to access reserved areas of memory or even to recover the full key that has been used for an encryption. Luckily, it is possible to implement cryptographic algorithms using techniques that allow to remove or to greatly reduce the amount of information that leaks during the encryption, thus making the side-channel attack almost impossible or, at least, very difficult. However, these techniques impact on the performances of the algorithm, that in order not to leak information about the data it is processing it must, for example, hide the computations in the middle of other calculations performed on fake data or, more generally, perform the computations in a less efficient way. Furthermore, these techniques are not trivial and are often known only to experts; for this reason, not all the implementations adopt them. In order to perform a side-channel attack capable of recovering the key used for an encryption, it is necessary to know the time instant in which the target device is executing the cryptographic algorithm. Therefore, the goal of our work will be to develop a software capable of analyzing the electromagnetic (EM) emissions of the device, by the means of a probe placed on top of the CPU, to determine when the device is performing an encryption. The first part of this work will be focused on characterizing the EM emissions of the device, in order to demonstrate that they contain enough information to deduce what the CPU of the device is processing. Subsequently, we will show that, using the information obtained from the characterization of the device it is possible to extract, from the recordings of the electromagnetic emissions, some slices - called extit{traces} - in which the device is performing an encryption, in particular AES. We will then develop a software that is able to extract these traces in a completely automated way, without the need for human intervention. Eventually, we will demonstrate the validity of the exported traces by successfully performing an attack that allows us to recover the key used for the encryption.

I moderni algoritmi crittografici sono progettati per essere matematicamente sicuri e non violabili in tempi umanamente ragionevoli. La correttezza matematica, tuttavia, è solo una parte della extit{chain-of-trust} che garantisce che l'intero sistema sia sicuro. Gli algoritmi, infatti, sono eseguiti su hardware reale che in qualche modo potrebbe far trapelare delle informazione sui dati che sta elaborando. I cosiddetti attacchi che sfruttano un canale laterale, noti in letteratura come attacchi "side-channel", consentono, analizzando ad esempio il suono emesso o la potenza consumata dal dispositivo, di estrarre informazioni rilevanti; ad esempio, è possibile dedurre cosa stia facendo il processore, accedere ad aree di memoria riservate o anche recuperare la chiave che è stata usata per una cifratura. Fourtunatamente, è possibile implementare gli algoritmi crittografici usando tecniche in grado di annullare o ridurre di molto la quantità di informazione che trapela durante la cifratura, così da rendere impossibile o molto difficile l'attacco side-channel. Queste tecniche, tuttavia, impattano sulle prestazioni dell'algoritmo, il quale per non far trapelare ciò che sta calcolando deve, ad esempio, nasconderlo in mezzo ad altri calcoli effettuati su dati falsi oppure, più in generale, effettuare il calcolo in un modo meno efficiente di quanto sarebbe possibile. Inoltre queste tecniche non sono concettualmente banali e sono spesso note solo ai più esperti; per questo motivo non tutte le implementazioni le adottano. Per poter effettuare un attacco di tipo side-channel in grado di recuperare la chiave usata per cifrare dei dati, è necessario conoscere l'istante nel quale il dispositivo bersaglio dell'attacco sta eseguendo l'algoritmo crittografico. L'obbiettivo del nostro lavoro sarà quindi quello di sviluppare un programma in grado di analizzare le emissioni elettromagnetiche del dispositivo, mediante una sonda posta sulla CPU, per determinare quando il dispositivo sta eseguendo una cifratura. Nella prima parte del lavoro qui presentato ci focalizzeremo sulla caratterizzazione delle emissioni, al fine di dimostrare che esse contengono abbastanza informazione per dedurre cosa stia calcolando il processore del dispositivo. Dimostreremo poi che con le informazioni ottenute dalla caratterizzazione del dispositivo è possibile estrarre, dalle registrazioni delle emissioni elettromagnetiche, delle porzioni - chiamate extit{tracce} - in cui il dispositivo sta eseguendo una cifratura, nello specifico AES. Proporremo quindi un metodo per identificare automaticamente la presenza di informazioni relative alla cifratura tramite AES nel segnale, realizzando praticamente questo metodo tramite implementazione software. Dimostreremo infine la validità delle tracce esportate effettuando un attacco che ci permetterà di recuperare la chiave usata per la cifratura.

Automatic identification and extraction of side channel information leakage from AES computations

FALCETTI, GIOELE
2018/2019

Abstract

Modern cryptographic algorithms are designed to be mathematically secure and unbreakable in a human reasonable time. The mathematical correctness, however, is only a part of the extit{chain-of-trust} that guarantees that the whole system is secure. These algorithms, in fact, are executed on real hardware which could, in some way, leak information about the data it is processing. The so-called extit{side-channel} attacks allow, for example analyzing the sound emitted or the power consumed by the device, to extract relevant information; for example, it is possible to infer what the processor (CPU) is doing, to access reserved areas of memory or even to recover the full key that has been used for an encryption. Luckily, it is possible to implement cryptographic algorithms using techniques that allow to remove or to greatly reduce the amount of information that leaks during the encryption, thus making the side-channel attack almost impossible or, at least, very difficult. However, these techniques impact on the performances of the algorithm, that in order not to leak information about the data it is processing it must, for example, hide the computations in the middle of other calculations performed on fake data or, more generally, perform the computations in a less efficient way. Furthermore, these techniques are not trivial and are often known only to experts; for this reason, not all the implementations adopt them. In order to perform a side-channel attack capable of recovering the key used for an encryption, it is necessary to know the time instant in which the target device is executing the cryptographic algorithm. Therefore, the goal of our work will be to develop a software capable of analyzing the electromagnetic (EM) emissions of the device, by the means of a probe placed on top of the CPU, to determine when the device is performing an encryption. The first part of this work will be focused on characterizing the EM emissions of the device, in order to demonstrate that they contain enough information to deduce what the CPU of the device is processing. Subsequently, we will show that, using the information obtained from the characterization of the device it is possible to extract, from the recordings of the electromagnetic emissions, some slices - called extit{traces} - in which the device is performing an encryption, in particular AES. We will then develop a software that is able to extract these traces in a completely automated way, without the need for human intervention. Eventually, we will demonstrate the validity of the exported traces by successfully performing an attack that allows us to recover the key used for the encryption.
ING - Scuola di Ingegneria Industriale e dell'Informazione
6-giu-2020
2018/2019
I moderni algoritmi crittografici sono progettati per essere matematicamente sicuri e non violabili in tempi umanamente ragionevoli. La correttezza matematica, tuttavia, è solo una parte della extit{chain-of-trust} che garantisce che l'intero sistema sia sicuro. Gli algoritmi, infatti, sono eseguiti su hardware reale che in qualche modo potrebbe far trapelare delle informazione sui dati che sta elaborando. I cosiddetti attacchi che sfruttano un canale laterale, noti in letteratura come attacchi "side-channel", consentono, analizzando ad esempio il suono emesso o la potenza consumata dal dispositivo, di estrarre informazioni rilevanti; ad esempio, è possibile dedurre cosa stia facendo il processore, accedere ad aree di memoria riservate o anche recuperare la chiave che è stata usata per una cifratura. Fourtunatamente, è possibile implementare gli algoritmi crittografici usando tecniche in grado di annullare o ridurre di molto la quantità di informazione che trapela durante la cifratura, così da rendere impossibile o molto difficile l'attacco side-channel. Queste tecniche, tuttavia, impattano sulle prestazioni dell'algoritmo, il quale per non far trapelare ciò che sta calcolando deve, ad esempio, nasconderlo in mezzo ad altri calcoli effettuati su dati falsi oppure, più in generale, effettuare il calcolo in un modo meno efficiente di quanto sarebbe possibile. Inoltre queste tecniche non sono concettualmente banali e sono spesso note solo ai più esperti; per questo motivo non tutte le implementazioni le adottano. Per poter effettuare un attacco di tipo side-channel in grado di recuperare la chiave usata per cifrare dei dati, è necessario conoscere l'istante nel quale il dispositivo bersaglio dell'attacco sta eseguendo l'algoritmo crittografico. L'obbiettivo del nostro lavoro sarà quindi quello di sviluppare un programma in grado di analizzare le emissioni elettromagnetiche del dispositivo, mediante una sonda posta sulla CPU, per determinare quando il dispositivo sta eseguendo una cifratura. Nella prima parte del lavoro qui presentato ci focalizzeremo sulla caratterizzazione delle emissioni, al fine di dimostrare che esse contengono abbastanza informazione per dedurre cosa stia calcolando il processore del dispositivo. Dimostreremo poi che con le informazioni ottenute dalla caratterizzazione del dispositivo è possibile estrarre, dalle registrazioni delle emissioni elettromagnetiche, delle porzioni - chiamate extit{tracce} - in cui il dispositivo sta eseguendo una cifratura, nello specifico AES. Proporremo quindi un metodo per identificare automaticamente la presenza di informazioni relative alla cifratura tramite AES nel segnale, realizzando praticamente questo metodo tramite implementazione software. Dimostreremo infine la validità delle tracce esportate effettuando un attacco che ci permetterà di recuperare la chiave usata per la cifratura.
Tesi di laurea Magistrale
File allegati
File Dimensione Formato  
tesi.pdf

solo utenti autorizzati dal 22/05/2023

Descrizione: Thesis text
Dimensione 3.83 MB
Formato Adobe PDF
3.83 MB Adobe PDF   Visualizza/Apri

I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/10589/165445