Skip to main content

Traces and trace header set Python library for side-channel analysis.

Project description

estraces - Traces and trace sets Python library for side-channel attacks

pipeline status PyPI version Conda installer Latest Conda release

estraces is a Python library to manipulate side-channel trace sets. It aims at giving a clear and uniform API to handle traces samples and metadata for various persistency and file formats. It uses Numpy to handle data.

estraces was originally developped and maintain by eshard, and is heavily used in the open-source side-channel analysis framework.

Getting started

Prerequisites

You will need Python 3.6+ to use and install estraces. You can use pip (or any pip based tool like pipenv) or conda to install it.

Installation

To install estraces, you can use pip (or pipenv, or any other pip based-tool) or conda:

$ pip install estraces
# or with Conda
$ conda install -c eshard estraces

Opens a trace set

If you have a trace set as binary files, you can get a trace header set by using the binary reader:

# First import the lib
import estraces

# We suppose the binary files are under traces/ and are named something.bin
my_traces = estraces.read_ths_from_bin_filenames_pattern(
    'traces/*.bin', # First indicate the filename pattern for the bin file
    dtype='uint8', # Indicate the numpy dtype of the data
    metadatas_parsers={} # This dict allows to associate metadata
)

You can then read your samples:

# This will return the data for the first 100 traces
my_traces.samples[:100]

# This will return the frame 0 - 1000 of all the traces as a numpy array
my_traces.samples[:, :1000]

# You can iterate on traces
for trace in my_traces:
    # do something

Documentation

To go further and learn all about estraces, please go to the full documentation.

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.

Project details


Download files

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

Files for estraces, version 1.3.2
Filename, size File type Python version Upload date Hashes
Filename, size estraces-1.3.2-py3-none-any.whl (43.4 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size estraces-1.3.2.tar.gz (21.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page