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

Example AES-128 CBC encryption using the CSSv2 (CLNS component mcuxClCss. More...

#include <mcuxClCss.h>
#include <mcuxCsslFlowProtection.h>
#include <stdbool.h>

Functions

bool cipher_aes128_cbc_encrypt (void)
 Performs AES-128 CBC encryption using mcuxClCss functions. More...
 

Variables

static uint8_t const aes128_input [MCUXCLCSS_CIPHER_BLOCK_SIZE_AES]
 Plaintext input for the AES encryption. More...
 
static uint8_t aes128_iv [MCUXCLCSS_CIPHER_BLOCK_SIZE_AES]
 IV of the AES encryption. More...
 
static uint8_t const aes128_expected_output [MCUXCLCSS_CIPHER_BLOCK_SIZE_AES]
 Expected ciphertext output of the AES encryption. More...
 
static uint8_t const aes128_key [MCUXCLCSS_CIPHER_KEY_SIZE_AES_128]
 Key for the AES encryption. More...
 
static uint8_t aes128_output [MCUXCLCSS_CIPHER_BLOCK_SIZE_AES]
 Destination buffer to receive the ciphertext output of the AES encryption. More...
 

Detailed Description

Example AES-128 CBC encryption using the CSSv2 (CLNS component mcuxClCss.

Function Documentation

◆ cipher_aes128_cbc_encrypt()

bool cipher_aes128_cbc_encrypt ( void  )

Performs AES-128 CBC encryption using mcuxClCss functions.

Return values
trueThe example code completed successfully
falseThe example code failed
Examples
cipher_aes128_cbc_encrypt.c.

Variable Documentation

◆ aes128_input

uint8_t const aes128_input[MCUXCLCSS_CIPHER_BLOCK_SIZE_AES]
static

Plaintext input for the AES encryption.

Examples
cipher_aes128_cbc_encrypt.c.

◆ aes128_iv

uint8_t aes128_iv[MCUXCLCSS_CIPHER_BLOCK_SIZE_AES]
static

IV of the AES encryption.

Examples
cipher_aes128_cbc_encrypt.c.

◆ aes128_expected_output

uint8_t const aes128_expected_output[MCUXCLCSS_CIPHER_BLOCK_SIZE_AES]
static

Expected ciphertext output of the AES encryption.

Examples
cipher_aes128_cbc_encrypt.c.

◆ aes128_key

uint8_t const aes128_key[MCUXCLCSS_CIPHER_KEY_SIZE_AES_128]
static

Key for the AES encryption.

Examples
cipher_aes128_cbc_encrypt.c.

◆ aes128_output

uint8_t aes128_output[MCUXCLCSS_CIPHER_BLOCK_SIZE_AES]
static

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

Examples
cipher_aes128_cbc_encrypt.c.