Diplomová práce
Získaná ocenění: Cena děkana FI za vynikající závěrečnou práci

Automatic Performance Profiler for Security Analysis of Cryptographic Smart Cards

Bc. Lukáš Zaoral
Anotace

Tato práce slouží jako stručný přehled současných přístupů k detekci zdrojového kódu, který je náchylný vůči časové analýze, a má za cíl zhodnotit jejich použitelnost pro platformu JavaCard. Dále je podrobně rozebrán nástroj JCProfiler určený k profilování výkonu na této platformě. Následně je představen nástroj JCProfilerNext. Jedná se o přepis původního nástroje s dodatečnou funkcionalitou a s množstvím …více

Abstract

This thesis serves as a brief survey of contemporary approaches for the detection of source code vulnerable to timing attacks and aims to assess their applicability to the JavaCard platform. JCProfiler, an existing performance profiling tool for this platform, is then examined in detail. Afterwards, JCProfilerNext is presented, a rewrite of the original release with additional features and many fixes …více

Zadání práce
The goal of the thesis is to design and implement process and supporting tool(s) for automatic performance profiling of code running on a JavaCard platform inside cryptographic smartcards. As the measurement cannot be performed directly on the card due to lack of an on-card clock, host-side measurement techniques have to be used, combined with source code modifications allowing for finer-grade measurements. The use of performance measurements is two-fold 1) help to detect inefficient code and 2) detect timing leakages in cryptographic implementations.
The theoretical part of the thesis will survey available approaches and existing tools for performance analysis and detection of non-constant time behavior and assess their applicability to smaller embedded devices and smartcards. In the practical part, a tool for automatic insertions of helper code into the source code of an inspected applet will be created, based on suitable Java parser (e.g., Spoon). Transformed source code will be then uploaded and executed on a real card with partial measurements (utilizing inserted helper snippets) to provide detailed performance measurement of applet's code.
The tool will be then used as part of the setup for verification of constant-time execution for cryptographic code processing sensitive values which might otherwise leak sensitive data to an attack via timing side-channel. The practical demonstration will be performed on JCMathLib library and one other open-source project, followed by improvement of its resiliency against side-channel attacks. The tool will be also used to perform system-wide survey of properties of open-source JavaCard applets and provide insight into JavaCard open-source ecosystem (required memory allocations, used imports and constants, performance...)

The collected performance metadata will be presented in suitable form, e.g., via static html page (similarly to gcov) with links to measured data-to-time dependency graphs.
Literature:
Pawlak et. al.: Spoon - Source Code Analysis and Transformation for Java, http://spoon.gforge.inria.fr/
Jancar, J.: The state of tooling for verifying constant-timeness of cryptographic implementations https://neuromancer.sk/article/26
Svenda et. al.: JavaCard Algorithm Test, http://jcalgtest.org/
JCMathLib, https://github.com/OpenCryptoProject/JCMathLib
gcov - coverage testing tool, https://www.man7.org/linux/man-pages/man1/gcov.1.html
Curated list of JavaCard applications, https://github.com/EnigmaBridge/javacard-curated-list
Práce zkontrolována:
14. 12. 2022 14:16, doc. RNDr. Petr Švenda, Ph.D., učo 4085
Jazyk práce
angličtina angličtina
Termín obhajoby
25. 1. 2023
Práce byla úspěšně obhájena

Vedoucí

doc. RNDr. Petr Švenda, Ph.D., učo 4085
KPSK FI MU

Oponent

Ing. Mgr. et Mgr. Zdeněk Říha, Ph.D., učo 2514
KPSK FI MU

  • Přidání souboru

    Soubor nebo složku lze nahrát pomocí tlačítka Přidat.
  • Další operace se soubory

    Podrobnosti lze zjistit označením příslušného řádku.
  • Pohled pro experty

    Pro častou práci je možné zvolit režim Více možností.
  • Vyhledávání souborů

    Vyhledávaný výraz můžete zadat přímo do adresního řádku.
  • Rychlý přístup k souborům

    Pomocí funkce Nedávné je možné se rychle vrátit k právě prohlíženým souborům. Oblíbené soubory je také možné označit Hvězdičkou.