[Gmp-commit] /var/hg/gmp: Updated mpn_powm_doc, saying that left-over exponen...

mercurial at gmplib.org mercurial at gmplib.org
Fri Feb 14 09:47:13 UTC 2014


details:   /var/hg/gmp/rev/cab67a423523
changeset: 16297:cab67a423523
user:      Niels M?ller <nisse at lysator.liu.se>
date:      Fri Feb 14 10:46:57 2014 +0100
description:
Updated mpn_powm_doc, saying that left-over exponent bits must be zero.

diffstat:

 ChangeLog    |  6 ++++++
 doc/gmp.texi |  8 +++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diffs (31 lines):

diff -r 626160712a60 -r cab67a423523 ChangeLog
--- a/ChangeLog	Tue Feb 11 22:26:02 2014 +0100
+++ b/ChangeLog	Fri Feb 14 10:46:57 2014 +0100
@@ -1,3 +1,9 @@
+2014-02-14  Niels Möller  <nisse at lysator.liu.se>
+
+	* doc/gmp.texi (Low-level Functions): Update docs for
+	mpn_sec_powm, to specify that left-over exponent bits must be
+	zero.
+
 2014-02-11  Niels Möller  <nisse at lysator.liu.se>
 
 	* Makefile.am (EXTRA_DIST): Distribute COPYING.LESSERv3,
diff -r 626160712a60 -r cab67a423523 doc/gmp.texi
--- a/doc/gmp.texi	Tue Feb 11 22:26:02 2014 +0100
+++ b/doc/gmp.texi	Fri Feb 14 10:46:57 2014 +0100
@@ -5747,9 +5747,11 @@
 @deftypefunx mp_size_t mpn_sec_powm_itch (mp_size_t @var{bn}, mp_bitcnt_t @var{enb}, size_t @var{n})
 Set @var{R} to @m{B^E \bmod @var{M}, (@var{B} raised to @var{E}) modulo
 @var{M}}, where @var{R} = @{@var{rp}, at var{n}@}, @var{M} = @{@var{mp}, at var{n}@},
-and @var{E} consists of the least @var{enb} in the area pointed to by @var{ep}.
-
-It is required that @math{@var{B} > 0}, and that @math{@var{M} > 0} is odd.
+and @var{E} = @{@var{ep}, at math{@GMPceil{@var{enb} /
+ at code{GMP\_NUMB\_BITS}}}@}.
+
+It is required that @math{@var{B} > 0}, that @math{@var{M} > 0} is odd, and
+that @m{@var{E} < 2 at GMPraise{@var{enb}}, @var{E} < 2^@var{enb}}.
 
 No overlapping between @var{R} and the input operands is allowed.
 


More information about the gmp-commit mailing list