aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/sca
diff options
context:
space:
mode:
authorJ08nY2023-11-08 16:11:47 +0100
committerJ08nY2023-11-10 12:21:27 +0100
commit4f8f8a8a7a1ea62ec80ad56388cb2bef2b8f0c8a (patch)
tree8811a63fc9e0972eaeee13ffb41b1afec773bb4e /test/sca
parent3694c7ba86650e3e8e60a18c8d540e56c5f026fc (diff)
downloadpyecsca-4f8f8a8a7a1ea62ec80ad56388cb2bef2b8f0c8a.tar.gz
pyecsca-4f8f8a8a7a1ea62ec80ad56388cb2bef2b8f0c8a.tar.zst
pyecsca-4f8f8a8a7a1ea62ec80ad56388cb2bef2b8f0c8a.zip
Add secp256k1 formulas.
Diffstat (limited to 'test/sca')
-rw-r--r--test/sca/test_structural.py25
1 files changed, 23 insertions, 2 deletions
diff --git a/test/sca/test_structural.py b/test/sca/test_structural.py
index d8200a3..e12d865 100644
--- a/test/sca/test_structural.py
+++ b/test/sca/test_structural.py
@@ -143,6 +143,27 @@ def test_efd_formula_match():
("secg", "secp224r1"),
AdditionEFDFormula,
],
+ [
+ "add-libressl-v382",
+ ShortWeierstrassModel,
+ "jacobian",
+ ("secg", "secp128r1"),
+ AdditionEFDFormula,
+ ],
+ [
+ "dbl-libressl-v382",
+ ShortWeierstrassModel,
+ "jacobian",
+ ("secg", "secp128r1"),
+ DoublingEFDFormula,
+ ],
+ [
+ "dbl-secp256k1-v040",
+ ShortWeierstrassModel,
+ "jacobian",
+ ("secg", "secp256k1"),
+ DoublingEFDFormula,
+ ],
],
)
def test_formula_correctness(name, model, coords, param_spec, formula_type):
@@ -208,6 +229,6 @@ def test_formula_correctness(name, model, coords, param_spec, formula_type):
== QR
)
assert (
- scale(params.curve.prime, res[0], **params.curve.parameters)[0]
- == Q2
+ scale(params.curve.prime, res[0], **params.curve.parameters)[0]
+ == Q2
)