38 #ifndef __DRIVERLIB_AES_H__ 39 #define __DRIVERLIB_AES_H__ 61 #define AES_CFG_DIR_ENCRYPT 0x00000004 62 #define AES_CFG_DIR_DECRYPT 0x00000000 70 #define AES_CFG_KEY_SIZE_128BIT 0x00000008 71 #define AES_CFG_KEY_SIZE_192BIT 0x00000010 72 #define AES_CFG_KEY_SIZE_256BIT 0x00000018 80 #define AES_CFG_MODE_M 0x2007fe60 81 #define AES_CFG_MODE_ECB 0x00000000 82 #define AES_CFG_MODE_CBC 0x00000020 83 #define AES_CFG_MODE_CTR 0x00000040 84 #define AES_CFG_MODE_ICM 0x00000200 85 #define AES_CFG_MODE_CFB 0x00000400 86 #define AES_CFG_MODE_XTS_TWEAKJL \ 88 #define AES_CFG_MODE_XTS_K2IJL \ 90 #define AES_CFG_MODE_XTS_K2ILJ0 \ 92 #define AES_CFG_MODE_F8 0x00002000 93 #define AES_CFG_MODE_F9 0x20004000 94 #define AES_CFG_MODE_CBCMAC 0x20008000 95 #define AES_CFG_MODE_GCM_HLY0ZERO \ 97 #define AES_CFG_MODE_GCM_HLY0CALC \ 99 #define AES_CFG_MODE_GCM_HY0CALC \ 101 #define AES_CFG_MODE_CCM 0x20040040 110 #define AES_CFG_CTR_WIDTH_32 0x00000000 111 #define AES_CFG_CTR_WIDTH_64 0x00000080 112 #define AES_CFG_CTR_WIDTH_96 0x00000100 113 #define AES_CFG_CTR_WIDTH_128 0x00000180 122 #define AES_CFG_CCM_L_1 0x00000000 123 #define AES_CFG_CCM_L_2 0x00080000 124 #define AES_CFG_CCM_L_3 0x00100000 125 #define AES_CFG_CCM_L_4 0x00180000 126 #define AES_CFG_CCM_L_5 0x00200000 127 #define AES_CFG_CCM_L_6 0x00280000 128 #define AES_CFG_CCM_L_7 0x00300000 129 #define AES_CFG_CCM_L_8 0x00380000 138 #define AES_CFG_CCM_M_4 0x00400000 139 #define AES_CFG_CCM_M_6 0x00800000 140 #define AES_CFG_CCM_M_8 0x00c00000 141 #define AES_CFG_CCM_M_10 0x01000000 142 #define AES_CFG_CCM_M_12 0x01400000 143 #define AES_CFG_CCM_M_14 0x01800000 144 #define AES_CFG_CCM_M_16 0x01c00000 152 #define AES_INT_CONTEXT_IN 0x00000001 153 #define AES_INT_CONTEXT_OUT 0x00000008 154 #define AES_INT_DATA_IN 0x00000002 155 #define AES_INT_DATA_OUT 0x00000004 156 #define AES_INT_DMA_CONTEXT_IN 0x00010000 157 #define AES_INT_DMA_CONTEXT_OUT 0x00080000 158 #define AES_INT_DMA_DATA_IN 0x00020000 159 #define AES_INT_DMA_DATA_OUT 0x00040000 167 #define AES_DMA_DATA_IN 0x00000020 168 #define AES_DMA_DATA_OUT 0x00000040 169 #define AES_DMA_CONTEXT_IN 0x00000080 170 #define AES_DMA_CONTEXT_OUT 0x00000100 178 extern void AESConfigSet(uint32_t ui32Base, uint32_t ui32Config);
179 extern void AESDataRead(uint32_t ui32Base, uint32_t *pui32Dest);
182 uint32_t *pui32Dest, uint32_t ui32Length);
183 extern bool AESDataAuth(uint32_t ui32Base, uint32_t *pui32Src,
184 uint32_t ui32Length, uint32_t *pui32Tag);
186 uint32_t *pui32Dest, uint32_t ui32Length,
187 uint32_t *pui32AuthSrc,
188 uint32_t ui32AuthLength, uint32_t *pui32Tag);
189 extern void AESDataWrite(uint32_t ui32Base, uint32_t *pui32Src);
191 extern void AESDMADisable(uint32_t ui32Base, uint32_t ui32Flags);
192 extern void AESDMAEnable(uint32_t ui32Base, uint32_t ui32Flags);
193 extern void AESIntClear(uint32_t ui32Base, uint32_t ui32IntFlags);
194 extern void AESIntDisable(uint32_t ui32Base, uint32_t ui32IntFlags);
195 extern void AESIntEnable(uint32_t ui32Base, uint32_t ui32IntFlags);
196 extern void AESIntRegister(uint32_t ui32Base,
void (*pfnHandler)(
void));
197 extern uint32_t
AESIntStatus(uint32_t ui32Base,
bool bMasked);
199 extern void AESIVSet(uint32_t ui32Base, uint32_t *pui32IVdata);
200 extern void AESIVRead(uint32_t ui32Base, uint32_t *pui32IVdata);
201 extern void AESKey1Set(uint32_t ui32Base, uint32_t *pui32Key,
202 uint32_t ui32Keysize);
203 extern void AESKey2Set(uint32_t ui32Base, uint32_t *pui32Key,
204 uint32_t ui32Keysize);
205 extern void AESKey3Set(uint32_t ui32Base, uint32_t *pui32Key);
206 extern void AESLengthSet(uint32_t ui32Base, uint64_t ui64Length);
207 extern void AESReset(uint32_t ui32Base);
208 extern void AESTagRead(uint32_t ui32Base, uint32_t *pui32TagData);
219 #endif // __DRIVERLIB_AES_H__ void AESDMAEnable(uint32_t ui32Base, uint32_t ui32Flags)
Definition: aes.c:1243
void AESIntDisable(uint32_t ui32Base, uint32_t ui32IntFlags)
Definition: aes.c:1083
void AESKey1Set(uint32_t ui32Base, uint32_t *pui32Key, uint32_t ui32Keysize)
Definition: aes.c:266
void AESLengthSet(uint32_t ui32Base, uint64_t ui64Length)
Definition: aes.c:521
void AESIntRegister(uint32_t ui32Base, void(*pfnHandler)(void))
Definition: aes.c:1172
void AESConfigSet(uint32_t ui32Base, uint32_t ui32Config)
Definition: aes.c:180
void AESAuthLengthSet(uint32_t ui32Base, uint32_t ui32Length)
Definition: aes.c:558
void AESKey2Set(uint32_t ui32Base, uint32_t *pui32Key, uint32_t ui32Keysize)
Definition: aes.c:322
bool AESDataProcessAuth(uint32_t ui32Base, uint32_t *pui32Src, uint32_t *pui32Dest, uint32_t ui32Length, uint32_t *pui32AuthSrc, uint32_t ui32AuthLength, uint32_t *pui32Tag)
Definition: aes.c:889
void AESReset(uint32_t ui32Base)
Definition: aes.c:69
bool AESDataReadNonBlocking(uint32_t ui32Base, uint32_t *pui32Dest)
Definition: aes.c:587
void AESIntEnable(uint32_t ui32Base, uint32_t ui32IntFlags)
Definition: aes.c:1032
void AESDataRead(uint32_t ui32Base, uint32_t *pui32Dest)
Definition: aes.c:632
bool AESDataWriteNonBlocking(uint32_t ui32Base, uint32_t *pui32Src)
Definition: aes.c:671
void AESTagRead(uint32_t ui32Base, uint32_t *pui32TagData)
Definition: aes.c:474
void AESIntClear(uint32_t ui32Base, uint32_t ui32IntFlags)
Definition: aes.c:1130
void AESIVSet(uint32_t ui32Base, uint32_t *pui32IVdata)
Definition: aes.c:405
void AESDataWrite(uint32_t ui32Base, uint32_t *pui32Src)
Definition: aes.c:715
void AESIntUnregister(uint32_t ui32Base)
Definition: aes.c:1206
void AESDMADisable(uint32_t ui32Base, uint32_t ui32Flags)
Definition: aes.c:1280
void AESIVRead(uint32_t ui32Base, uint32_t *pui32IVdata)
Definition: aes.c:436
uint32_t AESIntStatus(uint32_t ui32Base, bool bMasked)
Definition: aes.c:973
bool AESDataAuth(uint32_t ui32Base, uint32_t *pui32Src, uint32_t ui32Length, uint32_t *pui32Tag)
Definition: aes.c:822
bool AESDataProcess(uint32_t ui32Base, uint32_t *pui32Src, uint32_t *pui32Dest, uint32_t ui32Length)
Definition: aes.c:763
void AESKey3Set(uint32_t ui32Base, uint32_t *pui32Key)
Definition: aes.c:375