diff options
author | Torbjorn Granlund <tege@gmplib.org> | 2014-01-01 23:10:49 +0100 |
---|---|---|
committer | Torbjorn Granlund <tege@gmplib.org> | 2014-01-01 23:10:49 +0100 |
commit | 5f81ad35e5ab14b84ae824443b992ab51f6300a3 (patch) | |
tree | 451b2650a65a94b9c184a8ac45f61e8ae26df834 /doc | |
parent | d33fe0bc51c1f4440b8cf20df6d3867c547eb861 (diff) | |
download | gmp-5f81ad35e5ab14b84ae824443b992ab51f6300a3.tar.gz |
Doc updates.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/gmp.texi | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/doc/gmp.texi b/doc/gmp.texi index b6dc596b5..7d2ff465b 100644 --- a/doc/gmp.texi +++ b/doc/gmp.texi @@ -5763,14 +5763,14 @@ limbs. Store the selected entry at @var{rp}. This function reads the entire table to avoid side-channel information leaks. @end deftypefun -@deftypefun void mpn_sec_div_qr (mp_limb_t *@var{qp}, mp_limb_t *@var{np}, mp_size_t @var{nn}, const mp_limb_t *@var{dp}, mp_size_t @var{dn}, mp_limb_t *@var{tp}) +@deftypefun mp_limb_t mpn_sec_div_qr (mp_limb_t *@var{qp}, mp_limb_t *@var{np}, mp_size_t @var{nn}, const mp_limb_t *@var{dp}, mp_size_t @var{dn}, mp_limb_t *@var{tp}) @deftypefunx mp_size_t mpn_sec_div_qr_itch (mp_size_t @var{nn}, mp_size_t @var{dn}) -@strong{This function's interface is preliminary.} Set @var{Q} to @m{\lfloor @var{N} / @var{D}\rfloor, the truncated quotient @var{N} / @var{D}} and @var{R} to @m{@var{N} \bmod @var{D}, @var{N} modulo @var{D}}, where @var{N} = @{@var{np},@var{nn}@}, @var{D} = -@{@var{dp},@var{dn}@}, @var{Q} = @{@var{qp},@var{nn-dn+1}@}, and @var{R} = +@{@var{dp},@var{dn}@}, @var{Q}'s most significant limb is the function return +value and the remaining limbs are @{@var{qp},@var{nn-dn}@}, and @var{R} = @{@var{np},@var{dn}@}. It is required that @math{@var{nn} @ge @var{dn} @ge 1}, and that @@ -5803,14 +5803,15 @@ This function requires scratch space of @code{mpn_sec_div_r_itch(@var{nn}, @var{dn})} limbs to be passed in the @var{tp} parameter. @end deftypefun -@deftypefun int (mp_limb_t *@var{rp}, mp_limb_t *@var{ap}, const mp_limb_t +@deftypefun int mpn_sec_minvert (mp_limb_t *@var{rp}, mp_limb_t *@var{ap}, const mp_limb_t *@var{mp}, mp_size_t @var{n}, mp_bitcnt_t @var{bit_size}, mp_limb_t *@var{tp}) @deftypefunx mp_size_t mpn_sec_minvert_itch (mp_size_t @var{n}) -Set @var{R} to the inverse of @var{A} modulo @var{M}, where @var{R} = -@{@var{rp},@var{n}@}, @var{A} = @{@var{ap},@var{n}@}, and @var{M} = @{@var{mp},@var{n}@}. -@strong{This function's interface is preliminary.} +Set @var{R} to @m{@var{A}^{-1} \bmod @var{M}, the inverse of @var{A} modulo +@var{M}}, where @var{R} = @{@var{rp},@var{n}@}, @var{A} = @{@var{ap},@var{n}@}, +and @var{M} = @{@var{mp},@var{n}@}. @strong{This function's interface is +preliminary.} -If an inverse exists, returns 1, otherwise returns 0 and leaves @var{R} +If an inverse exists, return 1, otherwise return 0 and leave @var{R} undefined. In either case, the input @var{A} is destroyed. It is required that @var{M} is odd, and that @var{bit_size} is no smaller than @@ -5818,7 +5819,8 @@ the sum of the bit sizes of @var{A} and @var{M}. E.g, @var{bit_size} = 2 * @var{n} * @code{GMP_NUMB_BITS} is always a safe choice, but smaller values can be used if @var{M} or @var{A} are known to have leading zero bits. -This function requires scratch space of @code{mpn_sec_minvert_itch(@var{n})} limbs to be passed in the @var{tp} parameter. +This function requires scratch space of @code{mpn_sec_minvert_itch(@var{n})} +limbs to be passed in the @var{tp} parameter. @end deftypefun |