diff options
author | Vadim Sukhomlinov <sukhomlinov@google.com> | 2019-11-15 11:37:08 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-11-19 20:35:30 +0000 |
commit | 8190be1a6fef4203d743825d7afe74b5ec1fc083 (patch) | |
tree | ab821d6962572ea7c6476ac17d47f85f3de3919e /include/tpm_vendor_cmds.h | |
parent | e9bc15a9ac68e3b28e68c0191794e842927622ee (diff) | |
download | chrome-ec-8190be1a6fef4203d743825d7afe74b5ec1fc083.tar.gz |
cr50: Add TRNG_TEST command to download entropy samples for NIST tests
NIST 800-90B Entropy assesment tests requires 1M of 8-bit samples for
statistical tests. While it's possible to use TPM2_GetRandom command
to get entropy on cr50 (there is no software postprocessing), this
command is not available when compiled with CRYPTO_TEST=1 due to lack
of space in firmware. Adding vendor command which is available with
CRYPTO_TEST=1 to get raw entropy from TRNG. Added support script
to save entropy in file for further analysis. Since downloading
entropy takes a long time, new option'-t' added to tpmtest.py
which only invokes download of TRNG samples
BUG=b:138577834
BRANCH=cr50
TEST=make BOARD=cr50 CRYPTO_TEST=1 && test/tpm_test/tpmtest.py -t
To run NIST tests: nist_entropy.sh
Change-Id: I237a4581332a6e2c0332fe6ecf40731ab0be3355
Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1919640
Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
Auto-Submit: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Diffstat (limited to 'include/tpm_vendor_cmds.h')
-rw-r--r-- | include/tpm_vendor_cmds.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/tpm_vendor_cmds.h b/include/tpm_vendor_cmds.h index c22079f490..7244b47a4f 100644 --- a/include/tpm_vendor_cmds.h +++ b/include/tpm_vendor_cmds.h @@ -136,6 +136,8 @@ enum vendor_cmd_cc { VENDOR_CC_U2F_MODE = 49, + VENDOR_CC_TRNG_TEST = 51, + LAST_VENDOR_COMMAND = 65535, }; |