GithubHelp home page GithubHelp logo

isabella232 / lascar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ledgerhq/lascar

0.0 0.0 0.0 3.36 MB

Mirror of lascar (https://github.com/Ledger-Donjon/lascar)

License: GNU Lesser General Public License v3.0

Python 100.00%

lascar's Introduction

Ledger Logo     Ledger Logo

LASCAR:

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 at Ledger Security team (Donjon), 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.

Installation

Clone the repository then use the setup.py file, based on setuptools:

python3 setup.py install --user

Build the doc:

cd docs/
make html

Requirements

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

Tutorial

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

Examples

The examples folder contains two parts:

  • base folder: basic scripts for state-of-the-art side-channel use cases one simulated traces: compute Snr, Cpa, T-Test, Profiled Attacks( including Deep-Learning Attacks).
  • ascad folder: Use real traces of a secure AES implementation on a on the ATMega8515 provided by ANSSI at ASCAD. The idea is to reproduce with lascar the study made in their paper.

Ledger Logo About Ledger's DonjonLedger Logo

Created in 2018, Ledger's 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!

Acknowledgerments

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.

lascar's People

Contributors

manuelsanpedro avatar gbillou avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.