RetroArch
Macros | Functions | Variables
aes.c File Reference
#include "mbedtls/config.h"
#include <string.h>
#include "mbedtls/aes.h"
#include "mbedtls/padlock.h"
#include "mbedtls/aesni.h"
#include "mbedtls/platform.h"
#include "arc4_alt.h"
Include dependency graph for aes.c:

Macros

#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)
 
void mbedtls_aes_init (mbedtls_aes_context *ctx)
 Initialize AES context. More...
 
void mbedtls_aes_free (mbedtls_aes_context *ctx)
 Clear AES context. More...
 
int mbedtls_aes_setkey_enc (mbedtls_aes_context *ctx, const unsigned char *key, unsigned int keybits)
 AES key schedule (encryption) More...
 
int mbedtls_aes_setkey_dec (mbedtls_aes_context *ctx, const unsigned char *key, unsigned int keybits)
 AES key schedule (decryption) More...
 
int mbedtls_internal_aes_encrypt (mbedtls_aes_context *ctx, const unsigned char input[16], unsigned char output[16])
 Internal AES block encryption function (Only exposed to allow overriding it, see MBEDTLS_AES_ENCRYPT_ALT) More...
 
void mbedtls_aes_encrypt (mbedtls_aes_context *ctx, const unsigned char input[16], unsigned char output[16])
 Deprecated internal AES block encryption function without return value. More...
 
int mbedtls_internal_aes_decrypt (mbedtls_aes_context *ctx, const unsigned char input[16], unsigned char output[16])
 Internal AES block decryption function (Only exposed to allow overriding it, see MBEDTLS_AES_DECRYPT_ALT) More...
 
void mbedtls_aes_decrypt (mbedtls_aes_context *ctx, const unsigned char input[16], unsigned char output[16])
 Deprecated internal AES block decryption function without return value. More...
 
int mbedtls_aes_crypt_ecb (mbedtls_aes_context *ctx, int mode, const unsigned char input[16], unsigned char output[16])
 AES-ECB block encryption/decryption. More...
 
int mbedtls_aes_crypt_cbc (mbedtls_aes_context *ctx, int mode, size_t length, unsigned char iv[16], const unsigned char *input, unsigned char *output)
 AES-CBC buffer encryption/decryption Length should be a multiple of the block size (16 bytes) More...
 
int mbedtls_aes_crypt_cfb128 (mbedtls_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. More...
 
int mbedtls_aes_crypt_cfb8 (mbedtls_aes_context *ctx, int mode, size_t length, unsigned char iv[16], const unsigned char *input, unsigned char *output)
 AES-CFB8 buffer encryption/decryption. More...
 
int mbedtls_aes_crypt_ctr (mbedtls_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. More...
 
int mbedtls_aes_self_test (int verbose)
 Checkup routine. More...
 

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]
 

Macro Definition Documentation

◆ AES_FROUND

#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 ]; \
}
static uint32_t FT1[256]
Definition: aes.c:359
static uint32_t FT3[256]
Definition: aes.c:361
static uint32_t FT0[256]
Definition: aes.c:358

◆ AES_RROUND

#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 ]; \
}
static uint32_t RT3[256]
Definition: aes.c:370
static uint32_t RT0[256]
Definition: aes.c:367
static uint32_t RT1[256]
Definition: aes.c:368

◆ GET_UINT32_LE

#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 ); \
}
GLboolean GLboolean GLboolean b
Definition: glext.h:6844
GLdouble n
Definition: glext.h:8396
unsigned int uint32_t
Definition: stdint.h:126

◆ MUL

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

◆ PUT_UINT32_LE

#define PUT_UINT32_LE (   n,
  b,
 
)
Value:
{ \
(b)[(i) ] = (unsigned char) ( ( (n) ) & 0xFF ); \
(b)[(i) + 1] = (unsigned char) ( ( (n) >> 8 ) & 0xFF ); \
(b)[(i) + 2] = (unsigned char) ( ( (n) >> 16 ) & 0xFF ); \
(b)[(i) + 3] = (unsigned char) ( ( (n) >> 24 ) & 0xFF ); \
}
GLboolean GLboolean GLboolean b
Definition: glext.h:6844
GLdouble n
Definition: glext.h:8396

◆ ROTL8

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

◆ XTIME

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

Function Documentation

◆ aes_gen_tables()

static void aes_gen_tables ( void  )
static
Here is the caller graph for this function:

◆ mbedtls_aes_crypt_cbc()

int mbedtls_aes_crypt_cbc ( mbedtls_aes_context ctx,
int  mode,
size_t  length,
unsigned char  iv[16],
const unsigned char *  input,
unsigned char *  output 
)

AES-CBC buffer encryption/decryption Length should be a multiple of the block size (16 bytes)

Note
Upon exit, the content of the IV is updated so that you can call the function same function again on the following block(s) of data and get the same result as if it was encrypted in one call. This allows a "streaming" usage. If on the other hand you need to retain the contents of the IV, you should either save it manually or use the cipher module instead.
Parameters
ctxAES context
modeMBEDTLS_AES_ENCRYPT or MBEDTLS_AES_DECRYPT
lengthlength of the input data
ivinitialization vector (updated after use)
inputbuffer holding the input data
outputbuffer holding the output data
Returns
0 if successful, or MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mbedtls_aes_crypt_cfb128()

int mbedtls_aes_crypt_cfb128 ( mbedtls_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 mbedtls_aes_setkey_enc() for both MBEDTLS_AES_ENCRYPT and MBEDTLS_AES_DECRYPT.

Note
Upon exit, the content of the IV is updated so that you can call the function same function again on the following block(s) of data and get the same result as if it was encrypted in one call. This allows a "streaming" usage. If on the other hand you need to retain the contents of the IV, you should either save it manually or use the cipher module instead.
Parameters
ctxAES context
modeMBEDTLS_AES_ENCRYPT or MBEDTLS_AES_DECRYPT
lengthlength of the input data
iv_offoffset in IV (updated after use)
ivinitialization vector (updated after use)
inputbuffer holding the input data
outputbuffer holding the output data
Returns
0 if successful
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mbedtls_aes_crypt_cfb8()

int mbedtls_aes_crypt_cfb8 ( mbedtls_aes_context ctx,
int  mode,
size_t  length,
unsigned char  iv[16],
const unsigned char *  input,
unsigned char *  output 
)

AES-CFB8 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 mbedtls_aes_setkey_enc() for both MBEDTLS_AES_ENCRYPT and MBEDTLS_AES_DECRYPT.

Note
Upon exit, the content of the IV is updated so that you can call the function same function again on the following block(s) of data and get the same result as if it was encrypted in one call. This allows a "streaming" usage. If on the other hand you need to retain the contents of the IV, you should either save it manually or use the cipher module instead.
Parameters
ctxAES context
modeMBEDTLS_AES_ENCRYPT or MBEDTLS_AES_DECRYPT
lengthlength of the input data
ivinitialization vector (updated after use)
inputbuffer holding the input data
outputbuffer holding the output data
Returns
0 if successful
Here is the call graph for this function:

◆ mbedtls_aes_crypt_ctr()

int mbedtls_aes_crypt_ctr ( mbedtls_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 mbedtls_aes_setkey_enc() for both MBEDTLS_AES_ENCRYPT and MBEDTLS_AES_DECRYPT.

Parameters
ctxAES context
lengthThe length of the data
nc_offThe 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_counterThe 128-bit nonce and counter.
stream_blockThe saved stream-block for resuming. Is overwritten by the function.
inputThe input data stream
outputThe output data stream
Returns
0 if successful
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mbedtls_aes_crypt_ecb()

int mbedtls_aes_crypt_ecb ( mbedtls_aes_context ctx,
int  mode,
const unsigned char  input[16],
unsigned char  output[16] 
)

AES-ECB block encryption/decryption.

Parameters
ctxAES context
modeMBEDTLS_AES_ENCRYPT or MBEDTLS_AES_DECRYPT
input16-byte input block
output16-byte output block
Returns
0 if successful
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mbedtls_aes_decrypt()

void mbedtls_aes_decrypt ( mbedtls_aes_context ctx,
const unsigned char  input[16],
unsigned char  output[16] 
)

Deprecated internal AES block decryption function without return value.

Deprecated:
Superseded by mbedtls_aes_decrypt_ext() in 2.5.0
Parameters
ctxAES context
inputCiphertext block
outputOutput (plaintext) block
Here is the call graph for this function:

◆ mbedtls_aes_encrypt()

void mbedtls_aes_encrypt ( mbedtls_aes_context ctx,
const unsigned char  input[16],
unsigned char  output[16] 
)

Deprecated internal AES block encryption function without return value.

Deprecated:
Superseded by mbedtls_aes_encrypt_ext() in 2.5.0
Parameters
ctxAES context
inputPlaintext block
outputOutput (ciphertext) block
Here is the call graph for this function:

◆ mbedtls_aes_free()

void mbedtls_aes_free ( mbedtls_aes_context ctx)

Clear AES context.

Parameters
ctxAES context to be cleared
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mbedtls_aes_init()

void mbedtls_aes_init ( mbedtls_aes_context ctx)

Initialize AES context.

Parameters
ctxAES context to be initialized
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mbedtls_aes_self_test()

int mbedtls_aes_self_test ( int  verbose)

Checkup routine.

Returns
0 if successful, or 1 if the test failed
Here is the call graph for this function:

◆ mbedtls_aes_setkey_dec()

int mbedtls_aes_setkey_dec ( mbedtls_aes_context ctx,
const unsigned char *  key,
unsigned int  keybits 
)

AES key schedule (decryption)

Parameters
ctxAES context to be initialized
keydecryption key
keybitsmust be 128, 192 or 256
Returns
0 if successful, or MBEDTLS_ERR_AES_INVALID_KEY_LENGTH
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mbedtls_aes_setkey_enc()

int mbedtls_aes_setkey_enc ( mbedtls_aes_context ctx,
const unsigned char *  key,
unsigned int  keybits 
)

AES key schedule (encryption)

Parameters
ctxAES context to be initialized
keyencryption key
keybitsmust be 128, 192 or 256
Returns
0 if successful, or MBEDTLS_ERR_AES_INVALID_KEY_LENGTH
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mbedtls_internal_aes_decrypt()

int mbedtls_internal_aes_decrypt ( mbedtls_aes_context ctx,
const unsigned char  input[16],
unsigned char  output[16] 
)

Internal AES block decryption function (Only exposed to allow overriding it, see MBEDTLS_AES_DECRYPT_ALT)

Parameters
ctxAES context
inputCiphertext block
outputOutput (plaintext) block
Returns
0 if successful
Here is the caller graph for this function:

◆ mbedtls_internal_aes_encrypt()

int mbedtls_internal_aes_encrypt ( mbedtls_aes_context ctx,
const unsigned char  input[16],
unsigned char  output[16] 
)

Internal AES block encryption function (Only exposed to allow overriding it, see MBEDTLS_AES_ENCRYPT_ALT)

Parameters
ctxAES context
inputPlaintext block
outputOutput (ciphertext) block
Returns
0 if successful
Here is the caller graph for this function:

Variable Documentation

◆ aes_init_done

int aes_init_done = 0
static

◆ aes_test_cbc_dec

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 }
}

◆ aes_test_cbc_enc

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 }
}

◆ aes_test_cfb128_ct

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 }
}

◆ aes_test_cfb128_iv

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
}

◆ aes_test_cfb128_key

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 }
}

◆ aes_test_cfb128_pt

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
}

◆ aes_test_ctr_ct

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 }
}

◆ aes_test_ctr_key

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 }
}

◆ aes_test_ctr_len

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

◆ aes_test_ctr_nonce_counter

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 }
}

◆ aes_test_ctr_pt

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 }
}

◆ aes_test_ecb_dec

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 }
}

◆ aes_test_ecb_enc

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 }
}

◆ FSb

unsigned char FSb[256]
static

◆ FT0

uint32_t FT0[256]
static

◆ FT1

uint32_t FT1[256]
static

◆ FT2

uint32_t FT2[256]
static

◆ FT3

uint32_t FT3[256]
static

◆ RCON

uint32_t RCON[10]
static

◆ RSb

unsigned char RSb[256]
static

◆ RT0

uint32_t RT0[256]
static

◆ RT1

uint32_t RT1[256]
static

◆ RT2

uint32_t RT2[256]
static

◆ RT3

uint32_t RT3[256]
static