summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* cr50: improve g2f implementationVadim Sukhomlinov2021-12-292-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Replace int to size_t in DCRYPTO_x509_* functions to indicate that returned value is actually a size. Replaced int to enum dcrypto_result and removed arithmetic on enum in DCRYPTO_x509_gen_u2f_cert_name() to make code clear. Added intermediate variable certificate_len in GetG2fCert to make logic clear. However, virtual nvmem requires further refactoring to replace void with size_t to escalate errors if any. Added check that G2F certificate is not all zeroes in tpm_test.py BUG=b:212517336 TEST=test/tpm_test.py Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: I5ee4567219f43dd3c7e7ef7d260b446732c5c22d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3361100 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* tpm_test: add support for running tests independentlyMary Ruthven2021-12-281-22/+52
| | | | | | | | | | | BUG=b:210879337 TEST=./tpmtest.py -T hash ; ./tpmtest.py -T drbg Change-Id: I80152b1c95111b2c294b154f2495b3611b3b8870 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3352714 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* cr50: fix g2f certificate retrievalVadim Sukhomlinov2021-12-281-0/+34
| | | | | | | | | | | | | | | | | Logical error was introduced in crrev.com/c/3119223 which resulted in failing attempts to read G2F certificate from virtual nvmem. This CL fixes it and adds a test for this command. BUG=b:211820657 TEST=make BOARD=cr50; test/tpm_test/tpm_test.py Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: I3c46e9e050d5084dbac1b0a7c3d7e378987a3759 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3359755 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* Revert "console_channel.inc: Add more ifdef to reduce number of channels"Mary Ruthven2021-11-221-4/+4
| | | | | | | | | | | | | This reverts commit b5cebbaadb4966e9d1820b0dcabd690d3e5d762e. BUG=b:207391162 TEST=The chan output is the same on ToT and mp images. Change-Id: Ief9bc6f6c9b027284b423e46681c313fd3fd73aa Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3296743 Reviewed-by: Andrey Pronin <apronin@chromium.org> Commit-Queue: Andrey Pronin <apronin@chromium.org>
* coil: replace non-inclusive terms with "placeholder"Mary Ruthven2021-11-196-24/+24
| | | | | | | | | | BUG=b:173227629 TEST=make buildall -j Change-Id: I2b203dfe45416aa3b632f6f788d14264b08f44e0 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3293252 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* coil: replace non-inclusive terms with "validity"Mary Ruthven2021-11-191-1/+1
| | | | | | | | | | BUG=b:173227629 TEST=make buildall -j Change-Id: Iaf8028984cc58cc4108907fdba4ea4b38c43cf70 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3293250 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* Revert "rsa: Optimization of multiplications for Cortex-M0"Mary Ruthven2021-11-181-27/+0
| | | | | | | | | | | | This reverts commit 49ff62bf0be5cfc88e092f987d77c18a0b21390a. BUG=b:200823466 TEST=make buildall -j Change-Id: I144e310c00d6490d278ca6215bf0a37d3cfc7d4f Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3285751 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* Revert "common: Add uptime host command"Mary Ruthven2021-11-183-85/+0
| | | | | | | | | | | | This reverts commit af51b9ea19c0ba4c6d57cdc4c5f3380647be3034. BUG=b:200823466 TEST=make buildall -j Change-Id: Ib620967f239dd2ee3fdd0f4749d08bd544509fcb Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3285747 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* Revert "Treat SYSTEM_IMAGE_RW_B also as RW copy"Mary Ruthven2021-11-181-1/+1
| | | | | | | | | | | | This reverts commit 5da63f4ea2c93e6b059d8c50ff01dbe53a13dec2. BUG=b:200823466 TEST=make buildall -j Change-Id: Id035f3e4a107c00407c16cc878bd88da63f9de7f Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3273451 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* Revert "EFS: Add support for early firmware selection"Mary Ruthven2021-11-181-4/+1
| | | | | | | | | | | | This reverts commit 4dcee1c545c31d288b23221d8e07bc452214ce7b. BUG=b:200823466 TEST=make buildall -j Change-Id: I5226e749decc26e1af05172353327a368610def3 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3273449 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* Revert "rsa: Further optimization of multiplications for Cortex-M0"Mary Ruthven2021-11-181-7/+3
| | | | | | | | | | | | This reverts commit ecd0d1b5767c829f4c73a79a9eb6abae343284fb. BUG=b:200823466 TEST=make buildall -j Change-Id: I1229e86f015e1a04ee8026abd2f647d6039125fd Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3273423 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* Revert "util: Add macro to swap two variables"Mary Ruthven2021-11-181-20/+0
| | | | | | | | | | | | This reverts commit eb3ac28cb5a634cf15770e1f79558cdfa4a6923b. BUG=b:200823466 TEST=make buildall -j Change-Id: I7b7863a2c19967915d92f5c22b0abc2fb86a2dea Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3273405 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* Revert "Align behavior of strtoi() and strtoul() to match Linux manpage ↵Mary Ruthven2021-11-181-97/+0
| | | | | | | | | | | | | | description of strtol()." This reverts commit ac8a13329b0b321daeb87f6afb79c163beb21372. BUG=b:200823466 TEST=make buildall -j Change-Id: I379e5fc1ebd15030715561732ea71eb6fda8406d Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3273383 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* Revert "common: queue: Update chunk struct and get read/write logic"Mary Ruthven2021-11-181-61/+17
| | | | | | | | | | | | This reverts commit b4f1c3ca375f6e3c50edae12c1713236a0bcd2cc. BUG=b:200823466 TEST=make buildall -j Change-Id: Ida5142d256633e24ca9c59fcd82dfc37bf207b96 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3273376 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* Revert "utils: Add strstr"Mary Ruthven2021-11-181-15/+0
| | | | | | | | | | | | This reverts commit 620b7164dddf12df27d5380d647c921853c036dc. BUG=b:200823466 TEST=make buildall -j Change-Id: Ifdd8baeff50d7be572826057ad6419038f17bd61 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3273358 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* cr50: update U2F_Sign command to hash authentication secretVadim Sukhomlinov2021-10-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | U2F_Sign is expected to receive pre-hashed version of user credentials so should apply SHA2-256 to the value before key handle verification. Also, enforce user verification with authentication time secret if no user presence (power button press) is requested. test/tpm_test/tpmtest.py updated to apply SHA256 in U2F_Generate to match expected u2fd behavior. BUG=b:172971998 TEST=make BOARD=cr50 CRYPTO_TEST=1 U2F_TEST=1; test/tpm_test/tpmtest.py Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: I92d73cd1fc0d962fefe11faeb4ce0ed68c798aa7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3221264 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org> Reviewed-by: Howard Yang <hcyang@google.com> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* cr50: improve stability and performance of tpmtest on H1 Red boardVadim Sukhomlinov2021-10-112-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently tpmtest.py fails to connect to H1 red board first time after it is flashed, which is not convenient. It looks like the workaround is to try to read any TPM register. So, implement a workaround. Frequency of FTDI can be safely increased to 2000Khz. Reduced delay to start transaction from 10ms to 200us which greatly improve overall testing (except for RSA which actually runs noticeable time). Overall time to run tests decreased from 165s to about 120s, but take into account RSA key gen tests alone are about 100s. BUG=none TEST=testtpm.py Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: Ib67b71b36457b33f38135f9cec269dcf35881f54 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3214771 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* cr50: fix test/tpm_test makefile to build bn_testVadim Sukhomlinov2021-10-092-1/+10
| | | | | | | | | | | | | | | | | | | | | | | test/tpm_test Makefile doesn't build bn_test properly. Need to add handling of difference between Cr50 and Chip/g dcrypto. Also, Cr50 code use __always_inline for some functions which itself requires compiler optimization to turn on. Adding -O2 to CFLAGS. BUG=None TEST=make -C test/tpm_test clean make -C test/tpm_test make -C test/tpm_test clean make -C test/tpm_test CR50=1 Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: I08749ebaa930fd4f71d7406ed289bf480b5a8510 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3215057 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Auto-Submit: Vadim Sukhomlinov <sukhomlinov@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* cr50: add support for v2 of U2F key handle for WebAuthnstabilize-14267.B-cr50_stabVadim Sukhomlinov2021-10-061-4/+32
| | | | | | | | | | | | | | | | | | | Adding v2 of key handle which drops kh_hmac field and use single authorization code for all relevant fields. BUG=b:172971998 TEST=make BOARD=cr50 CRYPTO_TEST=1 U2F_TEST=1; in ccd: u2f_test - unit tests test/tpm_test/tpmtest.py Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: I647ded7a2c157cea91ac48a2ba679def318c1e63 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3199671 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Auto-Submit: Vadim Sukhomlinov <sukhomlinov@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* cr50: Update AES public APIsfactory-ambassador-14265.B-cr50_stabVadim Sukhomlinov2021-10-051-5/+6
| | | | | | | | | | | | | | | | | | | | To support FIPS mode we need to block access to crypto in case of errors. 1) Added check for FIPS errors into DCRYPTO_aes_init() 2) Return codes updated to enum dcrypto_result 3) Call sites updated to check for return codes BUG=b:197893750 TEST=make BOARD=cr50 CRYPTO_TEST=1; test/tpm_test/tpmtest.py Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: Id614cc346fe22537e9208196bf1322221a253b0c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3194985 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* cr50: provide public crypto API for HMAC/HASH with error reporting.Vadim Sukhomlinov2021-10-022-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To implement FIPS mode for Cr50 we should be able to block access to crypto functions if errors are detected. Historically all HASH/HMAC functions were declared as void with no return type. 1) Split existing functions into public part (data structs, update and final parts) and internal part - unchecked init functions. 2) Introduced new functions to start SHA / HMAC operation which returns status code and block access to crypto in case of FIPS errors. 3) Dcrypto hash algorithms codes updated to match TPM_ALG_ID to simplify adaptation layer and move checks inside Dcrypto module. 4) Updated all uses of API outside FIPS module to check return code and act accordingly. 5) As a side effect RSA can now support SHA384 & SHA512 for signing, board/host mock ups simplified. BUG=b:197893750 TEST=make buildall -j; make BOARD=cr50 CRYPTO_TEST=1; test/tpm_test/tpm_test.py TCG tests ------------------------------ Test Result Summary --------------------- Test executed on: Tue Sep 28 15:23:35 2021 Performed Tests: 248 Passed Tests: 248 Failed Tests: 0 Errors: 0 Warnings: 0 ======================================================================== Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: Ibbc38703496f417cba693c37d39a82a662c3f7ee Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3192137 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* cr50: Fix sign comparison warnings (-Wsign-compare)Vadim Sukhomlinov2021-09-242-2/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | For crypto code we care about possible concerns during review, so add more strict warnings. Fix all uses int to uint32_t/size_t comparisons, make consistent use of size_t vs. uint32_t in crypto code. Update test/tpm_test/bn_test.c to compile for checking big number functions correctness. BUG=none TEST=make BOARD=cr50 CRYPTO_TEST=1; test/tpm_test/tpmtest.py TCG tests: ---------------------- Test Result Summary ----------------------------- Test executed on: Thu Sep 23 17:45:19 2021 Performed Tests: 248 Passed Tests: 248 Failed Tests: 0 Errors: 0 Warnings: 0 ======================================================================== Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: I47e5de3d180d3aebb13b3feef4c1da87c9f6a174 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3180279 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* cr50: switch ECDSA to use enum dcrypto_result, added FIPS checksVadim Sukhomlinov2021-09-241-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have to block access to crypto functions when FIPS errors occurred. To achieve this: 1. Provide wrappers for ECDSA P-256 sign and verify functions a) DCRYPTO_p256_ecdsa_verify as wrapper for dcrypto_p256_ecdsa_verify b) DCRYPTO_p256_ecdsa_sign as wrapper for dcrypto_p256_fips_sign_internal with additional check for FIPS DRBG initialization which is needed for signing. 2. Switch all ECDSA functions, both internal and external to use enum dcrypto_result instead of inconsistent 0/1 values. 3. Added warning for unused result code for ECDSA functions. 4. Updated documentation for public APIs 5. In DCRYPTO_p256_key_from_bytes() implemented clear distinction between bad candidate and failures due to FIPS or pair-wise consistency. 6. U2F, rma_auth, TPM ecc, etc updated to use new return codes. BUG=b:197893750 TEST=make BOARD=cr50 CRYPTO_TEST=1; rma_auth, u2f_test, etc. test/tpm_test/tpmtest.py TCG tests ----------------------------- Test Result Summary ---------------------- Test executed on: Thu Sep 23 09:56:42 2021 Performed Tests: 248 Passed Tests: 248 Failed Tests: 0 Errors: 0 Warnings: 0 ======================================================================== Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: I0251bf511771c1c1fd281f6db706d1dedac3e8b8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3179708 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Auto-Submit: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* cr50: detangle public and internal APIs of FIPS moduleVadim Sukhomlinov2021-09-181-0/+3
| | | | | | | | | | | | | | | | | | | To properly define FIPS module boundary all APIs provided by module to external applications (TPM2, pinweaver, etc) should be identifiable. Shuffle functions between dcrypto.h and internal.h to achieve this goal. Adjust included headers as needed. BUG=b:134594373 TEST=make buildall; TCG tests Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: Ie2679644d62e232a5d5d06f8ed6bf602853ebde2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3169558 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* cr50: block access to U2F functions in case of FIPS errorsVadim Sukhomlinov2021-09-171-0/+5
| | | | | | | | | | | | | | | | | | | | All public functionality of FIPS module should be disabled in case of FIPS errors. BUG=b:197893750 TEST=make BOARD=cr50 CRYPTO_TEST=1; ccd: fips sha fips test u2f_test - should fail Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: Ice8a0ab6535fcb0bd426ebbe969db1859cbd3ae8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3169097 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* cr50: remove unused and empty struct APPKEY_CTX from APIsVadim Sukhomlinov2021-09-171-2/+2
| | | | | | | | | | | | | | | | struct APPKEY_CTX is an empty struct passed with few APIs and not used for any purpose. Remove it. BUG=none TEST=make BOARD=cr50 CRYPTO_TEST=1; Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: I4bcb8f196b70cefc58a81e8592d83aa70464fcf8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3169374 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* cr50: add TRNG testing mode with TRNG restartstabilize-rust-14225.B-cr50_stabVadim Sukhomlinov2021-09-172-3/+12
| | | | | | | | | | | | | | | | | | | | NIST statistical tests for TRNG entropy requires to compare entropy in regular mode (continuous readings) with entropy after TRNG restarts. Added support for TRNG restart before reading entropy and updated script to drive tests. BUG=b:138577834 TEST=test/nist_entropy.sh Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: Idc46191be05e8275730726f6debb8007ca361bc6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3165883 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: William Wesson <wesson@google.com> Reviewed-by: Andrey Pronin <apronin@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* cr50: switch to using DRBG for key generation purposes.Vadim Sukhomlinov2021-09-171-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An "Approved" RNG listed in FIPS 140-2 Annex C must be used for the generation of random data or cryptographic keys used by an approved security function. Detailed information and guidance on Key Generation can be found in NIST SP 800-133 and FIPS 140-2 IG 7.8 and D.12. Many of function use raw entropy from TRNG without any health tests or even checking returned status, as old API didn't provide any indication of failure. With this patch we remove old API: rand() and rand_bytes() and expose new API: fips_rand_bytes() - generation of random bits from properly instantiated and reseeded as needed DRBG. fips_trng_bytes() - generation of entropy from TRNG with statistical testing and checking for TRNG failures. fips_trng_rand32() - generation of 32 bits from TRNG with health check and indication of status. ccd, rsa, ecc, pinweaver, rma_auth are updated to use new APIs. These functions are moved into dcrypto.h which will become "Public API" for the module. trng_test vendor command moved to dcrypto/trng.c where it belongs. BUG=b:138577416 TEST=make BOARD=cr50 CRYPTO_TEST=1; test/tpmtest.py TCG tests. -------------------------- Test Result Summary ------------------------- Test executed on: Thu Sep 16 10:16:59 2021 Performed Tests: 248 Passed Tests: 248 Failed Tests: 0 Errors: 0 Warnings: 0 ====================================================================== Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: I80d103ead1962ee388df5cabfabe0498d8d06d38 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3165870 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Auto-Submit: Vadim Sukhomlinov <sukhomlinov@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* cr50: switch to FIPS key gen for U2F and G2FVadim Sukhomlinov2021-09-151-0/+1
| | | | | | | | | | | | | | | | | | For G2F switched to proper use of DRBG. For U2F added support for 512-bit entropy, changed DRBG instantiation in FIPS path. BUG=b:134594373 TEST=make BOARD=cr50 CRYPTO_TEST=1; u2f_tests in ccd, tpm_test.py Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: I1acf9947317a8b2f1b53cee0b2d81829c54336d5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3161506 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Commit-Queue: Andrey Pronin <apronin@chromium.org>
* cr50: consolidate FIPS module sources under board/cr50/dcryptoVadim Sukhomlinov2021-09-101-1/+1
| | | | | | | | | | | | | | | | | To simplify identification of FIPS module boundary, move all sources into same place. BUG=b:134594373 TEST=make buildall -j Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: I6acd12d12c00a3362041914bd515534f72a08ab2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3150057 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Auto-Submit: Vadim Sukhomlinov <sukhomlinov@chromium.org> Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
* u2f: refactoring to split command processing and cryptoVadim Sukhomlinov2021-09-022-28/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | Split U2F crypto from U2F command processing by moving all crypto code into boards/cr50 (platform hooks). U2F state management is part of common code and passed to U2F crypto as a parameter. Previously reviewed as https://crrev.com/c/3034852, but reverted due to ChromeOS dependency on include/u2f.h. In this revision this is addressed by restoring include/u2f.h with previous content and new additions and adjusting dependencies in other headers. BUG=b:134594373 TEST=make BOARD=cr50 CRYPTO_TEST=1 console: u2f_test test/tpmtest.py FAFT U2F tests pass Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: Iff1973c8e475216b801d7adde23b1ef6c4a6f699 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3119223 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* Revert "u2f: refactoring to split command processing and crypto"stabilize-14179.B-cr50_stabstabilize-14178.B-cr50_stabDavid Stevens2021-08-252-43/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5ae1c684271a117539858cb12252959dfe46803c. Reason for revert: breaks chromeos-ec-headers BUG=b:197691499 Original change's description: > u2f: refactoring to split command processing and crypto > > Split U2F crypto from U2F command processing by moving all crypto > code into boards/cr50 (platform hooks). > > U2F state management is part of common code and passed to U2F crypto > as a parameter. > > BUG=b:134594373 > TEST=make BOARD=cr50 CRYPTO_TEST=1 > console: u2f_test > test/tpmtest.py > FAFT U2F tests pass > > Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> > Change-Id: I85442cddb2959bd3102f7f6e6047134ede90951b > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3034852 > Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> > Reviewed-by: Andrey Pronin <apronin@chromium.org> > Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> > Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org> Bug: b:134594373 Change-Id: I61a965995fcd53b4e155084f5f351574cb84cd1e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3115930 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Owners-Override: David Stevens <stevensd@chromium.org>
* u2f: refactoring to split command processing and cryptoVadim Sukhomlinov2021-08-242-28/+43
| | | | | | | | | | | | | | | | | | | | | | Split U2F crypto from U2F command processing by moving all crypto code into boards/cr50 (platform hooks). U2F state management is part of common code and passed to U2F crypto as a parameter. BUG=b:134594373 TEST=make BOARD=cr50 CRYPTO_TEST=1 console: u2f_test test/tpmtest.py FAFT U2F tests pass Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: I85442cddb2959bd3102f7f6e6047134ede90951b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3034852 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* cr50: drop cryptoc for SHA1/SHA2 supportstabilize-14150.882.B-cr50_stabstabilize-14150.881.B-cr50_stabstabilize-14150.74.B-cr50_stabstabilize-14150.734.B-cr50_stabstabilize-14150.64.B-cr50_stabstabilize-14150.43.B-cr50_stabstabilize-14150.376.B-cr50_stabrelease-R94-14150.B-cr50_stabrelease-R94-14150.49.B-cr50_stabVadim Sukhomlinov2021-08-123-47/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To implement FIPS module we need to bring many crypto functions in the module boundary. Unfortunately, cryptoc is a third-party library used by dcrypto code in cr50. Cryptoc is also not well-maintained and shared with other projects. While just making local copy of cryptoc would solve an issue, it's suboptimal as prevents from many optimizations and improvements. Provided SHA & HMAC implementations from Ti50 project. This provides better performance (500us vs. 670us earlier for HMAC DRBG) and reduce code size. This implementation also enables stack use savings when only specific digest is needed. Earlier SHA512 context was allocated when only SHA256 is needed greatly increasing stack consumption for code using HMAC_DRBG and others. However, it introduce subtle API changes which require handling. As for tests, since core implementation is hardware-independent, make it available for BOARD=host too. Before change (with cryptoc): *** 12368 bytes in flash and 5784 bytes in RAM After: *** 13136 bytes in flash and 5796 bytes in RAM BUG=b:138578318 TEST=make BOARD=cr50 CRYPTO_TEST=1; test/tpm_test/tpmtest.py Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: I2ff5362aee9078ce83dc1f8081943a5101d5f666 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3064201 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Auto-Submit: Vadim Sukhomlinov <sukhomlinov@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* cr50: fix CRYPTO_TEST=1 broken due to FIPS codeVadim Sukhomlinov2021-08-091-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Linker script used by FIPS module broke several extension commands used for testing due to section name used (no wildcards support). FIPS self-integrity tests broke access to crypto commands as until there is no correct digest it fails and prevents access to crypto. This is temporary fix until digest computation is done. TPM tests requires GCM for testing - adding this module when built with CRYPTO_TEST=1. U2F test status made a bit clearer (printing success) and hex dumps of key handles, signatures only printed in debug mode now. BUG=none TEST=make BOARD=cr50 CRYPTO_TEST=1; test/tpm_test/tpmtest.py Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: I7c974abf8ac71de2949b35a4411f77a03d9048a0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3082325 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Auto-Submit: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* cr50: add basic U2F test to tpmtest, disable eciesVadim Sukhomlinov2021-07-283-10/+128
| | | | | | | | | | | | | | | | | | | | | Add basic test to U2F generate, sign and attest commands to make sure commands are processed correctly. When build with CRYPTO_TEST=1 pretend that power button for U2F is always pressed when requested to simulate user presence. BUG=None TEST=make BOARD=cr50 CRYPTO_TEST=1 tests/tpmtest.py Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: I8fda8037ea7322eb5fa46421ded6da3d1bba9c66 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3048103 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org> Auto-Submit: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* cr50: replace call to __aeabi_uldivmod with better implementationVadim Sukhomlinov2021-07-211-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | FIPS module should be self contained. Adding __aeabi_uldivmod is challenging as it comes from compiler builtin and used by other parts. In this CL we implement udiv32() which divides 64-bit number by 32-bit number. Since it doesn't compute reminder and don't have to support real 64-bit by 64-bit division it's faster. Also, we can use ARM instruction to count leading zeros instead of doing it manually. This code is reused from Ti50 cryptolib code as is. Exhaustive bn_div() test is provided by test/tpm_test/bn_test.c which is now can be built with board/cr50/dcrypto version. BUG=b:138578318 TEST=make BOARD=cr50 test/tpm_test/make CR50=1 build/tpm_test/bn_test Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: I19cebc5c11d3a80bc50732350b7c598bfa374348 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3042138 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Auto-Submit: Vadim Sukhomlinov <sukhomlinov@chromium.org> Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
* cr50: support EC-EFS 2.1Namyoon Woo2021-06-164-34/+256
| | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the codes that support EC-EFS 2.1. However, it is not enabled. EC-EFS 2.0 is still enabled as default. BUG=b:187953899 TEST=built cr50 image, and ran it on hatch with CONFIG_EC_EFS2_VERSION defined as 0 and 1 respectively. For both cases, CrOS booted good. Also checked CrOS recovery was done good with corrupted TPM secdata, and booted good at the end. > ec_comm corrupt > ecrst pulse Ran the unittest for both version as well. $ make run-ec_comm $ make run-ec_comm21 Signed-off-by: Namyoon Woo <namyoon@google.com> Change-Id: I7623fa56dd44a01002628685826105afe76e034f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2891925 Tested-by: Namyoon Woo <namyoon@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org> Commit-Queue: Namyoon Woo <namyoon@chromium.org>
* tpm_test: drbg_test: add support for using lab vectorsMary Ruthven2021-06-094-33/+245
| | | | | | | | | | | | | This adds support for running drbg_test with the lab vectors. BUG=b:189376694 TEST=./tpmtest Change-Id: I44f3671f55e1befcac36006568bf1a4deb2d4685 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2924406 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* tpm_test: add u2f hmac drbg vectorsMary Ruthven2021-06-092-0/+27226
| | | | | | | | | | | BUG=b:189376694 TEST=none Change-Id: I943a94ff35e6a387717032df5bd9d6c5ac8d4293 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2924405 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* tpm_test: drbg_test: reformat test to fix too many local variables errorMary Ruthven2021-06-091-27/+76
| | | | | | | | | | | | | | pylint says there are too many local variables in drbg test. Break out the drbg op handling into separate functions. BUG=b:189376694 TEST=./tpmtest Change-Id: Ic26cf28e85a9b56ce4f681175daaf077aea14e58 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2924404 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* tpm_test: drbg_test: save the results in a listMary Ruthven2021-06-091-3/+26
| | | | | | | | | | | | | | | Save the results in a list with their group and test case ids. We'll need all of this information to generate the response vectors for the lab. BUG=b:189376694 TEST=./tpmtest Change-Id: I9a43d8397baed30e527b213c8860a0ec740c5398 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2924403 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* tpm_test: drbg_test: explicitly state whether to check the resultMary Ruthven2021-06-091-7/+11
| | | | | | | | | | | | | | | | | We won't have the responses for the lab vectors. Add a check_result bool to the DRBG_GENERATE test items, so there's a way to tell when it needs to record the result for the generate command. The test will compare the expected result to the actual result while running if check_result is True and the expected string is not empty. BUG=b:189376694 TEST=./tpmtest Change-Id: Ifbb5ad9737a6649affce4c885083b631f5056a26 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2924402 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* tpm_test: drbg_test: be explicit about output lengthMary Ruthven2021-06-091-6/+7
| | | | | | | | | | | | | | For lab testing we won't get the response vectors just the output bit length. Add a way to specify the byte length in TEST_INPUTS. BUG=b:189376694 TEST=./tpmtest Change-Id: I1c4f6940b4ccfced9494eefce6867176c79fa06f Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2923241 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* host: fixing make runtestsVadim Sukhomlinov2021-06-031-1/+1
| | | | | | | | | | | | | | | | | | | | Changes in compiler resulted in multiple warnings treated as errors, failing host test builds. Addresing warnings by checking return values. BUG=none TEST=make runtests Change-Id: Idb2686370bf041791099b3e332ff25173338e994 Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2936000 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org> Commit-Queue: Vadim Bendebury <vbendeb@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Auto-Submit: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* u2f: Move some u2f logic to common/ for testingYicheng Li2021-02-181-22/+18
| | | | | | | | | | | | | | | | | | | | | Since this is cr50's branch, there's no semantic difference whether we put logic in board/cr50/u2f.c or common/u2f.c. EC's build system doesn't quite allow unit-testing board-specific logic, so to unit-test some of the crypto logic in board/cr50/u2f.c, things need to move to common/u2f.c. There's no change in functionality. There should also be no problem for merging/cherry-picking ToT changes to cr50_stab, because any new u2f changes are made on cr50_stab only and not on ToT. BUG=b:172971998 TEST=make run-u2f TEST=make CR50_DEV=1 BOARD=cr50 Change-Id: I3cb8d78fd6427620a6fe20cef12708899d2896b5 Signed-off-by: Yicheng Li <yichengli@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2702496 Reviewed-by: Mary Ruthven <mruthven@chromium.org>
* cr50_stab: Add unittests for u2fstabilize-quickfix-13729.84.B-cr50_stabstabilize-quickfix-13729.73.B-cr50_stabstabilize-quickfix-13729.60.B-cr50_stabstabilize-13729.72.B-cr50_stabstabilize-13729.57.B-cr50_stabstabilize-13729.56.B-cr50_stabstabilize-13729.49.B-cr50_stabstabilize-13729.45.B-cr50_stabstabilize-13729.16.B-cr50_stabrelease-R89-13729.B-cr50_stabYicheng Li2021-01-124-0/+190
| | | | | | | | | | | | | | | | | | | | | The u2f functionality had no unittests at all. This change is more of a setup (in terms of build dependencies) so that u2f tests can be easily added in the future. This change comes with a few simple tests for u2f_generate. The basic idea here is to use board/host/dcrypto.h to mock the dcrypto functionalities. Since board/host/dcrypto.h includes an alternative to cryptoc's sha256 definitions, we need to exclude cryptoc/sha256.h in the test builds. BUG=b:172971998 TEST=make -j run-u2f TEST=make CR50_DEV=1 BOARD=cr50 -j Signed-off-by: Yicheng Li <yichengli@chromium.org> Change-Id: Idae6f55f599a017aedcaf0fe4cdb6c0506e72712 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2610133 Reviewed-by: Mary Ruthven <mruthven@chromium.org>
* coil: cleanup commentsstabilize-rust-13720.B-cr50_stabMary Ruthven2021-01-111-7/+8
| | | | | | | | | | BUG=b:175244613 TEST=make buildall -j Change-Id: Icbd143b072fdd5df3b67d7e5a09ee6c01a77f6b9 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2622889 Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* coil: CONFIG_I2C_MASTER -> CONFIG_I2C_CONTROLLERMary Ruthven2021-01-072-3/+3
| | | | | | | | | | BUG=b:175244613 TEST=make buildall -j Change-Id: I74900cd9113c12e5e08a0770e30f3abf69816302 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2611757 Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* coil: nvmem master_at->controller_atMary Ruthven2021-01-061-10/+10
| | | | | | | | | | BUG=b:175244613 TEST=make buildall -j Change-Id: I7ee1b4393039ce84966eaea245e6510f1e570f63 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2613459 Reviewed-by: Namyoon Woo <namyoon@chromium.org>