Package: lascar
LASCARLedger'sAdvancedSideChannelAnalysisRepositoryA fast, versatile, and open source python3 library designed to facilitate Side-Channel Analysis.lascaris intended to be used by seasoned side-channel attackers as well as laymen who would like to get a feel of side-channel analysis.From side-channel acquisitions to results management, passing by signal synchronisation, custom attacks,lascarprovides classes/functions to solve most of the obstacles an attacker would face, when needed to perform sound, state-of-the-art side-channel analysis.This project has been developed in parallel of the activities done by Ledger Donjon (Ledger's security team), to fully match our needs regarding side-channel evaluation.Main featuresThe philosophy behindlascaris to simplify for the end user the process of a side-channel analysis.
It provides many classes and functions that you can accomodate with, or inherit from to do the job you need.Openness:lascarlibrary is open source and is intended to facilitate attack implementations, and exchange between users. Contributing tolascarisstrongly encouraged.Simplicity: Forbasicstate of the art attacks, the correspondinglascarscript shall staybasicCompatibility: Sincelascarrelies on mainstream python libraries (numpy, sklearn, keras):lascaris easily deployableFlexibility: Implement your own classes (for your already existing trace format, your specific attacks, the way you want your output to be...), use different languages (provided that you bind them with python),...Please note that performance has not yet been challenged.Thetutorial/examplesfolders of the library provide basic scripts solving the most frequent use-cases of side-channel analysis.InstallationLascarcan be installed with pip3:pip3 install "git+https://github.com/Ledger-Donjon/lascar.git"RequirementsThis library requires the following packages:clickh5pykeras- for machine learningmatplotlib- for curve visualizationnumba- for python JIT code compilationnumpyprogressbar2psutipytestPyQt5scikit-learn- for machine learningscipytensorflow- keras backendvispy- for curve visualizationTutorialThetutorialfolder contains commented scripts to understand how to handle the core classes behindlascar(Container, Session, Engine, OutputMethod)01-discovering-containers.py02-store_containers.py03-abstract-container.py04-acquisition-setup-example.py05-synchronization-example.py06-session-introduction.py07-session-dpa-example.py08-session-manage-outputs.pyExamplesSeeexamples.mdCommand-line toolUselascarctl,lascarcommand line tool.
For documentation,see hereAbout Ledger DonjonCreated in 2018, Ledger Donjon (Ledger security team) regroups experts in security with a wide range of expertise (such as software, perturbation and side-channel attacks, secured development, reverse engineering, ...). Based in Paris, Ledger's Donjon tends to shift the paradigm of security through obscurity. Take a look at ourblogpostsand thedetailed introduction!AcknowledgermentsLedger's Donjon would like to thank the people behindASCAD, for making available real side-channel traces and scripts for analysis.
Their traces have been used in examples/ascad/ folder to illustrate how to uselascarto reproduce (part of) their study.