From 3bc0a6b273fdd8bdc5ad34e5a0c1ecc88754cfa1 Mon Sep 17 00:00:00 2001 From: Vadim Sukhomlinov Date: Tue, 12 Nov 2019 11:20:12 -0800 Subject: cr50: Add support for ACVP tests of HMAC SHA-256 DRBG HMAC DRBG is used for U2F key generation, and as such is subject for ACVP tests. Expose DRBG Init, Generate and Seed commands for automated testing with externally provided test vectors. BUG=b:138578319 BRANCH=cr50 TEST=make CRYPTO_TEST=1 BOARD=cr50 -j && test/tpm_test/tpmtest.py Change-Id: I50a6750864d3cd9a304a9b8a8524ef29cec04410 Signed-off-by: Vadim Sukhomlinov Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1912662 Reviewed-by: Vadim Sukhomlinov Reviewed-by: Vadim Bendebury Tested-by: Vadim Sukhomlinov Commit-Queue: Vadim Sukhomlinov Auto-Submit: Vadim Sukhomlinov --- test/tpm_test/subcmd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/tpm_test/subcmd.py') diff --git a/test/tpm_test/subcmd.py b/test/tpm_test/subcmd.py index d6aeb6722f..7260df0dd5 100644 --- a/test/tpm_test/subcmd.py +++ b/test/tpm_test/subcmd.py @@ -5,7 +5,7 @@ """Subcommand codes that specify the crypto module.""" -# Keep these codes in sync with include/extension.h. +# Keep these codes in sync with include/tpm_vendor_cmds.h AES = 0 HASH = 1 RSA = 2 @@ -13,7 +13,7 @@ ECC = 3 FW_UPGRADE = 4 HKDF = 5 ECIES = 6 - +DRBG_TEST = 50 # The same exception class used by all tpmtest modules. class TpmTestError(Exception): pass -- cgit v1.2.1