projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Failure to set multipliers[NPRIMES] was rendering the input-modulus
[u/mdw/putty]
/
sshprime.c
diff --git
a/sshprime.c
b/sshprime.c
index
b48ce1a
..
4d79aac
100644
(file)
--- a/
sshprime.c
+++ b/
sshprime.c
@@
-1255,6
+1255,10
@@
Bignum primegen(int bits, int modulus, int residue, Bignum factor,
moduli[NPRIMES] = modulus;
residues[NPRIMES] = (bignum_mod_short(p, (unsigned short) modulus)
+ modulus - residue);
moduli[NPRIMES] = modulus;
residues[NPRIMES] = (bignum_mod_short(p, (unsigned short) modulus)
+ modulus - residue);
+ if (factor)
+ multipliers[NPRIMES] = bignum_mod_short(factor, modulus);
+ else
+ multipliers[NPRIMES] = 1;
delta = 0;
while (1) {
for (i = 0; i < (sizeof(moduli) / sizeof(*moduli)); i++)
delta = 0;
while (1) {
for (i = 0; i < (sizeof(moduli) / sizeof(*moduli)); i++)