From 6c0852f22f94556ad4281f097df442e9d0a9ebfd Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Thu, 4 Sep 2014 13:24:09 -0700 Subject: [PATCH] Remove unused macros --- test/default/sign.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/test/default/sign.c b/test/default/sign.c index 12b0f8d4..1dc347f0 100644 --- a/test/default/sign.c +++ b/test/default/sign.c @@ -4,11 +4,6 @@ #define TEST_NAME "sign" #include "cmptest.h" -#define KEYPAIR_SEED "1@ABCFGHLOPRSTUWabcdefghiklmnopq" - -#define crypto_sign_SECRETKEYBYTES_WITHOUT_PK \ - (crypto_sign_SECRETKEYBYTES - crypto_sign_PUBLICKEYBYTES) - static const unsigned char keypair_seed[] = { 0x42, 0x11, 0x51, 0xa4, 0x59, 0xfa, 0xea, 0xde, 0x3d, 0x24, 0x71, 0x15, 0xf9, 0x4a, 0xed, 0xae, @@ -17,7 +12,7 @@ static const unsigned char keypair_seed[] = { }; typedef struct TestData_ { - const unsigned char sk[crypto_sign_SECRETKEYBYTES_WITHOUT_PK]; + const unsigned char sk[crypto_sign_SEEDBYTES]; const unsigned char pk[crypto_sign_PUBLICKEYBYTES]; const unsigned char sig[crypto_sign_BYTES]; const char *m; @@ -1068,8 +1063,8 @@ int main(void) unsigned int i; for (i = 0U; i < (sizeof test_data) / (sizeof test_data[0]); i++) { - memcpy(skpk, test_data[i].sk, crypto_sign_SECRETKEYBYTES_WITHOUT_PK); - memcpy(skpk + crypto_sign_SECRETKEYBYTES_WITHOUT_PK, + memcpy(skpk, test_data[i].sk, crypto_sign_SEEDBYTES); + memcpy(skpk + crypto_sign_SEEDBYTES, test_data[i].pk, crypto_sign_PUBLICKEYBYTES); if (crypto_sign(sm, &smlen, (const unsigned char *) test_data[i].m, i, skpk) != 0) {