Skip to content
Ledger's Advanced Side-Channel Analysis Repository
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Code formatting using black Oct 30, 2019
examples improving ascad test script with split_container Nov 7, 2019
images New logo. Feb 19, 2019
lascar Doc for lascarctl command-line tool Jan 13, 2020
scripts Doc for lascarctl command-line tool Jan 13, 2020
tests Code formatting using black Oct 30, 2019
tutorial Code formatting using black Oct 30, 2019
.gitignore Added logo in sphinx documentation. Apr 1, 2019
COPYING First Commit! Oct 31, 2018
COPYING.LESSER Typos Jan 13, 2020 Typos Jan 13, 2020
setup.cfg First Commit! Oct 31, 2018 Code formatting using black Oct 30, 2019

Ledger LogoLedger Logo

Join the chat at

Documentation Status


Ledger's Advanced Side Channel Analysis Repository

A fast, versatile, and open source python3 library designed to facilitate Side-Channel Analysis.

lascar is 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, lascar provides 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 features

The philosophy behind lascar is 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: lascar library is open source and is intended to facilitate attack implementations, and exchange between users. Contributing to lascar is strongly encouraged.
  • Simplicity: For basic state of the art attacks, the corresponding lascar script shall stay basic
  • Compatibility: Since lascar relies on mainstream python libraries (numpy, sklearn, keras): lascar is easily deployable
  • Flexibility: 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.

The tutorial/examples folders of the library provide basic scripts solving the most frequent use-cases of side-channel analysis.


Clone the repository then use the file, based on setuptools:

python3 install --user

Build the doc:

cd docs/
make html


This library requires the following packages:

  • numpy
  • scipy
  • matplotlib: for curve visualization
  • vispy: for curve visualization
  • sklearn: for machine learning
  • keras: for deep learning
  • tensorflow: keras backend
  • h5py: for data storage
  • progressbar2
  • pytest
  • numba


The tutorial folder contains commented scripts to understand how to handle the core classes behind lascar (Container, Session, Engine, OutputMethod)



Command-line tool

Use lascarctl, lascar command line tool. For documentation, see here

Ledger Donjon Logo About Ledger Donjon Ledger Donjon Logo

Created 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 our blogposts and the detailed introduction!


Ledger's Donjon would like to thank the people behind ASCAD, for making available real side-channel traces and scripts for analysis. Their traces have been used in examples/ascad/ folder to illustrate how to use lascar to reproduce (part of) their study.

You can’t perform that action at this time.