summaryrefslogtreecommitdiff
path: root/src/mpi.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2014-01-09 19:14:09 +0100
committerWerner Koch <wk@gnupg.org>2014-01-13 10:38:13 +0100
commit2ef48ba59c32bfa1a9265d5eea8ab225a658903a (patch)
tree1c3b8520d24c43bddaac054f52b50ccadc08b7d0 /src/mpi.h
parentef3e66e168c4b9b86bfc4903001631e53a7125d8 (diff)
downloadlibgcrypt-2ef48ba59c32bfa1a9265d5eea8ab225a658903a.tar.gz
ecc: Make a macro shorter.
* src/mpi.h (MPI_EC_TWISTEDEDWARDS): Rename to MPI_EC_EDWARDS. CHnage all users. * cipher/ecc-curves.c (domain_parms): Add parameters for Curve3617 as comment. * mpi/ec.c (dup_point_twistededwards): Rename to dup_point_edwards. (add_points_twistededwards): Rename to add_points_edwards. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'src/mpi.h')
-rw-r--r--src/mpi.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mpi.h b/src/mpi.h
index 7a57b9a6..eb0730ee 100644
--- a/src/mpi.h
+++ b/src/mpi.h
@@ -239,13 +239,18 @@ void _gcry_mpi_snatch_point (gcry_mpi_t x, gcry_mpi_t y, gcry_mpi_t z,
/* Models describing an elliptic curve. */
enum gcry_mpi_ec_models
{
-
+ /* The Short Weierstrass equation is
+ y^2 = x^3 + ax + b
+ */
MPI_EC_WEIERSTRASS = 0,
+ /* The Montgomery equation is
+ by^2 = x^3 + ax^2 + x
+ */
MPI_EC_MONTGOMERY,
- MPI_EC_TWISTEDEDWARDS
- /* The equation for Twisted Edwards curves is
+ /* The Twisted Edwards equation is
ax^2 + y^2 = 1 + bx^2y^2
Note that we use 'b' instead of the commonly used 'd'. */
+ MPI_EC_EDWARDS
};
/* Dialects used with elliptic curves. It is easier to keep the