From e766700a81f08cbe946494f48e4b89a15472f029 Mon Sep 17 00:00:00 2001 From: Joost Rijneveld Date: Wed, 10 Apr 2019 17:43:04 +0200 Subject: [PATCH 1/2] Add test_aes to `make clean` --- test/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/test/Makefile b/test/Makefile index 51da5b8b..167d9dbc 100644 --- a/test/Makefile +++ b/test/Makefile @@ -58,5 +58,6 @@ $(DEST_DIR)/printparams_$(SCHEME)_$(IMPLEMENTATION): build-scheme crypto_$(TYPE) clean: $(RM) $(DEST_DIR)/functest_$(SCHEME)_$(IMPLEMENTATION) $(RM) $(DEST_DIR)/testvectors_$(SCHEME)_$(IMPLEMENTATION) + $(RM) $(DEST_DIR)/test_aes $(RM) $(DEST_DIR)/test_fips202 $(RM) $(DEST_DIR)/test_sha2 From 69b74706c192452491aa4be6153ba0e0fc437ee0 Mon Sep 17 00:00:00 2001 From: Joost Rijneveld Date: Wed, 10 Apr 2019 17:54:52 +0200 Subject: [PATCH 2/2] Fix SHA3 test --- test/common/fips202.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/common/fips202.c b/test/common/fips202.c index 7c28672f..e7d017d8 100644 --- a/test/common/fips202.c +++ b/test/common/fips202.c @@ -54,8 +54,8 @@ const unsigned char expected[512] = { static int test_sha3_256_incremental(void) { unsigned char input[512]; - unsigned char check[512]; - unsigned char output[512]; + unsigned char check[32]; + unsigned char output[32]; uint64_t s_inc[26]; int i; int absorbed; @@ -78,15 +78,15 @@ static int test_sha3_256_incremental(void) { sha3_256_inc_finalize(output, s_inc); - if (memcmp(check, output, 512)) { + if (memcmp(check, output, 32)) { printf("ERROR sha3_256 incremental did not match sha3_256.\n"); printf(" Expected: "); - for (i = 0; i < 512; i++) { + for (i = 0; i < 32; i++) { printf("%02X", check[i]); } printf("\n"); printf(" Received: "); - for (i = 0; i < 512; i++) { + for (i = 0; i < 32; i++) { printf("%02X", output[i]); } printf("\n");