From 5590c715e26790d9b60384e1ac092529a19208af Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Tue, 8 Jan 2019 23:35:04 +0000 Subject: [PATCH] Mark some unmarked array sizes in curve25519.c. Change-Id: I92589f5d5e89c836cff3c26739b43eb65de67836 Reviewed-on: https://boringssl-review.googlesource.com/c/34304 Commit-Queue: Adam Langley Reviewed-by: Adam Langley --- third_party/fiat/curve25519.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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;