aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJ08nY2023-08-29 23:45:15 +0200
committerJ08nY2023-08-29 23:45:15 +0200
commit1238765979861a559790f66610763c252b2eaf3d (patch)
tree5f2cfe99b6c7109c60d66e2376d1a25017b055a5
parenta62beef76338fa2507f716bca03415933c2e48b5 (diff)
downloadpyecsca-1238765979861a559790f66610763c252b2eaf3d.tar.gz
pyecsca-1238765979861a559790f66610763c252b2eaf3d.tar.zst
pyecsca-1238765979861a559790f66610763c252b2eaf3d.zip
Fix docs.
-rw-r--r--docs/index.rst5
-rw-r--r--pyecsca/ec/divpoly.py5
-rw-r--r--pyecsca/sca/re/rpa.py3
3 files changed, 12 insertions, 1 deletions
diff --git a/docs/index.rst b/docs/index.rst
index 6ffa9e4..ac46e02 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -101,7 +101,10 @@ are the best source of documentation on how to use **pyecsca**.
:titlesonly:
:maxdepth: 3
- api/modules
+ api/pyecsca.ec
+ api/pyecsca.misc
+ api/pyecsca.sca
+ api/pyecsca.codegen
:fas:`file` References
======================
diff --git a/pyecsca/ec/divpoly.py b/pyecsca/ec/divpoly.py
index a616801..3ad2495 100644
--- a/pyecsca/ec/divpoly.py
+++ b/pyecsca/ec/divpoly.py
@@ -2,6 +2,7 @@
Provides functions for computing division polynomials and the multiplication-by-n map on an elliptic curve.
"""
from typing import Tuple, Dict, Set, Mapping
+from public import public
from sympy import symbols, FF, Poly
import networkx as nx
@@ -72,6 +73,7 @@ def dep_map(*ns: int):
return ls, vals
+@public
def a_invariants(curve: EllipticCurve) -> Tuple[Mod, ...]:
"""
Compute the a-invariants of the curve.
@@ -90,6 +92,7 @@ def a_invariants(curve: EllipticCurve) -> Tuple[Mod, ...]:
raise NotImplementedError
+@public
def b_invariants(curve: EllipticCurve) -> Tuple[Mod, ...]:
"""
Compute the b-invariants of the curve.
@@ -166,6 +169,7 @@ def divpoly0(curve: EllipticCurve, *ns: int) -> Mapping[int, Poly]:
return mem
+@public
def divpoly(curve: EllipticCurve, n: int, two_torsion_multiplicity: int = 2) -> Poly:
"""
Compute the n-th division polynomial.
@@ -198,6 +202,7 @@ def divpoly(curve: EllipticCurve, n: int, two_torsion_multiplicity: int = 2) ->
raise ValueError
+@public
def mult_by_n(curve: EllipticCurve, n: int) -> Tuple[Tuple[Poly, Poly], Tuple[Poly, Poly]]:
"""
Compute the multiplication-by-n map on an elliptic curve.
diff --git a/pyecsca/sca/re/rpa.py b/pyecsca/sca/re/rpa.py
index 721498c..5a44a0f 100644
--- a/pyecsca/sca/re/rpa.py
+++ b/pyecsca/sca/re/rpa.py
@@ -88,6 +88,7 @@ class MultipleContext(Context):
return f"{self.__class__.__name__}({self.base!r}, multiples={self.points.values()!r})"
+@public
def rpa_point_0y(params: DomainParameters) -> Optional[Point]:
"""Construct an (affine) [RPA]_ point (0, y) for given domain parameters."""
if isinstance(params.curve.model, ShortWeierstrassModel):
@@ -103,6 +104,7 @@ def rpa_point_0y(params: DomainParameters) -> Optional[Point]:
raise NotImplementedError
+@public
def rpa_point_x0(params: DomainParameters) -> Optional[Point]:
"""Construct an (affine) [RPA]_ point (x, 0) for given domain parameters."""
if isinstance(params.curve.model, ShortWeierstrassModel):
@@ -126,6 +128,7 @@ def rpa_point_x0(params: DomainParameters) -> Optional[Point]:
raise NotImplementedError
+@public
def rpa_distinguish(params: DomainParameters, mults: List[ScalarMultiplier], oracle: Callable[[int, Point], bool]) -> List[ScalarMultiplier]:
"""
Distinguish the scalar multiplier used (from the possible :paramref:`~.rpa_distinguish.mults`) using