#include <stdio.h>#include "platform.h"Go to the source code of this file.
Compounds | |
| struct | cipherInstance |
| struct | keyInstance |
Defines | |
| #define | DIR_ENCRYPT 0 |
| #define | DIR_DECRYPT 1 |
| #define | MODE_ECB 1 |
| #define | MODE_CBC 2 |
| #define | MODE_CFB1 3 |
| #define | TRUE 1 |
| #define | FALSE 0 |
| #define | BAD_KEY_DIR -1 |
| #define | BAD_KEY_MAT -2 |
| #define | BAD_KEY_INSTANCE -3 |
| #define | BAD_CIPHER_MODE -4 |
| #define | BAD_CIPHER_STATE -5 |
| #define | MAX_KEY_SIZE 64 |
| #define | MAX_IV_SIZE 16 |
| #define | BAD_INPUT_LEN -6 |
| #define | BAD_PARAMS -7 |
| #define | BAD_IV_MAT -8 |
| #define | BAD_ENDIAN -9 |
| #define | BAD_ALIGN32 -10 |
| #define | BLOCK_SIZE 128 |
| #define | MAX_ROUNDS 16 |
| #define | ROUNDS_128 16 |
| #define | ROUNDS_192 16 |
| #define | ROUNDS_256 16 |
| #define | MAX_KEY_BITS 256 |
| #define | MIN_KEY_BITS 128 |
| #define | VALID_SIG 0x48534946 |
| #define | MCT_OUTER 400 |
| #define | MCT_INNER 10000 |
| #define | REENTRANT 1 |
| #define | INPUT_WHITEN 0 |
| #define | OUTPUT_WHITEN ( INPUT_WHITEN + BLOCK_SIZE/32) |
| #define | ROUND_SUBKEYS (OUTPUT_WHITEN + BLOCK_SIZE/32) |
| #define | TOTAL_SUBKEYS (ROUND_SUBKEYS + 2*MAX_ROUNDS) |
| #define | TAB_DISABLE 0 |
| #define | TAB_ENABLE 1 |
| #define | TAB_RESET 2 |
| #define | TAB_QUERY 3 |
| #define | TAB_MIN_QUERY 50 |
| #define | CONST |
| #define | Copy1(d, s, N) ((DWORD *)(d))[N] = ((DWORD *)(s))[N] |
| #define | BlockCopy(d, s) { Copy1(d,s,0);Copy1(d,s,1);Copy1(d,s,2);Copy1(d,s,3); } |
Typedefs | |
| typedef unsigned char | BYTE |
| typedef unsigned long | DWORD |
| typedef DWORD | fullSbox [4][256] |
Functions | |
| int | TableOp (int op) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|