From 72f7108a5a8c9315aaca0db6dede0b31fbaca987 Mon Sep 17 00:00:00 2001 From: Loup Vaillant Date: Sun, 6 Aug 2017 23:33:44 +0200 Subject: [PATCH] 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. --- tests/self.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.47.3