diff options
author | Vadim Bendebury <vbendeb@google.com> | 2022-02-17 18:12:01 -0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-05-27 04:07:35 +0000 |
commit | 67d0a801875f143df2ce8584b1c49e93e4467e76 (patch) | |
tree | a476de23f55c6ab11ef65214d5335890908ab0e4 | |
parent | d5c58ca5b9cd910544c775e7d3617e68736ecf6a (diff) | |
download | chrome-ec-67d0a801875f143df2ce8584b1c49e93e4467e76.tar.gz |
scribe: fix build failures
Scribe code is not compiled often, it has bitrot a bit due to tool
upgrades. This patch restores the scribe build correctness.
BUG=none
TEST=scribe build does not fail any more.
Signed-off-by: Vadim Bendebury <vbendeb@google.com>
Change-Id: I335c7903258b14ff731e7c345a36194395baf5d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3668651
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
-rw-r--r-- | chip/g/dcrypto/dcrypto_bn.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/chip/g/dcrypto/dcrypto_bn.c b/chip/g/dcrypto/dcrypto_bn.c index b8f8fef4f4..76801773b0 100644 --- a/chip/g/dcrypto/dcrypto_bn.c +++ b/chip/g/dcrypto/dcrypto_bn.c @@ -1275,6 +1275,8 @@ int dcrypto_modexp_blinded(struct LITE_BIGNUM *output, uint32_t r_buf[RSA_MAX_WORDS]; uint32_t rinv_buf[RSA_MAX_WORDS]; + uint32_t rx[2]; + struct LITE_BIGNUM r; struct LITE_BIGNUM rinv; @@ -1302,7 +1304,10 @@ int dcrypto_modexp_blinded(struct LITE_BIGNUM *output, result = setup_and_lock(N, input); /* Pick !0 64-bit random for exponent blinding */ - rand64(ctx->rnd); + rand64(rx); + ctx->rnd[0] = rx[0]; + ctx->rnd[1] = rx[1]; + ctx->pubexp = pubexp; ctx->_pad1[0] = ctx->_pad1[1] = ctx->_pad1[2] = 0; |