+6
−0
Loading
findPrime() set only the top bit of each prime, so two 1024-bit primes
often multiplied to a 2047-bit modulus (7 of 12 in a quick run). Let's
Encrypt refuses such keys ("key size not supported: 2047"). Setting the
second-highest bit as well, as OpenSSL/FIPS 186 do, puts p*q above
2^(2k-1): 20 of 20 keys now come out at exactly 2048 bits.
Co-Authored-By:
Claude Opus 5.5 <noreply@anthropic.com>