summaryrefslogtreecommitdiff
path: root/chip
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@google.com>2022-02-17 18:12:01 -0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-06-29 22:26:28 +0000
commit8b2dca4f2484672d5d015835178a74459e79fc0a (patch)
tree09c3333b059a7abc89e74a7fa85ba303fa5ecad6 /chip
parent9acfa39022a584dfcade4c11a09eb229e550fbc4 (diff)
downloadchrome-ec-8b2dca4f2484672d5d015835178a74459e79fc0a.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> (cherry picked from commit 67d0a801875f143df2ce8584b1c49e93e4467e76) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3691827 Tested-by: Mary Ruthven <mruthven@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org> Commit-Queue: Mary Ruthven <mruthven@chromium.org> (cherry picked from commit dd1b36d27c36882cc2c0ebb0af2bf85191b1c2b2) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3735793 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r--chip/g/dcrypto/dcrypto_bn.c7
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;