#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "Rijndael.h"
#include "Rand.h"
#include "Rijndael-Boxes.h"
Go to the source code of this file.
Defines | |
#define | __UNUS |
#define | SC ((BC - 4) >> 1) |
Functions | |
word8 | mul (word8 a, word8 b) |
void | KeyAddition (word8 a[4][4], word8 rk[4][4], word8 BC) |
void | ShiftRow (word8 a[4][4], word8 d, word8 BC) |
void | Substitution (word8 a[4][4], word8 box[256], word8 BC) |
void | MixColumn (word8 a[4][4], word8 BC) |
void | InvMixColumn (word8 a[4][4], word8 BC) |
int | rijndaelKeySched (word8 k[MAXKC][4], int keyBits __UNUS, word8 W[MAXROUNDS+1][4][4]) |
int | rijndaelKeyEnctoDec (int keyBits __UNUS, 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 keyByteLen, char *keyMaterial) |
int | cipherInit (cipherInstance *cipher, BYTE mode, char *IV) |
int | blockEncrypt (cipherInstance *cipher, keyInstance *key, BYTE *input, int inputByteLen, BYTE *outBuffer) |
int | blockDecrypt (cipherInstance *cipher, keyInstance *key, BYTE *input, int inputByteLen, BYTE *outBuffer) |
int | cipherUpdateRounds (cipherInstance *cipher, keyInstance *key, BYTE *input, int inputLen __UNUS, BYTE *outBuffer, int rounds) |
#define __UNUS |
Definition at line 21 of file rijndael.cpp.
#define SC ((BC - 4) >> 1) |
Definition at line 32 of file rijndael.cpp.
int blockDecrypt | ( | cipherInstance * | cipher, | |
keyInstance * | key, | |||
BYTE * | input, | |||
int | inputByteLen, | |||
BYTE * | outBuffer | |||
) |
Definition at line 640 of file rijndael.cpp.
int blockEncrypt | ( | cipherInstance * | cipher, | |
keyInstance * | key, | |||
BYTE * | input, | |||
int | inputByteLen, | |||
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 | keyByteLen, | |||
char * | keyMaterial | |||
) |
Definition at line 479 of file rijndael.cpp.
Definition at line 435 of file rijndael.cpp.
int rijndaelKeyEnctoDec | ( | int keyBits | __UNUS, | |
word8 | W[MAXROUNDS+1][4][4] | |||
) |
Definition at line 199 of file rijndael.cpp.