mpi: Add functions to manipulate the sign.
authorWerner Koch <wk@gnupg.org>
Fri, 6 Sep 2013 17:58:50 +0000 (19:58 +0200)
committerWerner Koch <wk@gnupg.org>
Sat, 7 Sep 2013 08:16:45 +0000 (10:16 +0200)
commit1bd2c67aa55b40589654d3fa5dea05cf1ed7dc5f
treeb9d3fdf529b9696b9f23707bf5fee958269628f5
parent4e4440153258e2f0dfdcaa8443820af06984ecb1
mpi: Add functions to manipulate the sign.

* src/gcrypt.h.in (gcry_mpi_is_neg): New.
(gcry_mpi_neg, gcry_mpi_abs): New.
* mpi/mpiutil.c (_gcry_mpi_is_neg): New.
(_gcry_mpi_neg, _gcry_mpi_abs): New.
* src/visibility.c, src/visibility.h: Add wrappers.
* src/libgcrypt.def, src/libgcrypt.vers: Export them.
* src/mpi.h (mpi_is_neg): New.  Rename old macro to mpi_has_sign.
* mpi/mpi-mod.c (_gcry_mpi_mod_barrett): Use mpi_has_sign.
* mpi/mpi-mpow.c (calc_barrett): Ditto.
* cipher/primegen.c (_gcry_derive_x931_prime): Ditto
* cipher/rsa.c (secret): Ditto.
14 files changed:
NEWS
cipher/primegen.c
cipher/rsa.c
doc/gcrypt.texi
mpi/ec.c
mpi/mpi-mod.c
mpi/mpi-mpow.c
mpi/mpiutil.c
src/gcrypt.h.in
src/libgcrypt.def
src/libgcrypt.vers
src/mpi.h
src/visibility.c
src/visibility.h