summaryrefslogtreecommitdiff
path: root/src/libgcrypt.def
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2013-03-08 22:10:23 +0100
committerWerner Koch <wk@gnupg.org>2013-03-08 22:13:52 +0100
commit8ac9e756d3ca545a9b97e61ad3d42fc2e877d788 (patch)
tree9c371da68f09dca2379381529f9d7810957260b2 /src/libgcrypt.def
parent7cce620acddac2df024ca421ed3abc32a88f3738 (diff)
downloadlibgcrypt-8ac9e756d3ca545a9b97e61ad3d42fc2e877d788.tar.gz
mpi: Add an API for EC math.
* src/context.c, src/context.h: New. * src/Makefile.am (libgcrypt_la_SOURCES): Add new files. * src/gcrypt.h.in (struct gcry_context, gcry_ctx_t): New types. (gcry_ctx_release): New prototype. (gcry_mpi_ec_p_new, gcry_mpi_ec_get_affine, gcry_mpi_ec_dup) (gcry_mpi_ec_add, gcry_mpi_ec_mul): New prototypes. * mpi/ec.c: Include errno.h and context.h. (_gcry_mpi_ec_init): Rename to .. (ec_p_init): this, make static, remove allocation and add arg CTX. (_gcry_mpi_ec_p_internal_new): New; to replace _gcry_mpi_ec_init. Change all callers to use this func. (_gcry_mpi_ec_free): Factor code out to .. (ec_deinit): New func. (gcry_mpi_ec_p_new): New. * src/visibility.c: Include context.h and mpi.h. (gcry_mpi_ec_p_new, gcry_mpi_ec_get_affine, gcry_mpi_ec_dup) (gcry_mpi_ec_add, gcry_mpi_ec_mul) (gcry_ctx_release): New wrapper functions. * src/visibility.h: Mark new wrapper functions visible. * src/libgcrypt.def, src/libgcrypt.vers: Add new symbols. * tests/t-mpi-point.c (print_mpi, hex2mpi, cmp_mpihex): New. (context_alloc): New. (make_point, basic_ec_math): New. -- This part finishes the basic API to do EC math. It provides a wrapper around all internal functions. tests/t-mpi-point.c may be useful as sample code. Eventually we will add function to retrieve curve parameters etc.
Diffstat (limited to 'src/libgcrypt.def')
-rw-r--r--src/libgcrypt.def8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libgcrypt.def b/src/libgcrypt.def
index 8f14dff6..611f10f9 100644
--- a/src/libgcrypt.def
+++ b/src/libgcrypt.def
@@ -220,3 +220,11 @@ EXPORTS
gcry_mpi_point_snatch_get @199
gcry_mpi_point_set @200
gcry_mpi_point_snatch_set @201
+
+ gcry_ctx_release @202
+
+ gcry_mpi_ec_p_new @203
+ gcry_mpi_ec_get_affine @204
+ gcry_mpi_ec_dup @205
+ gcry_mpi_ec_add @206
+ gcry_mpi_ec_mul @207