aes.c File Reference

#include "polarssl/config.h"
#include "polarssl/aes.h"
#include "polarssl/padlock.h"
#include <stdio.h>
Include dependency graph for aes.c:

Go to the source code of this file.

Defines

#define GET_UINT32_LE(n, b, i)
#define PUT_UINT32_LE(n, b, i)
#define ROTL8(x)   ( ( x << 8 ) & 0xFFFFFFFF ) | ( x >> 24 )
#define XTIME(x)   ( ( x << 1 ) ^ ( ( x & 0x80 ) ? 0x1B : 0x00 ) )
#define MUL(x, y)   ( ( x && y ) ? pow[(log[x]+log[y]) % 255] : 0 )
#define AES_FROUND(X0, X1, X2, X3, Y0, Y1, Y2, Y3)
#define AES_RROUND(X0, X1, X2, X3, Y0, Y1, Y2, Y3)

Functions

static void aes_gen_tables (void)
int aes_setkey_enc (aes_context *ctx, const unsigned char *key, unsigned int keysize)
 AES key schedule (encryption).
int aes_setkey_dec (aes_context *ctx, const unsigned char *key, unsigned int keysize)
 AES key schedule (decryption).
int aes_crypt_ecb (aes_context *ctx, int mode, const unsigned char input[16], unsigned char output[16])
 AES-ECB block encryption/decryption.
int aes_crypt_cbc (aes_context *ctx, int mode, size_t length, unsigned char iv[16], const unsigned char *input, unsigned char *output)
int aes_crypt_cfb128 (aes_context *ctx, int mode, size_t length, size_t *iv_off, unsigned char iv[16], const unsigned char *input, unsigned char *output)
 AES-CFB128 buffer encryption/decryption.
int aes_crypt_ctr (aes_context *ctx, size_t length, size_t *nc_off, unsigned char nonce_counter[16], unsigned char stream_block[16], const unsigned char *input, unsigned char *output)
 AES-CTR buffer encryption/decryption.
int aes_self_test (int verbose)
 Checkup routine.

Variables

static unsigned char FSb [256]
static uint32_t FT0 [256]
static uint32_t FT1 [256]
static uint32_t FT2 [256]
static uint32_t FT3 [256]
static unsigned char RSb [256]
static uint32_t RT0 [256]
static uint32_t RT1 [256]
static uint32_t RT2 [256]
static uint32_t RT3 [256]
static uint32_t RCON [10]
static int aes_init_done = 0
static const unsigned char aes_test_ecb_dec [3][16]
static const unsigned char aes_test_ecb_enc [3][16]
static const unsigned char aes_test_cbc_dec [3][16]
static const unsigned char aes_test_cbc_enc [3][16]
static const unsigned char aes_test_cfb128_key [3][32]
static const unsigned char aes_test_cfb128_iv [16]
static const unsigned char aes_test_cfb128_pt [64]
static const unsigned char aes_test_cfb128_ct [3][64]
static const unsigned char aes_test_ctr_key [3][16]
static const unsigned char aes_test_ctr_nonce_counter [3][16]
static const unsigned char aes_test_ctr_pt [3][48]
static const unsigned char aes_test_ctr_ct [3][48]
static const int aes_test_ctr_len [3]

Define Documentation

#define AES_FROUND ( X0,
X1,
X2,
X3,
Y0,
Y1,
Y2,
Y3   ) 
Value:
{                                               \
    X0 = *RK++ ^ FT0[ ( Y0       ) & 0xFF ] ^   \
                 FT1[ ( Y1 >>  8 ) & 0xFF ] ^   \
                 FT2[ ( Y2 >> 16 ) & 0xFF ] ^   \
                 FT3[ ( Y3 >> 24 ) & 0xFF ];    \
                                                \
    X1 = *RK++ ^ FT0[ ( Y1       ) & 0xFF ] ^   \
                 FT1[ ( Y2 >>  8 ) & 0xFF ] ^   \
                 FT2[ ( Y3 >> 16 ) & 0xFF ] ^   \
                 FT3[ ( Y0 >> 24 ) & 0xFF ];    \
                                                \
    X2 = *RK++ ^ FT0[ ( Y2       ) & 0xFF ] ^   \
                 FT1[ ( Y3 >>  8 ) & 0xFF ] ^   \
                 FT2[ ( Y0 >> 16 ) & 0xFF ] ^   \
                 FT3[ ( Y1 >> 24 ) & 0xFF ];    \
                                                \
    X3 = *RK++ ^ FT0[ ( Y3       ) & 0xFF ] ^   \
                 FT1[ ( Y0 >>  8 ) & 0xFF ] ^   \
                 FT2[ ( Y1 >> 16 ) & 0xFF ] ^   \
                 FT3[ ( Y2 >> 24 ) & 0xFF ];    \
}

Definition at line 619 of file aes.c.

Referenced by aes_crypt_ecb().

#define AES_RROUND ( X0,
X1,
X2,
X3,
Y0,
Y1,
Y2,
Y3   ) 
Value:
{                                               \
    X0 = *RK++ ^ RT0[ ( Y0       ) & 0xFF ] ^   \
                 RT1[ ( Y3 >>  8 ) & 0xFF ] ^   \
                 RT2[ ( Y2 >> 16 ) & 0xFF ] ^   \
                 RT3[ ( Y1 >> 24 ) & 0xFF ];    \
                                                \
    X1 = *RK++ ^ RT0[ ( Y1       ) & 0xFF ] ^   \
                 RT1[ ( Y0 >>  8 ) & 0xFF ] ^   \
                 RT2[ ( Y3 >> 16 ) & 0xFF ] ^   \
                 RT3[ ( Y2 >> 24 ) & 0xFF ];    \
                                                \
    X2 = *RK++ ^ RT0[ ( Y2       ) & 0xFF ] ^   \
                 RT1[ ( Y1 >>  8 ) & 0xFF ] ^   \
                 RT2[ ( Y0 >> 16 ) & 0xFF ] ^   \
                 RT3[ ( Y3 >> 24 ) & 0xFF ];    \
                                                \
    X3 = *RK++ ^ RT0[ ( Y3       ) & 0xFF ] ^   \
                 RT1[ ( Y2 >>  8 ) & 0xFF ] ^   \
                 RT2[ ( Y1 >> 16 ) & 0xFF ] ^   \
                 RT3[ ( Y0 >> 24 ) & 0xFF ];    \
}

Definition at line 642 of file aes.c.

Referenced by aes_crypt_ecb().

#define GET_UINT32_LE ( n,
b,
 ) 
Value:
{                                                       \
    (n) = ( (uint32_t) (b)[(i)    ]       )             \
        | ( (uint32_t) (b)[(i) + 1] <<  8 )             \
        | ( (uint32_t) (b)[(i) + 2] << 16 )             \
        | ( (uint32_t) (b)[(i) + 3] << 24 );            \
}

Definition at line 47 of file aes.c.

Referenced by aes_crypt_ecb(), aes_setkey_enc(), and md5_process().

#define MUL ( x,
 )     ( ( x && y ) ? pow[(log[x]+log[y]) % 255] : 0 )

Definition at line 366 of file aes.c.

Referenced by aes_gen_tables().

#define PUT_UINT32_LE ( n,
b,
 ) 
Value:
{                                                       \
    (b)[(i)    ] = (unsigned char) ( (n)       );       \
    (b)[(i) + 1] = (unsigned char) ( (n) >>  8 );       \
    (b)[(i) + 2] = (unsigned char) ( (n) >> 16 );       \
    (b)[(i) + 3] = (unsigned char) ( (n) >> 24 );       \
}

Definition at line 57 of file aes.c.

Referenced by aes_crypt_ecb(), and md5_finish().

#define ROTL8 (  )     ( ( x << 8 ) & 0xFFFFFFFF ) | ( x >> 24 )

Definition at line 364 of file aes.c.

Referenced by aes_gen_tables().

#define XTIME (  )     ( ( x << 1 ) ^ ( ( x & 0x80 ) ? 0x1B : 0x00 ) )

Definition at line 365 of file aes.c.

Referenced by aes_gen_tables().


Function Documentation

int aes_crypt_cbc ( aes_context ctx,
int  mode,
size_t  length,
unsigned char  iv[16],
const unsigned char *  input,
unsigned char *  output 
)
int aes_crypt_cfb128 ( aes_context ctx,
int  mode,
size_t  length,
size_t *  iv_off,
unsigned char  iv[16],
const unsigned char *  input,
unsigned char *  output 
)

AES-CFB128 buffer encryption/decryption.

Note: Due to the nature of CFB you should use the same key schedule for both encryption and decryption. So a context initialized with aes_setkey_enc() for both AES_ENCRYPT and AES_DECRYPT.

Parameters:
ctx AES context
mode AES_ENCRYPT or AES_DECRYPT
length length of the input data
iv_off offset in IV (updated after use)
iv initialization vector (updated after use)
input buffer holding the input data
output buffer holding the output data
Returns:
0 if successful

Definition at line 842 of file aes.c.

References aes_crypt_ecb(), AES_DECRYPT, and AES_ENCRYPT.

Referenced by aes_crypt_cfb128_wrap(), aes_self_test(), test_suite_aes_decrypt_cfb128(), and test_suite_aes_encrypt_cfb128().

int aes_crypt_ctr ( aes_context ctx,
size_t  length,
size_t *  nc_off,
unsigned char  nonce_counter[16],
unsigned char  stream_block[16],
const unsigned char *  input,
unsigned char *  output 
)

AES-CTR buffer encryption/decryption.

Warning: You have to keep the maximum use of your counter in mind!

Note: Due to the nature of CTR you should use the same key schedule for both encryption and decryption. So a context initialized with aes_setkey_enc() for both AES_ENCRYPT and AES_DECRYPT.

Parameters:
ctx AES context
length The length of the data
nc_off The offset in the current stream_block (for resuming within current cipher stream). The offset pointer to should be 0 at the start of a stream.
nonce_counter The 128-bit nonce and counter.
stream_block The saved stream-block for resuming. Is overwritten by the function.
input The input data stream
output The output data stream
Returns:
0 if successful

Definition at line 890 of file aes.c.

References aes_crypt_ecb(), and AES_ENCRYPT.

Referenced by aes_crypt_ctr_wrap(), and aes_self_test().

int aes_crypt_ecb ( aes_context ctx,
int  mode,
const unsigned char  input[16],
unsigned char  output[16] 
)

AES-ECB block encryption/decryption.

Parameters:
ctx AES context
mode AES_ENCRYPT or AES_DECRYPT
input 16-byte input block
output 16-byte output block
Returns:
0 if successful

Definition at line 668 of file aes.c.

References AES_DECRYPT, AES_FROUND, AES_RROUND, FSb, GET_UINT32_LE, aes_context::nr, PUT_UINT32_LE, aes_context::rk, and RSb.

Referenced by aes_crypt_cbc(), aes_crypt_cfb128(), aes_crypt_ctr(), aes_crypt_ecb_wrap(), aes_self_test(), block_cipher_df(), ctr_drbg_random_with_add(), ctr_drbg_update_internal(), test_suite_aes_decrypt_ecb(), and test_suite_aes_encrypt_ecb().

static void aes_gen_tables ( void   )  [static]

Definition at line 370 of file aes.c.

References FSb, FT0, FT1, FT2, FT3, MUL, RCON, ROTL8, RSb, RT0, RT1, RT2, RT3, and XTIME.

Referenced by aes_setkey_enc().

int aes_self_test ( int  verbose  ) 
int aes_setkey_dec ( aes_context ctx,
const unsigned char *  key,
unsigned int  keysize 
)

AES key schedule (decryption).

Parameters:
ctx AES context to be initialized
key decryption key
keysize must be 128, 192 or 256
Returns:
0 if successful, or POLARSSL_ERR_AES_INVALID_KEY_LENGTH

Definition at line 561 of file aes.c.

References aes_setkey_enc(), aes_context::buf, FSb, aes_context::nr, POLARSSL_ERR_AES_INVALID_KEY_LENGTH, aes_context::rk, RT0, RT1, RT2, and RT3.

Referenced by aes_self_test(), aes_setkey_dec_wrap(), pem_aes_decrypt(), ssl_ticket_keys_init(), test_suite_aes_decrypt_cbc(), and test_suite_aes_decrypt_ecb().

int aes_setkey_enc ( aes_context ctx,
const unsigned char *  key,
unsigned int  keysize 
)

AES key schedule (encryption).

Parameters:
ctx AES context to be initialized
key encryption key
keysize must be 128, 192 or 256
Returns:
0 if successful, or POLARSSL_ERR_AES_INVALID_KEY_LENGTH

Definition at line 451 of file aes.c.

References aes_gen_tables(), aes_init_done, aes_context::buf, FSb, GET_UINT32_LE, aes_context::nr, POLARSSL_ERR_AES_INVALID_KEY_LENGTH, RCON, and aes_context::rk.

Referenced by aes_self_test(), aes_setkey_dec(), aes_setkey_enc_wrap(), block_cipher_df(), ctr_drbg_init_entropy_len(), ctr_drbg_update_internal(), ssl_ticket_keys_init(), test_suite_aes_decrypt_cfb128(), test_suite_aes_encrypt_cbc(), test_suite_aes_encrypt_cfb128(), and test_suite_aes_encrypt_ecb().


Variable Documentation

int aes_init_done = 0 [static]

Definition at line 368 of file aes.c.

Referenced by aes_setkey_enc().

const unsigned char aes_test_cbc_dec[3][16] [static]
Initial value:
{
    { 0xFA, 0xCA, 0x37, 0xE0, 0xB0, 0xC8, 0x53, 0x73,
      0xDF, 0x70, 0x6E, 0x73, 0xF7, 0xC9, 0xAF, 0x86 },
    { 0x5D, 0xF6, 0x78, 0xDD, 0x17, 0xBA, 0x4E, 0x75,
      0xB6, 0x17, 0x68, 0xC6, 0xAD, 0xEF, 0x7C, 0x7B },
    { 0x48, 0x04, 0xE1, 0x81, 0x8F, 0xE6, 0x29, 0x75,
      0x19, 0xA3, 0xE8, 0x8C, 0x57, 0x31, 0x04, 0x13 }
}

Definition at line 953 of file aes.c.

Referenced by aes_self_test().

const unsigned char aes_test_cbc_enc[3][16] [static]
Initial value:
{
    { 0x8A, 0x05, 0xFC, 0x5E, 0x09, 0x5A, 0xF4, 0x84,
      0x8A, 0x08, 0xD3, 0x28, 0xD3, 0x68, 0x8E, 0x3D },
    { 0x7B, 0xD9, 0x66, 0xD5, 0x3A, 0xD8, 0xC1, 0xBB,
      0x85, 0xD2, 0xAD, 0xFA, 0xE8, 0x7B, 0xB1, 0x04 },
    { 0xFE, 0x3C, 0x53, 0x65, 0x3E, 0x2F, 0x45, 0xB5,
      0x6F, 0xCD, 0x88, 0xB2, 0xCC, 0x89, 0x8F, 0xF0 }
}

Definition at line 963 of file aes.c.

Referenced by aes_self_test().

const unsigned char aes_test_cfb128_ct[3][64] [static]
Initial value:
{
    { 0x3B, 0x3F, 0xD9, 0x2E, 0xB7, 0x2D, 0xAD, 0x20,
      0x33, 0x34, 0x49, 0xF8, 0xE8, 0x3C, 0xFB, 0x4A,
      0xC8, 0xA6, 0x45, 0x37, 0xA0, 0xB3, 0xA9, 0x3F,
      0xCD, 0xE3, 0xCD, 0xAD, 0x9F, 0x1C, 0xE5, 0x8B,
      0x26, 0x75, 0x1F, 0x67, 0xA3, 0xCB, 0xB1, 0x40,
      0xB1, 0x80, 0x8C, 0xF1, 0x87, 0xA4, 0xF4, 0xDF,
      0xC0, 0x4B, 0x05, 0x35, 0x7C, 0x5D, 0x1C, 0x0E,
      0xEA, 0xC4, 0xC6, 0x6F, 0x9F, 0xF7, 0xF2, 0xE6 },
    { 0xCD, 0xC8, 0x0D, 0x6F, 0xDD, 0xF1, 0x8C, 0xAB,
      0x34, 0xC2, 0x59, 0x09, 0xC9, 0x9A, 0x41, 0x74,
      0x67, 0xCE, 0x7F, 0x7F, 0x81, 0x17, 0x36, 0x21,
      0x96, 0x1A, 0x2B, 0x70, 0x17, 0x1D, 0x3D, 0x7A,
      0x2E, 0x1E, 0x8A, 0x1D, 0xD5, 0x9B, 0x88, 0xB1,
      0xC8, 0xE6, 0x0F, 0xED, 0x1E, 0xFA, 0xC4, 0xC9,
      0xC0, 0x5F, 0x9F, 0x9C, 0xA9, 0x83, 0x4F, 0xA0,
      0x42, 0xAE, 0x8F, 0xBA, 0x58, 0x4B, 0x09, 0xFF },
    { 0xDC, 0x7E, 0x84, 0xBF, 0xDA, 0x79, 0x16, 0x4B,
      0x7E, 0xCD, 0x84, 0x86, 0x98, 0x5D, 0x38, 0x60,
      0x39, 0xFF, 0xED, 0x14, 0x3B, 0x28, 0xB1, 0xC8,
      0x32, 0x11, 0x3C, 0x63, 0x31, 0xE5, 0x40, 0x7B,
      0xDF, 0x10, 0x13, 0x24, 0x15, 0xE5, 0x4B, 0x92,
      0xA1, 0x3E, 0xD0, 0xA8, 0x26, 0x7A, 0xE2, 0xF9,
      0x75, 0xA3, 0x85, 0x74, 0x1A, 0xB9, 0xCE, 0xF8,
      0x20, 0x31, 0x62, 0x3D, 0x55, 0xB1, 0xE4, 0x71 }
}

Definition at line 1011 of file aes.c.

Referenced by aes_self_test().

const unsigned char aes_test_cfb128_iv[16] [static]
Initial value:
{
    0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
    0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F
}

Definition at line 993 of file aes.c.

Referenced by aes_self_test().

const unsigned char aes_test_cfb128_key[3][32] [static]
Initial value:
{
    { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6,
      0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C },
    { 0x8E, 0x73, 0xB0, 0xF7, 0xDA, 0x0E, 0x64, 0x52,
      0xC8, 0x10, 0xF3, 0x2B, 0x80, 0x90, 0x79, 0xE5,
      0x62, 0xF8, 0xEA, 0xD2, 0x52, 0x2C, 0x6B, 0x7B },
    { 0x60, 0x3D, 0xEB, 0x10, 0x15, 0xCA, 0x71, 0xBE,
      0x2B, 0x73, 0xAE, 0xF0, 0x85, 0x7D, 0x77, 0x81,
      0x1F, 0x35, 0x2C, 0x07, 0x3B, 0x61, 0x08, 0xD7,
      0x2D, 0x98, 0x10, 0xA3, 0x09, 0x14, 0xDF, 0xF4 }
}

Definition at line 980 of file aes.c.

Referenced by aes_self_test().

const unsigned char aes_test_cfb128_pt[64] [static]
Initial value:
{
    0x6B, 0xC1, 0xBE, 0xE2, 0x2E, 0x40, 0x9F, 0x96,
    0xE9, 0x3D, 0x7E, 0x11, 0x73, 0x93, 0x17, 0x2A,
    0xAE, 0x2D, 0x8A, 0x57, 0x1E, 0x03, 0xAC, 0x9C,
    0x9E, 0xB7, 0x6F, 0xAC, 0x45, 0xAF, 0x8E, 0x51,
    0x30, 0xC8, 0x1C, 0x46, 0xA3, 0x5C, 0xE4, 0x11,
    0xE5, 0xFB, 0xC1, 0x19, 0x1A, 0x0A, 0x52, 0xEF,
    0xF6, 0x9F, 0x24, 0x45, 0xDF, 0x4F, 0x9B, 0x17,
    0xAD, 0x2B, 0x41, 0x7B, 0xE6, 0x6C, 0x37, 0x10
}

Definition at line 999 of file aes.c.

Referenced by aes_self_test().

const unsigned char aes_test_ctr_ct[3][48] [static]
Initial value:
{
    { 0xE4, 0x09, 0x5D, 0x4F, 0xB7, 0xA7, 0xB3, 0x79,
      0x2D, 0x61, 0x75, 0xA3, 0x26, 0x13, 0x11, 0xB8 },
    { 0x51, 0x04, 0xA1, 0x06, 0x16, 0x8A, 0x72, 0xD9,
      0x79, 0x0D, 0x41, 0xEE, 0x8E, 0xDA, 0xD3, 0x88,
      0xEB, 0x2E, 0x1E, 0xFC, 0x46, 0xDA, 0x57, 0xC8,
      0xFC, 0xE6, 0x30, 0xDF, 0x91, 0x41, 0xBE, 0x28 },
    { 0xC1, 0xCF, 0x48, 0xA8, 0x9F, 0x2F, 0xFD, 0xD9,
      0xCF, 0x46, 0x52, 0xE9, 0xEF, 0xDB, 0x72, 0xD7,
      0x45, 0x40, 0xA4, 0x2B, 0xDE, 0x6D, 0x78, 0x36,
      0xD5, 0x9A, 0x5C, 0xEA, 0xAE, 0xF3, 0x10, 0x53,
      0x25, 0xB2, 0x07, 0x2F }
}

Definition at line 1084 of file aes.c.

Referenced by aes_self_test().

const unsigned char aes_test_ctr_key[3][16] [static]
Initial value:
{
    { 0xAE, 0x68, 0x52, 0xF8, 0x12, 0x10, 0x67, 0xCC,
      0x4B, 0xF7, 0xA5, 0x76, 0x55, 0x77, 0xF3, 0x9E },
    { 0x7E, 0x24, 0x06, 0x78, 0x17, 0xFA, 0xE0, 0xD7,
      0x43, 0xD6, 0xCE, 0x1F, 0x32, 0x53, 0x91, 0x63 },
    { 0x76, 0x91, 0xBE, 0x03, 0x5E, 0x50, 0x20, 0xA8,
      0xAC, 0x6E, 0x61, 0x85, 0x29, 0xF9, 0xA0, 0xDC }
}

Definition at line 1047 of file aes.c.

Referenced by aes_self_test().

const int aes_test_ctr_len[3] [static]
Initial value:
    { 16, 32, 36 }

Definition at line 1099 of file aes.c.

Referenced by aes_self_test().

const unsigned char aes_test_ctr_nonce_counter[3][16] [static]
Initial value:
{
    { 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00,
      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 },
    { 0x00, 0x6C, 0xB6, 0xDB, 0xC0, 0x54, 0x3B, 0x59,
      0xDA, 0x48, 0xD9, 0x0B, 0x00, 0x00, 0x00, 0x01 },
    { 0x00, 0xE0, 0x01, 0x7B, 0x27, 0x77, 0x7F, 0x3F,
      0x4A, 0x17, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x01 }
}

Definition at line 1057 of file aes.c.

Referenced by aes_self_test().

const unsigned char aes_test_ctr_pt[3][48] [static]
Initial value:
{
    { 0x53, 0x69, 0x6E, 0x67, 0x6C, 0x65, 0x20, 0x62,
      0x6C, 0x6F, 0x63, 0x6B, 0x20, 0x6D, 0x73, 0x67 },

    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
      0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
      0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
      0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F },

    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
      0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
      0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
      0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F,
      0x20, 0x21, 0x22, 0x23 }
}

Definition at line 1067 of file aes.c.

Referenced by aes_self_test().

const unsigned char aes_test_ecb_dec[3][16] [static]
Initial value:
{
    { 0x44, 0x41, 0x6A, 0xC2, 0xD1, 0xF5, 0x3C, 0x58,
      0x33, 0x03, 0x91, 0x7E, 0x6B, 0xE9, 0xEB, 0xE0 },
    { 0x48, 0xE3, 0x1E, 0x9E, 0x25, 0x67, 0x18, 0xF2,
      0x92, 0x29, 0x31, 0x9C, 0x19, 0xF1, 0x5B, 0xA4 },
    { 0x05, 0x8C, 0xCF, 0xFD, 0xBB, 0xCB, 0x38, 0x2D,
      0x1F, 0x6F, 0x56, 0x58, 0x5D, 0x8A, 0x4A, 0xDE }
}

Definition at line 932 of file aes.c.

Referenced by aes_self_test().

const unsigned char aes_test_ecb_enc[3][16] [static]
Initial value:
{
    { 0xC3, 0x4C, 0x05, 0x2C, 0xC0, 0xDA, 0x8D, 0x73,
      0x45, 0x1A, 0xFE, 0x5F, 0x03, 0xBE, 0x29, 0x7F },
    { 0xF3, 0xF6, 0x75, 0x2A, 0xE8, 0xD7, 0x83, 0x11,
      0x38, 0xF0, 0x41, 0x56, 0x06, 0x31, 0xB1, 0x14 },
    { 0x8B, 0x79, 0xEE, 0xCC, 0x93, 0xA0, 0xEE, 0x5D,
      0xFF, 0x30, 0xB4, 0xEA, 0x21, 0x63, 0x6D, 0xA4 }
}

Definition at line 942 of file aes.c.

Referenced by aes_self_test().

unsigned char FSb[256] [static]

Definition at line 341 of file aes.c.

Referenced by aes_crypt_ecb(), aes_gen_tables(), aes_setkey_dec(), and aes_setkey_enc().

uint32_t FT0[256] [static]

Definition at line 342 of file aes.c.

Referenced by aes_gen_tables().

uint32_t FT1[256] [static]

Definition at line 343 of file aes.c.

Referenced by aes_gen_tables().

uint32_t FT2[256] [static]

Definition at line 344 of file aes.c.

Referenced by aes_gen_tables().

uint32_t FT3[256] [static]

Definition at line 345 of file aes.c.

Referenced by aes_gen_tables().

uint32_t RCON[10] [static]

Definition at line 359 of file aes.c.

Referenced by aes_gen_tables(), and aes_setkey_enc().

unsigned char RSb[256] [static]

Definition at line 350 of file aes.c.

Referenced by aes_crypt_ecb(), and aes_gen_tables().

uint32_t RT0[256] [static]

Definition at line 351 of file aes.c.

Referenced by aes_gen_tables(), and aes_setkey_dec().

uint32_t RT1[256] [static]

Definition at line 352 of file aes.c.

Referenced by aes_gen_tables(), and aes_setkey_dec().

uint32_t RT2[256] [static]

Definition at line 353 of file aes.c.

Referenced by aes_gen_tables(), and aes_setkey_dec().

uint32_t RT3[256] [static]

Definition at line 354 of file aes.c.

Referenced by aes_gen_tables(), and aes_setkey_dec().


Generated on 9 Apr 2014 for PolarSSL v1.3.2 by  doxygen 1.6.1