MCUX CLNS
MCUX Crypto Library Normal Secure
mcuxClEls_Cipher_Aes128_Ecb_Encrypt_example.c File Reference

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

#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_Ecb_Encrypt_example)
 Performs AES-128 ECB encryption using mcuxClEls functions. More...
 

Variables

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

Detailed Description

Example AES-128 ECB encryption using the ELS (CLNS component mcuxClEls)

Function Documentation

◆ MCUXCLEXAMPLE_FUNCTION()

MCUXCLEXAMPLE_FUNCTION ( mcuxClEls_Cipher_Aes128_Ecb_Encrypt_example  )

Performs AES-128 ECB 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

Examples
mcuxClEls_Cipher_Aes128_Ecb_Encrypt_example.c.

Variable Documentation

◆ aes128_input

uint8_t const aes128_input[MCUXCLELS_CIPHER_BLOCK_SIZE_AES]
static

Plaintext input for the AES encryption.

Examples
mcuxClEls_Cipher_Aes128_Ecb_Encrypt_example.c.

◆ aes128_expected_output

uint8_t const aes128_expected_output[MCUXCLELS_CIPHER_BLOCK_SIZE_AES]
static

Expected ciphertext output of the AES encryption.

Examples
mcuxClEls_Cipher_Aes128_Ecb_Encrypt_example.c.

◆ aes128_key

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

Key for the AES encryption.

Examples
mcuxClEls_Cipher_Aes128_Ecb_Encrypt_example.c.

◆ aes128_output

uint8_t aes128_output[MCUXCLELS_CIPHER_BLOCK_SIZE_AES]
static

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

Examples
mcuxClEls_Cipher_Aes128_Ecb_Encrypt_example.c.