Geoff Thorpe 81d1998e09 Currently, RSA code, when using no padding scheme, simply checks that input
does not contain more bytes than the RSA modulus 'n' - it does not check
that the input is strictly *less* than 'n'. Whether this should be the
case or not is open to debate - however, due to security problems with
returning miscalculated CRT results, the 'rsa_mod_exp' implementation in
rsa_eay.c now performs a public-key exponentiation to verify the CRT result
and in the event of an error will instead recalculate and return a non-CRT
(more expensive) mod_exp calculation. As the mod_exp of 'I' is equivalent
to the mod_exp of 'I mod n', and the verify result is automatically between
0 and n-1 inclusive, the verify only matches the input if 'I' was less than
'n', otherwise even a correct CRT calculation is only congruent to 'I' (ie.
they differ by a multiple of 'n'). Rather than rejecting correct
calculations and doing redundant and slower ones instead, this changes the
equality check in the verification code to a congruence check.
2001-07-20 15:16:10 +00:00
..
1999-04-29 16:04:54 +00:00
2001-06-23 16:43:03 +00:00
2000-11-06 22:34:17 +00:00
2000-06-01 14:24:59 +00:00
2000-11-06 22:34:17 +00:00
2000-11-06 22:34:17 +00:00
2000-11-06 22:34:17 +00:00
2000-11-06 22:34:17 +00:00