mpn_sec_powm

Torbjorn Granlund tg at gmplib.org
Tue Feb 11 20:52:13 UTC 2014


The exponent size argument docs implies that bits in the leading limb
beyond the bit count argument are to be ignored.  I am not sure that is
a wise promise.  But if we keep promising that, we need to add tests
that put random garbage there.

(An alterntive would be to say that the operand is {ep,en} where en =
ceil{(enbits-1)/GMP_NUMB_BITS}.)

Please use something else than ebits, since that sounds like the
arguments contains bits with individual meaning.  IIRC "enb" would
follow conventions used elsewhere in the manual.

It is somewhat confusing to use ebi in one function, eb in another, and
ebits in the docs for the same operand.

The code looks correct to me.


Torbjörn


More information about the gmp-devel mailing list