diff options
author | Geoff Thorpe <geoff@openssl.org> | 2001-07-20 15:16:10 +0000 |
---|---|---|
committer | Geoff Thorpe <geoff@openssl.org> | 2001-07-20 15:16:10 +0000 |
commit | 81d1998e096684d8ca4318ffdfc07495a8c906de (patch) | |
tree | ab38030965caad2e0c0e3bce8ecb92deaf4e0dae /ms | |
parent | 6b46ca135a70ad7f77bba771496751f555e4863c (diff) | |
download | openssl-81d1998e096684d8ca4318ffdfc07495a8c906de.tar.gz |
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.
Diffstat (limited to 'ms')
0 files changed, 0 insertions, 0 deletions