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
16 int main (int argc, char *argv[]);
19 void good_bye (void) __attribute__ ((noreturn));
27 printf("Passed DES validation suite\n");
30 printf("%d failures during DES validation suite!!!\n", totfails);
40 char key[64],plain[64],cipher[64],answer[64];
45 for(test=0;!feof(stdin);test++){
48 printf(" K: "); put8(key);
52 printf(" P: "); put8(plain);
55 printf(" C: "); put8(answer);
62 if(cipher[i] != answer[i])
66 printf(" Encrypt FAIL");
73 if(cipher[i] != plain[i])
76 printf(" Decrypt FAIL");
97 *cp++ = (t & (0x01 << (7-j))) != 0;