ecc

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

commit a7d8f9972ad8a6b97c8cd295dcacab1794275741
parent edd6cd7b252b7d0c60e21e27a256a6b3c2595830
Author: Shivakumar <[email protected]>
Date:   Thu, 12 Jun 2025 23:34:40 +0530

add test for subtraction and multiplication

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

diff --git a/tests/test_field.py b/tests/test_field.py @@ -12,3 +12,15 @@ def test_exponentiation(): assert a ** 12 == FieldElement(1, 13) +def test_multiplication(): + a = FieldElement(7, 13) + b = FieldElement(12, 13) + assert a * b == FieldElement(6, 13) + + +def test_subtraction(): + a = FieldElement(7, 13) + b = FieldElement(12, 13) + assert b - a == FieldElement(5, 13) + +