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));
23 printf("Passed DES validation suite\n");
26 printf("%d failures during DES validation suite!!!\n", totfails);
36 char key[64],plain[64],cipher[64],answer[64];
41 for(test=0;!feof(stdin);test++){
44 printf(" K: "); put8(key);
48 printf(" P: "); put8(plain);
51 printf(" C: "); put8(answer);
58 if(cipher[i] != answer[i])
62 printf(" Encrypt FAIL");
69 if(cipher[i] != plain[i])
72 printf(" Decrypt FAIL");
93 *cp++ = (t & (0x01 << (7-j))) != 0;