Coder Social home page Coder Social logo

dfa-aes's Introduction

C++ implementation of Differential Fault Analysis (DFA) of AES-128 using a single fault injection. Software features multi-core support via OpenMP.


LICENSE

This program is free software; see LICENSE for more details.

REQUIREMENTS

  • gcc-4.8.1 or newer.
  • OpenMP.
  • Python 2.7.5 or newer. (optionally)
  • Workstation with at least 32 cores. (recommended)

USAGE

Note: Some computations might take quite some time, especially in the case where the fault location is not known and if too few cores are available. For comparison:

  • Example 1 takes 17.5 seconds for a known fault location and 279 seconds for an unknown fault location using 32 cores (with 2.1 GHz each, Opteron 6172).
  • Example 2 takes 784 seconds for unknown fault locations using 40 cores of the same machine as above.
Example 1

Differential fault analysis of a single ciphertext pair (see input-1.csv) on 32 cores. A fault was injected in byte 11 during the 8-th round of the AES encryption process.

cd analysis
make
cd ../examples
./dfa 32 11 input-1.csv

After the computation is finished all remaining masterkeys are written to the file keys-0.csv including the correct one:

keys-0.csv: 10000005200000063000000740000008

The ciphertext pair in input-1.csv was generated by

cd simulator
./inject 7 11 >> ../examples/input-1.csv
Example 2

DFA of multiple ciphertext pairs with distinct keys (see input-2.csv) on 40 cores. Faults were injected at unknown locations (input -1) during the 8-th round of the AES encryption process.

cd analysis
make
cd ../examples
./dfa 40 -1 input-2.csv

After the computation is finished the remaining masterkeys of pair {0,1,2} are written to keys-{0,1,2}.csv. The correct keys are:

keys-0.csv: 1234567890abcdef1234567890abcdef
keys-1.csv: deadc0dedeadc0dedeadc0dedeadc0de
keys-2.csv: 10000005200000063000000740000008

The data in input-2.csv was generated by

cd simulator
./inject 2 5 >> ../examples/input-2.csv
./inject 6 8 >> ../examples/input-2.csv
./inject 7 12 >> ../examples/input-2.csv

Contact

Philipp Jovanovic via [email protected]

dfa-aes's People

Contributors

gteissier 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.