3 * This crypt(3) validation program shipped with UFC-crypt
4 * is derived from one distributed with Phil Karns PD DES package.
6 * @(#)cert.c 1.8 11 Aug 1996
15 int main (int argc, char *argv[]);
18 void good_bye (void) __attribute__ ((noreturn));
24 printf("Passed DES validation suite\n");
27 printf("%d failures during DES validation suite!!!\n", totfails);
33 main (int argc, char *argv[])
35 char key[64],plain[64],cipher[64],answer[64];
40 for(test=0;!feof(stdin);test++){
43 printf(" K: "); put8(key);
47 printf(" P: "); put8(plain);
50 printf(" C: "); put8(answer);
57 if(cipher[i] != answer[i])
61 printf(" Encrypt FAIL");
68 if(cipher[i] != plain[i])
71 printf(" Decrypt FAIL");
91 *cp++ = (t & (0x01 << (7-j))) != 0;