40 #ifndef __DRIVERLIB_AES_H__ 41 #define __DRIVERLIB_AES_H__ 60 #define AES_CFG_DIR_ENCRYPT 0x00000004 61 #define AES_CFG_DIR_DECRYPT 0x00000000 69 #define AES_CFG_KEY_SIZE_128BIT 0x00000008 70 #define AES_CFG_KEY_SIZE_192BIT 0x00000010 71 #define AES_CFG_KEY_SIZE_256BIT 0x00000018 79 #define AES_CFG_MODE_M 0x2007fe60 80 #define AES_CFG_MODE_ECB 0x00000000 81 #define AES_CFG_MODE_CBC 0x00000020 82 #define AES_CFG_MODE_CTR 0x00000040 83 #define AES_CFG_MODE_ICM 0x00000200 84 #define AES_CFG_MODE_CFB 0x00000400 85 #define AES_CFG_MODE_XTS_TWEAKJL \ 87 #define AES_CFG_MODE_XTS_K2IJL \ 89 #define AES_CFG_MODE_XTS_K2ILJ0 \ 91 #define AES_CFG_MODE_F8 0x00002000 92 #define AES_CFG_MODE_F9 0x20004000 93 #define AES_CFG_MODE_CBCMAC 0x20008000 94 #define AES_CFG_MODE_GCM_HLY0ZERO \ 96 #define AES_CFG_MODE_GCM_HLY0CALC \ 98 #define AES_CFG_MODE_GCM_HY0CALC \ 100 #define AES_CFG_MODE_CCM 0x20040040 109 #define AES_CFG_CTR_WIDTH_32 0x00000000 110 #define AES_CFG_CTR_WIDTH_64 0x00000080 111 #define AES_CFG_CTR_WIDTH_96 0x00000100 112 #define AES_CFG_CTR_WIDTH_128 0x00000180 121 #define AES_CFG_CCM_L_2 0x00080000 122 #define AES_CFG_CCM_L_4 0x00180000 123 #define AES_CFG_CCM_L_8 0x00380000 132 #define AES_CFG_CCM_M_4 0x00400000 133 #define AES_CFG_CCM_M_6 0x00800000 134 #define AES_CFG_CCM_M_8 0x00c00000 135 #define AES_CFG_CCM_M_10 0x01000000 136 #define AES_CFG_CCM_M_12 0x01400000 137 #define AES_CFG_CCM_M_14 0x01800000 138 #define AES_CFG_CCM_M_16 0x01c00000 146 #define AES_INT_CONTEXT_IN 0x00000001 147 #define AES_INT_CONTEXT_OUT 0x00000008 148 #define AES_INT_DATA_IN 0x00000002 149 #define AES_INT_DATA_OUT 0x00000004 150 #define AES_INT_DMA_CONTEXT_IN 0x00010000 151 #define AES_INT_DMA_CONTEXT_OUT 0x00020000 152 #define AES_INT_DMA_DATA_IN 0x00040000 153 #define AES_INT_DMA_DATA_OUT 0x00080000 161 #define AES_DMA_DATA_IN 0x00000040 162 #define AES_DMA_DATA_OUT 0x00000020 163 #define AES_DMA_CONTEXT_IN 0x00000080 164 #define AES_DMA_CONTEXT_OUT 0x00000100 171 extern void AESConfigSet(uint32_t ui32Base, uint32_t ui32Config);
172 extern void AESKey1Set(uint32_t ui32Base, uint8_t *pui8Key,
173 uint32_t ui32Keysize);
174 extern void AESKey2Set(uint32_t ui32Base, uint8_t *pui8Key,
175 uint32_t ui32Keysize);
176 extern void AESKey3Set(uint32_t ui32Base, uint8_t *pui8Key);
177 extern void AESIVSet(uint32_t ui32Base, uint8_t *pui8IVdata);
178 extern void AESIVGet(uint32_t ui32Base, uint8_t *pui8IVdata);
179 extern void AESTagRead(uint32_t ui32Base, uint8_t *pui8TagData);
184 extern void AESDataRead(uint32_t ui32Base, uint8_t *pui8Dest,
188 extern void AESDataWrite(uint32_t ui32Base, uint8_t *pui8Src,
192 uint32_t ui32Length);
193 extern bool AESDataMAC(uint32_t ui32Base, uint8_t *pui8Src,
197 uint8_t *pui8Dest, uint32_t ui32Length,
198 uint8_t *pui8AuthSrc, uint32_t ui32AuthLength,
200 extern uint32_t
AESIntStatus(uint32_t ui32Base,
bool bMasked);
201 extern void AESIntEnable(uint32_t ui32Base, uint32_t ui32IntFlags);
202 extern void AESIntDisable(uint32_t ui32Base, uint32_t ui32IntFlags);
203 extern void AESIntClear(uint32_t ui32Base, uint32_t ui32IntFlags);
204 extern void AESIntRegister(uint32_t ui32Base,
void(*pfnHandler)(
void));
206 extern void AESDMAEnable(uint32_t ui32Base, uint32_t ui32Flags);
207 extern void AESDMADisable(uint32_t ui32Base, uint32_t ui32Flags);
218 #endif // __DRIVERLIB_AES_H__ void AESKey2Set(uint32_t ui32Base, uint8_t *pui8Key, uint32_t ui32Keysize)
Definition: aes.c:281
void AESConfigSet(uint32_t ui32Base, uint32_t ui32Config)
Definition: aes.c:144
void AESDMADisable(uint32_t ui32Base, uint32_t ui32Flags)
Definition: aes.c:1338
void AESIVGet(uint32_t ui32Base, uint8_t *pui8IVdata)
Definition: aes.c:394
void AESIntDisable(uint32_t ui32Base, uint32_t ui32IntFlags)
Definition: aes.c:1145
void AESIntEnable(uint32_t ui32Base, uint32_t ui32IntFlags)
Definition: aes.c:1096
void AESKey1Set(uint32_t ui32Base, uint8_t *pui8Key, uint32_t ui32Keysize)
Definition: aes.c:225
void AESIntUnregister(uint32_t ui32Base)
Definition: aes.c:1264
bool AESDataMAC(uint32_t ui32Base, uint8_t *pui8Src, uint32_t ui32Length, uint8_t *pui8Tag)
Definition: aes.c:861
bool AESDataProcessAE(uint32_t ui32Base, uint8_t *pui8Src, uint8_t *pui8Dest, uint32_t ui32Length, uint8_t *pui8AuthSrc, uint32_t ui32AuthLength, uint8_t *pui8Tag)
Definition: aes.c:951
void AESIntRegister(uint32_t ui32Base, void(*pfnHandler)(void))
Definition: aes.c:1230
void AESKey3Set(uint32_t ui32Base, uint8_t *pui8Key)
Definition: aes.c:334
void AESAuthDataLengthSet(uint32_t ui32Base, uint32_t ui32Length)
Definition: aes.c:501
void AESDataLengthSet(uint32_t ui32Base, uint64_t ui64Length)
Definition: aes.c:464
bool AESDataReadNonBlocking(uint32_t ui32Base, uint8_t *pui8Dest, uint8_t ui8Length)
Definition: aes.c:532
void AESDataRead(uint32_t ui32Base, uint8_t *pui8Dest, uint8_t ui8Length)
Definition: aes.c:597
void AESIntClear(uint32_t ui32Base, uint32_t ui32IntFlags)
Definition: aes.c:1190
bool AESDataProcess(uint32_t ui32Base, uint8_t *pui8Src, uint8_t *pui8Dest, uint32_t ui32Length)
Definition: aes.c:782
void AESDMAEnable(uint32_t ui32Base, uint32_t ui32Flags)
Definition: aes.c:1301
uint32_t AESIntStatus(uint32_t ui32Base, bool bMasked)
Definition: aes.c:1041
void AESIVSet(uint32_t ui32Base, uint8_t *pui8IVdata)
Definition: aes.c:364
void AESDataWrite(uint32_t ui32Base, uint8_t *pui8Src, uint8_t ui8Length)
Definition: aes.c:719
bool AESDataWriteNonBlocking(uint32_t ui32Base, uint8_t *pui8Src, uint8_t ui8Length)
Definition: aes.c:655
void AESTagRead(uint32_t ui32Base, uint8_t *pui8TagData)
Definition: aes.c:424