From: Loup Vaillant Date: Sun, 6 Aug 2017 21:33:44 +0000 (+0200) Subject: More sensitive constant timing test X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=72f7108a5a8c9315aaca0db6dede0b31fbaca987;p=Monocypher.git More sensitive constant timing test 32 bytes buffers weren't big enough to make a difference if crypto_memcmp and crypto_zerocmp don't run in constant time. Increased to 64Kib instead. --- diff --git a/tests/self.c b/tests/self.c index 4ac2292..6e27fa3 100644 --- a/tests/self.c +++ b/tests/self.c @@ -296,8 +296,8 @@ static u64 rand64() // Tests that constant-time comparison is actually constant-time. static int test_cmp() { - u8 va[32] = {0}; - u8 vb[32] = {0}; + u8 va[1024 * 64] = {0}; + u8 vb[1024 * 64] = {0}; clock_t t1, t2, d; int status = 0;