|
@@ -346,6 +346,21 @@ int kseed_test(void)
|
|
|
kseed_ecb_encrypt(tests[x].pt, buf[0], &skey);
|
|
|
kseed_ecb_decrypt(buf[0], buf[1], &skey);
|
|
|
if (XMEMCMP(buf[0], tests[x].ct, 16) || XMEMCMP(buf[1], tests[x].pt, 16)) {
|
|
|
+#if 0
|
|
|
+ int i, j;
|
|
|
+ printf ("\n\nLTC_KSEED failed for x=%d, I got:\n", x);
|
|
|
+ for (i = 0; i < 2; i++) {
|
|
|
+ const unsigned char *expected, *actual;
|
|
|
+ expected = (i ? tests[x].pt : tests[x].ct);
|
|
|
+ actual = buf[i];
|
|
|
+ printf ("expected actual (%s)\n", (i ? "plaintext" : "ciphertext"));
|
|
|
+ for (j = 0; j < 16; j++) {
|
|
|
+ const char *eq = (expected[j] == actual[j] ? "==" : "!=");
|
|
|
+ printf (" %02x %s %02x\n", expected[j], eq, actual[j]);
|
|
|
+ }
|
|
|
+ printf ("\n");
|
|
|
+ }
|
|
|
+#endif
|
|
|
return CRYPT_FAIL_TESTVECTOR;
|
|
|
}
|
|
|
}
|