Giter VIP home page Giter VIP logo

jlsca-tutorials's Introduction

Jlsca tutorials

Examples on how to use Jlsca, the side channel analysis toolkit written in Julia.

Prerequisites

It all works alike on Linux, Mac, and Windows.

Here is a docker image built on top of Orka with all the prerequisites (apart from some example tracesets).

Starting IJulia's Jupyter with threading

Jlsca's incremental correlation benefits from more threads. By default Julia only has 1 thread, but you can configure this by setting environment variable JULIA_NUM_THREADS. Start the notebook like this to give Julia 2 threads:

JULIA_NUM_THREADS=2 julia -e "using IJulia; notebook()"

Trace formats

Working with any tool starts with the data formats. Jlsca natively works with trs format, originally used by Riscure Inspector, and in addition handles other formats.

  • Daredevil (split binary) format. Jlsca natively supports it for both reading and writing, and includes a converter to/from trs. Whitebox example notebook below shows how to do conversion.
  • ChipWhisperer project format. Examples of how to convert data from CWP to trs are below in RHme2 notebooks. In case you would like to export a trs into CWP, here is the noteboook: trs2cwp.ipynb.

DPA on SW AES implementations

These are simple examples on how to do the SCA challenges of the RHme2 embedded CTF.

  • piece of SCAke - correlation power analysis attack on unprotected AES-128
  • still not SCAry - linear regression analysis attack on AES-128 with a misalignment countermeasure
  • SCAlate - correlation power analysis attack on AES-128 with a misalignment countermeasure

Tarballs with power traces available at https://drive.google.com/drive/folders/0B2slHLSL3nXaTFBWMUxHSkNmSTg, shasums included.

Here are the external writeups showing how to adapt examples above to do RHme3 SCA qualifier challange: [1], [2], [3]. Note that due to recent changes in Jlsca these writeups need minor adjustments to be runnable.

Second-order DPA

DPA on whitebox implementations

HPC (runnig on a computing cluster)

Jlsca can be run on a cluster of Linux machines.

DPA on HMAC-SHA

  • DPA on HMAC-SHA1 running on STM32F417 with hardware SHA accelerator. This is an advanced example. Traceset here.

jlsca-tutorials's People

Contributors

ceesb avatar ikizhvatov avatar keesj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jlsca-tutorials's Issues

Feature request

It would be really nice with an example or tutorial where Jlsca is used to execute a profiling attack.

trace format

any solution for npz or npy format data? or tranformation tool

Leakage model

Thank you for your sharing,
I am new in Side channel analysis. Could you please explain why do you use HW(SBox) as leakage model in Second-order CPA (for ASCAD data) ?

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.