diff options
author | nagendra modadugu <ngm@google.com> | 2016-05-31 17:09:40 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-06-01 15:50:49 -0700 |
commit | 1242805ba54daba82cfe79b732ac82c530e4fd57 (patch) | |
tree | a8e0cd1bd171de31454ce717f16bfdc0ca543183 /test | |
parent | c3463c7f5d4a80bc8992b6a1f695e49739fbd012 (diff) | |
download | chrome-ec-1242805ba54daba82cfe79b732ac82c530e4fd57.tar.gz |
CR50: add tests for 1024-bit RSA.
Add tests for RSA-1024, and created partner CRBUG/53893
to track issue discovered with 1024-bit modinv.
1024-bit RSA support being added in preparation
for a forthcoming hardware based implementation.
BRANCH=none
BUG=chrome-os-partner:43025,chrome-os-partner:47524,chrome-os-partner:53893
TEST=all tests in test/tpm_test/tpmtest.py pass
Change-Id: I6b5aaeffc9df1cbbe403535fd21cdd377b42c38e
Signed-off-by: nagendra modadugu <ngm@google.com>
Reviewed-on: https://chromium-review.googlesource.com/348490
Commit-Ready: Nagendra Modadugu <ngm@google.com>
Tested-by: Nagendra Modadugu <ngm@google.com>
Reviewed-by: Nagendra Modadugu <ngm@google.com>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/tpm_test/rsa_test.py | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/test/tpm_test/rsa_test.py b/test/tpm_test/rsa_test.py index d746fba47c..8fea03c449 100644 --- a/test/tpm_test/rsa_test.py +++ b/test/tpm_test/rsa_test.py @@ -563,6 +563,7 @@ def _prime_from_seed(seed): _ENCRYPT_INPUTS = ( ('OAEP', 'SHA1', 768), ('OAEP', 'SHA256', 768), + ('OAEP', 'SHA256', 1024), ('PKCS1-ES', 'NONE', 768), ('PKCS1-ES', 'NONE', 2048), ('NULL', 'NONE', 768), @@ -572,27 +573,36 @@ _ENCRYPT_INPUTS = ( _SIGN_INPUTS = ( ('PKCS1-SSA', 'SHA1', 768), ('PKCS1-SSA', 'SHA256', 768), + ('PKCS1-SSA', 'SHA256', 1024), ('PKCS1-PSS', 'SHA1', 768), ('PKCS1-PSS', 'SHA256', 768), + ('PKCS1-PSS', 'SHA256', 2048), ) _KEYTEST_INPUTS = ( (768,), +# TODO(ngm): 1024-bit modinv is broken, see partner CRBUG/53893. +# (1024,), (2048,), ) _KEYGEN_INPUTS = ( - (768, 65537, "rsa_test"), (768, 65537, ''), + (1024, 65537, 'rsa_test'), + (2048, 65537, 'rsa_test'), + (2048, 65537, ''), ) - +# 2048-bit will be done in hardware (i.e. fast), rest are in software. +# Sizes below correspond to RSA key size. _PRIMEGEN_INPUTS = ( 768, - 768, - 768, - 768, - 768 + 1024, + 2048, + 2048, + 2048, + 2048, + 2048 ) def _encrypt_tests(tpm): |