OpenSSL and the MS RSA CSP (Win7 x64) generate RSA keys with a public exponent of 65537. Smaller public exponents are not allowed by some specifications and may be rejected by other software.
// p and q values should have a length of half the strength in bits
int pbitlength = ((KeySize + 1) >> 1);
int qbitlength = (KeySize - pbitlength);
// p and q values should have a length of half the strength in bits
int pbitlength = ((KeySize + 1) >> 1);
int qbitlength = (KeySize - pbitlength);
- const uint uint_e = 17;
+ const uint uint_e = 65537;
e = uint_e; // fixed
// generate p, prime and (p-1) relatively prime to e
e = uint_e; // fixed
// generate p, prime and (p-1) relatively prime to e