Package: pyecsca
PythonEllipticCurve cryptographySide-ChannelAnalysis toolkit.For more info, see the.Functionalitypyecscaaims 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. The main goal ofpyecscais to be able to reverse engineer the curve model, coordinate system, addition formulas, scalar
multiplier and even finite-field implementation details.It is currently in an alpha stage of development and thus only provides:Enumeration of millions of possible ECC implementation configurations (seenotebook/configuration_space)Simulation and execution tracing of key generation, ECDH and ECDSA (seenotebook/simulation)Synthesis of C implementations of ECC for embedded devices, given any implementation configuration (seenotebook/codegen)Trace acquisition using PicoScope/ChipWhisperer oscilloscopes (seenotebook/measurement)Trace processing capabilities, e.g. signal-processing, filtering, averaging, cutting, aligning (pyecsca.sca)Trace visualization using holoviews and datashader (seenotebook/visualization)Communication via PCSC/LEIA with a smartcard target (seenotebook/smartcards)pyecscaconsists of three packages:the core:https://github.com/J08nY/pyecscathe codegen package:https://github.com/J08nY/pyecsca-codegenthe notebook package:https://github.com/J08nY/pyecsca-notebookRequirementsNumpyScipysympyatpublicfastdtwasn1cryptoh5pyholoviewsbokehdatashadermatplotlibxarrayastunparseOptionally:Oscilloscope support:picosdkpicoscopechipwhispererSmartcard support:pyscardLEIA support:smartleiaFaster arithmetic:gmpy2(and also GMP library)pyecscacontains data from theExplicit-Formulas Databaseby Daniel J. Bernstein and Tanja Lange.
The data was partially changed, to make working with it easier.It also supports working withRiscureInspector trace sets, which are of a proprietary format.Testing & DevelopmentSee theMakefilefor tests, performance measurement, codestyle and type checking commands.
Useblackfor code-formatting.nose2greenmypyparameterizedflake8coverageinterrogatepyinstrumentpre-commitat.pre-commit-config.yamlblackDocssphinxsphinx-autodoc-typehintsnbsphinxsphinx-paramlinkssphinx-designLicenseMIT License

Copyright (c) 2018-2023 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.Development was supported by the Masaryk University grantMUNI/C/1701/2018.