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()
3117 if ((hcryp->Init.Algorithm & CRYP_AES_GCM) != CRYP_AES_GCM) in CRYP_DMAOutCplt()
3134 if ((hcryp->Init.Algorithm & CRYP_AES_GCM_GMAC) != CRYP_AES_GCM_GMAC) in CRYP_DMAOutCplt()
3251 if (((hcryp->Init.Algorithm & CRYP_AES_GCM_GMAC) != CRYP_AES_GCM_GMAC) in CRYP_SetDMAConfig()
3252 && ((hcryp->Init.Algorithm & CRYP_AES_CCM) != CRYP_AES_CCM)) in CRYP_SetDMAConfig()
3290 if ((hcryp->Init.Algorithm & CRYP_AES_CCM) == CRYP_AES_CCM) in CRYP_SetDMAConfig()
3613 hcryp->Instance->K0LR = *(uint32_t *)(hcryp->Init.pKey); in CRYP_SetKey()
3614 hcryp->Instance->K0RR = *(uint32_t *)(hcryp->Init.pKey + 1); in CRYP_SetKey()
3615 hcryp->Instance->K1LR = *(uint32_t *)(hcryp->Init.pKey + 2); in CRYP_SetKey()
3616 hcryp->Instance->K1RR = *(uint32_t *)(hcryp->Init.pKey + 3); in CRYP_SetKey()
3617 hcryp->Instance->K2LR = *(uint32_t *)(hcryp->Init.pKey + 4); in CRYP_SetKey()
3618 hcryp->Instance->K2RR = *(uint32_t *)(hcryp->Init.pKey + 5); in CRYP_SetKey()
3619 hcryp->Instance->K3LR = *(uint32_t *)(hcryp->Init.pKey + 6); in CRYP_SetKey()
3620 hcryp->Instance->K3RR = *(uint32_t *)(hcryp->Init.pKey + 7); in CRYP_SetKey()
3623 hcryp->Instance->K1LR = *(uint32_t *)(hcryp->Init.pKey); in CRYP_SetKey()
3624 hcryp->Instance->K1RR = *(uint32_t *)(hcryp->Init.pKey + 1); in CRYP_SetKey()
3625 hcryp->Instance->K2LR = *(uint32_t *)(hcryp->Init.pKey + 2); in CRYP_SetKey()
3626 hcryp->Instance->K2RR = *(uint32_t *)(hcryp->Init.pKey + 3); in CRYP_SetKey()
3627 hcryp->Instance->K3LR = *(uint32_t *)(hcryp->Init.pKey + 4); in CRYP_SetKey()
3628 hcryp->Instance->K3RR = *(uint32_t *)(hcryp->Init.pKey + 5); in CRYP_SetKey()
3631 hcryp->Instance->K2LR = *(uint32_t *)(hcryp->Init.pKey); in CRYP_SetKey()
3632 hcryp->Instance->K2RR = *(uint32_t *)(hcryp->Init.pKey + 1); in CRYP_SetKey()
3633 hcryp->Instance->K3LR = *(uint32_t *)(hcryp->Init.pKey + 2); in CRYP_SetKey()
3634 hcryp->Instance->K3RR = *(uint32_t *)(hcryp->Init.pKey + 3); in CRYP_SetKey()
3644 hcryp->Instance->KEYR7 = *(uint32_t *)(hcryp->Init.pKey); in CRYP_SetKey()
3645 hcryp->Instance->KEYR6 = *(uint32_t *)(hcryp->Init.pKey + 1); in CRYP_SetKey()
3646 hcryp->Instance->KEYR5 = *(uint32_t *)(hcryp->Init.pKey + 2); in CRYP_SetKey()
3647 hcryp->Instance->KEYR4 = *(uint32_t *)(hcryp->Init.pKey + 3); in CRYP_SetKey()
3648 hcryp->Instance->KEYR3 = *(uint32_t *)(hcryp->Init.pKey + 4); in CRYP_SetKey()
3649 hcryp->Instance->KEYR2 = *(uint32_t *)(hcryp->Init.pKey + 5); in CRYP_SetKey()
3650 hcryp->Instance->KEYR1 = *(uint32_t *)(hcryp->Init.pKey + 6); in CRYP_SetKey()
3651 hcryp->Instance->KEYR0 = *(uint32_t *)(hcryp->Init.pKey + 7); in CRYP_SetKey()
3654 hcryp->Instance->KEYR3 = *(uint32_t *)(hcryp->Init.pKey); in CRYP_SetKey()
3655 hcryp->Instance->KEYR2 = *(uint32_t *)(hcryp->Init.pKey + 1); in CRYP_SetKey()
3656 hcryp->Instance->KEYR1 = *(uint32_t *)(hcryp->Init.pKey + 2); in CRYP_SetKey()
3657 hcryp->Instance->KEYR0 = *(uint32_t *)(hcryp->Init.pKey + 3); in CRYP_SetKey()
3681 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AESGCM_Process()
3714 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESGCM_Process()
3719 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AESGCM_Process()
3720 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AESGCM_Process()
3721 hcryp->Instance->IV1LR = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AESGCM_Process()
3722 hcryp->Instance->IV1RR = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AESGCM_Process()
3760 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AESGCM_Process()
3761 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AESGCM_Process()
3762 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AESGCM_Process()
3763 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AESGCM_Process()
3882 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AESGCM_Process_IT()
3916 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESGCM_Process_IT()
3920 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AESGCM_Process_IT()
3921 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AESGCM_Process_IT()
3922 hcryp->Instance->IV1LR = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AESGCM_Process_IT()
3923 hcryp->Instance->IV1RR = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AESGCM_Process_IT()
3957 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AESGCM_Process_IT()
3958 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AESGCM_Process_IT()
3959 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AESGCM_Process_IT()
3960 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AESGCM_Process_IT()
4006 MODIFY_REG(hcryp->Instance->CR, AES_CR_DATATYPE, hcryp->Init.DataType); in CRYP_AESGCM_Process_IT()
4017 if (hcryp->Init.HeaderSize == 0U) /*header phase is skipped*/ in CRYP_AESGCM_Process_IT()
4093 else if ((hcryp->Init.HeaderSize) < 4U) in CRYP_AESGCM_Process_IT()
4095 for (loopcounter = 0U; loopcounter < hcryp->Init.HeaderSize ; loopcounter++) in CRYP_AESGCM_Process_IT()
4097 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESGCM_Process_IT()
4121 else if ((hcryp->Init.HeaderSize) >= 4U) in CRYP_AESGCM_Process_IT()
4124 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESGCM_Process_IT()
4126 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESGCM_Process_IT()
4128 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESGCM_Process_IT()
4130 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESGCM_Process_IT()
4158 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AESGCM_Process_DMA()
4191 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESGCM_Process_DMA()
4195 hcryp->Instance->IV0LR = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AESGCM_Process_DMA()
4196 hcryp->Instance->IV0RR = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AESGCM_Process_DMA()
4197 hcryp->Instance->IV1LR = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AESGCM_Process_DMA()
4198 hcryp->Instance->IV1RR = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AESGCM_Process_DMA()
4232 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AESGCM_Process_DMA()
4233 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1); in CRYP_AESGCM_Process_DMA()
4234 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2); in CRYP_AESGCM_Process_DMA()
4235 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3); in CRYP_AESGCM_Process_DMA()
4342 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AESCCM_Process()
4378 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESCCM_Process()
4381 hcryp->Instance->IV0LR = (hcryp->Init.B0[0]) & CRYP_CCM_CTR1_0; in CRYP_AESCCM_Process()
4382 hcryp->Instance->IV0RR = hcryp->Init.B0[1]; in CRYP_AESCCM_Process()
4383 hcryp->Instance->IV1LR = hcryp->Init.B0[2]; in CRYP_AESCCM_Process()
4384 hcryp->Instance->IV1RR = (hcryp->Init.B0[3] & CRYP_CCM_CTR1_1) | CRYP_CCM_CTR1_2; in CRYP_AESCCM_Process()
4391 if (hcryp->Init.DataType == CRYP_DATATYPE_8B) in CRYP_AESCCM_Process()
4393 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0)); in CRYP_AESCCM_Process()
4394 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0 + 1)); in CRYP_AESCCM_Process()
4395 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0 + 2)); in CRYP_AESCCM_Process()
4396 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0 + 3)); in CRYP_AESCCM_Process()
4398 else if (hcryp->Init.DataType == CRYP_DATATYPE_16B) in CRYP_AESCCM_Process()
4400 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0), 16); in CRYP_AESCCM_Process()
4401 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0 + 1), 16); in CRYP_AESCCM_Process()
4402 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0 + 2), 16); in CRYP_AESCCM_Process()
4403 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0 + 3), 16); in CRYP_AESCCM_Process()
4405 else if (hcryp->Init.DataType == CRYP_DATATYPE_1B) in CRYP_AESCCM_Process()
4407 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0)); in CRYP_AESCCM_Process()
4408 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0 + 1)); in CRYP_AESCCM_Process()
4409 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0 + 2)); in CRYP_AESCCM_Process()
4410 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0 + 3)); in CRYP_AESCCM_Process()
4414 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0); in CRYP_AESCCM_Process()
4415 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 1); in CRYP_AESCCM_Process()
4416 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 2); in CRYP_AESCCM_Process()
4417 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 3); in CRYP_AESCCM_Process()
4452 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESCCM_Process()
4464 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.B0); in CRYP_AESCCM_Process()
4465 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.B0 + 1); in CRYP_AESCCM_Process()
4466 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.B0 + 2); in CRYP_AESCCM_Process()
4467 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.B0 + 3); in CRYP_AESCCM_Process()
4489 if (hcryp->Init.HeaderSize != 0U) in CRYP_AESCCM_Process()
4491 if ((hcryp->Init.HeaderSize % 4U) == 0U) in CRYP_AESCCM_Process()
4494 for (loopcounter = 0U; (loopcounter < hcryp->Init.HeaderSize); loopcounter += 4U) in CRYP_AESCCM_Process()
4497 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process()
4499 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process()
4501 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process()
4503 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process()
4526 …for (loopcounter = 0U; (loopcounter < ((hcryp->Init.HeaderSize) - (hcryp->Init.HeaderSize % 4U)));… in CRYP_AESCCM_Process()
4529 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process()
4531 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process()
4533 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process()
4535 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process()
4555 for (loopcounter = 0U; (loopcounter < (hcryp->Init.HeaderSize % 4U)); loopcounter++) in CRYP_AESCCM_Process()
4557 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process()
4764 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE)
4800 CRYP_SetKey(hcryp, hcryp->Init.KeySize);
4803 hcryp->Instance->IV0LR = (hcryp->Init.B0[0]) & CRYP_CCM_CTR1_0;
4804 hcryp->Instance->IV0RR = hcryp->Init.B0[1];
4805 hcryp->Instance->IV1LR = hcryp->Init.B0[2];
4806 hcryp->Instance->IV1RR = (hcryp->Init.B0[3] & CRYP_CCM_CTR1_1) | CRYP_CCM_CTR1_2;
4812 if (hcryp->Init.DataType == CRYP_DATATYPE_8B)
4814 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0));
4815 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0 + 1));
4816 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0 + 2));
4817 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0 + 3));
4819 else if (hcryp->Init.DataType == CRYP_DATATYPE_16B)
4821 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0), 16);
4822 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0 + 1), 16);
4823 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0 + 2), 16);
4824 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0 + 3), 16);
4826 else if (hcryp->Init.DataType == CRYP_DATATYPE_1B)
4828 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0));
4829 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0 + 1));
4830 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0 + 2));
4831 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0 + 3));
4835 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0);
4836 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 1);
4837 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 2);
4838 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 3);
4881 CRYP_SetKey(hcryp, hcryp->Init.KeySize);
4895 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.B0);
4896 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.B0 + 1);
4897 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.B0 + 2);
4898 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.B0 + 3);
4924 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE)
4960 CRYP_SetKey(hcryp, hcryp->Init.KeySize);
4963 hcryp->Instance->IV0LR = (hcryp->Init.B0[0]) & CRYP_CCM_CTR1_0;
4964 hcryp->Instance->IV0RR = hcryp->Init.B0[1];
4965 hcryp->Instance->IV1LR = hcryp->Init.B0[2];
4966 hcryp->Instance->IV1RR = (hcryp->Init.B0[3] & CRYP_CCM_CTR1_1) | CRYP_CCM_CTR1_2;
4972 if (hcryp->Init.DataType == CRYP_DATATYPE_8B)
4974 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0));
4975 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0 + 1));
4976 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0 + 2));
4977 hcryp->Instance->DIN = __REV(*(uint32_t *)(hcryp->Init.B0 + 3));
4979 else if (hcryp->Init.DataType == CRYP_DATATYPE_16B)
4981 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0), 16);
4982 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0 + 1), 16);
4983 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0 + 2), 16);
4984 hcryp->Instance->DIN = __ROR(*(uint32_t *)(hcryp->Init.B0 + 3), 16);
4986 else if (hcryp->Init.DataType == CRYP_DATATYPE_1B)
4988 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0));
4989 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0 + 1));
4990 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0 + 2));
4991 hcryp->Instance->DIN = __RBIT(*(uint32_t *)(hcryp->Init.B0 + 3));
4995 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0);
4996 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 1);
4997 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 2);
4998 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.B0 + 3);
5031 CRYP_SetKey(hcryp, hcryp->Init.KeySize);
5043 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.B0);
5044 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.B0 + 1);
5045 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.B0 + 2);
5046 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.B0 + 3);
5075 if (hcryp->Init.HeaderSize != 0U)
5077 if ((hcryp->Init.HeaderSize % 4U) == 0U)
5080 for (loopcounter = 0U; (loopcounter < hcryp->Init.HeaderSize); loopcounter += 4U)
5083 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5085 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5087 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5089 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5118 …for (loopcounter = 0U; (loopcounter < ((hcryp->Init.HeaderSize) - (hcryp->Init.HeaderSize % 4U)));…
5121 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5123 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5125 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5127 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5152 for (loopcounter = 0U; (loopcounter < (hcryp->Init.HeaderSize % 4U)); loopcounter++)
5154 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5614 if (hcryp->Init.HeaderWidthUnit == CRYP_HEADERWIDTHUNIT_WORD)
5616 size_in_bytes = hcryp->Init.HeaderSize * 4U;
5620 size_in_bytes = hcryp->Init.HeaderSize;
5639 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5641 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5643 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5645 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5669 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5671 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5673 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5675 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5696 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5712 tmp = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5713 tmp &= mask[(hcryp->Init.DataType * 2U) + (size_in_bytes % 4U)];
5755 if (hcryp->Init.Algorithm == CRYP_AES_GCM_GMAC)
5758 MODIFY_REG(hcryp->Instance->CR, AES_CR_DATATYPE, hcryp->Init.DataType);
5774 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5776 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5778 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5780 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5806 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5808 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5810 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5812 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5834 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5850 tmp = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5851 tmp &= mask[(hcryp->Init.DataType * 2U) + (size_in_bytes % 4U)];
5883 if (hcryp->Init.Algorithm == CRYP_AES_GCM_GMAC)
5886 MODIFY_REG(hcryp->Instance->CR, AES_CR_DATATYPE, hcryp->Init.DataType);
5917 if (hcryp->Init.HeaderWidthUnit == CRYP_HEADERWIDTHUNIT_WORD)
5919 headersize_in_bytes = hcryp->Init.HeaderSize * 4U;
5923 headersize_in_bytes = hcryp->Init.HeaderSize;
5942 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5944 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5946 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5948 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5977 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5979 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5981 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
5983 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6009 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6025 tmp = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6026 tmp &= mask[(hcryp->Init.DataType * 2U) + (headersize_in_bytes % 4U)];
6078 if (hcryp->Init.Algorithm == CRYP_AES_GCM_GMAC)
6081 MODIFY_REG(hcryp->Instance->CR, AES_CR_DATATYPE, hcryp->Init.DataType);
6095 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6097 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6099 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6101 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6134 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6136 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6138 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6140 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6169 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6185 tmp = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6186 tmp &= mask[(hcryp->Init.DataType * 2U) + (headersize_in_bytes % 4U)];
6224 if (hcryp->Init.Algorithm == CRYP_AES_GCM_GMAC)
6227 MODIFY_REG(hcryp->Instance->CR, AES_CR_DATATYPE, hcryp->Init.DataType);
6260 if (hcryp->Init.HeaderWidthUnit == CRYP_HEADERWIDTHUNIT_WORD)
6262 headersize_in_bytes = hcryp->Init.HeaderSize * 4U;
6266 headersize_in_bytes = hcryp->Init.HeaderSize;
6296 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6298 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6300 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6302 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6310 hcryp->Instance->DIN = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6326 tmp = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6327 tmp &= mask[(hcryp->Init.DataType * 2U) + (headersize_in_bytes % 4U)];
6348 if (hcryp->Init.Algorithm == CRYP_AES_GCM_GMAC)
6353 if (hcryp->Init.Algorithm == CRYP_AES_CCM)
6429 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6431 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6433 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6435 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6443 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6460 tmp = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount);
6461 tmp &= mask[(hcryp->Init.DataType * 2U) + (headersize_in_bytes % 4U)];
6513 if (hcryp->Init.Algorithm == CRYP_AES_GCM)