scared is a side-channel analysis framework maintained by eShard team.
Scared need python 3.7, 3.8, 3.9 or 3.10.
You can install
scared, depending on your setup:
You just have to run:
conda install -c eshard scared
Python wheels are available from Pypi, just run:
pip install scared
Install from sources¶
To install from sources, you will need to run:
pip install .
from the source folder.
If you are planning to contribute, see CONTRIBUTING.md to install the library in development mode and run the test suite.
Make a first cool thing¶
Start using scared by doing a cool thing:
# First import the lib import scared import numpy as np # Define a selection function @scared.attack_selection_function def first_add_key(plaintext, guesses): res = np.empty((plaintext.shape, len(guesses), plaintext.shape), dtype='uint8') for i, guess in enumerate(guesses): res[:, i, :] = np.bitwise_xor(plaintext, guess) return res # Create an analysis CPA a = scared.CPAAttack( selection_function=first_add_key, model=scared.HammingWeight(), discriminant=scared.maxabs) # Load some traces, for example a dpa v2 subset ths = scared.traces.read_ths_from_ets_file('dpa_v2.ets') # Create a container for your ths container = scared.Container(ths) # Run! a.run(container)
To go further and learn all about scared, please go to the full documentation. You can also have an interactive introduction to scared by launching these notebooks with Binder.
All contributions, starting with feedbacks, are welcomed. Please read CONTRIBUTING.md if you wish to contribute to the project.
This library is licensed under LGPL V3 license. See the LICENSE file for details.
It is mainly intended for non-commercial use, by academics, students or professional willing to learn the basics of side-channel analysis.
If you wish to use this library in a commercial or industrial context, eShard provides commercial licenses under fees. Contact us!
Binary builds available¶
Binary builds (wheels on pypi and conda builds) are available for the following platforms and Python version.
Linux x86 64
Macosx x86 64