Giter Site home page Giter Site logo

eshard / estraces Goto Github PK

View Code? Open in Web Editor NEW
9.0 5.0 2.0 8.59 MB

Manage efficiently your heavy side-channel datasets with eShard library and process them with http://gitlab.com/eshard/scared. This is a mirror of estraces Gitlab repository. All contributions and merge request must be done through Gitlab project.

Home Page: https://www.gitlab.com/eshard/estraces

License: GNU Affero General Public License v3.0

Shell 0.04% Python 99.96%
side-channel cryptography python traces

estraces's Introduction

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

Requirements and installation

estraces requires and must work on Python 3.6, 3.7 and 3.8 versions.

You can install it by several ways:

  • from source
  • with pip
  • with conda

At time of writing, we highly recommend to install from conda when using estraces with python 3.8.

Installing from source

To install estraces from source, you will need the following requirements:

  • pip and setuptools with version greater than 40.0
  • For Python 3.8, you'll need to build and install h5py from source see H5PY installation instructions before installing estraces

From the source code folder, run:

pip install .

Installing with pip

First, you should update your pip and setuptools version:

pip install -U pip setuptools

If you use Python 3.8, you must first build and install h5py, see instructions.

pip install estraces

Installing with conda

To install from conda, simply run:

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.

estraces's People

Contributors

joseph2rs avatar mkrtchian avatar p0r0 avatar remihuguet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

leehanbo root4rce

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.