From 7e89b6b291c1c9da9eb62bc0848b7c0b33eb0d91 Mon Sep 17 00:00:00 2001 From: Konstantinos Margaritis Date: Sat, 18 Mar 2023 00:07:13 +0000 Subject: [PATCH] print correct/svp64 cipher text --- crypto/chacha20/src/test.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crypto/chacha20/src/test.c b/crypto/chacha20/src/test.c index f797f0f3..66b16440 100644 --- a/crypto/chacha20/src/test.c +++ b/crypto/chacha20/src/test.c @@ -58,6 +58,16 @@ int check_cpp(void){ /* Compare our ciphertext to the correct ciphertext */ if(memcmp(buffer, correct_ciphertext, msglen) != 0){ + printf("msglen: %d\n", msglen); + printf("correct:\n"); + for (uint32_t i=0; i < msglen; i++) { + printf("%02x ", correct_ciphertext[i]); + } + printf("\nsvp64:\n"); + for (uint32_t i=0; i < msglen; i++) { + printf("%02x ", buffer[i]); + } + printf("\n"); return(-1); } -- 2.30.2