1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 19:12: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

5
ecc.c
View File

@ -833,6 +833,11 @@ void ecc_montgomery_get_affine(MontgomeryPoint *mp, mp_int **x)
*x = monty_export(mc->mc, mp->X);
}
unsigned ecc_montgomery_is_identity(MontgomeryPoint *mp)
{
return mp_eq_integer(mp->Z, 0);
}
/* ----------------------------------------------------------------------
* Twisted Edwards curves.
*/