diff options
author | Tom Hughes <tomhughes@chromium.org> | 2022-06-17 17:15:14 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-07-06 22:04:35 +0000 |
commit | 738de2b575de93f71f3a95f9294b9006f4f7b008 (patch) | |
tree | 4d95d8dcdb00843cd137bf883ef98c4723040ab7 /third_party | |
parent | c1415ecc5fc7ace6e91115e73b97e7034b329d2b (diff) | |
download | chrome-ec-738de2b575de93f71f3a95f9294b9006f4f7b008.tar.gz |
trng: Rename rand to trng_rand
The declaration for rand conflicts with the standard library declaration
so rename it from "rand" to "trng_rand". This has the benefit of making
it obvious when we're using the true random number generator.
For consistency, this also renames init_trng/exit_trng to
trng_init/trng_exit.
This is a reland of commit a6b0b3554f59cc9b0c4aae9bff7dff075f2089a9.
BRANCH=none
BUG=b:234181908, b:237344361
TEST=./util/compare_build.sh -b all -j 120
=> MATCH
TEST=emerge-hatch ec-utils-test
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: Ic26890572cb9865275c866b65b0532c5ab029865
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3738978
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Bobby Casey <bobbycasey@google.com>
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/boringssl/common/curve25519.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/third_party/boringssl/common/curve25519.c b/third_party/boringssl/common/curve25519.c index 2a7fad6509..b74d3c7d97 100644 --- a/third_party/boringssl/common/curve25519.c +++ b/third_party/boringssl/common/curve25519.c @@ -27,7 +27,7 @@ #ifdef CONFIG_RNG void X25519_keypair(uint8_t out_public_value[32], uint8_t out_private_key[32]) { - rand_bytes(out_private_key, 32); + trng_rand_bytes(out_private_key, 32); /* All X25519 implementations should decode scalars correctly (see * https://tools.ietf.org/html/rfc7748#section-5). However, if an |