Lines Matching refs:Init

439   assert_param(IS_CRYP_KEYSIZE(hcryp->Init.KeySize));  in HAL_CRYP_Init()
440 assert_param(IS_CRYP_DATATYPE(hcryp->Init.DataType)); in HAL_CRYP_Init()
441 assert_param(IS_CRYP_ALGORITHM(hcryp->Init.Algorithm)); in HAL_CRYP_Init()
442 assert_param(IS_CRYP_INIT(hcryp->Init.KeyIVConfigSkip)); in HAL_CRYP_Init()
477 hcryp->Init.DataType | hcryp->Init.KeySize | hcryp->Init.Algorithm); in HAL_CRYP_Init()
482 hcryp->Init.DataType | hcryp->Init.KeySize | hcryp->Init.Algorithm); in HAL_CRYP_Init()
580 hcryp->Init.DataType = pConf->DataType; in HAL_CRYP_SetConfig()
581 hcryp->Init.pKey = pConf->pKey; in HAL_CRYP_SetConfig()
582 hcryp->Init.Algorithm = pConf->Algorithm; in HAL_CRYP_SetConfig()
583 hcryp->Init.KeySize = pConf->KeySize; in HAL_CRYP_SetConfig()
584 hcryp->Init.pInitVect = pConf->pInitVect; in HAL_CRYP_SetConfig()
585 hcryp->Init.Header = pConf->Header; in HAL_CRYP_SetConfig()
586 hcryp->Init.HeaderSize = pConf->HeaderSize; in HAL_CRYP_SetConfig()
587 hcryp->Init.B0 = pConf->B0; in HAL_CRYP_SetConfig()
588 hcryp->Init.DataWidthUnit = pConf->DataWidthUnit; in HAL_CRYP_SetConfig()
589 hcryp->Init.KeyIVConfigSkip = pConf->KeyIVConfigSkip; in HAL_CRYP_SetConfig()
590 hcryp->Init.HeaderWidthUnit = pConf->HeaderWidthUnit; in HAL_CRYP_SetConfig()
596 hcryp->Init.DataType | hcryp->Init.KeySize | hcryp->Init.Algorithm); in HAL_CRYP_SetConfig()
600 hcryp->Init.DataType | hcryp->Init.KeySize | hcryp->Init.Algorithm); in HAL_CRYP_SetConfig()
657 pConf->DataType = hcryp->Init.DataType; in HAL_CRYP_GetConfig()
658 pConf->pKey = hcryp->Init.pKey; in HAL_CRYP_GetConfig()
659 pConf->Algorithm = hcryp->Init.Algorithm; in HAL_CRYP_GetConfig()
660 pConf->KeySize = hcryp->Init.KeySize ; in HAL_CRYP_GetConfig()
661 pConf->pInitVect = hcryp->Init.pInitVect; in HAL_CRYP_GetConfig()
662 pConf->Header = hcryp->Init.Header ; in HAL_CRYP_GetConfig()
663 pConf->HeaderSize = hcryp->Init.HeaderSize; in HAL_CRYP_GetConfig()
664 pConf->B0 = hcryp->Init.B0; in HAL_CRYP_GetConfig()
665 pConf->DataWidthUnit = hcryp->Init.DataWidthUnit; in HAL_CRYP_GetConfig()
666 pConf->KeyIVConfigSkip = hcryp->Init.KeyIVConfigSkip; in HAL_CRYP_GetConfig()
667 pConf->HeaderWidthUnit = hcryp->Init.HeaderWidthUnit; in HAL_CRYP_GetConfig()
967 if (hcryp->Init.DataWidthUnit == CRYP_DATAWIDTHUNIT_WORD) in HAL_CRYP_Encrypt()
991 hcryp->Instance->K1LR = *(uint32_t *)(hcryp->Init.pKey); in HAL_CRYP_Encrypt()
992 hcryp->Instance->K1RR = *(uint32_t *)(hcryp->Init.pKey + 1); in HAL_CRYP_Encrypt()
993 if ((hcryp->Init.Algorithm == CRYP_TDES_ECB) || (hcryp->Init.Algorithm == CRYP_TDES_CBC)) in HAL_CRYP_Encrypt()
995 hcryp->Instance->K2LR = *(uint32_t *)(hcryp->Init.pKey + 2); in HAL_CRYP_Encrypt()
996 hcryp->Instance->K2RR = *(uint32_t *)(hcryp->Init.pKey + 3); in HAL_CRYP_Encrypt()
997 hcryp->Instance->K3LR = *(uint32_t *)(hcryp->Init.pKey + 4); in HAL_CRYP_Encrypt()
998 hcryp->Instance->K3RR = *(uint32_t *)(hcryp->Init.pKey + 5); in HAL_CRYP_Encrypt()
1002 if ((hcryp->Init.Algorithm == CRYP_DES_CBC) || (hcryp->Init.Algorithm == CRYP_TDES_CBC)) in HAL_CRYP_Encrypt()
1004 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in HAL_CRYP_Encrypt()
1005 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in HAL_CRYP_Encrypt()
1140 if (hcryp->Init.DataWidthUnit == CRYP_DATAWIDTHUNIT_WORD) in HAL_CRYP_Decrypt()
1165 hcryp->Instance->K1LR = *(uint32_t *)(hcryp->Init.pKey); in HAL_CRYP_Decrypt()
1166 hcryp->Instance->K1RR = *(uint32_t *)(hcryp->Init.pKey + 1); in HAL_CRYP_Decrypt()
1167 if ((hcryp->Init.Algorithm == CRYP_TDES_ECB) || (hcryp->Init.Algorithm == CRYP_TDES_CBC)) in HAL_CRYP_Decrypt()
1169 hcryp->Instance->K2LR = *(uint32_t *)(hcryp->Init.pKey + 2); in HAL_CRYP_Decrypt()
1170 hcryp->Instance->K2RR = *(uint32_t *)(hcryp->Init.pKey + 3); in HAL_CRYP_Decrypt()
1171 hcryp->Instance->K3LR = *(uint32_t *)(hcryp->Init.pKey + 4); in HAL_CRYP_Decrypt()
1172 hcryp->Instance->K3RR = *(uint32_t *)(hcryp->Init.pKey + 5); in HAL_CRYP_Decrypt()
1176 if ((hcryp->Init.Algorithm == CRYP_DES_CBC) || (hcryp->Init.Algorithm == CRYP_TDES_CBC)) in HAL_CRYP_Decrypt()
1178 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in HAL_CRYP_Decrypt()
1179 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in HAL_CRYP_Decrypt()
1312 if (hcryp->Init.DataWidthUnit == CRYP_DATAWIDTHUNIT_WORD) in HAL_CRYP_Encrypt_IT()
1337 hcryp->Instance->K1LR = *(uint32_t *)(hcryp->Init.pKey); in HAL_CRYP_Encrypt_IT()
1338 hcryp->Instance->K1RR = *(uint32_t *)(hcryp->Init.pKey + 1); in HAL_CRYP_Encrypt_IT()
1339 if ((hcryp->Init.Algorithm == CRYP_TDES_ECB) || (hcryp->Init.Algorithm == CRYP_TDES_CBC)) in HAL_CRYP_Encrypt_IT()
1341 hcryp->Instance->K2LR = *(uint32_t *)(hcryp->Init.pKey + 2); in HAL_CRYP_Encrypt_IT()
1342 hcryp->Instance->K2RR = *(uint32_t *)(hcryp->Init.pKey + 3); in HAL_CRYP_Encrypt_IT()
1343 hcryp->Instance->K3LR = *(uint32_t *)(hcryp->Init.pKey + 4); in HAL_CRYP_Encrypt_IT()
1344 hcryp->Instance->K3RR = *(uint32_t *)(hcryp->Init.pKey + 5); in HAL_CRYP_Encrypt_IT()
1347 if ((hcryp->Init.Algorithm == CRYP_DES_CBC) || (hcryp->Init.Algorithm == CRYP_TDES_CBC)) in HAL_CRYP_Encrypt_IT()
1349 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in HAL_CRYP_Encrypt_IT()
1350 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in HAL_CRYP_Encrypt_IT()
1475 if (hcryp->Init.DataWidthUnit == CRYP_DATAWIDTHUNIT_WORD) in HAL_CRYP_Decrypt_IT()
1500 hcryp->Instance->K1LR = *(uint32_t *)(hcryp->Init.pKey); in HAL_CRYP_Decrypt_IT()
1501 hcryp->Instance->K1RR = *(uint32_t *)(hcryp->Init.pKey + 1); in HAL_CRYP_Decrypt_IT()
1502 if ((hcryp->Init.Algorithm == CRYP_TDES_ECB) || (hcryp->Init.Algorithm == CRYP_TDES_CBC)) in HAL_CRYP_Decrypt_IT()
1504 hcryp->Instance->K2LR = *(uint32_t *)(hcryp->Init.pKey + 2); in HAL_CRYP_Decrypt_IT()
1505 hcryp->Instance->K2RR = *(uint32_t *)(hcryp->Init.pKey + 3); in HAL_CRYP_Decrypt_IT()
1506 hcryp->Instance->K3LR = *(uint32_t *)(hcryp->Init.pKey + 4); in HAL_CRYP_Decrypt_IT()
1507 hcryp->Instance->K3RR = *(uint32_t *)(hcryp->Init.pKey + 5); in HAL_CRYP_Decrypt_IT()
1511 if ((hcryp->Init.Algorithm == CRYP_DES_CBC) || (hcryp->Init.Algorithm == CRYP_TDES_CBC)) in HAL_CRYP_Decrypt_IT()
1513 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in HAL_CRYP_Decrypt_IT()
1514 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in HAL_CRYP_Decrypt_IT()
1643 if (hcryp->Init.DataWidthUnit == CRYP_DATAWIDTHUNIT_WORD) in HAL_CRYP_Encrypt_DMA()
1668 hcryp->Instance->K1LR = *(uint32_t *)(hcryp->Init.pKey); in HAL_CRYP_Encrypt_DMA()
1669 hcryp->Instance->K1RR = *(uint32_t *)(hcryp->Init.pKey + 1); in HAL_CRYP_Encrypt_DMA()
1670 if ((hcryp->Init.Algorithm == CRYP_TDES_ECB) || (hcryp->Init.Algorithm == CRYP_TDES_CBC)) in HAL_CRYP_Encrypt_DMA()
1672 hcryp->Instance->K2LR = *(uint32_t *)(hcryp->Init.pKey + 2); in HAL_CRYP_Encrypt_DMA()
1673 hcryp->Instance->K2RR = *(uint32_t *)(hcryp->Init.pKey + 3); in HAL_CRYP_Encrypt_DMA()
1674 hcryp->Instance->K3LR = *(uint32_t *)(hcryp->Init.pKey + 4); in HAL_CRYP_Encrypt_DMA()
1675 hcryp->Instance->K3RR = *(uint32_t *)(hcryp->Init.pKey + 5); in HAL_CRYP_Encrypt_DMA()
1679 if ((hcryp->Init.Algorithm == CRYP_DES_CBC) || (hcryp->Init.Algorithm == CRYP_TDES_CBC)) in HAL_CRYP_Encrypt_DMA()
1681 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in HAL_CRYP_Encrypt_DMA()
1682 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in HAL_CRYP_Encrypt_DMA()
1700 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in HAL_CRYP_Encrypt_DMA()
1720 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in HAL_CRYP_Encrypt_DMA()
1723 if (hcryp->Init.Algorithm != CRYP_AES_ECB) in HAL_CRYP_Encrypt_DMA()
1725 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in HAL_CRYP_Encrypt_DMA()
1726 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1U); in HAL_CRYP_Encrypt_DMA()
1727 hcryp->Instance->IV1LR = *(uint32_t *)(hcryp->Init.pInitVect + 2U); in HAL_CRYP_Encrypt_DMA()
1728 hcryp->Instance->IV1RR = *(uint32_t *)(hcryp->Init.pInitVect + 3U); in HAL_CRYP_Encrypt_DMA()
1774 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in HAL_CRYP_Encrypt_DMA()
1794 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in HAL_CRYP_Encrypt_DMA()
1797 if (hcryp->Init.Algorithm != CRYP_AES_ECB) in HAL_CRYP_Encrypt_DMA()
1799 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in HAL_CRYP_Encrypt_DMA()
1800 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1); in HAL_CRYP_Encrypt_DMA()
1801 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2); in HAL_CRYP_Encrypt_DMA()
1802 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3); in HAL_CRYP_Encrypt_DMA()
1875 if (hcryp->Init.DataWidthUnit == CRYP_DATAWIDTHUNIT_WORD) in HAL_CRYP_Decrypt_DMA()
1900 hcryp->Instance->K1LR = *(uint32_t *)(hcryp->Init.pKey); in HAL_CRYP_Decrypt_DMA()
1901 hcryp->Instance->K1RR = *(uint32_t *)(hcryp->Init.pKey + 1); in HAL_CRYP_Decrypt_DMA()
1902 if ((hcryp->Init.Algorithm == CRYP_TDES_ECB) || (hcryp->Init.Algorithm == CRYP_TDES_CBC)) in HAL_CRYP_Decrypt_DMA()
1904 hcryp->Instance->K2LR = *(uint32_t *)(hcryp->Init.pKey + 2); in HAL_CRYP_Decrypt_DMA()
1905 hcryp->Instance->K2RR = *(uint32_t *)(hcryp->Init.pKey + 3); in HAL_CRYP_Decrypt_DMA()
1906 hcryp->Instance->K3LR = *(uint32_t *)(hcryp->Init.pKey + 4); in HAL_CRYP_Decrypt_DMA()
1907 hcryp->Instance->K3RR = *(uint32_t *)(hcryp->Init.pKey + 5); in HAL_CRYP_Decrypt_DMA()
1911 if ((hcryp->Init.Algorithm == CRYP_DES_CBC) || (hcryp->Init.Algorithm == CRYP_TDES_CBC)) in HAL_CRYP_Decrypt_DMA()
1913 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in HAL_CRYP_Decrypt_DMA()
1914 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in HAL_CRYP_Decrypt_DMA()
2044 if ((hcryp->Init.Algorithm == CRYP_DES_ECB) || (hcryp->Init.Algorithm == CRYP_DES_CBC) in HAL_CRYP_IRQHandler()
2045 || (hcryp->Init.Algorithm == CRYP_TDES_ECB) || (hcryp->Init.Algorithm == CRYP_TDES_CBC)) in HAL_CRYP_IRQHandler()
2049 else if ((hcryp->Init.Algorithm == CRYP_AES_ECB) || (hcryp->Init.Algorithm == CRYP_AES_CBC) in HAL_CRYP_IRQHandler()
2050 || (hcryp->Init.Algorithm == CRYP_AES_CTR)) in HAL_CRYP_IRQHandler()
2055 …else if ((hcryp->Init.Algorithm == CRYP_AES_GCM) || (hcryp->Init.Algorithm == CRYP_CR_ALGOMODE_AES… in HAL_CRYP_IRQHandler()
2083 if (hcryp->Init.Algorithm == CRYP_AES_GCM_GMAC) in HAL_CRYP_IRQHandler()
2096 else if (hcryp->Init.Algorithm == CRYP_AES_CCM) in HAL_CRYP_IRQHandler()
2099 if (hcryp->Init.HeaderSize >= hcryp->CrypHeaderCount) in HAL_CRYP_IRQHandler()
2406 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AES_Encrypt()
2427 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Encrypt()
2429 if (hcryp->Init.Algorithm != CRYP_AES_ECB) in CRYP_AES_Encrypt()
2433 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AES_Encrypt()
2434 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AES_Encrypt()
2435 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AES_Encrypt()
2436 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AES_Encrypt()
2438 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AES_Encrypt()
2439 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AES_Encrypt()
2440 hcryp->Instance->IV1LR = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AES_Encrypt()
2441 hcryp->Instance->IV1RR = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AES_Encrypt()
2483 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AES_Encrypt_IT()
2503 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Encrypt_IT()
2505 if (hcryp->Init.Algorithm != CRYP_AES_ECB) in CRYP_AES_Encrypt_IT()
2509 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AES_Encrypt_IT()
2510 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AES_Encrypt_IT()
2511 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AES_Encrypt_IT()
2512 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AES_Encrypt_IT()
2515 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AES_Encrypt_IT()
2516 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AES_Encrypt_IT()
2517 hcryp->Instance->IV1LR = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AES_Encrypt_IT()
2518 hcryp->Instance->IV1RR = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AES_Encrypt_IT()
2580 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AES_Decrypt()
2600 if (hcryp->Init.Algorithm != CRYP_AES_CTR) in CRYP_AES_Decrypt()
2609 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt()
2637 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt()
2647 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt()
2667 MODIFY_REG(hcryp->Instance->CR, CRYP_CR_ALGOMODE, hcryp->Init.Algorithm); in CRYP_AES_Decrypt()
2674 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt()
2678 if (hcryp->Init.Algorithm != CRYP_AES_ECB) in CRYP_AES_Decrypt()
2682 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AES_Decrypt()
2683 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AES_Decrypt()
2684 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AES_Decrypt()
2685 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AES_Decrypt()
2687 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AES_Decrypt()
2688 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AES_Decrypt()
2689 hcryp->Instance->IV1LR = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AES_Decrypt()
2690 hcryp->Instance->IV1RR = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AES_Decrypt()
2731 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AES_Decrypt_IT()
2751 if (hcryp->Init.Algorithm != CRYP_AES_CTR) in CRYP_AES_Decrypt_IT()
2760 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt_IT()
2794 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt_IT()
2805 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt_IT()
2828 MODIFY_REG(hcryp->Instance->CR, CRYP_CR_ALGOMODE, hcryp->Init.Algorithm); in CRYP_AES_Decrypt_IT()
2836 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt_IT()
2840 if (hcryp->Init.Algorithm != CRYP_AES_ECB) in CRYP_AES_Decrypt_IT()
2844 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AES_Decrypt_IT()
2845 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AES_Decrypt_IT()
2846 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AES_Decrypt_IT()
2847 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AES_Decrypt_IT()
2849 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AES_Decrypt_IT()
2850 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AES_Decrypt_IT()
2851 hcryp->Instance->IV1LR = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AES_Decrypt_IT()
2852 hcryp->Instance->IV1RR = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AES_Decrypt_IT()
2913 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AES_Decrypt_DMA()
2932 if (hcryp->Init.Algorithm != CRYP_AES_CTR) in CRYP_AES_Decrypt_DMA()
2941 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt_DMA()
2975 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt_DMA()
2985 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt_DMA()
3011 MODIFY_REG(hcryp->Instance->CR, CRYP_CR_ALGOMODE, hcryp->Init.Algorithm); in CRYP_AES_Decrypt_DMA()
3018 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt_DMA()
3021 if (hcryp->Init.Algorithm != CRYP_AES_ECB) in CRYP_AES_Decrypt_DMA()
3025 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AES_Decrypt_DMA()
3026 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AES_Decrypt_DMA()
3027 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AES_Decrypt_DMA()
3028 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AES_Decrypt_DMA()
3030 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AES_Decrypt_DMA()
3031 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AES_Decrypt_DMA()
3032 hcryp->Instance->IV1LR = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AES_Decrypt_DMA()
3033 hcryp->Instance->IV1RR = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AES_Decrypt_DMA()
3078 if ((hcryp->Init.Algorithm & CRYP_AES_CCM) == CRYP_AES_CCM) in CRYP_DMAInCplt()
3116 if ((hcryp->Init.Algorithm & CRYP_AES_GCM) != CRYP_AES_GCM) in CRYP_DMAOutCplt()
3128 if ((hcryp->Init.Algorithm & CRYP_AES_GCM_GMAC) != CRYP_AES_GCM_GMAC) in CRYP_DMAOutCplt()
3245 if (((hcryp->Init.Algorithm & CRYP_AES_GCM_GMAC) != CRYP_AES_GCM_GMAC) in CRYP_SetDMAConfig()
3246 && ((hcryp->Init.Algorithm & CRYP_AES_CCM) != CRYP_AES_CCM)) in CRYP_SetDMAConfig()
3284 if ((hcryp->Init.Algorithm & CRYP_AES_CCM) == CRYP_AES_CCM) in CRYP_SetDMAConfig()
3607 hcryp->Instance->K0LR = *(uint32_t *)(hcryp->Init.pKey); in CRYP_SetKey()
3608 hcryp->Instance->K0RR = *(uint32_t *)(hcryp->Init.pKey + 1); in CRYP_SetKey()
3609 hcryp->Instance->K1LR = *(uint32_t *)(hcryp->Init.pKey + 2); in CRYP_SetKey()
3610 hcryp->Instance->K1RR = *(uint32_t *)(hcryp->Init.pKey + 3); in CRYP_SetKey()
3611 hcryp->Instance->K2LR = *(uint32_t *)(hcryp->Init.pKey + 4); in CRYP_SetKey()
3612 hcryp->Instance->K2RR = *(uint32_t *)(hcryp->Init.pKey + 5); in CRYP_SetKey()
3613 hcryp->Instance->K3LR = *(uint32_t *)(hcryp->Init.pKey + 6); in CRYP_SetKey()
3614 hcryp->Instance->K3RR = *(uint32_t *)(hcryp->Init.pKey + 7); in CRYP_SetKey()
3617 hcryp->Instance->K1LR = *(uint32_t *)(hcryp->Init.pKey); in CRYP_SetKey()
3618 hcryp->Instance->K1RR = *(uint32_t *)(hcryp->Init.pKey + 1); in CRYP_SetKey()
3619 hcryp->Instance->K2LR = *(uint32_t *)(hcryp->Init.pKey + 2); in CRYP_SetKey()
3620 hcryp->Instance->K2RR = *(uint32_t *)(hcryp->Init.pKey + 3); in CRYP_SetKey()
3621 hcryp->Instance->K3LR = *(uint32_t *)(hcryp->Init.pKey + 4); in CRYP_SetKey()
3622 hcryp->Instance->K3RR = *(uint32_t *)(hcryp->Init.pKey + 5); in CRYP_SetKey()
3625 hcryp->Instance->K2LR = *(uint32_t *)(hcryp->Init.pKey); in CRYP_SetKey()
3626 hcryp->Instance->K2RR = *(uint32_t *)(hcryp->Init.pKey + 1); in CRYP_SetKey()
3627 hcryp->Instance->K3LR = *(uint32_t *)(hcryp->Init.pKey + 2); in CRYP_SetKey()
3628 hcryp->Instance->K3RR = *(uint32_t *)(hcryp->Init.pKey + 3); in CRYP_SetKey()
3638 hcryp->Instance->KEYR7 = *(uint32_t *)(hcryp->Init.pKey); in CRYP_SetKey()
3639 hcryp->Instance->KEYR6 = *(uint32_t *)(hcryp->Init.pKey + 1); in CRYP_SetKey()
3640 hcryp->Instance->KEYR5 = *(uint32_t *)(hcryp->Init.pKey + 2); in CRYP_SetKey()
3641 hcryp->Instance->KEYR4 = *(uint32_t *)(hcryp->Init.pKey + 3); in CRYP_SetKey()
3642 hcryp->Instance->KEYR3 = *(uint32_t *)(hcryp->Init.pKey + 4); in CRYP_SetKey()
3643 hcryp->Instance->KEYR2 = *(uint32_t *)(hcryp->Init.pKey + 5); in CRYP_SetKey()
3644 hcryp->Instance->KEYR1 = *(uint32_t *)(hcryp->Init.pKey + 6); in CRYP_SetKey()
3645 hcryp->Instance->KEYR0 = *(uint32_t *)(hcryp->Init.pKey + 7); in CRYP_SetKey()
3648 hcryp->Instance->KEYR3 = *(uint32_t *)(hcryp->Init.pKey); in CRYP_SetKey()
3649 hcryp->Instance->KEYR2 = *(uint32_t *)(hcryp->Init.pKey + 1); in CRYP_SetKey()
3650 hcryp->Instance->KEYR1 = *(uint32_t *)(hcryp->Init.pKey + 2); in CRYP_SetKey()
3651 hcryp->Instance->KEYR0 = *(uint32_t *)(hcryp->Init.pKey + 3); in CRYP_SetKey()
3675 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AESGCM_Process()
3708 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESGCM_Process()
3713 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AESGCM_Process()
3714 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AESGCM_Process()
3715 hcryp->Instance->IV1LR = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AESGCM_Process()
3716 hcryp->Instance->IV1RR = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AESGCM_Process()
3754 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AESGCM_Process()
3755 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AESGCM_Process()
3756 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AESGCM_Process()
3757 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AESGCM_Process()
3876 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AESGCM_Process_IT()
3910 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESGCM_Process_IT()
3914 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AESGCM_Process_IT()
3915 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AESGCM_Process_IT()
3916 hcryp->Instance->IV1LR = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AESGCM_Process_IT()
3917 hcryp->Instance->IV1RR = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AESGCM_Process_IT()
3951 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AESGCM_Process_IT()
3952 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AESGCM_Process_IT()
3953 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AESGCM_Process_IT()
3954 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AESGCM_Process_IT()
4000 MODIFY_REG(hcryp->Instance->CR, AES_CR_DATATYPE, hcryp->Init.DataType); in CRYP_AESGCM_Process_IT()
4011 if (hcryp->Init.HeaderSize == 0U) /*header phase is skipped*/ in CRYP_AESGCM_Process_IT()
4087 else if ((hcryp->Init.HeaderSize) < 4U) in CRYP_AESGCM_Process_IT()
4089 for (loopcounter = 0U; loopcounter < hcryp->Init.HeaderSize ; loopcounter++) in CRYP_AESGCM_Process_IT()
4091 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESGCM_Process_IT()
4115 else if ((hcryp->Init.HeaderSize) >= 4U) in CRYP_AESGCM_Process_IT()
4118 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESGCM_Process_IT()
4120 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESGCM_Process_IT()
4122 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESGCM_Process_IT()
4124 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESGCM_Process_IT()
4152 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AESGCM_Process_DMA()
4185 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESGCM_Process_DMA()
4189 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AESGCM_Process_DMA()
4190 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AESGCM_Process_DMA()
4191 hcryp->Instance->IV1LR = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AESGCM_Process_DMA()
4192 hcryp->Instance->IV1RR = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AESGCM_Process_DMA()
4226 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AESGCM_Process_DMA()
4227 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AESGCM_Process_DMA()
4228 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AESGCM_Process_DMA()
4229 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AESGCM_Process_DMA()
4336 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AESCCM_Process()
4372 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESCCM_Process()
4375 hcryp->Instance->IV0LR = (hcryp->Init.B0[0]) & CRYP_CCM_CTR1_0; in CRYP_AESCCM_Process()
4376 hcryp->Instance->IV0RR = hcryp->Init.B0[1]; in CRYP_AESCCM_Process()
4377 hcryp->Instance->IV1LR = hcryp->Init.B0[2]; in CRYP_AESCCM_Process()
4378 hcryp->Instance->IV1RR = (hcryp->Init.B0[3] & CRYP_CCM_CTR1_1) | CRYP_CCM_CTR1_2; in CRYP_AESCCM_Process()
4385 if (hcryp->Init.DataType == CRYP_DATATYPE_8B) in CRYP_AESCCM_Process()
4387 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0)); in CRYP_AESCCM_Process()
4388 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0 + 1)); in CRYP_AESCCM_Process()
4389 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0 + 2)); in CRYP_AESCCM_Process()
4390 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0 + 3)); in CRYP_AESCCM_Process()
4392 else if (hcryp->Init.DataType == CRYP_DATATYPE_16B) in CRYP_AESCCM_Process()
4394 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0), 16); in CRYP_AESCCM_Process()
4395 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0 + 1), 16); in CRYP_AESCCM_Process()
4396 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0 + 2), 16); in CRYP_AESCCM_Process()
4397 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0 + 3), 16); in CRYP_AESCCM_Process()
4399 else if (hcryp->Init.DataType == CRYP_DATATYPE_1B) in CRYP_AESCCM_Process()
4401 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0)); in CRYP_AESCCM_Process()
4402 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0 + 1)); in CRYP_AESCCM_Process()
4403 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0 + 2)); in CRYP_AESCCM_Process()
4404 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0 + 3)); in CRYP_AESCCM_Process()
4408 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0); in CRYP_AESCCM_Process()
4409 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 1); in CRYP_AESCCM_Process()
4410 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 2); in CRYP_AESCCM_Process()
4411 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 3); in CRYP_AESCCM_Process()
4446 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESCCM_Process()
4458 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.B0); in CRYP_AESCCM_Process()
4459 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.B0 + 1); in CRYP_AESCCM_Process()
4460 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.B0 + 2); in CRYP_AESCCM_Process()
4461 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.B0 + 3); in CRYP_AESCCM_Process()
4483 if (hcryp->Init.HeaderSize != 0U) in CRYP_AESCCM_Process()
4485 if ((hcryp->Init.HeaderSize % 4U) == 0U) in CRYP_AESCCM_Process()
4488 for (loopcounter = 0U; (loopcounter < hcryp->Init.HeaderSize); loopcounter += 4U) in CRYP_AESCCM_Process()
4491 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process()
4493 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process()
4495 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process()
4497 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process()
4520 …for (loopcounter = 0U; (loopcounter < ((hcryp->Init.HeaderSize) - (hcryp->Init.HeaderSize % 4U)));… in CRYP_AESCCM_Process()
4523 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process()
4525 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process()
4527 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process()
4529 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process()
4549 for (loopcounter = 0U; (loopcounter < (hcryp->Init.HeaderSize % 4U)); loopcounter++) in CRYP_AESCCM_Process()
4551 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process()
4758 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE)
4794 CRYP_SetKey(hcryp, hcryp->Init.KeySize);
4797 hcryp->Instance->IV0LR = (hcryp->Init.B0[0]) & CRYP_CCM_CTR1_0;
4798 hcryp->Instance->IV0RR = hcryp->Init.B0[1];
4799 hcryp->Instance->IV1LR = hcryp->Init.B0[2];
4800 hcryp->Instance->IV1RR = (hcryp->Init.B0[3] & CRYP_CCM_CTR1_1) | CRYP_CCM_CTR1_2;
4806 if (hcryp->Init.DataType == CRYP_DATATYPE_8B)
4808 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0));
4809 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0 + 1));
4810 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0 + 2));
4811 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0 + 3));
4813 else if (hcryp->Init.DataType == CRYP_DATATYPE_16B)
4815 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0), 16);
4816 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0 + 1), 16);
4817 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0 + 2), 16);
4818 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0 + 3), 16);
4820 else if (hcryp->Init.DataType == CRYP_DATATYPE_1B)
4822 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0));
4823 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0 + 1));
4824 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0 + 2));
4825 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0 + 3));
4829 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0);
4830 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 1);
4831 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 2);
4832 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 3);
4875 CRYP_SetKey(hcryp, hcryp->Init.KeySize);
4889 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.B0);
4890 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.B0 + 1);
4891 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.B0 + 2);
4892 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.B0 + 3);
4918 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE)
4954 CRYP_SetKey(hcryp, hcryp->Init.KeySize);
4957 hcryp->Instance->IV0LR = (hcryp->Init.B0[0]) & CRYP_CCM_CTR1_0;
4958 hcryp->Instance->IV0RR = hcryp->Init.B0[1];
4959 hcryp->Instance->IV1LR = hcryp->Init.B0[2];
4960 hcryp->Instance->IV1RR = (hcryp->Init.B0[3] & CRYP_CCM_CTR1_1) | CRYP_CCM_CTR1_2;
4966 if (hcryp->Init.DataType == CRYP_DATATYPE_8B)
4968 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0));
4969 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0 + 1));
4970 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0 + 2));
4971 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0 + 3));
4973 else if (hcryp->Init.DataType == CRYP_DATATYPE_16B)
4975 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0), 16);
4976 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0 + 1), 16);
4977 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0 + 2), 16);
4978 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0 + 3), 16);
4980 else if (hcryp->Init.DataType == CRYP_DATATYPE_1B)
4982 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0));
4983 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0 + 1));
4984 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0 + 2));
4985 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0 + 3));
4989 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0);
4990 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 1);
4991 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 2);
4992 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 3);
5025 CRYP_SetKey(hcryp, hcryp->Init.KeySize);
5037 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.B0);
5038 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.B0 + 1);
5039 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.B0 + 2);
5040 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.B0 + 3);
5069 if (hcryp->Init.HeaderSize != 0U)
5071 if ((hcryp->Init.HeaderSize % 4U) == 0U)
5074 for (loopcounter = 0U; (loopcounter < hcryp->Init.HeaderSize); loopcounter += 4U)
5077 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5079 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5081 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5083 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5112 …for (loopcounter = 0U; (loopcounter < ((hcryp->Init.HeaderSize) - (hcryp->Init.HeaderSize % 4U)));…
5115 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5117 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5119 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5121 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5146 for (loopcounter = 0U; (loopcounter < (hcryp->Init.HeaderSize % 4U)); loopcounter++)
5148 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5608 if (hcryp->Init.HeaderWidthUnit == CRYP_HEADERWIDTHUNIT_WORD)
5610 size_in_bytes = hcryp->Init.HeaderSize * 4U;
5614 size_in_bytes = hcryp->Init.HeaderSize;
5633 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5635 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5637 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5639 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5663 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5665 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5667 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5669 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5690 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5706 tmp = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5707 tmp &= mask[(hcryp->Init.DataType * 2U) + (size_in_bytes % 4U)];
5749 if (hcryp->Init.Algorithm == CRYP_AES_GCM_GMAC)
5752 MODIFY_REG(hcryp->Instance->CR, AES_CR_DATATYPE, hcryp->Init.DataType);
5768 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5770 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5772 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5774 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5800 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5802 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5804 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5806 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5828 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5844 tmp = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5845 tmp &= mask[(hcryp->Init.DataType * 2U) + (size_in_bytes % 4U)];
5877 if (hcryp->Init.Algorithm == CRYP_AES_GCM_GMAC)
5880 MODIFY_REG(hcryp->Instance->CR, AES_CR_DATATYPE, hcryp->Init.DataType);
5911 if (hcryp->Init.HeaderWidthUnit == CRYP_HEADERWIDTHUNIT_WORD)
5913 headersize_in_bytes = hcryp->Init.HeaderSize * 4U;
5917 headersize_in_bytes = hcryp->Init.HeaderSize;
5936 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5938 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5940 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5942 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5971 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5973 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5975 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5977 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6003 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6019 tmp = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6020 tmp &= mask[(hcryp->Init.DataType * 2U) + (headersize_in_bytes % 4U)];
6072 if (hcryp->Init.Algorithm == CRYP_AES_GCM_GMAC)
6075 MODIFY_REG(hcryp->Instance->CR, AES_CR_DATATYPE, hcryp->Init.DataType);
6089 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6091 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6093 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6095 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6128 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6130 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6132 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6134 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6163 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6179 tmp = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6180 tmp &= mask[(hcryp->Init.DataType * 2U) + (headersize_in_bytes % 4U)];
6218 if (hcryp->Init.Algorithm == CRYP_AES_GCM_GMAC)
6221 MODIFY_REG(hcryp->Instance->CR, AES_CR_DATATYPE, hcryp->Init.DataType);
6254 if (hcryp->Init.HeaderWidthUnit == CRYP_HEADERWIDTHUNIT_WORD)
6256 headersize_in_bytes = hcryp->Init.HeaderSize * 4U;
6260 headersize_in_bytes = hcryp->Init.HeaderSize;
6290 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6292 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6294 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6296 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6304 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6320 tmp = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6321 tmp &= mask[(hcryp->Init.DataType * 2U) + (headersize_in_bytes % 4U)];
6342 if (hcryp->Init.Algorithm == CRYP_AES_GCM_GMAC)
6347 if (hcryp->Init.Algorithm == CRYP_AES_CCM)
6423 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6425 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6427 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6429 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6437 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6454 tmp = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6455 tmp &= mask[(hcryp->Init.DataType * 2U) + (headersize_in_bytes % 4U)];
6507 if (hcryp->Init.Algorithm == CRYP_AES_GCM)