#include static unsigned char DES_IP[64] = { 57, 49, 41, 33, 25, 17, 9, 1, 59, 51, 43, 35, 27, 19, 11, 3, 61, 53, 45, 37, 29, 21, 13, 5, 63, 55, 47, 39, 31, 23, 15, 7, 56, 48, 40, 32, 24, 16, 8, 0, 58, 50, 42, 34, 26, 18, 10, 2, 60, 52, 44, 36, 28, 20, 12, 4, 62, 54, 46, 38, 30, 22, 14, 6 }; static unsigned char *block = "KGS!@#$%"; int main(void) { int dst; for (dst = 0; dst < 64; dst++) { int src = DES_IP[dst ^ 0x20]; printf("%u", (unsigned int)(block[src >> 3] >> (7 - (src & 7))) & 1); } putchar('\n'); return 0; }