diff options
| author | J08nY | 2023-08-28 13:26:15 +0200 |
|---|---|---|
| committer | J08nY | 2023-08-28 13:26:15 +0200 |
| commit | 06465b2455587dd3d747081258971c3023ac8b3e (patch) | |
| tree | 69552dc1b83790f095a8924dfd6aa8be7ddf965e | |
| parent | e786ae764596bffc92d9ed28250e3d134d03dd7e (diff) | |
| download | pyecsca-06465b2455587dd3d747081258971c3023ac8b3e.tar.gz pyecsca-06465b2455587dd3d747081258971c3023ac8b3e.tar.zst pyecsca-06465b2455587dd3d747081258971c3023ac8b3e.zip | |
Add references to docs.
| -rw-r--r-- | docs/index.rst | 10 | ||||
| -rw-r--r-- | docs/references.rst | 10 | ||||
| -rw-r--r-- | pyecsca/ec/configuration.py | 4 | ||||
| -rw-r--r-- | pyecsca/ec/coordinates.py | 2 | ||||
| -rw-r--r-- | pyecsca/ec/formula.py | 2 | ||||
| -rw-r--r-- | pyecsca/ec/model.py | 1 | ||||
| -rw-r--r-- | pyecsca/ec/params.py | 14 | ||||
| -rw-r--r-- | pyecsca/ec/scalar.py | 8 | ||||
| -rw-r--r-- | pyecsca/sca/re/zvp.py | 2 |
9 files changed, 39 insertions, 14 deletions
diff --git a/docs/index.rst b/docs/index.rst index 421ae1f..6ffa9e4 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -103,6 +103,16 @@ are the best source of documentation on how to use **pyecsca**. api/modules +:fas:`file` References +====================== + +.. toctree:: + :caption: References + :titlesonly: + :maxdepth: 1 + + references + Requirements ============ diff --git a/docs/references.rst b/docs/references.rst new file mode 100644 index 0000000..63aaf41 --- /dev/null +++ b/docs/references.rst @@ -0,0 +1,10 @@ +========== +References +========== + +.. [STD] Standard Curve Database, https://neuromancer.sk/std/ +.. [EFD] Explicit Formulas Database, https://hyperelliptic.org/EFD/ +.. [GECC] Guide to Elliptic Curve Cryptography, https://link.springer.com/book/10.1007/b97644 +.. [HEHCC] Handbook of Elliptic and Hyper-Elliptic Curve Cryptography, https://www.hyperelliptic.org/HEHCC/ +.. [HAC] Handbook of Applied Cryptography, https://cacr.uwaterloo.ca/hac/ +.. [BBG+17] Sliding right into disaster: Left-to-right sliding windows leak, https://eprint.iacr.org/2017/627.pdf diff --git a/pyecsca/ec/configuration.py b/pyecsca/ec/configuration.py index 1a7020e..03dc86b 100644 --- a/pyecsca/ec/configuration.py +++ b/pyecsca/ec/configuration.py @@ -121,8 +121,8 @@ def all_configurations(**kwargs) -> Generator[Configuration, Configuration, None .. note:: The ``formulas`` attribute is unsupported and formulas should be provided using the ``scalarmult`` - attribute, which is either a subclass of the :py:class:`~.mult.ScalarMultiplier` class or an instance - of it or a dictionary giving arguments to a constructor of some :py:class:`~.mult.ScalarMultiplier` + attribute, which is either a subclass of the :py:class:`~.ScalarMultiplier` class or an instance + of it or a dictionary giving arguments to a constructor of some :py:class:`~.ScalarMultiplier` subclass. .. warning:: diff --git a/pyecsca/ec/coordinates.py b/pyecsca/ec/coordinates.py index 10ea400..82b74e7 100644 --- a/pyecsca/ec/coordinates.py +++ b/pyecsca/ec/coordinates.py @@ -71,6 +71,8 @@ class AffineCoordinateModel(CoordinateModel): class EFDCoordinateModel(CoordinateModel): + """A coordinate model from [EFD]_ data.""" + def __init__(self, dir_path: Traversable, name: str, curve_model: Any): self.name = name self.curve_model = curve_model diff --git a/pyecsca/ec/formula.py b/pyecsca/ec/formula.py index d737c70..3e825e4 100644 --- a/pyecsca/ec/formula.py +++ b/pyecsca/ec/formula.py @@ -337,7 +337,7 @@ class Formula(ABC): class EFDFormula(Formula): - """Formula from the `Explicit-Formulas Database <https://www.hyperelliptic.org/EFD/>`_.""" + """Formula from the [EFD]_.""" def __init__(self, meta_path: Traversable, op3_path: Traversable, name: str, coordinate_model: Any): self.name = name diff --git a/pyecsca/ec/model.py b/pyecsca/ec/model.py index 7827a51..570e9e6 100644 --- a/pyecsca/ec/model.py +++ b/pyecsca/ec/model.py @@ -30,6 +30,7 @@ class CurveModel: class EFDCurveModel(CurveModel): + """A curve model from [EFD]_ data.""" _efd_name: str _loaded: bool = False diff --git a/pyecsca/ec/params.py b/pyecsca/ec/params.py index 4141dfa..014a479 100644 --- a/pyecsca/ec/params.py +++ b/pyecsca/ec/params.py @@ -1,5 +1,5 @@ """ -Provides functions for obtaining domain parameters from the `std-curves <https://github.com/J08nY/std-curves>`_ repository. +Provides functions for obtaining domain parameters from the `std-curves <https://github.com/J08nY/std-curves>`_ repository [STD]_. It also provides a domain parameter class and a class for a whole category of domain parameters. """ @@ -264,7 +264,7 @@ def load_category( :param file: The file to load from. :param coords: The name of the coordinate system to use. Can be a callable that takes as argument the name of the curve and produces the coordinate system to use for that curve. - :param infty: Whether to use the special :py:class:InfinityPoint (`True`) or try to use the + :param infty: Whether to use the special :py:class:`.InfinityPoint` (`True`) or try to use the point at infinity of the coordinate system. Can be a callable that takes as argument the name of the curve and returns the infinity option to use for that curve. :return: The category. @@ -299,7 +299,7 @@ def load_params( :param file: The file to load from. :param coords: The name of the coordinate system to use. - :param infty: Whether to use the special :py:class:InfinityPoint (`True`) or try to use the + :param infty: Whether to use the special :py:class:`.InfinityPoint` (`True`) or try to use the point at infinity of the coordinate system. :return: The curve. """ @@ -323,7 +323,7 @@ def load_params_ecgen( :param file: The file to load from. :param coords: The name of the coordinate system to use. - :param infty: Whether to use the special :py:class:InfinityPoint (`True`) or try to use the + :param infty: Whether to use the special :py:class:`.InfinityPoint` (`True`) or try to use the point at infinity of the coordinate system. :return: The curve. """ @@ -378,7 +378,7 @@ def load_params_ectester( :param file: The file to load from. :param coords: The name of the coordinate system to use. - :param infty: Whether to use the special :py:class:InfinityPoint (`True`) or try to use the + :param infty: Whether to use the special :py:class:`.InfinityPoint` (`True`) or try to use the point at infinity of the coordinate system. :return: The curve. """ @@ -436,7 +436,7 @@ def get_category( :param category: The category to retrieve. :param coords: The name of the coordinate system to use. Can be a callable that takes as argument the name of the curve and produces the coordinate system to use for that curve. - :param infty: Whether to use the special :py:class:InfinityPoint (`True`) or try to use the + :param infty: Whether to use the special :py:class:`.InfinityPoint` (`True`) or try to use the point at infinity of the coordinate system. Can be a callable that takes as argument the name of the curve and returns the infinity option to use for that curve. :return: The category. @@ -462,7 +462,7 @@ def get_params( :param category: The category of the curve. :param name: The name of the curve. :param coords: The name of the coordinate system to use. - :param infty: Whether to use the special :py:class:InfinityPoint (`True`) or try to use the + :param infty: Whether to use the special :py:class:`.InfinityPoint` (`True`) or try to use the point at infinity of the coordinate system. :return: The curve. """ diff --git a/pyecsca/ec/scalar.py b/pyecsca/ec/scalar.py index c191160..3fadc00 100644 --- a/pyecsca/ec/scalar.py +++ b/pyecsca/ec/scalar.py @@ -26,7 +26,8 @@ def convert_base(i: int, base: int) -> List[int]: def sliding_window_ltr(i: int, w: int) -> List[int]: """ Compute the sliding-window left-to-right form. - From https://eprint.iacr.org/2017/627.pdf. + + From [BBG+17]_. :param i: The scalar. :param w: The width. @@ -59,7 +60,8 @@ def sliding_window_ltr(i: int, w: int) -> List[int]: def sliding_window_rtl(i: int, w: int) -> List[int]: """ Compute the sliding-window right-to-left form. - From https://eprint.iacr.org/2017/627.pdf. + + From [BBG+17]_. :param i: The scalar. :param w: The width. @@ -84,7 +86,7 @@ def wnaf(k: int, w: int) -> List[int]: """ Compute width `w` NAF (Non-Adjacent Form) of the scalar `k`. - Algorithm 9.35 from GECC, Algorithm 9.20 from HEHCC. + Algorithm 9.35 from [GECC]_, Algorithm 9.20 from [HEHCC]_. .. note:: According to HEHCC this is actually not unique diff --git a/pyecsca/sca/re/zvp.py b/pyecsca/sca/re/zvp.py index 22f6f79..413e75a 100644 --- a/pyecsca/sca/re/zvp.py +++ b/pyecsca/sca/re/zvp.py @@ -20,7 +20,7 @@ def unroll_formula(formula: Formula, prime: int) -> List[SymbolicMod]: Unroll a given formula symbolically to obtain symbolic expressions for its intermediate values. :param formula: Formula to unroll. - :param prime: Field to unroll over. + :param prime: Field to unroll over, necessary for technical reasons. :return: List of symbolic intermediate values. """ inputs = [Point(formula.coordinate_model, |
