Skip to main content

eshard scared Python library.

Project description

SCAred

pipeline status PyPI version Conda installer Latest Conda release

scared is a side-channel analysis framework maintained by eShard team.

Getting started

Requirements

Scared need python 3.11, 3.12 or 3.13 and Numpy>=2

You can install scared, depending on your setup:

  • from source
  • with pip
  • with conda

Install with conda

You just have to run:

conda install -c eshard scared

Install with pip

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[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_file('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.11
  • 3.12
  • 3.13

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-1.2.10.tar.gz (60.4 MB view details)

Uploaded Source

Built Distribution

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

scared-1.2.10-py3-none-any.whl (100.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scared-1.2.10.tar.gz
  • Upload date:
  • Size: 60.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for scared-1.2.10.tar.gz
Algorithm Hash digest
SHA256 0ec4697f9f67cb9e0276cc14afe5a0c38a2bf69530575b507d1a9a8c3c150aaf
MD5 cabf95653bd0022cf71eb8bcef9f45e7
BLAKE2b-256 2bbc52a43bf9a1cfd12ddbaff62c92fb6293cadcdb7187500c909080d238ff52

See more details on using hashes here.

File details

Details for the file scared-1.2.10-py3-none-any.whl.

File metadata

  • Download URL: scared-1.2.10-py3-none-any.whl
  • Upload date:
  • Size: 100.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for scared-1.2.10-py3-none-any.whl
Algorithm Hash digest
SHA256 a69c8f28a3d674d8b9e1bb8031287fe3aab171111648e3e766b4e2dc532a1e74
MD5 6d290b8704403551a9dd547f301cc974
BLAKE2b-256 de62f1f88b8de17911c140c76156244cabdfa71eda18eb6515f4d6ea7b9136f1

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