MCUX CLNS
MCUX Crypto Library Normal Secure
 
Loading...
Searching...
No Matches
mcuxClEls_Cipher.h File Reference

ELS header for symmetric ciphers. More...

#include <mcuxClConfig.h>
#include <mcuxClEls_Common.h>

Go to the source code of this file.

Data Structures

union  mcuxClEls_CipherOption_t
 Command option bit field for mcuxClEls_Cipher_Async. More...
 

Macros

#define MCUXCLELS_CIPHER_ENCRYPT
 Set this option at mcuxClEls_CipherOption_t.dcrpt to perform an encryption.
 
#define MCUXCLELS_CIPHER_DECRYPT
 Set this option at mcuxClEls_CipherOption_t.dcrpt to perform a decryption.
 
#define MCUXCLELS_CIPHER_STATE_OUT_ENABLE
 Set this option at mcuxClEls_CipherOption_t.cphsoe to export the internal ELS state to pIV.
 
#define MCUXCLELS_CIPHER_STATE_OUT_DISABLE
 Set this option at mcuxClEls_CipherOption_t.cphsoe to not export the internal ELS state.
 
#define MCUXCLELS_CIPHER_STATE_IN_ENABLE
 Set this option at mcuxClEls_CipherOption_t.cphsie to import an external ELS state from pIV.
 
#define MCUXCLELS_CIPHER_STATE_IN_DISABLE
 Set this option at mcuxClEls_CipherOption_t.cphsie to not import an external ELS state.
 
#define MCUXCLELS_CIPHER_EXTERNAL_KEY
 Set this option at mcuxClEls_CipherOption_t.extkey to use a key located in CPU memory provided by pKey.
 
#define MCUXCLELS_CIPHER_INTERNAL_KEY
 Set this option at mcuxClEls_CipherOption_t.extkey to use a key located in ELS keystore privded by keyIdx.
 
#define MCUXCLELS_CIPHERPARAM_ALGORITHM_AES_ECB
 Set this option at mcuxClEls_CipherOption_t.cphmde to use AES engine in Electornic Code Book (ECB) mode.
 
#define MCUXCLELS_CIPHERPARAM_ALGORITHM_AES_CBC
 Set this option at mcuxClEls_CipherOption_t.cphmde to use AES engine in Cipher Block Chaining (CBC) mode.
 
#define MCUXCLELS_CIPHERPARAM_ALGORITHM_AES_CTR
 Set this option at mcuxClEls_CipherOption_t.cphmde to use AES engine in Counter (CTR) mode.
 
#define MCUXCLELS_CIPHER_BLOCK_SIZE_AES
 
#define MCUXCLELS_CIPHER_KEY_SIZE_AES_128
 Size of an AES128 key: 128 bit (16 bytes)
 
#define MCUXCLELS_CIPHER_KEY_SIZE_AES_192
 Size of an AES192 key: 192 bit (24 bytes)
 
#define MCUXCLELS_CIPHER_KEY_SIZE_AES_256
 Size of an AES192 key: 256 bit (32 bytes)
 

Functions

MCUXCLELS_API mcuxClEls_Status_t mcuxClEls_Cipher_Async (mcuxClEls_CipherOption_t options, mcuxClEls_KeyIndex_t keyIdx, uint8_t const *pKey, size_t keyLength, uint8_t const *pInput, size_t inputLength, uint8_t *pIV, uint8_t *pOutput)
 Performs AES encryption/decryption.
 

Detailed Description

ELS header for symmetric ciphers.

This header exposes functions that enable using the ELS for symmetric encryption/decryption. The cipher algorithm supported by ELS is AES in the following modes:

  • Electronic Code Book (ECB) mode,
  • Cipher Block Chaining (CBC) mode, and
  • Counter (CTR) mode. Supported key sizes are 128, 192, and 256 bits.