ecc: Add mitigation against timing attack.
authorNIIBE Yutaka <gniibe@fsij.org>
Wed, 17 Jul 2019 03:44:50 +0000 (12:44 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Wed, 7 Aug 2019 05:26:41 +0000 (14:26 +0900)
commitb9577f7c89b4327edc09f2231bc8b31521102c79
tree0f110e74421b34fa9ac7868ceb6a3816ed2244ad
parent75c2fbc43d2f2cf5f4c60cb28001fda7324185c2
ecc: Add mitigation against timing attack.

* cipher/ecc-ecdsa.c (_gcry_ecc_ecdsa_sign): Add the order N to K.
* mpi/ec.c (_gcry_mpi_ec_mul_point): Compute with NBITS of P or larger.

CVE-id: CVE-2019-13627
GnuPG-bug-id: 4626
Co-authored-by: Ján Jančár <johny@neuromancer.sk>
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
cipher/ecc-ecdsa.c
mpi/ec.c