diff options
| author | J08nY | 2024-06-03 14:16:32 +0200 |
|---|---|---|
| committer | J08nY | 2024-06-03 14:16:32 +0200 |
| commit | 0a4613903108fca72a3cb589565663af006c9e94 (patch) | |
| tree | 63cd222edf3dfa113001e66b72351891bd3d8034 | |
| parent | 89eacd11c361835ed52ba9390f19b7df695a3d39 (diff) | |
| download | pyecsca-0a4613903108fca72a3cb589565663af006c9e94.tar.gz pyecsca-0a4613903108fca72a3cb589565663af006c9e94.tar.zst pyecsca-0a4613903108fca72a3cb589565663af006c9e94.zip | |
Fix configuration enumeration.
| -rw-r--r-- | pyecsca/ec/configuration.py | 2 | ||||
| -rw-r--r-- | pyecsca/ec/curve.py | 2 | ||||
| -rw-r--r-- | pyproject.toml | 1 | ||||
| -rw-r--r-- | test/ec/test_pickle.py | 1 |
4 files changed, 3 insertions, 3 deletions
diff --git a/pyecsca/ec/configuration.py b/pyecsca/ec/configuration.py index 1a6f795..40ca59b 100644 --- a/pyecsca/ec/configuration.py +++ b/pyecsca/ec/configuration.py @@ -96,7 +96,7 @@ class RandomMod(EnumDefine): @public -@dataclass(frozen=True) +@dataclass(frozen=True, eq=True) class Configuration: """An ECC implementation configuration.""" diff --git a/pyecsca/ec/curve.py b/pyecsca/ec/curve.py index 5d18727..957aafc 100644 --- a/pyecsca/ec/curve.py +++ b/pyecsca/ec/curve.py @@ -46,7 +46,7 @@ class EllipticCurve: >>> curve.affine_add(P, Q) Point([x=110884201872336783252492544257507655322265785208411447156687491781308462893723, y=17851997459724035659875545393642578516937407971293368958749928013979790074156] in shortw/affine) >>> curve.affine_multiply(P, 10) - Point([x=102258728610797412855984739741975475478412665729440354248608608794190482472287, y=108928182525231985447294771990422379640574982656217795144410067267239526061757] in shortw/affine) + Point([x=102258728610797412855984739741975475478412665729440354248608608794190482472287, y=6863906685124263315402674958985193889511160759072519051123564041627571792194] in shortw/affine) >>> curve.affine_random() # doctest: +ELLIPSIS Point([x=..., y=...] in shortw/affine) >>> curve.is_on_curve(P) diff --git a/pyproject.toml b/pyproject.toml index 94831b0..63d30e0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,6 +79,7 @@ [tool.setuptools_scm] [tool.pytest.ini_options] + consider_namespace_packages = true testpaths = ["pyecsca", "test"] markers = [ "slow: marks tests as slow (deselect with '-m \"not slow\"')", diff --git a/test/ec/test_pickle.py b/test/ec/test_pickle.py index 5c2b270..3400158 100644 --- a/test/ec/test_pickle.py +++ b/test/ec/test_pickle.py @@ -84,7 +84,6 @@ def test_code_formula(): graph = FormulaGraph(formula) code = graph.to_formula() data = pickle.dumps(code) - pickletools.dis(data) back = pickle.loads(data) assert code == back |
