1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-08 14:53:43 -05:00

Generate keys more carefully, so that when the user asks for an n-bit

key they always get an n-bit number instead of n-1. The latter was
perfectly harmless but kept confusing users.

[originally from svn r9421]
This commit is contained in:
Simon Tatham
2012-03-04 00:24:49 +00:00
parent e59f1ac827
commit 9604c2b367
4 changed files with 57 additions and 9 deletions

3
ssh.h
View File

@ -550,7 +550,8 @@ int rsa_generate(struct RSAKey *key, int bits, progfn_t pfn,
int dsa_generate(struct dss_key *key, int bits, progfn_t pfn,
void *pfnparam);
Bignum primegen(int bits, int modulus, int residue, Bignum factor,
int phase, progfn_t pfn, void *pfnparam);
int phase, progfn_t pfn, void *pfnparam, unsigned firstbits);
void invent_firstbits(unsigned *one, unsigned *two);
/*