Riassunto analitico
Gli attacchi basati su timing side-channel permettono di dedurre informazioni segrete dal tempo impiegato da un algoritmo per processarle. In crittografia, specialmente nell'ambito delle firme digitali con algoritmo ECDSA, questo tipo di attacchi possono compromettere la chiave privata mediante la raccolta e l'analisi del tempo impiegato a effettuare diverse firme. L'efficacia di questo tipo di attacchi è stato dimostrato in diversi contesti sperimentali, quali la compromissione di chiavi associate a certificati di servizi HTTPs locali o remoti o a sistemi di firme digitali eseguiti su smartcard. L'obiettivo di questa tesi è mostrare la fattibilità di eseguire questo tipo di attacchi verso una smartcard collegata tramite interfaccia USB a un normale personal computer, che rappresenta un contesto non studiato in dettaglio in letteratura. Al fine di analizzare il rumore nelle misure di tempi introdotto dai sistemi e dalla loro interazione, confrontiamo le misurazioni di tempi effettuate sul personal computer in user space e in kernel space. A tale scopo, si approfondisce la possibilità di misurare i tempi usando extended Berkeley Packet Filter (eBPF), una tecnologia che consente di sviluppare programmi che sono eseguiti in kernel space, tipicamente in associazione ad eventi del sistema. In particolare, si sviluppa una funzionalità che consente di misurare i tempi di scambio di dati tra l'host e un device collegato a interfaccia USB, direttamente in kernel space. Al fine di dimostrare l'efficacia del metodo proposto, si realizza un testbed sperimentale su un sistema operativo GNU/Linux su cui non sono stati presi accorgimenti per la riduzione di interferenze che possono essere causate da altri processi in esecuzione sullo stesso sistema. Come smartcard viene utilizzato il dispositivo USB Armory MK-II su cui viene eseguita una versione del software GoKey opportunamente modificata per essere vulnerabile a attacchi di tipo timing side-channel utili a rivelare i valori dei bit più significati dei nonce generati dallo schema di firma, e per fornire informazioni aggiuntive utili ad analizzare l'efficienza dell'attacco. I tempi raccolti grazie a questo testbed sono stati infine impiegati per eseguire euristiche matematiche note basate su reticoli che consentono di ricavare la chiave privata
|
Abstract
Timing side-channel attacks allow to infer information from the time taken for an algorithm to process it.
In cryptography, especially with ECDSA digital signatures, these attacks can compromise the private key through the collection and analysis of the times taken to issue several signatures.
The effectiveness of these attacks has been proved in several experimental scenarios, such as the compromise of private keys associated to certificates belonging to HTTPs services, both local and remote ones, and to digital signature systems running on smartcards.
The purpose of this thesis is to show the feasibility of these attacks against a smartcard connected to a normal Personal Computer via USB, which is a scenario that has not been studied in detail in literature.
In order to analyze the measurement noise due to the systems and their interaction, we compare the timing measurements made on the Personal Computer both in user space and in kernel space.
To this end, we study the possibility of measuring signatures timings by using extended Berkeley Packet Filter (eBPF), a technology that allows to develop programs which are executed in kernel space and are typically associated to system events.
Specifically, we develop a program that measures timings related to data exchanges between the host and an USB device, directly in kernel space.
In order to show the effectiveness of the proposed methodology, we deploy an experimental testbed where the host is a GNU/Linux operating system without any particular precautions to reduce the noise generated by other running processes on the same system.
The targeted smartcard is a USB Armory MK-II device flashed with a GoKey firmware, that we modified to be vulnerable against timing side-channel attacks that leak the value of the most significant bits of the signature nonce, and to provide additional information useful for analyzing the efficiency of the attack. We used the signature timings collected by using this testbed as inputs for known mathematical heuristics based on lattices that allow the retrieval of the private key.
|