pyecsca [pɪɛtska]

https://img.shields.io/badge/-Github-brightgreen?style=flat&logo=github https://img.shields.io/github/license/J08nY/pyecsca?color=brightgreen https://github.com/J08nY/pyecsca/workflows/Test/badge.svg https://github.com/J08nY/pyecsca/workflows/Lint/badge.svg https://img.shields.io/codecov/c/gh/J08nY/pyecsca?color=brightgreen&logo=codecov https://deepsource.io/gh/J08nY/pyecsca.svg/?label=active+issues&show_trend=true

Python Elliptic Curve cryptography Side-Channel Analysis toolkit.

pyecsca aims to fill a gap in SCA tooling for Elliptic Curve Cryptography, it focuses on black-box implementations of ECC and presents a way to extract implementation information about a black-box implementation of ECC through side-channels.

It currently provides:

Enumeration

Enumeration of millions of possible ECC implementation configurations (see Configuration space)

Simulation

Simulation and execution tracing of key generation, ECDH and ECDSA (see Simulation)

Code generation

Synthesis of C implementations of ECC for embedded devices, given any implementation configuration (see Code generation), CPU-level emulation of implementations (see Emulation and leakage simulation)

Trace acquisition

Trace acquisition using PicoScope/ChipWhisperer oscilloscopes (see Measurement)

Trace processing

Trace processing capabilities, e.g. signal-processing, filtering, averaging, cutting, aligning (pyecsca.sca package)

Trace visualization

Trace visualization using holoviews and datashader (see Visualization)

Smartcard communication

Communication via PCSC/LEIA with a smartcard target (see Smartcards)

Reverse-engineering

Reverse-engineering of black-box ECC via RPA-RE and ZVP-RE methods (see RPA-based reverse-engineering and ZVP-based reverse-engineering)

pyecsca consists of three repositories:

Core

The core repository contains the core of the functionality, except the code generation and notebooks.

Codegen

The codegen repository contains the code generation functionality.

Notebook

The notebook repository contains example notebooks that showcase functionality of the toolkit.

Tutorials

To learn more about the toolkit you can check out two tutorials on it.

License

MIT License

MIT License

Copyright (c) 2018-2024 Jan Jancar

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Thanks alot to contributors: Tomas Jusko, Andrej Batora, Vojtech Suchanek and to ChipWhisperer/NewAE.

Development was supported by the Masaryk University grant MUNI/C/1707/2018.