Contiki-NG
Files

Driver for the cc2538 AES-ECB mode of the security core. More...

Files

file  ecb.c
 Implementation of the cc2538 AES-ECB driver.
 
file  ecb.h
 Header file for the cc2538 AES-ECB driver.
 

AES-ECB functions

uint8_t ecb_crypt_start (uint8_t encrypt, uint8_t key_area, const void *mdata_in, void *mdata_out, uint16_t mdata_len, struct process *process)
 Starts an ECB crypto operation. More...
 
int8_t ecb_crypt_check_status (void)
 Checks the status of the ECB crypto operation. More...
 

Detailed Description

Driver for the cc2538 AES-ECB mode of the security core.

Function Documentation

◆ ecb_crypt_check_status()

int8_t ecb_crypt_check_status ( void  )

Checks the status of the ECB crypto operation.

Returns
CRYPTO_PENDING if operation still pending, CRYPTO_SUCCESS if successful, or CRYPTO/AES/ECB error code
Note
This function must be called only after ecb_crypt_start().

Definition at line 58 of file ecb.c.

References aes_auth_crypt_check_status(), and aes_auth_crypt_get_result().

◆ ecb_crypt_start()

uint8_t ecb_crypt_start ( uint8_t  encrypt,
uint8_t  key_area,
const void *  mdata_in,
void *  mdata_out,
uint16_t  mdata_len,
struct process *  process 
)

Starts an ECB crypto operation.

Parameters
encrypttrue to encrypt, or false to decrypt
key_areaArea in Key RAM where the key is stored (0 to AES_KEY_AREAS - 1)
mdata_inPointer to input message in SRAM
mdata_outPointer to output message in SRAM (may be mdata_in)
mdata_lenLength of message in octets
processProcess to be polled upon completion of the operation, or NULL
Returns
CRYPTO_SUCCESS if successful, or CRYPTO/AES/ECB error code

Definition at line 45 of file ecb.c.