MCUX CLNS
MCUX Crypto Library Normal Secure
 
Loading...
Searching...
No Matches
mcuxClEls_Cipher_Aes128_Cbc_Encrypt_example.c File Reference

Example AES-128 CBC encryption using the ELS (CLNS component mcuxClEls. More...

#include <mcuxClToolchain.h>
#include <mcuxClEls.h>
#include <mcuxCsslFlowProtection.h>
#include <mcuxClCore_FunctionIdentifiers.h>
#include <mcuxClCore_Examples.h>
#include <mcuxClExample_ELS_Helper.h>

Functions

 MCUXCLEXAMPLE_FUNCTION (mcuxClEls_Cipher_Aes128_Cbc_Encrypt_example)
 Performs AES-128 CBC encryption using mcuxClEls functions.
 

Variables

static ALIGNED uint8_t const aes128_input [MCUXCLELS_CIPHER_BLOCK_SIZE_AES]
 Plaintext input for the AES encryption.
 
static ALIGNED uint8_t aes128_iv [MCUXCLELS_CIPHER_BLOCK_SIZE_AES]
 IV of the AES encryption.
 
static ALIGNED uint8_t const aes128_expected_output [MCUXCLELS_CIPHER_BLOCK_SIZE_AES]
 Expected ciphertext output of the AES encryption.
 
static uint32_t const aes128_key [MCUXCLELS_CIPHER_KEY_SIZE_AES_128/sizeof(uint32_t)]
 Key for the AES encryption.
 
static ALIGNED uint8_t aes128_output [MCUXCLELS_CIPHER_BLOCK_SIZE_AES]
 Destination buffer to receive the ciphertext output of the AES encryption.
 

Detailed Description

Example AES-128 CBC encryption using the ELS (CLNS component mcuxClEls.

Function Documentation

◆ MCUXCLEXAMPLE_FUNCTION()

MCUXCLEXAMPLE_FUNCTION ( mcuxClEls_Cipher_Aes128_Cbc_Encrypt_example  )

Performs AES-128 CBC encryption using mcuxClEls functions.

Return values
MCUXCLEXAMPLE_STATUS_OKThe example code completed successfully
MCUXCLEXAMPLE_STATUS_ERRORThe example code failed

Initialize ELS, Enable the ELS

Disable the ELS

Variable Documentation

◆ aes128_input

ALIGNED uint8_t const aes128_input[MCUXCLELS_CIPHER_BLOCK_SIZE_AES]
static

Plaintext input for the AES encryption.

◆ aes128_iv

ALIGNED uint8_t aes128_iv[MCUXCLELS_CIPHER_BLOCK_SIZE_AES]
static

IV of the AES encryption.

Examples
mcuxClEls_Cipher_Aes128_Cbc_Encrypt_example.c.

◆ aes128_expected_output

ALIGNED uint8_t const aes128_expected_output[MCUXCLELS_CIPHER_BLOCK_SIZE_AES]
static

Expected ciphertext output of the AES encryption.

◆ aes128_key

uint32_t const aes128_key[MCUXCLELS_CIPHER_KEY_SIZE_AES_128/sizeof(uint32_t)]
static

Key for the AES encryption.

◆ aes128_output

ALIGNED uint8_t aes128_output[MCUXCLELS_CIPHER_BLOCK_SIZE_AES]
static

Destination buffer to receive the ciphertext output of the AES encryption.