summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMoritz Schulte <mo@g10code.com>2004-08-24 20:22:46 +0000
committerMoritz Schulte <mo@g10code.com>2004-08-24 20:22:46 +0000
commit75a6e0d4080d01aecb206739770358898bab204a (patch)
tree7194d1adc981515edded0899afcf8d20d25d468f /doc
parent2c884975dddc71b7d284d49357d3dd57a8bd3b35 (diff)
downloadlibgcrypt-75a6e0d4080d01aecb206739770358898bab204a.tar.gz
2004-08-24 Moritz Schulte <moritz@g10code.com>
* gcrypt.texi (Miscellaneous): Document gcry_mpi_randomize.
Diffstat (limited to 'doc')
-rw-r--r--doc/ChangeLog4
-rw-r--r--doc/gcrypt.texi22
2 files changed, 17 insertions, 9 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 3acf47bb..c6d59034 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,7 @@
+2004-08-24 Moritz Schulte <moritz@g10code.com>
+
+ * gcrypt.texi (Miscellaneous): Document gcry_mpi_randomize.
+
2004-08-18 Moritz Schulte <moritz@g10code.com>
* gcrypt.texi (Multi Threading): Document
diff --git a/doc/gcrypt.texi b/doc/gcrypt.texi
index b99464d6..d3b72c66 100644
--- a/doc/gcrypt.texi
+++ b/doc/gcrypt.texi
@@ -177,7 +177,7 @@ MPI library
* Calculations:: Performing MPI calculations.
* Comparisons:: How to compare MPI values.
* Bit manipulations:: How to access single bits of MPI values.
-* Misc:: Miscellaneous MPI functions.
+* Miscellaneous:: Miscellaneous MPI functions.
Utilities
* Memory allocation:: Functions related with memory allocation.
@@ -3307,7 +3307,7 @@ can't be converted to an MPI, @code{NULL} is returned.
* Calculations:: Performing MPI calculations.
* Comparisons:: How to compare MPI values.
* Bit manipulations:: How to access single bits of MPI values.
-* Misc:: Misc, fixme.
+* Miscellaneous:: Miscellaneous MPI functions.
@end menu
Public key cryptography is based on mathematics with large numbers. To
@@ -3618,19 +3618,15 @@ Shift the value of @var{a} by @var{n} bits to the right and store the
result in @var{x}.
@end deftypefun
-@node Misc
-@section Misc
-
-@noindent
-The remaining MPI functions take care of very special properties of the
-implementation:
+@node Miscellaneous
+@section Miscellanous
@deftypefun gcry_mpi_t gcry_mpi_set_opaque (@w{gcry_mpi_t @var{a}}, @w{void *@var{p}}, @w{unsigned int @var{nbits}})
Store @var{nbits} of the value @var{p} points to in @var{a} and mark
@var{a} as an opaque value (i.e. an value that can't be used for any
math calculation and is only used to store an arbitrary bit pattern in
-@var{a}.
+@var{a}).
WARNING: Never use an opaque MPI for actual math operations. The only
valid functions are gcry_mpi_get_opaque and gcry_mpi_release. Use
@@ -3664,6 +3660,14 @@ currently useless as no flags are allowed.
Return true when the @var{flag} is set for @var{a}.
@end deftypefun
+@deftypefun void gcry_mpi_randomize (@w{gcry_mpi_t @var{w}}, @w{unsigned int @var{nbits}}, @w{enum gcry_random_level @var{level}})
+
+Set the big integer @var{w} to a random value of @var{nbits}, using
+random data quality of level @var{level}. In case @var{nbits} is not
+a multiple of a byte, @var{nbits} is rounded up to the next byte
+boundary.
+@end deftypefun
+
@node Utilities
@chapter Utilities