scared is a side-channel analysis framework.
Project description
SCAred
scared is a side-channel analysis framework.
Getting started
Pre-requisites
To use scared, you will need the the following Python 3.6 or 3.7.
If your configuration has a binary build available (see list here), you can just run:
pip install scared
conda install -c eshard scared
If your system isn't yet supported (build contributions are welcome!), or you want to build from source or develop, you'll also need:
- setuptools 0.40 or greater (just run
pip install -U pip setuptools
) - a C compiler to compile C extension
To install from source, you just need to run:
pip install .
from the source folder.
Make a first cool thing
Start using scared by doing a cool thing:
# First import the lib
import scared
# Define a selection function
@scared.attack_selection_function
def first_add_key(plaintext, guesses):
res = np.empty((plaintext.shape[0], len(guesses), plaintext.shape[1]), 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('dpa_v2.ets')
# Create a container for your ths
container = scared.Container(ths)
# Run!
a.run(container)
Documentation
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.
Contributing
All contributions, starting with feedbacks, are welcomed. Please read CONTRIBUTING.md if you wish to contribute to the project.
License
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!
Authors
See AUTHORS for the list of contributors to the project.
Binary builds available
Binary builds (wheels on pypi and conda builds) are available for the following platforms and Python version.
Platforms:
- Linux x86 64
- Macosx x86 64
Python version:
- 3.6
- 3.7
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for scared-0.8.6-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7a37976898e49131260fe1ede32365befb8d64ec730964ae5c1691a06de201a |
|
MD5 | 4fb577ce11d513b594dcd901a38bdff8 |
|
BLAKE2b-256 | 6489e6d5b1aae8e18bc5751441de5a984e3c22efbfb4023919a1660c4a633354 |
Hashes for scared-0.8.6-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4367fbc431bfa3e0f422860cbeff306fb9611ec5d547793563fa4f13b95fb682 |
|
MD5 | 4d51b4b6200afaf4f41dd64b0d705528 |
|
BLAKE2b-256 | b1c614f9a9b56172ee9c3d6069c74f56c4b1e5547969a4b4d84eca46958b4dfe |
Hashes for scared-0.8.6-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2d0e3e3f8a11129045d0deb84d4bbc88333922e3f8a59560c4f2ec387af6f43 |
|
MD5 | 82e88891d4760e795f207943a4622e51 |
|
BLAKE2b-256 | ab8568eb6ca93fe837e85b77b29a54244594b7ae6d16c0da34545815f1ad26d4 |
Hashes for scared-0.8.6-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 653561522b45dbcf07855b24bd1b306ba11edbbbc6fb421605dbc43b4adec1cd |
|
MD5 | 8076b9602147e17361afc46f192362c4 |
|
BLAKE2b-256 | b0cc3f077558a5f36e7e0f47373e722f72c2928d107835a0b3173189a6c44bab |
Hashes for scared-0.8.6-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efe2b8151e002a63c5dc0391bc9387b7c0729004700b50d70b5d370a33d99466 |
|
MD5 | 559e75fde1bc54b752752c2ad337e654 |
|
BLAKE2b-256 | 1ff3032d085401147b70831b57b08ba2d6c9d6740b754c9a7e9fe7a3dfbdb859 |
Hashes for scared-0.8.6-cp36-cp36m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71c4228f2426cceb76104d858e3f44e520d1baaf4f9744894c8aa347d57d18c7 |
|
MD5 | 354cfe46aecd1860adee8a76915b41c0 |
|
BLAKE2b-256 | 0084071a8d04e128301972693056e069a0d6164c2dd2ae794f9b68ed67a6d2f0 |