diff options
author | nagendra modadugu <ngm@google.com> | 2016-02-09 15:10:13 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-02-10 12:44:16 -0800 |
commit | 388a7fa8cff831dcb5f25a3ea4bd67de898d865a (patch) | |
tree | a974733670f0db8968ca34d87d45be6325c5afea | |
parent | e7b5e7b0506c5c2528ff008b02217b8b60434de9 (diff) | |
download | chrome-ec-388a7fa8cff831dcb5f25a3ea4bd67de898d865a.tar.gz |
CR50: remove incorrect output length check in RSA decrypt
The required output length is not known until padding
verification completes (this check is already done
in the appropriate padding check functions).
BRANCH=none
BUG=chrome-os-partner:43025,chrome-os-partner:47524
TEST=tests under test/tpm2/ pass.
Change-Id: I452244d052b7f334a6907bd653645671033a0890
Signed-off-by: nagendra modadugu <ngm@google.com>
Reviewed-on: https://chromium-review.googlesource.com/327074
Commit-Ready: Nagendra Modadugu <ngm@google.com>
Tested-by: Nagendra Modadugu <ngm@google.com>
Reviewed-by: Marius Schilder <mschilder@chromium.org>
-rw-r--r-- | chip/g/dcrypto/rsa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chip/g/dcrypto/rsa.c b/chip/g/dcrypto/rsa.c index 92e9af4c59..9d854e7533 100644 --- a/chip/g/dcrypto/rsa.c +++ b/chip/g/dcrypto/rsa.c @@ -380,7 +380,7 @@ int DCRYPTO_rsa_decrypt(struct RSA *rsa, uint8_t *out, uint32_t *out_len, struct BIGNUM padded; int ret = 1; - if (!check_modulus_params(&rsa->N, out_len)) + if (!check_modulus_params(&rsa->N, NULL)) return 0; if (in_len != bn_size(&rsa->N)) return 0; /* Invalid input length. */ |