![]() |
NetSim Source Code Help
|
Go to the source code of this file.
Macros | |
| #define | uchar unsigned char |
| #define | uint unsigned int |
| #define | ENCRYPT 1 |
| #define | DECRYPT 0 |
| #define | BITNUM(a, b, c) (((a[(b)/8] >> (7 - (b%8))) & 0x01) << (c)) |
| #define | BITNUMINTR(a, b, c) ((((a) >> (31 - (b))) & 0x00000001) << (c)) |
| #define | BITNUMINTL(a, b, c) ((((a) << (b)) & 0x80000000) >> (c)) |
| #define | SBOXBIT(a) (((a) & 0x20) | (((a) & 0x1f) >> 1) | (((a) & 0x01) << 4)) |
Functions | |
| void | key_schedule (uchar key[], uchar schedule[][6], uint mode) |
| void | IP (uint state[], uchar in[]) |
| void | InvIP (uint state[], uchar in[]) |
| uint | f (uint state, uchar key[]) |
| void | des_crypt (uchar in[], uchar out[], uchar key[][6]) |
| void | three_des_key_schedule (uchar key[], uchar schedule[][16][6], uint mode) |
| void | three_des_crypt (uchar in[], uchar out[], uchar key[][16][6]) |
Variables | |
| uchar | sbox1 [64] |
| uchar | sbox2 [64] |
| uchar | sbox3 [64] |
| uchar | sbox4 [64] |
| uchar | sbox5 [64] |
| uchar | sbox6 [64] |
| uchar | sbox7 [64] |
| uchar | sbox8 [64] |
| uchar sbox1[64] |
| uchar sbox2[64] |
| uchar sbox3[64] |
| uchar sbox4[64] |
| uchar sbox5[64] |
| uchar sbox6[64] |
| uchar sbox7[64] |