diff options
| author | J08nY | 2021-04-11 14:16:57 +0200 |
|---|---|---|
| committer | J08nY | 2021-04-11 14:16:57 +0200 |
| commit | 942c0fb9d6fcbff7c91c553211cc81c7e0939e4e (patch) | |
| tree | 1df80da6030019ef2a7490d2b2050a7d4b9a83ec /pyecsca/ec/mod.py | |
| parent | a2e01e037fcde3e63571633e94156e324a4f2299 (diff) | |
| download | pyecsca-942c0fb9d6fcbff7c91c553211cc81c7e0939e4e.tar.gz pyecsca-942c0fb9d6fcbff7c91c553211cc81c7e0939e4e.tar.zst pyecsca-942c0fb9d6fcbff7c91c553211cc81c7e0939e4e.zip | |
Diffstat (limited to 'pyecsca/ec/mod.py')
| -rw-r--r-- | pyecsca/ec/mod.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/pyecsca/ec/mod.py b/pyecsca/ec/mod.py index 4712de1..b5f71f4 100644 --- a/pyecsca/ec/mod.py +++ b/pyecsca/ec/mod.py @@ -1,5 +1,7 @@ """ -This module provides several implementations of an element of ℤₙ. The base class :py:class:`Mod` dynamically +This module provides several implementations of an element of ℤₙ. + +The base class :py:class:`Mod` dynamically dispatches to the implementation chosen by the runtime configuration of the library (see :py:class:`pyecsca.misc.cfg.Config`). A Python integer based implementation is available under :py:class:`RawMod`. A symbolic implementation based on sympy is available under :py:class:`SymbolicMod`. If @@ -599,7 +601,6 @@ if has_gmp: return GMPMod(res, self.n) def is_residue(self) -> bool: - """Whether this element is a quadratic residue (only implemented for prime modulus).""" if not _is_prime(self.n): raise NotImplementedError if self.x == 0: @@ -609,11 +610,6 @@ if has_gmp: return gmpy2.legendre(self.x, self.n) == 1 def sqrt(self) -> "GMPMod": - """ - The modular square root of this element (only implemented for prime modulus). - - Uses the `Tonelli-Shanks <https://en.wikipedia.org/wiki/Tonelli–Shanks_algorithm>`_ algorithm. - """ if not _is_prime(self.n): raise NotImplementedError if self.x == 0: |
