ecc

Elliptic Curve Cryptograpy library from scratch in python.
Log | Files | Refs | README | LICENSE

commit 627be72160bd3c09fd6b671bbcd34f4458c266f8
parent f0456e9780776f979ac3543bc23dc31e674cf2b2
Author: Shivakumar <[email protected]>
Date:   Thu, 26 Jun 2025 13:55:33 +0530

add tests for scalar multiplication and division for FieldElement

Diffstat:
Mtests/test_field.py | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/tests/test_field.py b/tests/test_field.py @@ -24,3 +24,13 @@ def test_subtraction(): assert b - a == FieldElement(5, 13) +def test_scalar_multiplication(): + a = FieldElement(7, 13) + k = 2 + assert k * a == FieldElement(1, 13) + + +def test_division(): + a = FieldElement(7, 13) + b = FieldElement(3, 13) + assert a / b == FieldElement(11, 13)