Skip to main content

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 scared.

Getting started

Requirements and installation

estraces requires Python 3.10 or higher (3.10, 3.11, 3.12, 3.13).

The library uses modern Python packaging standards (PEP 517/518/621) with pyproject.toml and requires:

  • NumPy 2.0 or higher
  • Python 3.10+

You can install it by several ways:

  • with pip (recommended)
  • with conda
  • from source

Installing with pip

Simply install using pip:

pip install estraces

For the latest development version:

pip install git+https://gitlab.com/eshard/estraces.git

Installing from source

To install estraces from source, you will need:

  • Python 3.10 or higher
  • pip and build tools

Clone the repository and install:

git clone https://gitlab.com/eshard/estraces.git
cd estraces
pip install .

For development (editable install with test dependencies):

pip install -e ".[test]"

Installing with conda

To install from conda:

conda install -c eshard estraces

Or create a new environment with estraces:

conda create -n myenv python=3.10 -c eshard estraces
conda activate myenv

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.

Release files for estraces 1.10.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for estraces 1.10.2
File Size Uploaded
estraces-1.10.2.tar.gz 100.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for estraces 1.10.2
File Interpreter ABI Platform
estraces-1.10.2-py3-none-any.whl Python 3 none any Details

Total release size: 200.6 MB

Release files / estraces-1.10.2.tar.gz

Download URL estraces-1.10.2.tar.gz
Size 100.3 MB
Tags Source
SHA-256 checksum
How to use checksums
e8a8adb9b879965f2a4f355a00a0edf80fe182031557c7f9450e955cb4703fa5
BLAKE2b-256 checksum
How to use checksums
df9872ad93d51bf2f425243868bc8e6c887ece36a599cf53c74daedbf2491067
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.19

Release files / estraces-1.10.2-py3-none-any.whl

Download URL estraces-1.10.2-py3-none-any.whl
Size 100.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
9a36d02edb7e7f3eb03f7b22124515a18ec710f65495dc0b751d62fb964a5673
BLAKE2b-256 checksum
How to use checksums
85352df239bc76bf04370636a19434a8273936872908996898442ca992482617
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.19

Release history Release notifications | RSS feed

This release

1.10.2 This release

2 release files

1.9.10

2 release files

1.9.9

2 release files

1.9.8

2 release files

1.9.6

2 release files

1.9.4

2 release files

1.9.3

2 release files

1.9.2

2 release files

1.8.0

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.4

2 release files

1.6.3

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page