1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 03:22:48 -05:00

New query function ecc_montgomery_is_identity.

To begin with, this allows me to add a regression test for the change
in the previous commit.
This commit is contained in:
Simon Tatham
2020-02-28 19:32:35 +00:00
parent 141b75a71a
commit c9a8fa639e
4 changed files with 17 additions and 0 deletions

View File

@ -769,6 +769,12 @@ class ecc(MyTestBase):
check_point(ecc_montgomery_double(mP), rP + rP)
check_point(ecc_montgomery_double(mQ), rQ + rQ)
zero = ecc_montgomery_point_new(mc, 0)
self.assertEqual(ecc_montgomery_is_identity(zero), False)
identity = ecc_montgomery_double(zero)
ecc_montgomery_get_affine(identity)
self.assertEqual(ecc_montgomery_is_identity(identity), True)
def testEdwardsSimple(self):
p, d, a = 3141592661, 2688750488, 367934288