
MC1322x SMAC Primitives
MC1322x SMAC Reference Manual, Rev. 1.7
3-18
Freescale Semiconductor
Arguments
u8CipherMode
The cipher mode to use (gCTRMode_c, gCBCMode_c or gCCMMode_c).
pCipherKey
A pointer to the 128 bits key.
pCtrValue
A pointer to the 128 counter value.
Returns
gFailTest_c
CipherEngineInit has not been executed or self test failed.
gFailOutOfRange_c
u8CipherMode is not a valid value.
gSuccess_c
Configuration action was performed
3.3.2
CipherEngineInit
Call the CipherEngineInit function to initiate the security module. This function allows carrying out a self
test to verify encryption engine operation.
Function
FuncReturn_t CipherEngineInit(void)
Returns
gFailTest_c
Cipher Engine Self Test failed.
gSuccess_c
Cipher Engine Self Test succeed.
Figure 3-1
shows the security CTR and CBC modes. CCM mode combines the CTR mode for protecting
the privacy of data and the CBC mode to generate a MAC to protect the data from unauthorized
modifications.
Figure 3-1. CTR and CBC Ciphering Modes