diff options
author | Vadim Sukhomlinov <sukhomlinov@google.com> | 2021-09-10 13:46:24 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-09-10 23:14:00 +0000 |
commit | 82bea41f492aff12660118a479916edea5105675 (patch) | |
tree | 9635881f9056eea841ccede95a97a7f4dca7db6c | |
parent | 577a2900bd7628f010a514b81e1eb645e03ceda7 (diff) | |
download | chrome-ec-82bea41f492aff12660118a479916edea5105675.tar.gz |
cr50: remove unused DCRYPTO_ladder_random()stabilize-14217.B-cr50_stab
After migration to DRBG use, remove DCRYPTO_ladder_random() function.
BUG=none
TEST=make buildall -j
Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com>
Change-Id: Ifdb3fd79ec03ac94066a91ed38b61218dbceefde
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3155295
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>
-rw-r--r-- | board/cr50/dcrypto/dcrypto.h | 1 | ||||
-rw-r--r-- | board/cr50/dcrypto/key_ladder.c | 22 |
2 files changed, 0 insertions, 23 deletions
diff --git a/board/cr50/dcrypto/dcrypto.h b/board/cr50/dcrypto/dcrypto.h index 760d388404..318a58e4e7 100644 --- a/board/cr50/dcrypto/dcrypto.h +++ b/board/cr50/dcrypto/dcrypto.h @@ -397,7 +397,6 @@ struct APPKEY_CTX { }; int DCRYPTO_ladder_compute_frk2(size_t major_fw_version, uint8_t *frk2); -int DCRYPTO_ladder_random(void *output); void DCRYPTO_ladder_revoke(void); int DCRYPTO_appkey_init(enum dcrypto_appid id, struct APPKEY_CTX *ctx); diff --git a/board/cr50/dcrypto/key_ladder.c b/board/cr50/dcrypto/key_ladder.c index 77055e4159..31844736bc 100644 --- a/board/cr50/dcrypto/key_ladder.c +++ b/board/cr50/dcrypto/key_ladder.c @@ -231,28 +231,6 @@ static void ladder_out(uint32_t output[8]) output[7] = GREG32(KEYMGR, SHA_STS_H7); } -/* - * Stir TRNG entropy into RSR and pull some out. - */ -int DCRYPTO_ladder_random(void *output) -{ - int error = 1; - uint32_t tmp[8]; - - if (!dcrypto_grab_sha_hw()) - goto fail; - - rand_bytes(tmp, sizeof(tmp)); - /* Mix TRNG bytes with RSR entropy */ - error = ladder_step(KEYMGR_CERT_27, tmp); - if (!error) - ladder_out(output); - -fail: - dcrypto_release_sha_hw(); - return !error; -} - int dcrypto_ladder_derive(enum dcrypto_appid appid, const uint32_t salt[8], const uint32_t input[8], uint32_t output[8]) { |