]> git.codecow.com Git - Monocypher.git/commitdiff
Speed benchmark: fixed buffer overflow
authorLoup Vaillant <loup@loup-vaillant.fr>
Fri, 5 Mar 2021 11:02:24 +0000 (12:02 +0100)
committerLoup Vaillant <loup@loup-vaillant.fr>
Fri, 5 Mar 2021 11:02:24 +0000 (12:02 +0100)
tests/speed/speed-sodium.c
tests/speed/speed.c

index 417e9fce426373fce9d56d1618a8d45ef748a1f8..113992a4edd0f9a608e77e16f45999bc1315b3a7 100644 (file)
@@ -83,7 +83,7 @@ static u64 authenticated(void)
     u8 mac[crypto_aead_xchacha20poly1305_ietf_ABYTES];
     RANDOM_INPUT(in   , SIZE);
     RANDOM_INPUT(key  ,   32);
-    RANDOM_INPUT(nonce,    8);
+    RANDOM_INPUT(nonce,   24);
 
     TIMING_START {
         crypto_aead_xchacha20poly1305_ietf_encrypt_detached(
index fbc2532ea6afa330bb6d7ed137203ae6d877542b..b02fff07701cfdb978213383a3cef31a348b0fd4 100644 (file)
@@ -85,7 +85,7 @@ static u64 authenticated(void)
     u8 mac[  16];
     RANDOM_INPUT(in   , SIZE);
     RANDOM_INPUT(key  ,   32);
-    RANDOM_INPUT(nonce,    8);
+    RANDOM_INPUT(nonce,   24);
 
     TIMING_START {
         crypto_lock(mac, out, key, nonce, in, SIZE);