[Internal] AES encoding / decoding rijndael-alg-fst.h v2.0 August '99 Optimised ANSI C code taken from the 'aescrypt' project: www.sf.net/projects/aescrypt See LICENSE-EST for the license applicable to this file More...
#include <stdio.h>
Go to the source code of this file.
Classes | |
struct | keyInstance |
struct | cipherInstance |
Defines | |
#define | MAXKC (256/32) |
#define | MAXROUNDS 14 |
#define | __RIJNDAEL_API_H |
#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 | BITSPERBLOCK 128 |
#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 | BAD_BLOCK_LENGTH -6 |
#define | BAD_CIPHER_INSTANCE -7 |
#define | MAX_KEY_SIZE 32 |
#define | MAX_IV_SIZE 16 |
Typedefs | |
typedef unsigned char | word8 |
typedef unsigned short | word16 |
typedef unsigned int | word32 |
typedef unsigned char | BYTE |
Functions | |
int | rijndaelKeySched (word8 k[MAXKC][4], int keyBits, word8 rk[MAXROUNDS+1][4][4]) |
int | rijndaelKeyEnctoDec (int keyBits, word8 W[MAXROUNDS+1][4][4]) |
int | rijndaelEncrypt (word8 a[16], word8 b[16], word8 rk[MAXROUNDS+1][4][4]) |
int | rijndaelEncryptRound (word8 a[4][4], word8 rk[MAXROUNDS+1][4][4], int rounds) |
int | rijndaelDecrypt (word8 a[16], word8 b[16], word8 rk[MAXROUNDS+1][4][4]) |
int | rijndaelDecryptRound (word8 a[4][4], word8 rk[MAXROUNDS+1][4][4], int rounds) |
int | makeKey (keyInstance *key, BYTE direction, int keyLen, char *keyMaterial) |
int | cipherInit (cipherInstance *cipher, BYTE mode, char *IV) |
int | blockEncrypt (cipherInstance *cipher, keyInstance *key, BYTE *input, int inputLen, BYTE *outBuffer) |
int | blockDecrypt (cipherInstance *cipher, keyInstance *key, BYTE *input, int inputLen, BYTE *outBuffer) |
int | cipherUpdateRounds (cipherInstance *cipher, keyInstance *key, BYTE *input, int inputLen, BYTE *outBuffer, int Rounds) |
[Internal] AES encoding / decoding rijndael-alg-fst.h v2.0 August '99 Optimised ANSI C code taken from the 'aescrypt' project: www.sf.net/projects/aescrypt See LICENSE-EST for the license applicable to this file
Definition in file Rijndael.h.
#define __RIJNDAEL_API_H |
Definition at line 45 of file Rijndael.h.
#define BAD_BLOCK_LENGTH -6 |
Definition at line 74 of file Rijndael.h.
#define BAD_CIPHER_INSTANCE -7 |
Definition at line 75 of file Rijndael.h.
#define BAD_CIPHER_MODE -4 |
Definition at line 72 of file Rijndael.h.
#define BAD_CIPHER_STATE -5 |
Definition at line 73 of file Rijndael.h.
#define BAD_KEY_DIR -1 |
Definition at line 69 of file Rijndael.h.
#define BAD_KEY_INSTANCE -3 |
Definition at line 71 of file Rijndael.h.
#define BAD_KEY_MAT -2 |
Definition at line 70 of file Rijndael.h.
#define BITSPERBLOCK 128 |
Definition at line 66 of file Rijndael.h.
#define DIR_DECRYPT 1 |
Definition at line 56 of file Rijndael.h.
#define DIR_ENCRYPT 0 |
Definition at line 55 of file Rijndael.h.
#define FALSE 0 |
Definition at line 64 of file Rijndael.h.
#define MAX_IV_SIZE 16 |
Definition at line 81 of file Rijndael.h.
#define MAX_KEY_SIZE 32 |
Definition at line 80 of file Rijndael.h.
#define MAXKC (256/32) |
Definition at line 20 of file Rijndael.h.
#define MAXROUNDS 14 |
Definition at line 21 of file Rijndael.h.
#define MODE_CBC 2 |
Definition at line 58 of file Rijndael.h.
#define MODE_CFB1 3 |
Definition at line 59 of file Rijndael.h.
#define MODE_ECB 1 |
Definition at line 57 of file Rijndael.h.
#define TRUE 1 |
Definition at line 61 of file Rijndael.h.
typedef unsigned char BYTE |
Definition at line 86 of file Rijndael.h.
typedef unsigned short word16 |
Definition at line 24 of file Rijndael.h.
typedef unsigned int word32 |
Definition at line 25 of file Rijndael.h.
typedef unsigned char word8 |
Definition at line 23 of file Rijndael.h.
int blockDecrypt | ( | cipherInstance * | cipher, | |
keyInstance * | key, | |||
BYTE * | input, | |||
int | inputLen, | |||
BYTE * | outBuffer | |||
) |
Definition at line 640 of file rijndael.cpp.
int blockEncrypt | ( | cipherInstance * | cipher, | |
keyInstance * | key, | |||
BYTE * | input, | |||
int | inputLen, | |||
BYTE * | outBuffer | |||
) |
Definition at line 545 of file rijndael.cpp.
int cipherInit | ( | cipherInstance * | cipher, | |
BYTE | mode, | |||
char * | IV | |||
) |
Definition at line 520 of file rijndael.cpp.
int cipherUpdateRounds | ( | cipherInstance * | cipher, | |
keyInstance * | key, | |||
BYTE * | input, | |||
int inputLen | __UNUS, | |||
BYTE * | outBuffer, | |||
int | rounds | |||
) |
cipherUpdateRounds:
Encrypts/Decrypts exactly one full block a specified number of rounds. Only used in the Intermediate Value Known Answer Test.
Returns: TRUE - on success BAD_CIPHER_STATE - cipher in bad state (e.g., not initialized)
Definition at line 761 of file rijndael.cpp.
int makeKey | ( | keyInstance * | key, | |
BYTE | direction, | |||
int | keyLen, | |||
char * | keyMaterial | |||
) |
Definition at line 479 of file rijndael.cpp.
Definition at line 435 of file rijndael.cpp.
int rijndaelKeyEnctoDec | ( | int | keyBits, | |
word8 | W[MAXROUNDS+1][4][4] | |||
) |
Definition at line 199 of file rijndael.cpp.