diff --git a/third_party/fiat/curve25519.c b/third_party/fiat/curve25519.c index 15623c64..b64956e8 100644 --- a/third_party/fiat/curve25519.c +++ b/third_party/fiat/curve25519.c @@ -170,7 +170,7 @@ static uint32_t cmovznz32(uint32_t t, uint32_t z, uint32_t nz) { } \ } while (0) -static void fe_frombytes_impl(uint64_t h[5], const uint8_t *s) { +static void fe_frombytes_impl(uint64_t h[5], const uint8_t s[32]) { // Ignores top bit of s. uint64_t a0 = load_8(s); uint64_t a1 = load_8(s+8); @@ -189,7 +189,7 @@ static void fe_frombytes_impl(uint64_t h[5], const uint8_t *s) { assert_fe(h); } -static void fe_frombytes(fe *h, const uint8_t *s) { +static void fe_frombytes(fe *h, const uint8_t s[32]) { fe_frombytes_impl(h->v, s); } @@ -645,7 +645,7 @@ static void fe_cmov(fe_loose *f, const fe_loose *g, uint64_t b) { } \ } while (0) -static void fe_frombytes_impl(uint32_t h[10], const uint8_t *s) { +static void fe_frombytes_impl(uint32_t h[10], const uint8_t s[32]) { // Ignores top bit of s. uint32_t a0 = load_4(s); uint32_t a1 = load_4(s+4); @@ -668,7 +668,7 @@ static void fe_frombytes_impl(uint32_t h[10], const uint8_t *s) { assert_fe(h); } -static void fe_frombytes(fe *h, const uint8_t *s) { +static void fe_frombytes(fe *h, const uint8_t s[32]) { fe_frombytes_impl(h->v, s); } @@ -1584,7 +1584,7 @@ static void ge_p3_tobytes(uint8_t s[32], const ge_p3 *h) { s[31] ^= fe_isnegative(&x) << 7; } -int x25519_ge_frombytes_vartime(ge_p3 *h, const uint8_t *s) { +int x25519_ge_frombytes_vartime(ge_p3 *h, const uint8_t s[32]) { fe u; fe_loose v; fe v3;