projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement mget and mput in PSFTP, supporting wildcards.
[u/mdw/putty]
/
sshprime.c
diff --git
a/sshprime.c
b/sshprime.c
index
8bbfb87
..
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++)
@@
-1312,7
+1316,8
@@
Bignum primegen(int bits, int modulus, int residue, Bignum factor,
/*
* Next, write p-1 as q*2^k.
*/
/*
* Next, write p-1 as q*2^k.
*/
- for (k = 0; bignum_bit(p, k) == !k; k++); /* find first 1 bit in p-1 */
+ for (k = 0; bignum_bit(p, k) == !k; k++)
+ continue; /* find first 1 bit in p-1 */
q = bignum_rshift(p, k);
/* And store p-1 itself, which we'll need. */
pm1 = copybn(p);
q = bignum_rshift(p, k);
/* And store p-1 itself, which we'll need. */
pm1 = copybn(p);