1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 20:12:48 -05:00

Make the frankly ridiculous prototypes for modpow() and modmul() more sane

[originally from svn r752]
This commit is contained in:
Simon Tatham
2000-10-23 16:11:31 +00:00
parent bf2744aabf
commit e51b4da9f7
6 changed files with 33 additions and 34 deletions

View File

@ -670,8 +670,7 @@ Bignum primegen(int bits, int modulus, int residue,
/*
* Compute w^q mod p.
*/
wqp = newbn(p[0]);
modpow(w, q, p, wqp);
wqp = modpow(w, q, p);
freebn(w);
/*
@ -683,8 +682,7 @@ Bignum primegen(int bits, int modulus, int residue,
continue;
}
for (i = 0; i < k; i++) {
wqp2 = newbn(p[0]);
modmul(wqp, wqp, p, wqp2);
wqp2 = modmul(wqp, wqp, p);
freebn(wqp);
wqp = wqp2;
if (bignum_cmp(wqp, One) == 0)