Skip to main content

scared is a side-channel analysis framework.

Project description

SCAred

pipeline status PyPI version Conda installer Latest Conda release

scared is a side-channel analysis framework.

Getting started

Requirements

Scared need python 3.6, 3.7 or 3.8.

You can install scared, depending on your setup:

  • from source
  • with pip
  • with conda

At time of writing, we highly recommend to install scared with conda if you want to use it with python 3.8

Install with conda

Conda builds are available for linux-x64 and osx-64 platforms. If your system isn't yet supported, build contributions are welcome!).

You just have to run:

conda install -c eshard scared

Install with pip

Binary builds are available from Pypi for most Linux platforms and OS X. If your environment has a binary build available, just run:

pip install scared

If no wheel is available for your setup, you'll also need:

  • setuptools 0.40 or greater (just run pip install -U pip setuptools)
  • a C compiler to compile C extension
  • for Python 3.8 only, a llvmlite working installation (see install from source documentation)

and then run pip install scared.

Install from source

To install from source, you will need:

  • setuptools 0.40 or greater (just run pip install -U pip setuptools)
  • a C compiler to compile C extension
  • for Python 3.8 only, a llvmlite working installation (see install from source documentation, or install it with conda)

You 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

# 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
  • 3.8 from conda, or buy building from sources.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scared-0.8.8.tar.gz (118.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

scared-0.8.8-cp38-cp38-manylinux1_x86_64.whl (217.9 kB view details)

Uploaded CPython 3.8

scared-0.8.8-cp38-cp38-macosx_10_9_x86_64.whl (176.3 kB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

scared-0.8.8-cp37-cp37m-manylinux1_x86_64.whl (214.5 kB view details)

Uploaded CPython 3.7m

scared-0.8.8-cp37-cp37m-macosx_10_7_x86_64.whl (176.4 kB view details)

Uploaded CPython 3.7mmacOS 10.7+ x86-64

scared-0.8.8-cp36-cp36m-manylinux1_x86_64.whl (213.5 kB view details)

Uploaded CPython 3.6m

scared-0.8.8-cp36-cp36m-macosx_10_7_x86_64.whl (176.4 kB view details)

Uploaded CPython 3.6mmacOS 10.7+ x86-64

File details

Details for the file scared-0.8.8.tar.gz.

File metadata

  • Download URL: scared-0.8.8.tar.gz
  • Upload date:
  • Size: 118.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2.post20191203 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.9

File hashes

Hashes for scared-0.8.8.tar.gz
Algorithm Hash digest
SHA256 7f2bb76933808a547c641c13ea4f82c17c92c430e8a552169f816711a54d9ab4
MD5 acf9fb2d544ab8bdc068299ac152c9d1
BLAKE2b-256 84aa7d572f68015c29f21ae2ca31f849f5ae661f7b2314925c892b5c9914a464

See more details on using hashes here.

File details

Details for the file scared-0.8.8-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: scared-0.8.8-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 217.9 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.8.0

File hashes

Hashes for scared-0.8.8-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7eb873dbc204d4aa7d966638b888433f58d6b244cd340655c6e4389bcf1d8811
MD5 24f5cd24e9e42842fd2ac5c53d36c558
BLAKE2b-256 472555742f5ea1d874c2ed114b0410b89baa381b75b0ba4a6e77231ff0804967

See more details on using hashes here.

File details

Details for the file scared-0.8.8-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: scared-0.8.8-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 176.3 kB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2.post20191203 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.9

File hashes

Hashes for scared-0.8.8-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fd52add59b3666526e3c8cc7c34634d9ba967ca7b06631815b6f05395b61f413
MD5 47d2a08dbcbeabecfb89087c3d986a77
BLAKE2b-256 2ea09f866bda77a8c697b53a2e5ea365010518df6e4c290c183e1d20c49806f5

See more details on using hashes here.

File details

Details for the file scared-0.8.8-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: scared-0.8.8-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 214.5 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.8.0

File hashes

Hashes for scared-0.8.8-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 0b2b47166a1f0949c5949899ccaa913866d30f5e310d20e81440df7448b6570b
MD5 fe0d634b2aae54dc1bfa7ff65b55628b
BLAKE2b-256 eb318c4df646116b6e1b0b68d8335d1e2716d669b51f113d2a7e9bc3ef96c166

See more details on using hashes here.

File details

Details for the file scared-0.8.8-cp37-cp37m-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: scared-0.8.8-cp37-cp37m-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 176.4 kB
  • Tags: CPython 3.7m, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2.post20191203 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.9

File hashes

Hashes for scared-0.8.8-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 8be14bc9066b1857406c8a68f5fe85efa00329f7dd90d88c28bacd9aa583c87a
MD5 3687bca2dab631b4488bed97d52a0ab0
BLAKE2b-256 9aafc79ff7ebf94610778416d9f3f27bcf836529717d12bf5e530205fb0dece5

See more details on using hashes here.

File details

Details for the file scared-0.8.8-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: scared-0.8.8-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 213.5 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.8.0

File hashes

Hashes for scared-0.8.8-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 291a9e6e46a7be4aa207e3f6346fef3d555fc70a47a2d00851653409bfe42d62
MD5 d2dcef622a62eefe1e2563313102ce60
BLAKE2b-256 d68f68f81c23a027b88b632b4057cc68503342b0980fe0250d8ccdd1830e6b51

See more details on using hashes here.

File details

Details for the file scared-0.8.8-cp36-cp36m-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: scared-0.8.8-cp36-cp36m-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 176.4 kB
  • Tags: CPython 3.6m, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2.post20191203 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.9

File hashes

Hashes for scared-0.8.8-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 2fd80177d11cbcd2be50c9b9ad6734bace6646c2ee56da1fe62ea980f024b3c0
MD5 3d48dde033ee6a28a1bc4f5f370bea9a
BLAKE2b-256 eeb30d761bcb00d84053f88f72d3b6313bc7264627c7ce70cded9516fac768fa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page