Defines | Functions

rijndael.cpp File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "Rijndael.h"
#include "Rand.h"
#include "Rijndael-Boxes.h"
Include dependency graph for rijndael.cpp:

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 Documentation

#define __UNUS

Definition at line 21 of file rijndael.cpp.

#define SC   ((BC - 4) >> 1)

Definition at line 32 of file rijndael.cpp.


Function Documentation

int blockDecrypt ( cipherInstance cipher,
keyInstance key,
BYTE input,
int  inputByteLen,
BYTE outBuffer 
)

Definition at line 640 of file rijndael.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int blockEncrypt ( cipherInstance cipher,
keyInstance key,
BYTE input,
int  inputByteLen,
BYTE outBuffer 
)

Definition at line 545 of file rijndael.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int cipherInit ( cipherInstance cipher,
BYTE  mode,
char *  IV 
)

Definition at line 520 of file rijndael.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Here is the call graph for this function:

void InvMixColumn ( word8  a[4][4],
word8  BC 
)

Definition at line 123 of file rijndael.cpp.

Here is the caller graph for this function:

void KeyAddition ( word8  a[4][4],
word8  rk[4][4],
word8  BC 
)

Definition at line 71 of file rijndael.cpp.

Here is the caller graph for this function:

int makeKey ( keyInstance key,
BYTE  direction,
int  keyByteLen,
char *  keyMaterial 
)

Definition at line 479 of file rijndael.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void MixColumn ( word8  a[4][4],
word8  BC 
)

Definition at line 106 of file rijndael.cpp.

Here is the call graph for this function:

word8 mul ( word8  a,
word8  b 
)

Definition at line 61 of file rijndael.cpp.

Here is the caller graph for this function:

int rijndaelDecrypt ( word8  a[16],
word8  b[16],
word8  rk[MAXROUNDS+1][4][4] 
)

Definition at line 357 of file rijndael.cpp.

Here is the caller graph for this function:

int rijndaelDecryptRound ( word8  a[4][4],
word8  rk[MAXROUNDS+1][4][4],
int  rounds 
)

Definition at line 435 of file rijndael.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int rijndaelEncrypt ( word8  a[16],
word8  b[16],
word8  rk[MAXROUNDS+1][4][4] 
)

Definition at line 211 of file rijndael.cpp.

Here is the caller graph for this function:

int rijndaelEncryptRound ( word8  a[4][4],
word8  rk[MAXROUNDS+1][4][4],
int  rounds 
)

Definition at line 289 of file rijndael.cpp.

Here is the caller graph for this function:

int rijndaelKeyEnctoDec ( int keyBits  __UNUS,
word8  W[MAXROUNDS+1][4][4] 
)

Definition at line 199 of file rijndael.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int rijndaelKeySched ( word8  k[MAXKC][4],
int keyBits  __UNUS,
word8  W[MAXROUNDS+1][4][4] 
)

Definition at line 138 of file rijndael.cpp.

Here is the caller graph for this function:

void ShiftRow ( word8  a[4][4],
word8  d,
word8  BC 
)

Definition at line 80 of file rijndael.cpp.

Here is the caller graph for this function:

void Substitution ( word8  a[4][4],
word8  box[256],
word8  BC 
)

Definition at line 95 of file rijndael.cpp.

Here is the caller graph for this function: