SimpleLink API Reference Manual  1.11.1
 All Data Structures Files Functions Variables Typedefs Macros Groups
security.h File Reference
#include "nvmem.h"

Go to the source code of this file.

Macros

#define AES128_KEY_SIZE   16
 

Functions

void aes_encrypt (unsigned char *state, unsigned char *key)
 AES128 encryption: Given AES128 key and 16 bytes plain text, cipher text of 16 bytes is computed. The AES implementation is in mode ECB (Electronic Code Book).
 
void aes_decrypt (unsigned char *state, unsigned char *key)
 AES128 decryption: Given AES128 key and 16 bytes cipher text, plain text of 16 bytes is computed The AES implementation is in mode ECB (Electronic Code Book).
 
signed long aes_read_key (unsigned char *key)
 Reads AES128 key from EEPROM Reads the AES128 key from fileID #12 in EEPROM returns an error if the key does not exist.
 
signed long aes_write_key (unsigned char *key)
 writes AES128 key from EEPROM Writes the AES128 key to fileID #12 in EEPROM
 

Macro Definition Documentation

#define AES128_KEY_SIZE   16

Definition at line 51 of file security.h.

Function Documentation

void aes_encrypt ( unsigned char *  state,
unsigned char *  key 
)

AES128 encryption: Given AES128 key and 16 bytes plain text, cipher text of 16 bytes is computed. The AES implementation is in mode ECB (Electronic Code Book).

aes_encrypt

Parameters
[in]keyAES128 key of size 16 bytes
in\out]state 16 bytes of plain text and cipher text
Returns
none
void aes_decrypt ( unsigned char *  state,
unsigned char *  key 
)

AES128 decryption: Given AES128 key and 16 bytes cipher text, plain text of 16 bytes is computed The AES implementation is in mode ECB (Electronic Code Book).

aes_decrypt

Parameters
[in]keyAES128 key of size 16 bytes
in\out]state 16 bytes of cipher text and plain text
Returns
none
signed long aes_read_key ( unsigned char *  key)

Reads AES128 key from EEPROM Reads the AES128 key from fileID #12 in EEPROM returns an error if the key does not exist.

aes_read_key

Parameters
[out]keyAES128 key of size 16 bytes
Returns
on success 0, error otherwise.
signed long aes_write_key ( unsigned char *  key)

writes AES128 key from EEPROM Writes the AES128 key to fileID #12 in EEPROM

aes_write_key

Parameters
[out]keyAES128 key of size 16 bytes
Returns
on success 0, error otherwise.