summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2013-04-15 11:52:54 +0200
committerWerner Koch <wk@gnupg.org>2013-04-15 11:54:11 +0200
commitbd3afc27459a44df8cf501a7e1ae37bb849a8b0e (patch)
tree6bfb8c47d792bab0bed61ec453f0644ad4bc8039 /doc
parent71b25a5562f68aad81eae52cc1bab9ca7731a7e9 (diff)
downloadlibgcrypt-bd3afc27459a44df8cf501a7e1ae37bb849a8b0e.tar.gz
Add macros to return pre-defined MPIs.
* src/gcrypt.h.in (GCRYMPI_CONST_ONE, GCRYMPI_CONST_TWO) (GCRYMPI_CONST_THREE, GCRYMPI_CONST_FOUR, GCRYMPI_CONST_EIGHT): New. (_gcry_mpi_get_const): New private function. * src/visibility.c (_gcry_mpi_get_const): New. * src/visibility.h: Mark it visible. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/gcrypt.texi11
1 files changed, 10 insertions, 1 deletions
diff --git a/doc/gcrypt.texi b/doc/gcrypt.texi
index cace087b..d4c41940 100644
--- a/doc/gcrypt.texi
+++ b/doc/gcrypt.texi
@@ -4054,6 +4054,11 @@ coordinate is not required, @code{NULL} may be passed to @var{x} or
@var{y}. @var{ctx} is the context object which has been created using
@code{gcry_mpi_ec_new}. Returns 0 on success or not 0 if @var{point}
is at infinity.
+
+Note that you can use @code{gcry_mpi_ec_set_point} with the value
+@code{GCRYMPI_CONST_ONE} for @var{z} to convert affine coordinates
+back into projective coordinates.
+
@end deftypefun
@deftypefun void gcry_mpi_ec_dup ( @
@@ -4127,7 +4132,11 @@ If this flag is set, the MPI is marked as a constant and as immutable
Setting or changing the value of that MPI is ignored and an error
message is logged. Such an MPI will never be deallocated and may thus
be used without copying. Note that using gcry_mpi_copy will return a
-copy of that constant with this and the immutable flag cleared.
+copy of that constant with this and the immutable flag cleared. A few
+commonly used constants are pre-defined and accessible using the
+macros @code{GCRYMPI_CONST_ONE}, @code{GCRYMPI_CONST_TWO},
+@code{GCRYMPI_CONST_THREE}, @code{GCRYMPI_CONST_FOUR}, and
+@code{GCRYMPI_CONST_EIGHT}.
@end table
@deftypefun void gcry_mpi_set_flag (@w{gcry_mpi_t @var{a}}, @