From 4f8f8a8a7a1ea62ec80ad56388cb2bef2b8f0c8a Mon Sep 17 00:00:00 2001 From: J08nY Date: Wed, 8 Nov 2023 16:11:47 +0100 Subject: Add secp256k1 formulas. --- test/sca/test_structural.py | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'test/sca') 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 ) -- cgit v1.3.1