Re:Openssl: uses only 32 bytes (256 bit) for key generation
by tptacek on Wednesday March 19, 2014 @08:17PM
(#7432912)
No, that's not how the code works.
The "256 bits" (in this case) are used as a seed for the OpenSSL CSPRNG.
OpenSSL's RSA generation asks for two prime numbers each (bitlen/2) long. OpenSSL's primegen works by iterating over random numbers, here each (bitlen/2) long (of which (bitlen/2-2) are random), looking for primes.
The "256 bits" (in this case) are used as a seed for the OpenSSL CSPRNG.
OpenSSL's RSA generation asks for two prime numbers each (bitlen/2) long. OpenSSL's primegen works by iterating over random numbers, here each (bitlen/2) long (of which (bitlen/2-2) are random), looking for primes.