diff options
author | Werner Koch <wk@gnupg.org> | 2013-09-06 20:07:07 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2013-09-07 10:16:45 +0200 |
commit | ddfefe429660cc5d798f3517208936449247ae5c (patch) | |
tree | f048cf22d4cc2de5994b44560877b25e0fb825f5 /src | |
parent | 1bd2c67aa55b40589654d3fa5dea05cf1ed7dc5f (diff) | |
download | libgcrypt-ddfefe429660cc5d798f3517208936449247ae5c.tar.gz |
mpi: Add gcry_mpi_ec_curve_point.
* mpi/ec.c (_gcry_mpi_ec_curve_point): New.
(ec_powm): Return the absolute value.
* src/visibility.c, src/visibility.c: Add wrappers.
* src/libgcrypt.def, src/libgcrypt.vers: Export them.
Diffstat (limited to 'src')
-rw-r--r-- | src/libgcrypt.def | 9 | ||||
-rw-r--r-- | src/libgcrypt.vers | 3 | ||||
-rw-r--r-- | src/visibility.c | 7 | ||||
-rw-r--r-- | src/visibility.h | 1 |
4 files changed, 15 insertions, 5 deletions
diff --git a/src/libgcrypt.def b/src/libgcrypt.def index 9539d39a..9c691ec2 100644 --- a/src/libgcrypt.def +++ b/src/libgcrypt.def @@ -239,11 +239,12 @@ EXPORTS gcry_sexp_nth_buffer @214 - gcry_mpi_ec_curve_point @215 + gcry_mpi_is_neg @215 + gcry_mpi_neg @216 + gcry_mpi_abs @217 + + gcry_mpi_ec_curve_point @218 - gcry_mpi_is_neg @216 - gcry_mpi_neg @217 - gcry_mpi_abs @218 ;; end of file with public symbols for Windows. diff --git a/src/libgcrypt.vers b/src/libgcrypt.vers index 9bb7ae2c..beb691ee 100644 --- a/src/libgcrypt.vers +++ b/src/libgcrypt.vers @@ -97,7 +97,8 @@ GCRYPT_1.6 { gcry_mpi_ec_get_mpi; gcry_mpi_ec_get_point; gcry_mpi_ec_set_mpi; gcry_mpi_ec_set_point; gcry_mpi_ec_get_affine; - gcry_mpi_ec_dup; gcry_mpi_ec_add; gcry_mpi_ec_mul; gcry_mpi_ec_curve_point; + gcry_mpi_ec_dup; gcry_mpi_ec_add; gcry_mpi_ec_mul; + gcry_mpi_ec_curve_point; _gcry_mpi_get_const; diff --git a/src/visibility.c b/src/visibility.c index 0e244117..404da20b 100644 --- a/src/visibility.c +++ b/src/visibility.c @@ -547,6 +547,13 @@ gcry_mpi_ec_mul (gcry_mpi_point_t w, gcry_mpi_t n, gcry_mpi_point_t u, _gcry_ctx_get_pointer (ctx, CONTEXT_TYPE_EC)); } +int +gcry_mpi_ec_curve_point (gcry_mpi_point_t point, gcry_ctx_t ctx) +{ + return _gcry_mpi_ec_curve_point + (point, _gcry_ctx_get_pointer (ctx, CONTEXT_TYPE_EC)); +} + unsigned int gcry_mpi_get_nbits (gcry_mpi_t a) { diff --git a/src/visibility.h b/src/visibility.h index a6cb3dcf..b4da48e8 100644 --- a/src/visibility.h +++ b/src/visibility.h @@ -550,6 +550,7 @@ MARK_VISIBLE (gcry_mpi_copy) MARK_VISIBLE (gcry_mpi_div) MARK_VISIBLE (gcry_mpi_dump) MARK_VISIBLEX(gcry_mpi_ec_add) +MARK_VISIBLEX(gcry_mpi_ec_curve_point) MARK_VISIBLEX(gcry_mpi_ec_dup) MARK_VISIBLEX(gcry_mpi_ec_get_affine) MARK_VISIBLEX(gcry_mpi_ec_mul) |