Giter Site home page Giter Site logo

ascad-5minutes's Introduction

Attacking ASCAD with a Single Trace

This repository contains the scripts associated to the paper Give Me 5 Minutes: Attacking ASCAD with a Single Side-Channel Trace.

Installation

This repository contains simple python (>=3.7) scripts, with known-good dependencies specified in requirements.txt. A recent version of pip is needed if you want to install the pre-build version of SCALib, otherwise pip will try to recompile SCALib from scratch (which will fail if you don't have the build dependencies installed).

We suggest using a virtual environment:

git clone https://github.com/cassiersg/ASCAD-5minutes.git
cd ASCAD-5minutes
python3 -m venv ve

# On linux
source ve/bin/activate
# On windows
RUN ve/Scripts/activate

pip install -U pip # to get recent pip
pip install -r requirements.txt

Usage

attack.py

This is a simple attack script which minimally reproduces our attack and should be fairly esay to read or modify. To run with the default settings:

python3 attack.py --database /path/to/ASCAD/raw/traces/atmega8515-raw-traces.h5

For other attack settings:

python3 attack.py --help

attack_multi.py

This script performs the same attacks as <attack.py>, but stores intermediate results, run multiple attacks in parallel and produces success rate plots.

Commands used to generate the success rate figures in the paper:

Full trace and full key:

python3 attack_multi.py --database ./atmega8515-raw-traces.h5 --fast-snr --ntracesattack 1 --averageattack 1000 --poi 32,64,128,256,512,1024,2048 --dim 1,2,3,4,5,6,7,8,9,10,15,20  --show snr,model,attack,sr-map

Partial trace and one byte of key:

python3 attack_multi.py --database ./atmega8515-raw-traces.h5 --fast-snr --ntracesattack 1,2,4,8,16,32 --nbytes 1 --averageattack 1000  --ntracesprofile 20000 --window 80945,82345 --show snr,model,attack,sr-boxplot

For all attack settings:

python3 attack_multi.py --help

subset_traces.py

A utility script to make subsets of the ASCAD database that are smaller, thus faster to load, for faster experimentation.

python3 subset_traces.py --help

License

MIT

ascad-5minutes's People

Contributors

cassiersg avatar obronchain 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.