NXP Reader Library  v17.1.0.2535

Software implementation of the AES algorithm. More...

Collaboration diagram for Cipher : AES:

Modules

 Internals
 Software implementation of the AES algorithm.
 

Functions

phStatus_t phCryptoSym_Sw_Aes_KeyExpansion (phCryptoSym_Sw_DataParams_t *pDataParams, const uint8_t *pKey, uint8_t bNkCurrent, uint8_t bNkMax)
 Performs the key Expansion of the AES key (128, 192, 256 bits). More...
 
phStatus_t phCryptoSym_Sw_Aes_EncryptBlock (phCryptoSym_Sw_DataParams_t *pDataParams, uint8_t PH_CRYTOSYM_SW_FAST_RAM *pBlock, uint8_t bNumRounds)
 Performs a encryption of an AES Block (16 byte) using an AES Key. More...
 
phStatus_t phCryptoSym_Sw_Aes_DecryptBlock (phCryptoSym_Sw_DataParams_t *pDataParams, uint8_t PH_CRYTOSYM_SW_FAST_RAM *pBlock, uint8_t bNumRounds)
 Performs a decryption of an AES Block (16 byte) using an AES Key. More...
 

Detailed Description

Software implementation of the AES algorithm.

Function Documentation

◆ phCryptoSym_Sw_Aes_KeyExpansion()

phStatus_t phCryptoSym_Sw_Aes_KeyExpansion ( phCryptoSym_Sw_DataParams_t pDataParams,
const uint8_t pKey,
uint8_t  bNkCurrent,
uint8_t  bNkMax 
)

Performs the key Expansion of the AES key (128, 192, 256 bits).

According to the size of the key specified, the pDataParams key array is filled up in the following sequence: pKey || pRk1 ..... ||pRkN

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]pDataParams[In] Pointer to this layers parameter structure.
[in]pKey[In] Key array to be loaded into the AES engine.
[in]bNkCurrent[In] Size of the key provided (in 32 bit granularity).
[in]bNkMax[In] Total amount of 32 bit Values to be loaded.

◆ phCryptoSym_Sw_Aes_EncryptBlock()

phStatus_t phCryptoSym_Sw_Aes_EncryptBlock ( phCryptoSym_Sw_DataParams_t pDataParams,
uint8_t PH_CRYTOSYM_SW_FAST_RAM pBlock,
uint8_t  bNumRounds 
)

Performs a encryption of an AES Block (16 byte) using an AES Key.

The key needs to be provided in the pDataParams structure. By specifying the bNumRounds, the amount of AES rounds to be executed is defined.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]pDataParams[In] Pointer to this layers parameter structure.
[in,out]pBlock[InOut] Block to be enciphered in place.
[in]bNumRounds[In] Number of rounds according to AES algorithm.

◆ phCryptoSym_Sw_Aes_DecryptBlock()

phStatus_t phCryptoSym_Sw_Aes_DecryptBlock ( phCryptoSym_Sw_DataParams_t pDataParams,
uint8_t PH_CRYTOSYM_SW_FAST_RAM pBlock,
uint8_t  bNumRounds 
)

Performs a decryption of an AES Block (16 byte) using an AES Key.

The key needs to be provided in the pDataParams structure. By specifying the bNumRounds, the amount of AES rounds to be executed is defined.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]pDataParams[In] Pointer to this layers parameter structure.
[in,out]pBlock[InOut] Block to be deciphered in place.
[in]bNumRounds[In] Number of rounds according to AES algorithm.