Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ikizhvatov/pysca
Toolbox for advanced differential power analysis of symmetric key cryptographic algorithm implementations
https://github.com/ikizhvatov/pysca
cryptography-tools differential-power-analysis dpa linear-regression side-channel
Last synced: 3 months ago
JSON representation
Toolbox for advanced differential power analysis of symmetric key cryptographic algorithm implementations
- Host: GitHub
- URL: https://github.com/ikizhvatov/pysca
- Owner: ikizhvatov
- License: gpl-3.0
- Created: 2017-05-14T12:11:42.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-15T09:38:59.000Z (about 6 years ago)
- Last Synced: 2024-05-27T21:40:38.509Z (5 months ago)
- Topics: cryptography-tools, differential-power-analysis, dpa, linear-regression, side-channel
- Language: Python
- Homepage:
- Size: 218 KB
- Stars: 41
- Watchers: 3
- Forks: 16
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-side-channel-attack - Pysca - Toolbox for advanced differential power analysis of symmetric key cryptographic algorithm implementations (Project)
README
# Pysca toolbox
This toolbox was started in 2014 to experiment with efficient differential power analysis (DPA) techniques from the paper "Behind the Scene of Side Channel Attacks" by Victor Lomné, Emmanuel Prouff, and Thomas Roche (https://eprint.iacr.org/2013/794).
To clone this repo with the included example traces you will need [Git-LFS](https://git-lfs.github.com). Without Git-LFS, only pointers to traces will be cloned.
## Why
The toolbox was designed with the following in mind:
* state-of-the-art DPA techniques
* performance
* visualization of metrics for security evaluations purpose (and not just attack)
* simplicity and flexibility through use of a language suitable for scientific computingIn terms of these points, Pysca (still) outperforms some commercial tooling. Pysca is nowadays mostly superseded by https://github.com/Riscure/Jlsca.
## What
Pysca implements:
* non-profiled linear-regression analysis (LRA) with configurable basis functions
* classical correlation power analysis (CPA)
* significant speed-up of the above by conditional averaging
* targets: AES (S-box out) and DES (round in XOR round out, round out, S-box out)
* visualization of results## How
For usage basics refer to the [HOWTO](howto/HOWTO.md).
For a deeper dive into [leakage modelling using linear regression](https://github.com/ikizhvatov/leakage-modelling-tutorial), clone the tutorial into the subfolder:
git clone https://github.com/ikizhvatov/leakage-modelling-tutorial.git
## Details
Pysca works on traces stored in npz (numpy zipped) format. Example tracesets are included in the repo using git-lfs. The conversion script from Riscure Inspector trs format is included. The trs reader was originally implemented by Erik van den Brink.Under the hood, the most interesting technical tricks in pysca are perhaps:
* fast computation of correlation (see https://github.com/ikizhvatov/efficient-columnwise-correlation for a dedicated study)
* conditional averaging implementation for DES (because of all the bit permutations, it requires splitting the leakage function into two stages)Author: Ilya Kizhvatov
Version: 1.0, 2017-05-14