aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/test_impl.py
diff options
context:
space:
mode:
authorJ08nY2024-07-17 15:30:25 +0200
committerJ08nY2024-07-17 15:30:25 +0200
commit33027a201236e6e4aad2d7d637aed85a4f762021 (patch)
tree791faec5053905cdd1b5f473560eaea3c9215f5d /test/test_impl.py
parentd429a996d64e8f8df552ae4a34a04189dc9b82c4 (diff)
downloadpyecsca-codegen-33027a201236e6e4aad2d7d637aed85a4f762021.tar.gz
pyecsca-codegen-33027a201236e6e4aad2d7d637aed85a4f762021.tar.zst
pyecsca-codegen-33027a201236e6e4aad2d7d637aed85a4f762021.zip
Document the scripts.
Diffstat (limited to 'test/test_impl.py')
-rw-r--r--test/test_impl.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test_impl.py b/test/test_impl.py
index da42c33..34f427b 100644
--- a/test/test_impl.py
+++ b/test/test_impl.py
@@ -4,7 +4,7 @@ import pytest
from click.testing import CliRunner
from pyecsca.ec.key_agreement import ECDH_SHA1
-from pyecsca.ec.mod import Mod
+from pyecsca.ec.mod import mod
from pyecsca.ec.mult import (
LTRMultiplier,
RTLMultiplier,
@@ -323,7 +323,7 @@ def test_ecdh(target, mult, secp128r1):
for other_priv in other_privs:
priv, pub = target.generate()
other_pub = mult.multiply(other_priv)
- ecdh = ECDH_SHA1(copy(mult), secp128r1, other_pub, Mod(priv, secp128r1.order))
+ ecdh = ECDH_SHA1(copy(mult), secp128r1, other_pub, mod(priv, secp128r1.order))
result = target.ecdh(other_pub)
expected = ecdh.perform()
assert result == expected
@@ -343,7 +343,7 @@ def test_ecdsa(target, mult, secp128r1):
secp128r1,
mult.formulas["add"],
pub.to_model(secp128r1.curve.coordinate_model, secp128r1.curve),
- Mod(priv, secp128r1.order),
+ mod(priv, secp128r1.order),
)
signature_data = target.ecdsa_sign(message)