From 2d87abe21a705aac9f4a066168553204c84d9651 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 15 Apr 2019 09:44:32 +0200 Subject: [PATCH] Use the correct constant for the buffer lengths in scalar tests --- test/default/core_ed25519.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/default/core_ed25519.c b/test/default/core_ed25519.c index b6bdfab9..d796e01a 100644 --- a/test/default/core_ed25519.c +++ b/test/default/core_ed25519.c @@ -306,8 +306,8 @@ main(void) assert(sodium_is_zero(sc3, crypto_core_ed25519_SCALARBYTES)); } - memset(sc, 0x69, crypto_core_ed25519_UNIFORMBYTES); - memset(sc2, 0x42, crypto_core_ed25519_UNIFORMBYTES); + memset(sc, 0x69, crypto_core_ed25519_SCALARBYTES); + memset(sc2, 0x42, crypto_core_ed25519_SCALARBYTES); crypto_core_ed25519_scalar_add(sc, sc, sc2); crypto_core_ed25519_scalar_add(sc, sc2, sc); sodium_bin2hex(hex, crypto_core_ed25519_SCALARBYTES * 2 + 1, @@ -320,8 +320,8 @@ main(void) sc, crypto_core_ed25519_SCALARBYTES); printf("sub1: %s\n", hex); - memset(sc, 0xcd, crypto_core_ed25519_UNIFORMBYTES); - memset(sc2, 0x42, crypto_core_ed25519_UNIFORMBYTES); + memset(sc, 0xcd, crypto_core_ed25519_SCALARBYTES); + memset(sc2, 0x42, crypto_core_ed25519_SCALARBYTES); crypto_core_ed25519_scalar_add(sc, sc, sc2); crypto_core_ed25519_scalar_add(sc, sc2, sc); sodium_bin2hex(hex, crypto_core_ed25519_SCALARBYTES * 2 + 1,