|
Contiki 3.x
|
Driver for the cc2538 AES-CTR mode of the security core. More...
Files | |
| file | ctr.c |
| Implementation of the cc2538 AES-CTR driver. | |
| file | ctr.h |
| Header file for the cc2538 AES-CTR driver. | |
AES-CTR functions | |
| uint8_t | ctr_crypt_start (uint8_t encrypt, uint8_t key_area, const void *nonce, const void *ictr, uint8_t ctr_len, const void *mdata_in, void *mdata_out, uint16_t mdata_len, struct process *process) |
| Starts a CTR crypto operation. More... | |
| int8_t | ctr_crypt_check_status (void) |
| Checks the status of the CTR crypto operation. More... | |
Driver for the cc2538 AES-CTR mode of the security core.
| int8_t ctr_crypt_check_status | ( | void | ) |
Checks the status of the CTR crypto operation.
CRYPTO_PENDING if operation still pending, CRYPTO_SUCCESS if successful, or CRYPTO/AES/CTR error code ctr_crypt_start(). Definition at line 71 of file ctr.c.
References aes_auth_crypt_check_status(), aes_auth_crypt_get_result(), and NULL.
| uint8_t ctr_crypt_start | ( | uint8_t | encrypt, |
| uint8_t | key_area, | ||
| const void * | nonce, | ||
| const void * | ictr, | ||
| uint8_t | ctr_len, | ||
| const void * | mdata_in, | ||
| void * | mdata_out, | ||
| uint16_t | mdata_len, | ||
| struct process * | process | ||
| ) |
Starts a CTR crypto operation.
| encrypt | true to encrypt, or false to decrypt |
| key_area | Area in Key RAM where the key is stored (0 to AES_KEY_AREAS - 1) |
| nonce | Pointer to nonce (AES_IV_LEN - ctr_len octets), or NULL |
| ictr | Pointer to initial counter |
| ctr_len | Length of counter in octets (4, 8, 12, or 16) |
| mdata_in | Pointer to input message in SRAM |
| mdata_out | Pointer to output message in SRAM (may be mdata_in) |
| mdata_len | Length of message in octets |
| process | Process to be polled upon completion of the operation, or NULL |
CRYPTO_SUCCESS if successful, or CRYPTO/AES/CTR error code Definition at line 46 of file ctr.c.
References AES_AES_CTRL_CTR, AES_AES_CTRL_CTR_WIDTH_S, AES_AES_CTRL_DIRECTION_ENCRYPT, aes_auth_crypt_start(), and NULL.
1.8.6