Rename rand64() to _rand64()

This commit is contained in:
Justine Tunney 2022-10-10 04:12:06 -07:00
parent c424352a0a
commit 7ae556463a
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
52 changed files with 141 additions and 139 deletions

View file

@ -47,8 +47,8 @@ TEST(everest, tinierVersionBehavesTheSame) {
size_t i;
uint8_t secret[32], bpoint[32], public[2][32];
for (i = 0; i < 500; ++i) {
rngset(secret, sizeof(secret), rand64, -1);
rngset(bpoint, sizeof(bpoint), rand64, -1);
rngset(secret, sizeof(secret), _rand64, -1);
rngset(bpoint, sizeof(bpoint), _rand64, -1);
Hacl_Curve25519_crypto_scalarmult(public[0], secret, bpoint);
curve25519(public[1], secret, bpoint);
ASSERT_EQ(0, memcmp(public[0], public[1], sizeof(public[0])));
@ -70,8 +70,8 @@ TEST(everest, tinierVersionBehavesTheSame) {
BENCH(everest, bench) {
uint8_t secret[32], bpoint[32], public[32];
rngset(secret, sizeof(secret), rand64, -1);
rngset(bpoint, sizeof(bpoint), rand64, -1);
rngset(secret, sizeof(secret), _rand64, -1);
rngset(bpoint, sizeof(bpoint), _rand64, -1);
EZBENCH2("everest", donothing,
Hacl_Curve25519_crypto_scalarmult(public, secret, bpoint));
EZBENCH2("mariana", donothing, curve25519(public, secret, bpoint));