Correct checks for ecc secret key
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Wed, 31 Jul 2013 13:20:58 +0000 (17:20 +0400)
committerWerner Koch <wk@gnupg.org>
Wed, 31 Jul 2013 15:47:15 +0000 (17:47 +0200)
commit10dfa41b43a906031bc674ea41cd3073701011f3
treecbc2b6be94439759fca3bd24a204b8e5882821db
parent43320961a8751ee28dc95cdb0ae01ea8a7ff7f91
Correct checks for ecc secret key

* cipher/ecc.c (check_secret_key): replace wrong comparison of Q and
sk->Q points with correct one.

--
Currently check_secret_keys compares pointers to coordinates of Q
(calculated) and sk->Q (provided) points. Instead it should convert them
to affine representations and use mpi_cmp to compare coordinates.

This has an implication that keys that were (erroneously) verified as
valid could now become invalid.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
cipher/ecc.c