print correct/svp64 cipher text
authorKonstantinos Margaritis <konstantinos.margaritis@vectorcamp.gr>
Sat, 18 Mar 2023 00:07:13 +0000 (00:07 +0000)
committerKonstantinos Margaritis <konstantinos.margaritis@vectorcamp.gr>
Sat, 18 Mar 2023 00:07:13 +0000 (00:07 +0000)
crypto/chacha20/src/test.c

index f797f0f3efc5a5f56b697253bce740ccf4ac635a..66b164406bdfe9d1bb9ab8d4a2ea215321b7f3e3 100644 (file)
@@ -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);
        }