projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make the frankly ridiculous prototypes for modpow() and modmul() more sane
[u/mdw/putty]
/
sshprime.c
diff --git
a/sshprime.c
b/sshprime.c
index
d1793e4
..
4a2a660
100644
(file)
--- a/
sshprime.c
+++ b/
sshprime.c
@@
-670,8
+670,7
@@
Bignum primegen(int bits, int modulus, int residue,
/*
* Compute w^q mod p.
*/
/*
* Compute w^q mod p.
*/
- wqp = newbn(p[0]);
- modpow(w, q, p, wqp);
+ wqp = modpow(w, q, p);
freebn(w);
/*
freebn(w);
/*
@@
-683,8
+682,7
@@
Bignum primegen(int bits, int modulus, int residue,
continue;
}
for (i = 0; i < k; i++) {
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)
freebn(wqp);
wqp = wqp2;
if (bignum_cmp(wqp, One) == 0)