boringssl/crypto/rsa
David Benjamin b7ded430e4 Constrain RSA bit sizes.
The FIPS RSA generation algorithm is unkind to keys with funny bit
sizes. Odd numbers of bits are especially inconvenient, but the sqrt(2)
bound is much simpler if the key size is a multiple of 128 (thus giving
prime sizes a multiple of 64, so the sqrt(2) bound is easier to work
with).

Also impose a minimum RSA key size. 255-bit RSA is far too small as it
is and gives small enough primes that the p-q FIPS bound (2^(n/2-100))
starts risking underflow.

Change-Id: I4583c90b67385e53641ccee9b29044e79e94c920
Reviewed-on: https://boringssl-review.googlesource.com/14947
Reviewed-by: Adam Langley <agl@google.com>
2017-04-12 22:27:45 +00:00
..
blinding.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
CMakeLists.txt Convert rsa_test to GTest. 2017-02-16 22:23:16 +00:00
internal.h Remove redundant check in RSA_sign. 2017-04-12 22:06:11 +00:00
padding.c Remove redundant check in RSA_sign. 2017-04-12 22:06:11 +00:00
rsa_asn1.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
rsa_impl.c Constrain RSA bit sizes. 2017-04-12 22:27:45 +00:00
rsa_test.cc Constrain RSA bit sizes. 2017-04-12 22:27:45 +00:00
rsa.c Remove redundant check in RSA_sign. 2017-04-12 22:06:11 +00:00