diff options
author | Sebastian Andrzej Siewior <sebastian@breakpoint.cc> | 2017-10-18 13:30:23 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2017-12-11 12:53:07 +0100 |
commit | cac19d19e7d6f252ff9aea60d85e0c0fd71a117f (patch) | |
tree | c99c44c5a70e11d5662f4e187e1fa34bf67f923d /doc/man1/genrsa.pod | |
parent | a8ea8018fa187e22fb4989450b550589e20f62c2 (diff) |
rsa: Do not allow less than 512 bit RSA keys
As per documentation, the RSA keys should not be smaller than 64bit (the
documentation mentions something about a quirk in the prime generation
algorithm). I am adding check into the code which used to be 16 for some
reason.
My primary motivation is to get rid of the last sentence in the
documentation which suggest that typical keys have 1024 bits (instead
updating it to the now default 2048).
I *assume* that keys less than the 2048 bits (say 512) are used for
education purposes.
The 512 bits as the minimum have been suggested by Bernd Edlinger.
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4547)
Diffstat (limited to 'doc/man1/genrsa.pod')
-rw-r--r-- | doc/man1/genrsa.pod | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/doc/man1/genrsa.pod b/doc/man1/genrsa.pod index 3e42c98f5d..25562dc866 100644 --- a/doc/man1/genrsa.pod +++ b/doc/man1/genrsa.pod @@ -94,7 +94,7 @@ RSA key, which is defined in RFC 8017. =item B<numbits> The size of the private key to generate in bits. This must be the last option -specified. The default is 2048. +specified. The default is 2048 and values less than 512 are not allowed. =back @@ -112,13 +112,6 @@ Because key generation is a random process the time taken to generate a key may vary somewhat. But in general, more primes lead to less generation time of a key. -=head1 BUGS - -A quirk of the prime generation algorithm is that it cannot generate small -primes. Therefore the number of bits should not be less that 64. For typical -private keys this will not matter because for security reasons they will -be much larger (typically 1024 bits). - =head1 SEE ALSO L<gendsa(1)> |