Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

arm_hal_aes.h File Reference

arm_hal_aes.h File Reference

AES Platform API. More...

Go to the source code of this file.

Functions

arm_aes_context_t * arm_aes_start (const uint8_t key[__static 16])
 Set the AES key.
void arm_aes_encrypt (arm_aes_context_t *aes_context, const uint8_t src[__static 16], uint8_t dst[__static 16])
 This function performs dst=E[preset key,src] (Simple ECB block).
void arm_aes_finish (arm_aes_context_t *aes_context)
 Finish AES operations.

Detailed Description

AES Platform API.

Definition in file arm_hal_aes.h.


Function Documentation

void arm_aes_encrypt ( arm_aes_context_t *  aes_context,
const uint8_t  src[__static 16],
uint8_t  dst[__static 16] 
)

This function performs dst=E[preset key,src] (Simple ECB block).

This function performs a single-block AES encryption, using the preset key. It is called between arm_aes_start() and arm_aes_finish(). Note that src and dst pointers may be equal.

Parameters:
aes_contextPointer for allocated
srcpointer to 128-bit plaintext in
dstpointer for 128-bit ciphertext out
void arm_aes_finish ( arm_aes_context_t *  aes_context )

Finish AES operations.

This function is called to terminate a series of AES operations. It may be a no-op, or it may disable AES hardware. Use of the preset key is no longer valid after this call and aes context will be freed.

Definition at line 98 of file aes_mbedtls_adapter.c.

arm_aes_context_t* arm_aes_start ( const uint8_t  key[__static 16] )

Set the AES key.

This function sets the 128-bit AES key that will be used for future calls to arm_aes_encrypt(). The key must be copied by the function. Function must return unique pointer for every started AES context.

Parameters:
keypointer to 128-bit AES key
Returns:
Pointer to aes context
NULL if aes context allocation fail