diff options
| -rw-r--r-- | LICENSE | 2 | ||||
| -rw-r--r-- | README.md | 9 | ||||
| -rw-r--r-- | docs/Makefile | 2 | ||||
| -rw-r--r-- | docs/_modules.rst | 10 | ||||
| -rw-r--r-- | docs/conf.py | 9 | ||||
| -rw-r--r-- | docs/index.rst | 168 | ||||
| m--------- | notebook | 0 | ||||
| -rw-r--r-- | setup.py | 2 |
8 files changed, 122 insertions, 80 deletions
@@ -1,6 +1,6 @@ MIT License -Copyright (c) 2018-2020 Jan Jancar +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 @@ -21,6 +21,7 @@ It is currently in an alpha stage of development and thus only provides: - Trace acquisition using PicoScope/ChipWhisperer oscilloscopes (see [notebook/measurement](https://neuromancer.sk/pyecsca/notebook/measurement.html)) - Trace processing capabilities, e.g. signal-processing, filtering, averaging, cutting, aligning ([pyecsca.sca](https://neuromancer.sk/pyecsca/api/pyecsca.sca.html)) - Trace visualization using holoviews and datashader (see [notebook/visualization](https://neuromancer.sk/pyecsca/notebook/visualization.html)) + - Communication via PCSC/LEIA with a smartcard target (see [notebook/smartcards](https://neuromancer.sk/pyecsca/notebook/smartcards.html)) **pyecsca** consists of three packages: - the core: https://github.com/J08nY/pyecsca @@ -49,6 +50,8 @@ It is currently in an alpha stage of development and thus only provides: - [chipwhisperer](https://github.com/newaetech/chipwhisperer) - **Smartcard support:** - [pyscard](https://pyscard.sourceforge.io/) + - **LEIA support:** + - [smartleia](https://pypi.org/project/smartleia/) - **Faster arithmetic:** - [gmpy2](https://gmpy2.readthedocs.io/) (and also GMP library) @@ -80,13 +83,14 @@ Use [black](https://github.com/psf/black) for code-formatting. - [sphinx-autodoc-typehints](https://pypi.org/project/sphinx-autodoc-typehints/) - [nbsphinx](https://nbsphinx.readthedocs.io/) - [sphinx-paramlinks](https://pypi.org/project/sphinx-paramlinks/) + - [sphinx-design](https://sphinx-design.readthedocs.io/) ## License MIT License - Copyright (c) 2018-2021 Jan Jancar + 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 @@ -107,5 +111,4 @@ Use [black](https://github.com/psf/black) for code-formatting. SOFTWARE. -*Development is supported by the Masaryk University grant [MUNI/C/1701/2018](https://www.muni.cz/en/research/projects/46834), -this support is very appreciated.* +*Development was supported by the Masaryk University grant [MUNI/C/1701/2018](https://www.muni.cz/en/research/projects/46834).* diff --git a/docs/Makefile b/docs/Makefile index cdf5beb..9f705ec 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -16,7 +16,7 @@ apidoc: mkdir -p api/ sphinx-apidoc ../pyecsca/ --implicit-namespaces --ext-autodoc --no-toc -M -f -e -o api/ sphinx-apidoc ../../pyecsca-codegen/pyecsca/ --implicit-namespaces --ext-autodoc --no-toc -M -f -e -o api/ - cp _modules.rst api/modules.rst + mv _modules.rst api/modules.rst .PHONY: help apidoc Makefile diff --git a/docs/_modules.rst b/docs/_modules.rst deleted file mode 100644 index ec37f15..0000000 --- a/docs/_modules.rst +++ /dev/null @@ -1,10 +0,0 @@ -pyecsca -======= - -.. toctree:: - :maxdepth: 4 - - pyecsca.ec - pyecsca.misc - pyecsca.sca - pyecsca.codegen diff --git a/docs/conf.py b/docs/conf.py index 7f20953..f2c1de2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,7 +20,7 @@ sys.path.insert(0, os.path.abspath('../notebook/')) # -- Project information ----------------------------------------------------- project = 'pyecsca' -copyright = '2018-2021, Jan Jancar' +copyright = '2018-2023, Jan Jancar' author = 'Jan Jancar' sys.path.append(os.path.abspath('..')) @@ -47,6 +47,7 @@ extensions = [ 'sphinx.ext.mathjax', 'sphinx.ext.viewcode', 'sphinx_paramlinks', + 'sphinx_design', 'nbsphinx' ] @@ -67,7 +68,7 @@ master_doc = 'index' # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = "en" # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. @@ -108,7 +109,8 @@ html_favicon = "_static/logo_black.png" html_css_files = [ 'custom.css', - 'graphik.css' + 'graphik.css', + 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css' ] # Custom sidebar templates, must be a dictionary that maps document names @@ -212,3 +214,4 @@ autodoc_default_options = { autoclass_content = "both" nbsphinx_allow_errors = True +nbsphinx_execute = "never" diff --git a/docs/index.rst b/docs/index.rst index bb95c4a..4d9a3c6 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -25,24 +25,62 @@ is to be able to reverse engineer the curve model, coordinate system, addition f 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 (see :doc:`notebook/configuration_space`) - - Simulation and execution tracing of key generation, ECDH and ECDSA (see :doc:`notebook/simulation`) - - Synthesis of C implementations of ECC for embedded devices, given any implementation configuration (see :doc:`notebook/codegen`) - - Trace acquisition using PicoScope/ChipWhisperer oscilloscopes (see :doc:`notebook/measurement`) - - Trace processing capabilities, e.g. signal-processing, filtering, averaging, cutting, aligning (:doc:`api/pyecsca.sca`) - - Trace visualization using holoviews and datashader (see :doc:`notebook/visualization`) -**pyecsca** consists of three packages: - - the core: https://github.com/J08nY/pyecsca - - the codegen package: https://github.com/J08nY/pyecsca-codegen - - the notebook package: https://github.com/J08nY/pyecsca-notebook +.. card:: Enumeration -Notebooks -========= + 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`) + +.. 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`) + +**pyecsca** consists of three repositories: + +.. grid:: 3 + + .. grid-item-card:: Core + + The `core <https://github.com/J08nY/pyecsca>`_ package contains the core of the + functionality, except the code generation and notebooks. + + .. grid-item-card:: Codegen + + The `codegen <https://github.com/J08nY/pyecsca-codegen>`_ package 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. + + +:fas:`book` Notebooks +========================= The notebooks below contain a showcase of what is possible using **pyecsca** and are the best source of documentation on how to use **pyecsca**. .. toctree:: + :caption: Notebooks :titlesonly: :maxdepth: 1 @@ -51,9 +89,10 @@ are the best source of documentation on how to use **pyecsca**. notebook/codegen notebook/measurement notebook/visualization + notebook/smartcards -API reference -============= +:fas:`code` API reference +========================= .. toctree:: :caption: API reference @@ -65,70 +104,76 @@ API reference Requirements ============ - - Numpy_ - - Scipy_ - - sympy_ - - atpublic_ - - fastdtw_ - - asn1crypto_ - - h5py_ - - holoviews_ - - bokeh_ - - datashader_ - - matplotlib_ - - xarray_ - - astunparse_ - - **Optionally**: +.. dropdown:: General - - **Oscilloscope support:** + - Numpy_ + - Scipy_ + - sympy_ + - atpublic_ + - fastdtw_ + - asn1crypto_ + - h5py_ + - holoviews_ + - bokeh_ + - datashader_ + - matplotlib_ + - xarray_ + - astunparse_ + - **Optionally**: - - picosdk_ - - picoscope_ - - chipwhisperer_ - - **Smartcard support:** + - **Oscilloscope support:** - - pyscard_ + - picosdk_ + - picoscope_ + - chipwhisperer_ + - **Smartcard support:** - - **Faster arithmetic:** + - pyscard_ + - **LEIA support:** - - gmpy2_ (and also GMP library) + - leia_ + - **Faster arithmetic:** -*pyecsca* contains data from the `Explicit-Formulas Database`_ by Daniel J. Bernstein and Tanja Lange. + - gmpy2_ (and also GMP library) -It also supports working with Riscure_ Inspector trace sets, which are of a proprietary format. + *pyecsca* contains data from the `Explicit-Formulas Database`_ by Daniel J. Bernstein and Tanja Lange. + It also supports working with Riscure_ Inspector trace sets, which are of a proprietary format. -Testing & Development ---------------------- -See the Makefile for tests, performance measurement, codestyle and type checking commands. -Use black_ for code-formatting. +.. dropdown:: Testing & Development - - nose2_ - - green_ - - parameterized_ - - mypy_ - - flake8_ - - coverage_ - - interrogate_ - - pyinstrument_ - - pre-commit_ - - black_ + See the Makefile for tests, performance measurement, codestyle and type checking commands. + Use black_ for code-formatting. -Docs ----- + - nose2_ + - green_ + - parameterized_ + - mypy_ + - flake8_ + - coverage_ + - interrogate_ + - pyinstrument_ + - pre-commit_ + - black_ - - sphinx_ - - sphinx-autodoc-typehints_ - - nbsphinx_ - - sphinx-paramlinks_ + +.. dropdown:: Docs + + - sphinx_ + - sphinx-autodoc-typehints_ + - nbsphinx_ + - sphinx-paramlinks_ + - sphinx-design_ License ======= +.. dropdown:: MIT License + MIT License - Copyright (c) 2018-2021 Jan Jancar + 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 @@ -148,8 +193,7 @@ License OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -Development is supported by the Masaryk University grant `MUNI/C/1707/2018 <https://www.muni.cz/en/research/projects/46834>`_, -this support is very appreciated. +Development was supported by the Masaryk University grant `MUNI/C/1707/2018 <https://www.muni.cz/en/research/projects/46834>`_. .. _Numpy: https://www.numpy.org .. _Scipy: https://www.scipy.org @@ -168,6 +212,7 @@ this support is very appreciated. .. _picoscope: https://github.com/colinoflynn/pico-python .. _chipwhisperer: https://github.com/newaetech/chipwhisperer .. _pyscard: https://pyscard.sourceforge.io/ +.. _leia: https://pypi.org/project/smartleia/ .. _gmpy2: https://gmpy2.readthedocs.io/ .. _nose2: https://nose2.readthedocs.io .. _green: https://github.com/CleanCut/green @@ -183,5 +228,6 @@ this support is very appreciated. .. _sphinx-autodoc-typehints: https://pypi.org/project/sphinx-autodoc-typehints/ .. _nbsphinx: https://nbsphinx.readthedocs.io/ .. _sphinx-paramlinks: https://pypi.org/project/sphinx-paramlinks/ +.. _sphinx-design: https://pypi.org/project/sphinx_design/ .. _Explicit-Formulas Database: https://www.hyperelliptic.org/EFD/index.html .. _Riscure: https://www.riscure.com/ diff --git a/notebook b/notebook -Subproject 6f99cb164eba8c9da6aa2e7e4caf448e94cc889 +Subproject 06b53bea04b38564b1205e48d802601aa0d255a @@ -52,6 +52,6 @@ setup( "gmp": ["gmpy2"], "dev": ["mypy", "flake8", "interrogate", "pyinstrument", "black", "types-setuptools"], "test": ["nose2", "parameterized", "coverage"], - "doc": ["sphinx", "sphinx-autodoc-typehints", "nbsphinx", "sphinx-paramlinks"] + "doc": ["sphinx", "sphinx-autodoc-typehints", "nbsphinx", "sphinx-paramlinks", "sphinx_design"] } ) |
