Lines Matching refs:Init

423   assert_param(IS_CRYP_KEYSIZE(hcryp->Init.KeySize));  in HAL_CRYP_Init()
424 assert_param(IS_CRYP_DATATYPE(hcryp->Init.DataType)); in HAL_CRYP_Init()
425 assert_param(IS_CRYP_ALGORITHM(hcryp->Init.Algorithm)); in HAL_CRYP_Init()
426 assert_param(IS_CRYP_INIT(hcryp->Init.KeyIVConfigSkip)); in HAL_CRYP_Init()
459 hcryp->Init.DataType | hcryp->Init.KeySize | hcryp->Init.Algorithm); in HAL_CRYP_Init()
558 hcryp->Init.DataType = pConf->DataType; in HAL_CRYP_SetConfig()
559 hcryp->Init.pKey = pConf->pKey; in HAL_CRYP_SetConfig()
560 hcryp->Init.Algorithm = pConf->Algorithm; in HAL_CRYP_SetConfig()
561 hcryp->Init.KeySize = pConf->KeySize; in HAL_CRYP_SetConfig()
562 hcryp->Init.pInitVect = pConf->pInitVect; in HAL_CRYP_SetConfig()
563 hcryp->Init.Header = pConf->Header; in HAL_CRYP_SetConfig()
564 hcryp->Init.HeaderSize = pConf->HeaderSize; in HAL_CRYP_SetConfig()
565 hcryp->Init.B0 = pConf->B0; in HAL_CRYP_SetConfig()
566 hcryp->Init.DataWidthUnit = pConf->DataWidthUnit; in HAL_CRYP_SetConfig()
567 hcryp->Init.HeaderWidthUnit = pConf->HeaderWidthUnit; in HAL_CRYP_SetConfig()
568 hcryp->Init.KeyIVConfigSkip = pConf->KeyIVConfigSkip; in HAL_CRYP_SetConfig()
572 hcryp->Init.DataType | hcryp->Init.KeySize | hcryp->Init.Algorithm); in HAL_CRYP_SetConfig()
624 pConf->DataType = hcryp->Init.DataType; in HAL_CRYP_GetConfig()
625 pConf->pKey = hcryp->Init.pKey; in HAL_CRYP_GetConfig()
626 pConf->Algorithm = hcryp->Init.Algorithm; in HAL_CRYP_GetConfig()
627 pConf->KeySize = hcryp->Init.KeySize ; in HAL_CRYP_GetConfig()
628 pConf->pInitVect = hcryp->Init.pInitVect; in HAL_CRYP_GetConfig()
629 pConf->Header = hcryp->Init.Header ; in HAL_CRYP_GetConfig()
630 pConf->HeaderSize = hcryp->Init.HeaderSize; in HAL_CRYP_GetConfig()
631 pConf->B0 = hcryp->Init.B0; in HAL_CRYP_GetConfig()
632 pConf->DataWidthUnit = hcryp->Init.DataWidthUnit; in HAL_CRYP_GetConfig()
633 pConf->HeaderWidthUnit = hcryp->Init.HeaderWidthUnit; in HAL_CRYP_GetConfig()
634 pConf->KeyIVConfigSkip = hcryp->Init.KeyIVConfigSkip; in HAL_CRYP_GetConfig()
935 if (hcryp->Init.DataWidthUnit == CRYP_DATAWIDTHUNIT_WORD) in HAL_CRYP_Encrypt()
958 hcryp->Instance->K1LR = *(uint32_t *)(hcryp->Init.pKey); in HAL_CRYP_Encrypt()
959 hcryp->Instance->K1RR = *(uint32_t *)(hcryp->Init.pKey + 1); in HAL_CRYP_Encrypt()
960 if ((hcryp->Init.Algorithm == CRYP_TDES_ECB) || (hcryp->Init.Algorithm == CRYP_TDES_CBC)) in HAL_CRYP_Encrypt()
962 hcryp->Instance->K2LR = *(uint32_t *)(hcryp->Init.pKey + 2); in HAL_CRYP_Encrypt()
963 hcryp->Instance->K2RR = *(uint32_t *)(hcryp->Init.pKey + 3); in HAL_CRYP_Encrypt()
964 hcryp->Instance->K3LR = *(uint32_t *)(hcryp->Init.pKey + 4); in HAL_CRYP_Encrypt()
965 hcryp->Instance->K3RR = *(uint32_t *)(hcryp->Init.pKey + 5); in HAL_CRYP_Encrypt()
969 if ((hcryp->Init.Algorithm == CRYP_DES_CBC) || (hcryp->Init.Algorithm == CRYP_TDES_CBC)) in HAL_CRYP_Encrypt()
971 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in HAL_CRYP_Encrypt()
972 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in HAL_CRYP_Encrypt()
1065 if (hcryp->Init.DataWidthUnit == CRYP_DATAWIDTHUNIT_WORD) in HAL_CRYP_Decrypt()
1088 hcryp->Instance->K1LR = *(uint32_t *)(hcryp->Init.pKey); in HAL_CRYP_Decrypt()
1089 hcryp->Instance->K1RR = *(uint32_t *)(hcryp->Init.pKey + 1); in HAL_CRYP_Decrypt()
1090 if ((hcryp->Init.Algorithm == CRYP_TDES_ECB) || (hcryp->Init.Algorithm == CRYP_TDES_CBC)) in HAL_CRYP_Decrypt()
1092 hcryp->Instance->K2LR = *(uint32_t *)(hcryp->Init.pKey + 2); in HAL_CRYP_Decrypt()
1093 hcryp->Instance->K2RR = *(uint32_t *)(hcryp->Init.pKey + 3); in HAL_CRYP_Decrypt()
1094 hcryp->Instance->K3LR = *(uint32_t *)(hcryp->Init.pKey + 4); in HAL_CRYP_Decrypt()
1095 hcryp->Instance->K3RR = *(uint32_t *)(hcryp->Init.pKey + 5); in HAL_CRYP_Decrypt()
1099 if ((hcryp->Init.Algorithm == CRYP_DES_CBC) || (hcryp->Init.Algorithm == CRYP_TDES_CBC)) in HAL_CRYP_Decrypt()
1101 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in HAL_CRYP_Decrypt()
1102 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in HAL_CRYP_Decrypt()
1194 if (hcryp->Init.DataWidthUnit == CRYP_DATAWIDTHUNIT_WORD) in HAL_CRYP_Encrypt_IT()
1217 hcryp->Instance->K1LR = *(uint32_t *)(hcryp->Init.pKey); in HAL_CRYP_Encrypt_IT()
1218 hcryp->Instance->K1RR = *(uint32_t *)(hcryp->Init.pKey + 1); in HAL_CRYP_Encrypt_IT()
1219 if ((hcryp->Init.Algorithm == CRYP_TDES_ECB) || (hcryp->Init.Algorithm == CRYP_TDES_CBC)) in HAL_CRYP_Encrypt_IT()
1221 hcryp->Instance->K2LR = *(uint32_t *)(hcryp->Init.pKey + 2); in HAL_CRYP_Encrypt_IT()
1222 hcryp->Instance->K2RR = *(uint32_t *)(hcryp->Init.pKey + 3); in HAL_CRYP_Encrypt_IT()
1223 hcryp->Instance->K3LR = *(uint32_t *)(hcryp->Init.pKey + 4); in HAL_CRYP_Encrypt_IT()
1224 hcryp->Instance->K3RR = *(uint32_t *)(hcryp->Init.pKey + 5); in HAL_CRYP_Encrypt_IT()
1227 if ((hcryp->Init.Algorithm == CRYP_DES_CBC) || (hcryp->Init.Algorithm == CRYP_TDES_CBC)) in HAL_CRYP_Encrypt_IT()
1229 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in HAL_CRYP_Encrypt_IT()
1230 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in HAL_CRYP_Encrypt_IT()
1311 if (hcryp->Init.DataWidthUnit == CRYP_DATAWIDTHUNIT_WORD) in HAL_CRYP_Decrypt_IT()
1334 hcryp->Instance->K1LR = *(uint32_t *)(hcryp->Init.pKey); in HAL_CRYP_Decrypt_IT()
1335 hcryp->Instance->K1RR = *(uint32_t *)(hcryp->Init.pKey + 1); in HAL_CRYP_Decrypt_IT()
1336 if ((hcryp->Init.Algorithm == CRYP_TDES_ECB) || (hcryp->Init.Algorithm == CRYP_TDES_CBC)) in HAL_CRYP_Decrypt_IT()
1338 hcryp->Instance->K2LR = *(uint32_t *)(hcryp->Init.pKey + 2); in HAL_CRYP_Decrypt_IT()
1339 hcryp->Instance->K2RR = *(uint32_t *)(hcryp->Init.pKey + 3); in HAL_CRYP_Decrypt_IT()
1340 hcryp->Instance->K3LR = *(uint32_t *)(hcryp->Init.pKey + 4); in HAL_CRYP_Decrypt_IT()
1341 hcryp->Instance->K3RR = *(uint32_t *)(hcryp->Init.pKey + 5); in HAL_CRYP_Decrypt_IT()
1345 if ((hcryp->Init.Algorithm == CRYP_DES_CBC) || (hcryp->Init.Algorithm == CRYP_TDES_CBC)) in HAL_CRYP_Decrypt_IT()
1347 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in HAL_CRYP_Decrypt_IT()
1348 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in HAL_CRYP_Decrypt_IT()
1431 if (hcryp->Init.DataWidthUnit == CRYP_DATAWIDTHUNIT_WORD) in HAL_CRYP_Encrypt_DMA()
1454 hcryp->Instance->K1LR = *(uint32_t *)(hcryp->Init.pKey); in HAL_CRYP_Encrypt_DMA()
1455 hcryp->Instance->K1RR = *(uint32_t *)(hcryp->Init.pKey + 1); in HAL_CRYP_Encrypt_DMA()
1456 if ((hcryp->Init.Algorithm == CRYP_TDES_ECB) || (hcryp->Init.Algorithm == CRYP_TDES_CBC)) in HAL_CRYP_Encrypt_DMA()
1458 hcryp->Instance->K2LR = *(uint32_t *)(hcryp->Init.pKey + 2); in HAL_CRYP_Encrypt_DMA()
1459 hcryp->Instance->K2RR = *(uint32_t *)(hcryp->Init.pKey + 3); in HAL_CRYP_Encrypt_DMA()
1460 hcryp->Instance->K3LR = *(uint32_t *)(hcryp->Init.pKey + 4); in HAL_CRYP_Encrypt_DMA()
1461 hcryp->Instance->K3RR = *(uint32_t *)(hcryp->Init.pKey + 5); in HAL_CRYP_Encrypt_DMA()
1465 if ((hcryp->Init.Algorithm == CRYP_DES_CBC) || (hcryp->Init.Algorithm == CRYP_TDES_CBC)) in HAL_CRYP_Encrypt_DMA()
1467 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in HAL_CRYP_Encrypt_DMA()
1468 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in HAL_CRYP_Encrypt_DMA()
1487 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in HAL_CRYP_Encrypt_DMA()
1507 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in HAL_CRYP_Encrypt_DMA()
1510 if (hcryp->Init.Algorithm != CRYP_AES_ECB) in HAL_CRYP_Encrypt_DMA()
1512 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in HAL_CRYP_Encrypt_DMA()
1513 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1U); in HAL_CRYP_Encrypt_DMA()
1514 hcryp->Instance->IV1LR = *(uint32_t *)(hcryp->Init.pInitVect + 2U); in HAL_CRYP_Encrypt_DMA()
1515 hcryp->Instance->IV1RR = *(uint32_t *)(hcryp->Init.pInitVect + 3U); in HAL_CRYP_Encrypt_DMA()
1585 if (hcryp->Init.DataWidthUnit == CRYP_DATAWIDTHUNIT_WORD) in HAL_CRYP_Decrypt_DMA()
1608 hcryp->Instance->K1LR = *(uint32_t *)(hcryp->Init.pKey); in HAL_CRYP_Decrypt_DMA()
1609 hcryp->Instance->K1RR = *(uint32_t *)(hcryp->Init.pKey + 1); in HAL_CRYP_Decrypt_DMA()
1610 if ((hcryp->Init.Algorithm == CRYP_TDES_ECB) || (hcryp->Init.Algorithm == CRYP_TDES_CBC)) in HAL_CRYP_Decrypt_DMA()
1612 hcryp->Instance->K2LR = *(uint32_t *)(hcryp->Init.pKey + 2); in HAL_CRYP_Decrypt_DMA()
1613 hcryp->Instance->K2RR = *(uint32_t *)(hcryp->Init.pKey + 3); in HAL_CRYP_Decrypt_DMA()
1614 hcryp->Instance->K3LR = *(uint32_t *)(hcryp->Init.pKey + 4); in HAL_CRYP_Decrypt_DMA()
1615 hcryp->Instance->K3RR = *(uint32_t *)(hcryp->Init.pKey + 5); in HAL_CRYP_Decrypt_DMA()
1619 if ((hcryp->Init.Algorithm == CRYP_DES_CBC) || (hcryp->Init.Algorithm == CRYP_TDES_CBC)) in HAL_CRYP_Decrypt_DMA()
1621 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in HAL_CRYP_Decrypt_DMA()
1622 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in HAL_CRYP_Decrypt_DMA()
1708 if ((hcryp->Init.Algorithm == CRYP_DES_ECB) || (hcryp->Init.Algorithm == CRYP_DES_CBC) || in HAL_CRYP_IRQHandler()
1709 (hcryp->Init.Algorithm == CRYP_TDES_ECB) || (hcryp->Init.Algorithm == CRYP_TDES_CBC)) in HAL_CRYP_IRQHandler()
1713 else if ((hcryp->Init.Algorithm == CRYP_AES_ECB) || (hcryp->Init.Algorithm == CRYP_AES_CBC) || in HAL_CRYP_IRQHandler()
1714 (hcryp->Init.Algorithm == CRYP_AES_CTR)) in HAL_CRYP_IRQHandler()
1719 …else if ((hcryp->Init.Algorithm == CRYP_AES_GCM) || (hcryp->Init.Algorithm == CRYP_CR_ALGOMODE_AES… in HAL_CRYP_IRQHandler()
2004 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AES_Encrypt()
2024 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Encrypt()
2026 if (hcryp->Init.Algorithm != CRYP_AES_ECB) in CRYP_AES_Encrypt()
2029 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AES_Encrypt()
2030 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1U); in CRYP_AES_Encrypt()
2031 hcryp->Instance->IV1LR = *(uint32_t *)(hcryp->Init.pInitVect + 2U); in CRYP_AES_Encrypt()
2032 hcryp->Instance->IV1RR = *(uint32_t *)(hcryp->Init.pInitVect + 3U); in CRYP_AES_Encrypt()
2072 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AES_Encrypt_IT()
2092 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Encrypt_IT()
2094 if (hcryp->Init.Algorithm != CRYP_AES_ECB) in CRYP_AES_Encrypt_IT()
2097 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AES_Encrypt_IT()
2098 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1U); in CRYP_AES_Encrypt_IT()
2099 hcryp->Instance->IV1LR = *(uint32_t *)(hcryp->Init.pInitVect + 2U); in CRYP_AES_Encrypt_IT()
2100 hcryp->Instance->IV1RR = *(uint32_t *)(hcryp->Init.pInitVect + 3U); in CRYP_AES_Encrypt_IT()
2139 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AES_Decrypt()
2159 if (hcryp->Init.Algorithm != CRYP_AES_CTR) /*ECB or CBC*/ in CRYP_AES_Decrypt()
2165 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt()
2185 MODIFY_REG(hcryp->Instance->CR, CRYP_CR_ALGOMODE, hcryp->Init.Algorithm); in CRYP_AES_Decrypt()
2190 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt()
2194 if (hcryp->Init.Algorithm != CRYP_AES_ECB) in CRYP_AES_Decrypt()
2197 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AES_Decrypt()
2198 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AES_Decrypt()
2199 hcryp->Instance->IV1LR = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AES_Decrypt()
2200 hcryp->Instance->IV1RR = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AES_Decrypt()
2241 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AES_Decrypt_IT()
2261 if (hcryp->Init.Algorithm != CRYP_AES_CTR) in CRYP_AES_Decrypt_IT()
2267 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt_IT()
2290 MODIFY_REG(hcryp->Instance->CR, CRYP_CR_ALGOMODE, hcryp->Init.Algorithm); in CRYP_AES_Decrypt_IT()
2295 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt_IT()
2299 if (hcryp->Init.Algorithm != CRYP_AES_ECB) in CRYP_AES_Decrypt_IT()
2302 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AES_Decrypt_IT()
2303 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AES_Decrypt_IT()
2304 hcryp->Instance->IV1LR = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AES_Decrypt_IT()
2305 hcryp->Instance->IV1RR = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AES_Decrypt_IT()
2341 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AES_Decrypt_DMA()
2361 if (hcryp->Init.Algorithm != CRYP_AES_CTR) in CRYP_AES_Decrypt_DMA()
2367 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt_DMA()
2393 MODIFY_REG(hcryp->Instance->CR, CRYP_CR_ALGOMODE, hcryp->Init.Algorithm); in CRYP_AES_Decrypt_DMA()
2398 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt_DMA()
2401 if (hcryp->Init.Algorithm != CRYP_AES_ECB) in CRYP_AES_Decrypt_DMA()
2404 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AES_Decrypt_DMA()
2405 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AES_Decrypt_DMA()
2406 hcryp->Instance->IV1LR = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AES_Decrypt_DMA()
2407 hcryp->Instance->IV1RR = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AES_Decrypt_DMA()
2491 …if (((temp_cr_algodir == CRYP_OPERATINGMODE_ENCRYPT) && (hcryp->Init.Algorithm == CRYP_AES_GCM)) || in CRYP_DMAOutCplt()
2492 … ((temp_cr_algodir == CRYP_OPERATINGMODE_DECRYPT) && (hcryp->Init.Algorithm == CRYP_AES_CCM))) in CRYP_DMAOutCplt()
2564 if ((hcryp->Init.Algorithm & CRYP_AES_GCM) != CRYP_AES_GCM) in CRYP_DMAOutCplt()
2862 hcryp->Instance->K0LR = *(uint32_t *)(hcryp->Init.pKey); in CRYP_SetKey()
2863 hcryp->Instance->K0RR = *(uint32_t *)(hcryp->Init.pKey + 1); in CRYP_SetKey()
2864 hcryp->Instance->K1LR = *(uint32_t *)(hcryp->Init.pKey + 2); in CRYP_SetKey()
2865 hcryp->Instance->K1RR = *(uint32_t *)(hcryp->Init.pKey + 3); in CRYP_SetKey()
2866 hcryp->Instance->K2LR = *(uint32_t *)(hcryp->Init.pKey + 4); in CRYP_SetKey()
2867 hcryp->Instance->K2RR = *(uint32_t *)(hcryp->Init.pKey + 5); in CRYP_SetKey()
2868 hcryp->Instance->K3LR = *(uint32_t *)(hcryp->Init.pKey + 6); in CRYP_SetKey()
2869 hcryp->Instance->K3RR = *(uint32_t *)(hcryp->Init.pKey + 7); in CRYP_SetKey()
2872 hcryp->Instance->K1LR = *(uint32_t *)(hcryp->Init.pKey); in CRYP_SetKey()
2873 hcryp->Instance->K1RR = *(uint32_t *)(hcryp->Init.pKey + 1); in CRYP_SetKey()
2874 hcryp->Instance->K2LR = *(uint32_t *)(hcryp->Init.pKey + 2); in CRYP_SetKey()
2875 hcryp->Instance->K2RR = *(uint32_t *)(hcryp->Init.pKey + 3); in CRYP_SetKey()
2876 hcryp->Instance->K3LR = *(uint32_t *)(hcryp->Init.pKey + 4); in CRYP_SetKey()
2877 hcryp->Instance->K3RR = *(uint32_t *)(hcryp->Init.pKey + 5); in CRYP_SetKey()
2880 hcryp->Instance->K2LR = *(uint32_t *)(hcryp->Init.pKey); in CRYP_SetKey()
2881 hcryp->Instance->K2RR = *(uint32_t *)(hcryp->Init.pKey + 1); in CRYP_SetKey()
2882 hcryp->Instance->K3LR = *(uint32_t *)(hcryp->Init.pKey + 2); in CRYP_SetKey()
2883 hcryp->Instance->K3RR = *(uint32_t *)(hcryp->Init.pKey + 3); in CRYP_SetKey()
2909 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AESGCM_Process()
2942 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESGCM_Process()
2945 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AESGCM_Process()
2946 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AESGCM_Process()
2947 hcryp->Instance->IV1LR = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AESGCM_Process()
2948 hcryp->Instance->IV1RR = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AESGCM_Process()
3155 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AESGCM_Process_IT()
3189 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESGCM_Process_IT()
3192 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AESGCM_Process_IT()
3193 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AESGCM_Process_IT()
3194 hcryp->Instance->IV1LR = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AESGCM_Process_IT()
3195 hcryp->Instance->IV1RR = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AESGCM_Process_IT()
3252 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AESGCM_Process_DMA()
3285 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESGCM_Process_DMA()
3288 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AESGCM_Process_DMA()
3289 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AESGCM_Process_DMA()
3290 hcryp->Instance->IV1LR = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AESGCM_Process_DMA()
3291 hcryp->Instance->IV1RR = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AESGCM_Process_DMA()
3477 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AESCCM_Process()
3510 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESCCM_Process()
3513 hcryp->Instance->IV0LR = (hcryp->Init.B0[0]) & CRYP_CCM_CTR1_0; in CRYP_AESCCM_Process()
3514 hcryp->Instance->IV0RR = hcryp->Init.B0[1]; in CRYP_AESCCM_Process()
3515 hcryp->Instance->IV1LR = hcryp->Init.B0[2]; in CRYP_AESCCM_Process()
3516 hcryp->Instance->IV1RR = (hcryp->Init.B0[3] & CRYP_CCM_CTR1_1) | CRYP_CCM_CTR1_2; in CRYP_AESCCM_Process()
3524 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0); in CRYP_AESCCM_Process()
3525 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 1); in CRYP_AESCCM_Process()
3526 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 2); in CRYP_AESCCM_Process()
3527 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 3); in CRYP_AESCCM_Process()
3533 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0); in CRYP_AESCCM_Process()
3534 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 1); in CRYP_AESCCM_Process()
3535 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 2); in CRYP_AESCCM_Process()
3536 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 3); in CRYP_AESCCM_Process()
3540 if (hcryp->Init.DataType == CRYP_BYTE_SWAP) in CRYP_AESCCM_Process()
3542 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0)); in CRYP_AESCCM_Process()
3543 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0 + 1)); in CRYP_AESCCM_Process()
3544 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0 + 2)); in CRYP_AESCCM_Process()
3545 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0 + 3)); in CRYP_AESCCM_Process()
3547 else if (hcryp->Init.DataType == CRYP_HALFWORD_SWAP) in CRYP_AESCCM_Process()
3549 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0), 16); in CRYP_AESCCM_Process()
3550 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0 + 1), 16); in CRYP_AESCCM_Process()
3551 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0 + 2), 16); in CRYP_AESCCM_Process()
3552 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0 + 3), 16); in CRYP_AESCCM_Process()
3554 else if (hcryp->Init.DataType == CRYP_BIT_SWAP) in CRYP_AESCCM_Process()
3556 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0)); in CRYP_AESCCM_Process()
3557 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0 + 1)); in CRYP_AESCCM_Process()
3558 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0 + 2)); in CRYP_AESCCM_Process()
3559 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0 + 3)); in CRYP_AESCCM_Process()
3563 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0); in CRYP_AESCCM_Process()
3564 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 1); in CRYP_AESCCM_Process()
3565 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 2); in CRYP_AESCCM_Process()
3566 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 3); in CRYP_AESCCM_Process()
3773 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AESCCM_Process_IT()
3807 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESCCM_Process_IT()
3810 hcryp->Instance->IV0LR = (hcryp->Init.B0[0]) & CRYP_CCM_CTR1_0; in CRYP_AESCCM_Process_IT()
3811 hcryp->Instance->IV0RR = hcryp->Init.B0[1]; in CRYP_AESCCM_Process_IT()
3812 hcryp->Instance->IV1LR = hcryp->Init.B0[2]; in CRYP_AESCCM_Process_IT()
3813 hcryp->Instance->IV1RR = (hcryp->Init.B0[3] & CRYP_CCM_CTR1_1) | CRYP_CCM_CTR1_2; in CRYP_AESCCM_Process_IT()
3824 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0); in CRYP_AESCCM_Process_IT()
3825 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 1); in CRYP_AESCCM_Process_IT()
3826 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 2); in CRYP_AESCCM_Process_IT()
3827 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 3); in CRYP_AESCCM_Process_IT()
3832 if (hcryp->Init.DataType == CRYP_BYTE_SWAP) in CRYP_AESCCM_Process_IT()
3834 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0)); in CRYP_AESCCM_Process_IT()
3835 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0 + 1)); in CRYP_AESCCM_Process_IT()
3836 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0 + 2)); in CRYP_AESCCM_Process_IT()
3837 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0 + 3)); in CRYP_AESCCM_Process_IT()
3839 else if (hcryp->Init.DataType == CRYP_HALFWORD_SWAP) in CRYP_AESCCM_Process_IT()
3841 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0), 16); in CRYP_AESCCM_Process_IT()
3842 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0 + 1), 16); in CRYP_AESCCM_Process_IT()
3843 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0 + 2), 16); in CRYP_AESCCM_Process_IT()
3844 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0 + 3), 16); in CRYP_AESCCM_Process_IT()
3846 else if (hcryp->Init.DataType == CRYP_BIT_SWAP) in CRYP_AESCCM_Process_IT()
3848 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0)); in CRYP_AESCCM_Process_IT()
3849 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0 + 1)); in CRYP_AESCCM_Process_IT()
3850 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0 + 2)); in CRYP_AESCCM_Process_IT()
3851 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0 + 3)); in CRYP_AESCCM_Process_IT()
3855 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0); in CRYP_AESCCM_Process_IT()
3856 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 1); in CRYP_AESCCM_Process_IT()
3857 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 2); in CRYP_AESCCM_Process_IT()
3858 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 3); in CRYP_AESCCM_Process_IT()
3910 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AESCCM_Process_DMA()
3943 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESCCM_Process_DMA()
3946 hcryp->Instance->IV0LR = (hcryp->Init.B0[0]) & CRYP_CCM_CTR1_0; in CRYP_AESCCM_Process_DMA()
3947 hcryp->Instance->IV0RR = hcryp->Init.B0[1]; in CRYP_AESCCM_Process_DMA()
3948 hcryp->Instance->IV1LR = hcryp->Init.B0[2]; in CRYP_AESCCM_Process_DMA()
3949 hcryp->Instance->IV1RR = (hcryp->Init.B0[3] & CRYP_CCM_CTR1_1) | CRYP_CCM_CTR1_2; in CRYP_AESCCM_Process_DMA()
3960 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0); in CRYP_AESCCM_Process_DMA()
3961 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 1); in CRYP_AESCCM_Process_DMA()
3962 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 2); in CRYP_AESCCM_Process_DMA()
3963 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 3); in CRYP_AESCCM_Process_DMA()
3968 if (hcryp->Init.DataType == CRYP_BYTE_SWAP) in CRYP_AESCCM_Process_DMA()
3970 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0)); in CRYP_AESCCM_Process_DMA()
3971 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0 + 1)); in CRYP_AESCCM_Process_DMA()
3972 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0 + 2)); in CRYP_AESCCM_Process_DMA()
3973 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0 + 3)); in CRYP_AESCCM_Process_DMA()
3975 else if (hcryp->Init.DataType == CRYP_HALFWORD_SWAP) in CRYP_AESCCM_Process_DMA()
3977 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0), 16); in CRYP_AESCCM_Process_DMA()
3978 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0 + 1), 16); in CRYP_AESCCM_Process_DMA()
3979 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0 + 2), 16); in CRYP_AESCCM_Process_DMA()
3980 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0 + 3), 16); in CRYP_AESCCM_Process_DMA()
3982 else if (hcryp->Init.DataType == CRYP_BIT_SWAP) in CRYP_AESCCM_Process_DMA()
3984 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0)); in CRYP_AESCCM_Process_DMA()
3985 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0 + 1)); in CRYP_AESCCM_Process_DMA()
3986 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0 + 2)); in CRYP_AESCCM_Process_DMA()
3987 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0 + 3)); in CRYP_AESCCM_Process_DMA()
3991 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0); in CRYP_AESCCM_Process_DMA()
3992 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 1); in CRYP_AESCCM_Process_DMA()
3993 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 2); in CRYP_AESCCM_Process_DMA()
3994 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 3); in CRYP_AESCCM_Process_DMA()
4278 …if (((temp_cr_algodir == CRYP_OPERATINGMODE_ENCRYPT) && (hcryp->Init.Algorithm == CRYP_AES_GCM)) || in CRYP_GCMCCM_SetPayloadPhase_IT()
4279 … ((temp_cr_algodir == CRYP_OPERATINGMODE_DECRYPT) && (hcryp->Init.Algorithm == CRYP_AES_CCM))) in CRYP_GCMCCM_SetPayloadPhase_IT()
4389 if (hcryp->Init.HeaderWidthUnit == CRYP_HEADERWIDTHUNIT_WORD) in CRYP_GCMCCM_SetHeaderPhase()
4391 size_in_bytes = hcryp->Init.HeaderSize * 4U; in CRYP_GCMCCM_SetHeaderPhase()
4395 size_in_bytes = hcryp->Init.HeaderSize; in CRYP_GCMCCM_SetHeaderPhase()
4413 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4415 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4417 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4419 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4443 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4445 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4447 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4449 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4470 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4486 tmp = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4543 if ((hcryp->Init.HeaderSize != 0U)) in CRYP_GCMCCM_SetHeaderPhase_DMA()
4551 if ((hcryp->Init.HeaderSize % 4U) == 0U) in CRYP_GCMCCM_SetHeaderPhase_DMA()
4554 for (loopcounter = 0U; (loopcounter < hcryp->Init.HeaderSize); loopcounter += 4U) in CRYP_GCMCCM_SetHeaderPhase_DMA()
4556 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_DMA()
4558 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_DMA()
4560 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_DMA()
4562 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_DMA()
4589 … for (loopcounter = 0U; (loopcounter < ((hcryp->Init.HeaderSize) - (hcryp->Init.HeaderSize % 4U))); in CRYP_GCMCCM_SetHeaderPhase_DMA()
4592 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_DMA()
4594 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_DMA()
4596 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_DMA()
4598 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_DMA()
4622 for (loopcounter = 0U; (loopcounter < (hcryp->Init.HeaderSize % 4U)); loopcounter++) in CRYP_GCMCCM_SetHeaderPhase_DMA()
4624 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_DMA()
4686 if (hcryp->Init.HeaderSize == hcryp->CrypHeaderCount) in CRYP_GCMCCM_SetHeaderPhase_IT()
4714 else if (((hcryp->Init.HeaderSize) - (hcryp->CrypHeaderCount)) >= 4U) in CRYP_GCMCCM_SetHeaderPhase_IT()
4718 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_IT()
4720 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_IT()
4722 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_IT()
4724 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_IT()
4730 for (loopcounter = 0U; loopcounter < (hcryp->Init.HeaderSize % 4U); loopcounter++) in CRYP_GCMCCM_SetHeaderPhase_IT()
4732 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_IT()
4776 if (hcryp->Init.Algorithm == CRYP_AES_GCM) in CRYP_Workaround()