Broadcom Logo WICED™ v3.1.0 - API Reference Guide WICED Logo
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups

AES functions. More...

Functions

void aes_setkey_enc (aes_context_t *ctx, const unsigned char *key, int32_t keysize)
 AES key schedule (encryption) More...
 
void aes_setkey_dec (aes_context_t *ctx, const unsigned char *key, int32_t keysize)
 AES key schedule (decryption) More...
 
void aes_crypt_ecb (aes_context_t *ctx, int32_t mode, const unsigned char input[16], unsigned char output[16])
 AES-ECB block encryption/decryption. More...
 
void aes_crypt_cbc (aes_context_t *ctx, int32_t mode, int32_t length, unsigned char iv[16], const unsigned char *input, unsigned char *output)
 AES-CBC buffer encryption/decryption. More...
 
void aes_crypt_cfb128 (aes_context_t *ctx, int32_t mode, int32_t length, int32_t *iv_off, unsigned char iv[16], const unsigned char *input, unsigned char *output)
 AES-CFB128 buffer encryption/decryption. More...
 
int aes_ccm_encrypt (uint32_t *rk, const size_t key_len, const uint8_t *nonce, const size_t aad_len, const uint8_t *aad, const size_t data_len, const uint8_t *ptxt, uint8_t *ctxt, uint8_t *mac)
 
int aes_ccm_decrypt (uint32_t *rk, const size_t key_len, const uint8_t *nonce, const size_t aad_len, const uint8_t *aad, const size_t data_len, const uint8_t *ctxt, uint8_t *ptxt)
 

Detailed Description

AES functions.

Function Documentation

int aes_ccm_decrypt ( uint32_t *  rk,
const size_t  key_len,
const uint8_t *  nonce,
const size_t  aad_len,
const uint8_t *  aad,
const size_t  data_len,
const uint8_t *  ctxt,
uint8_t *  ptxt 
)
Parameters
rk
key_len
nonce
aad_len
aad
data_len
ctxt
ptxt
int aes_ccm_encrypt ( uint32_t *  rk,
const size_t  key_len,
const uint8_t *  nonce,
const size_t  aad_len,
const uint8_t *  aad,
const size_t  data_len,
const uint8_t *  ptxt,
uint8_t *  ctxt,
uint8_t *  mac 
)
Parameters
rk
key_len
nonce
aad_len
aad
data_len
ptxt
ctxt
mac
void aes_crypt_cbc ( aes_context_t *  ctx,
int32_t  mode,
int32_t  length,
unsigned char  iv[16],
const unsigned char *  input,
unsigned char *  output 
)

AES-CBC buffer encryption/decryption.

Parameters
ctxAES context
modeAES_ENCRYPT or AES_DECRYPT
lengthlength of the input data
ivinitialization vector (updated after use)
inputbuffer holding the input data
outputbuffer holding the output data
void aes_crypt_cfb128 ( aes_context_t *  ctx,
int32_t  mode,
int32_t  length,
int32_t *  iv_off,
unsigned char  iv[16],
const unsigned char *  input,
unsigned char *  output 
)

AES-CFB128 buffer encryption/decryption.

Parameters
ctxAES context
modeAES_ENCRYPT or 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
void aes_crypt_ecb ( aes_context_t *  ctx,
int32_t  mode,
const unsigned char  input[16],
unsigned char  output[16] 
)

AES-ECB block encryption/decryption.

Parameters
ctxAES context
modeAES_ENCRYPT or AES_DECRYPT
input16-byte input block
output16-byte output block
void aes_setkey_dec ( aes_context_t *  ctx,
const unsigned char *  key,
int32_t  keysize 
)

AES key schedule (decryption)

Parameters
ctxAES context to be initialized
keydecryption key
keysizemust be 128, 192 or 256
void aes_setkey_enc ( aes_context_t *  ctx,
const unsigned char *  key,
int32_t  keysize 
)

AES key schedule (encryption)

Parameters
ctxAES context to be initialized
keyencryption key
keysizemust be 128, 192 or 256