Git Product home page Git Product logo

eshard / scared Goto Github PK

View Code? Open in Web Editor NEW
78.0 12.0 20.0 43.09 MB

Make your first side-channel attack on public datasets with eShard. This is a mirror of scared Gitlab repository. All contributions and merge request must be done through Gitlab project.

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

License: GNU Affero General Public License v3.0

Shell 0.02% Python 99.98%
side-channel-channel-attack python cryptography traces side-channel

scared's Introduction

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.6, 3.7, 3.8 or 3.9.

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.6
  • 3.7
  • 3.8

scared's People

Contributors

bkerler avatar eshard-team avatar guilllaumeb avatar joseph2rs avatar mikafouenski avatar mkrtchian avatar p0r0 avatar piec avatar pyloutix avatar remihuguet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

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.