ecc: Use 25519 method also for ed25519.
authorNIIBE Yutaka <gniibe@fsij.org>
Wed, 23 Aug 2017 03:46:20 +0000 (12:46 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Tue, 29 Aug 2017 01:14:08 +0000 (10:14 +0900)
commitfab712d654b2ccd24696ed90bc239860a128ad5b
treed988911435902f47f657eddf84c05b06e5b61f09
parent1ac3d3637dd80013b78e03b9b9f582091710d908
ecc: Use 25519 method also for ed25519.

* cipher/ecc-curves.c (_gcry_ecc_fill_in_curve): Don't use mpi_add
since it resizes to have more limbs.
* mpi/ec.c (point_resize): Fix for Edwards curve.
(ec_p_init): Support Edwards curve.
(_gcry_mpi_ec_get_affine): Use the methods.
(dup_point_edwards, add_points_edwards, sub_points_edwards): Ditto.
(_gcry_mpi_ec_mul_point): Resize MPIs of point to fixed size.
(_gcry_mpi_ec_curve_point): Use the methods.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
cipher/Makefile.am
cipher/ecc-curves.c
mpi/ec.c