1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
=================
pyecsca [pɪɛtska]
=================
.. image:: https://img.shields.io/badge/-Github-brightgreen?style=flat&logo=github
:target: https://github.com/J08nY/pyecsca
.. image:: https://img.shields.io/github/license/J08nY/pyecsca?color=brightgreen
:target: https://github.com/J08nY/pyecsca/blob/master/LICENSE
.. image:: https://github.com/J08nY/pyecsca/workflows/Test/badge.svg
:target: https://github.com/J08nY/pyecsca/actions?query=workflow%3ATest
.. image:: https://github.com/J08nY/pyecsca/workflows/Lint/badge.svg
:target: https://github.com/J08nY/pyecsca/actions?query=workflow%3ALint
.. image:: https://img.shields.io/codecov/c/gh/J08nY/pyecsca?color=brightgreen&logo=codecov
:target: https://codecov.io/gh/J08nY/pyecsca
.. image:: https://deepsource.io/gh/J08nY/pyecsca.svg/?label=active+issues&show_trend=true
:target: https://deepsource.io/gh/J08nY/pyecsca/?ref=repository-badge
**Py**\ thon **E**\ lliptic **C**\ urve cryptography **S**\ ide-**C**\ hannel **A**\ nalysis 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:
.. card:: Enumeration
Enumeration of millions of possible ECC implementation configurations (see :doc:`notebook/configuration_space`)
.. card:: Simulation
Simulation and execution tracing of key generation, ECDH and ECDSA (see :doc:`notebook/simulation`)
.. card:: Code generation
Synthesis of C implementations of ECC for embedded devices, given any implementation configuration (see :doc:`notebook/codegen`),
CPU-level emulation of implementations (see :doc:`notebook/emulator`)
.. card:: Trace acquisition
Trace acquisition using PicoScope/ChipWhisperer oscilloscopes (see :doc:`notebook/measurement`)
.. card:: Trace processing
Trace processing capabilities, e.g. signal-processing, filtering, averaging, cutting, aligning (:doc:`api/pyecsca.sca`)
.. card:: Trace visualization
Trace visualization using holoviews and datashader (see :doc:`notebook/visualization`)
.. card:: Smartcard communication
Communication via PCSC/LEIA with a smartcard target (see :doc:`notebook/smartcards`)
.. card:: Reverse-engineering
Reverse-engineering of black-box ECC via RPA-RE and ZVP-RE methods (see :doc:`notebook/re/rpa` and :doc:`notebook/re/zvp`)
**pyecsca** consists of three repositories:
.. grid:: 1 1 3 3
.. grid-item-card:: Core
The `core <https://github.com/J08nY/pyecsca>`_ repository contains the core of the
functionality, except the code generation and notebooks.
.. grid-item-card:: Codegen
The `codegen <https://github.com/J08nY/pyecsca-codegen>`_ repository contains
the code generation functionality.
.. grid-item-card:: Notebook
The `notebook <https://github.com/J08nY/pyecsca-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.
- One from the `SummerSchool on Real-World Crypto and Privacy 2024 <https://github.com/J08nY/pyecsca-tutorial-croatia2024>`_ in Vodice, Croatia.
- One from the `Cryptographic Hardware and Embedded Systems (CHES) 2024 <https://github.com/J08nY/pyecsca-tutorial-ches2024>`_ conference in Halifax, Canada.
.. toctree::
:hidden:
:titlesonly:
:maxdepth: 2
installation
notebooks
api
libraries
papers
references
License
=======
.. dropdown:: 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 <https://www.muni.cz/en/research/projects/46834>`_.
Development was supported by the AI-SecTools (VJ02010010) project.
|