c4e_aes.h File Reference

(Version 521)

Advanced Encryption Standard (AES). More...

#include "c4e_arch.h"
#include "c4e_cipher.h"
Include dependency graph for c4e_aes.h:

Go to the source code of this file.

Defines

#define C4E_AES_STATE_COLUMNS
#define C4E_AES_STATE_ROWS
#define C4E_AES_STATE_SIZE
#define C4E_AES128_ROUNDS
#define C4E_AES192_ROUNDS
#define C4E_AES256_ROUNDS
#define C4E_AES_CTX_SIZE(rnds)
#define C4E_AES128_CTX_SIZE
#define C4E_AES192_CTX_SIZE
#define C4E_AES256_CTX_SIZE
#define C4E_AES_MAX_CTX_SIZE
#define C4E_AES128_KEY_SIZE
#define C4E_AES192_KEY_SIZE
#define C4E_AES256_KEY_SIZE
#define C4E_AES_BLOCK_SIZE

Typedefs

typedef C4eArchUint8 C4eAesState
 AES state element.

Functions

void c4e_aes_setup (C4eCipherId algo, C4E_CONST C4eArchUint8 *key, C4eAesState *ctx)
 KeyExpansion primitive according to FIPS 197, 5.2
void c4e_aes_encrypt (C4eCipherId algo, C4eAesState *C4E_RESTRICT ctx, C4E_CONST C4eArchUint8 *C4E_RESTRICT plain, C4eArchUint8 *C4E_RESTRICT cipher)
 AES encryption algorithm according to FIPS 197.
void c4e_aes_decrypt (C4eCipherId algo, C4eAesState *C4E_RESTRICT ctx, C4E_CONST C4eArchUint8 *C4E_RESTRICT cipher, C4eArchUint8 *C4E_RESTRICT plain)
 AES decryption algorithm according to FIPS 197.

Detailed Description

Advanced Encryption Standard (AES).

Author:
Copyright (C) 2010, 2015 Ralf Hoppe <ralf.hoppe@ieee.org>
Version:
Id
c4e_aes.h 521 2015-01-27 19:59:40Z ralf
Bibliography:
Advanced Encryption Standard (AES). FIPS Publication 197, National Institute of Standards and Technology, 2001.

Definition in file c4e_aes.h.


Define Documentation

#define C4E_AES_STATE_COLUMNS

Number of columns (Nb) in AES state array.

Definition at line 34 of file c4e_aes.h.

#define C4E_AES_STATE_ROWS

Number of rows in AES state array.

Definition at line 35 of file c4e_aes.h.

#define C4E_AES_STATE_SIZE

Number of C4eAesState elements needed for construction of state array.

Definition at line 40 of file c4e_aes.h.

#define C4E_AES128_ROUNDS

AES-128 has 10 rounds.

Definition at line 43 of file c4e_aes.h.

#define C4E_AES192_ROUNDS

AES-192 has 12 rounds.

Definition at line 44 of file c4e_aes.h.

#define C4E_AES256_ROUNDS

AES-256 has 14 rounds.

Definition at line 45 of file c4e_aes.h.

#define C4E_AES_CTX_SIZE ( rnds   ) 

Number of C4eAesState elements needed for an AES context, which is: (number of rounds + 2) * sizeof round key.

Definition at line 52 of file c4e_aes.h.