Lines Matching refs:Init
456 assert_param(IS_CRYP_KEYSIZE(hcryp->Init.KeySize)); in HAL_CRYP_Init()
457 assert_param(IS_CRYP_DATATYPE(hcryp->Init.DataType)); in HAL_CRYP_Init()
458 assert_param(IS_CRYP_ALGORITHM(hcryp->Init.Algorithm)); in HAL_CRYP_Init()
459 assert_param(IS_CRYP_INIT(hcryp->Init.KeyIVConfigSkip)); in HAL_CRYP_Init()
491 …CR_DATATYPE | AES_CR_KEYSIZE | AES_CR_CHMOD, hcryp->Init.DataType | hcryp->Init.KeySize | hcryp->I… in HAL_CRYP_Init()
590 hcryp->Init.DataType = pConf->DataType; in HAL_CRYP_SetConfig()
591 hcryp->Init.pKey = pConf->pKey; in HAL_CRYP_SetConfig()
592 hcryp->Init.Algorithm = pConf->Algorithm; in HAL_CRYP_SetConfig()
593 hcryp->Init.KeySize = pConf->KeySize; in HAL_CRYP_SetConfig()
594 hcryp->Init.pInitVect = pConf->pInitVect; in HAL_CRYP_SetConfig()
595 hcryp->Init.Header = pConf->Header; in HAL_CRYP_SetConfig()
596 hcryp->Init.HeaderSize = pConf->HeaderSize; in HAL_CRYP_SetConfig()
597 hcryp->Init.B0 = pConf->B0; in HAL_CRYP_SetConfig()
598 hcryp->Init.DataWidthUnit = pConf->DataWidthUnit; in HAL_CRYP_SetConfig()
599 hcryp->Init.HeaderWidthUnit = pConf->HeaderWidthUnit; in HAL_CRYP_SetConfig()
600 hcryp->Init.KeyIVConfigSkip = pConf->KeyIVConfigSkip; in HAL_CRYP_SetConfig()
603 …CR_DATATYPE | AES_CR_KEYSIZE | AES_CR_CHMOD, hcryp->Init.DataType | hcryp->Init.KeySize | hcryp->I… in HAL_CRYP_SetConfig()
658 pConf->DataType = hcryp->Init.DataType; in HAL_CRYP_GetConfig()
659 pConf->pKey = hcryp->Init.pKey; in HAL_CRYP_GetConfig()
660 pConf->Algorithm = hcryp->Init.Algorithm; in HAL_CRYP_GetConfig()
661 pConf->KeySize = hcryp->Init.KeySize ; in HAL_CRYP_GetConfig()
662 pConf->pInitVect = hcryp->Init.pInitVect; in HAL_CRYP_GetConfig()
663 pConf->Header = hcryp->Init.Header ; in HAL_CRYP_GetConfig()
664 pConf->HeaderSize = hcryp->Init.HeaderSize; in HAL_CRYP_GetConfig()
665 pConf->B0 = hcryp->Init.B0; in HAL_CRYP_GetConfig()
666 pConf->DataWidthUnit = hcryp->Init.DataWidthUnit; in HAL_CRYP_GetConfig()
667 pConf->HeaderWidthUnit = hcryp->Init.HeaderWidthUnit; in HAL_CRYP_GetConfig()
668 pConf->KeyIVConfigSkip = hcryp->Init.KeyIVConfigSkip; in HAL_CRYP_GetConfig()
956 if ((hcryp->Init.Algorithm == CRYP_AES_GCM_GMAC) || \ in HAL_CRYP_Suspend()
957 (hcryp->Init.Algorithm == CRYP_AES_CCM)) in HAL_CRYP_Suspend()
962 CRYP_Read_KeyRegisters(hcryp, hcryp->Key_saved, hcryp->Init.KeySize); in HAL_CRYP_Suspend()
970 hcryp->Init_saved = hcryp->Init; in HAL_CRYP_Suspend()
977 …hcryp->Size_saved = ( (hcryp->Init.DataWidthUnit == CRYP_DATAWIDTHUNIT_WORD) ? (hcryp… in HAL_CRYP_Suspend()
983 if ((hcryp->Init.Algorithm == CRYP_AES_CBC) || \ in HAL_CRYP_Suspend()
984 (hcryp->Init.Algorithm == CRYP_AES_CTR)) in HAL_CRYP_Suspend()
1023 hcryp->Init = hcryp->Init_saved; in HAL_CRYP_Resume()
1034 if ((hcryp->Init.Algorithm == CRYP_AES_CBC) || \ in HAL_CRYP_Resume()
1035 (hcryp->Init.Algorithm == CRYP_AES_CTR)) in HAL_CRYP_Resume()
1037 hcryp->Init.pInitVect = hcryp->IV_saved; in HAL_CRYP_Resume()
1055 CRYP_Write_KeyRegisters(hcryp, hcryp->Key_saved, hcryp->Init.KeySize); in HAL_CRYP_Resume()
1211 assert_param(IS_CRYP_BUFFERSIZE(algo_assert, hcryp->Init.DataWidthUnit, Size)); in HAL_CRYP_Encrypt()
1229 if (hcryp->Init.DataWidthUnit == CRYP_DATAWIDTHUNIT_WORD) in HAL_CRYP_Encrypt()
1311 assert_param(IS_CRYP_BUFFERSIZE(algo_assert, hcryp->Init.DataWidthUnit, Size)); in HAL_CRYP_Decrypt()
1329 if (hcryp->Init.DataWidthUnit == CRYP_DATAWIDTHUNIT_WORD) in HAL_CRYP_Decrypt()
1410 assert_param(IS_CRYP_BUFFERSIZE(algo_assert, hcryp->Init.DataWidthUnit, Size)); in HAL_CRYP_Encrypt_IT()
1448 if (hcryp->Init.DataWidthUnit == CRYP_DATAWIDTHUNIT_WORD) in HAL_CRYP_Encrypt_IT()
1520 assert_param(IS_CRYP_BUFFERSIZE(algo_assert, hcryp->Init.DataWidthUnit, Size)); in HAL_CRYP_Decrypt_IT()
1557 if (hcryp->Init.DataWidthUnit == CRYP_DATAWIDTHUNIT_WORD) in HAL_CRYP_Decrypt_IT()
1630 assert_param(IS_CRYP_BUFFERSIZE(algo_assert, hcryp->Init.DataWidthUnit, Size)); in HAL_CRYP_Encrypt_DMA()
1648 if (hcryp->Init.DataWidthUnit == CRYP_DATAWIDTHUNIT_WORD) in HAL_CRYP_Encrypt_DMA()
1670 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in HAL_CRYP_Encrypt_DMA()
1690 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in HAL_CRYP_Encrypt_DMA()
1693 if (hcryp->Init.Algorithm != CRYP_AES_ECB) in HAL_CRYP_Encrypt_DMA()
1695 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in HAL_CRYP_Encrypt_DMA()
1696 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1U); in HAL_CRYP_Encrypt_DMA()
1697 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2U); in HAL_CRYP_Encrypt_DMA()
1698 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3U); in HAL_CRYP_Encrypt_DMA()
1756 assert_param(IS_CRYP_BUFFERSIZE(algo_assert, hcryp->Init.DataWidthUnit, Size)); in HAL_CRYP_Decrypt_DMA()
1775 if (hcryp->Init.DataWidthUnit == CRYP_DATAWIDTHUNIT_WORD) in HAL_CRYP_Decrypt_DMA()
1882 if ((hcryp->Init.Algorithm == CRYP_AES_GCM_GMAC) || (hcryp->Init.Algorithm == CRYP_AES_CCM)) in HAL_CRYP_IRQHandler()
1997 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AES_Encrypt()
2017 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Encrypt()
2019 if (hcryp->Init.Algorithm != CRYP_AES_ECB) in CRYP_AES_Encrypt()
2022 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AES_Encrypt()
2023 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1U); in CRYP_AES_Encrypt()
2024 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2U); in CRYP_AES_Encrypt()
2025 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3U); in CRYP_AES_Encrypt()
2065 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AES_Encrypt_IT()
2085 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Encrypt_IT()
2087 if (hcryp->Init.Algorithm != CRYP_AES_ECB) in CRYP_AES_Encrypt_IT()
2090 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AES_Encrypt_IT()
2091 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1U); in CRYP_AES_Encrypt_IT()
2092 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2U); in CRYP_AES_Encrypt_IT()
2093 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3U); in CRYP_AES_Encrypt_IT()
2144 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AES_Decrypt()
2164 if (hcryp->Init.Algorithm != CRYP_AES_CTR) /*ECB or CBC*/ in CRYP_AES_Decrypt()
2172 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt()
2200 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt()
2209 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt()
2213 if (hcryp->Init.Algorithm != CRYP_AES_ECB) in CRYP_AES_Decrypt()
2216 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AES_Decrypt()
2217 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1U); in CRYP_AES_Decrypt()
2218 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2U); in CRYP_AES_Decrypt()
2219 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3U); in CRYP_AES_Decrypt()
2259 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AES_Decrypt_IT()
2279 if (hcryp->Init.Algorithm != CRYP_AES_CTR) in CRYP_AES_Decrypt_IT()
2287 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt_IT()
2322 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt_IT()
2331 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt_IT()
2335 if (hcryp->Init.Algorithm != CRYP_AES_ECB) in CRYP_AES_Decrypt_IT()
2338 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AES_Decrypt_IT()
2339 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1U); in CRYP_AES_Decrypt_IT()
2340 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2U); in CRYP_AES_Decrypt_IT()
2341 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3U); in CRYP_AES_Decrypt_IT()
2388 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AES_Decrypt_DMA()
2408 if (hcryp->Init.Algorithm != CRYP_AES_CTR) in CRYP_AES_Decrypt_DMA()
2416 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt_DMA()
2451 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt_DMA()
2460 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt_DMA()
2463 if (hcryp->Init.Algorithm != CRYP_AES_ECB) in CRYP_AES_Decrypt_DMA()
2466 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AES_Decrypt_DMA()
2467 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1U); in CRYP_AES_Decrypt_DMA()
2468 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2U); in CRYP_AES_Decrypt_DMA()
2469 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3U); in CRYP_AES_Decrypt_DMA()
2521 if (hcryp->Init.HeaderWidthUnit == CRYP_HEADERWIDTHUNIT_WORD) in CRYP_DMAInCplt()
2523 headersize_in_bytes = hcryp->Init.HeaderSize * 4U; in CRYP_DMAInCplt()
2527 headersize_in_bytes = hcryp->Init.HeaderSize; in CRYP_DMAInCplt()
2536 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_DMAInCplt()
2552 tmp = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_DMAInCplt()
2553 tmp &= mask[(hcryp->Init.DataType * 2U) + (headersize_in_bytes % 4U)]; in CRYP_DMAInCplt()
2636 if (((mode == CRYP_OPERATINGMODE_ENCRYPT) && (hcryp->Init.Algorithm == CRYP_AES_GCM_GMAC)) || in CRYP_DMAOutCplt()
2637 ((mode == CRYP_OPERATINGMODE_DECRYPT) && (hcryp->Init.Algorithm == CRYP_AES_CCM))) in CRYP_DMAOutCplt()
2693 …if (((hcryp->Init.Algorithm & CRYP_AES_GCM_GMAC) != CRYP_AES_GCM_GMAC) && ((hcryp->Init.Algorithm … in CRYP_DMAOutCplt()
2766 if ((hcryp->Init.Algorithm & CRYP_AES_GCM_GMAC) != CRYP_AES_GCM_GMAC) in CRYP_SetDMAConfig()
3028 if (hcryp->Init.pKey != NULL) in CRYP_SetKey()
3033 hcryp->Instance->KEYR7 = *(uint32_t *)(hcryp->Init.pKey); in CRYP_SetKey()
3034 hcryp->Instance->KEYR6 = *(uint32_t *)(hcryp->Init.pKey + 1U); in CRYP_SetKey()
3035 hcryp->Instance->KEYR5 = *(uint32_t *)(hcryp->Init.pKey + 2U); in CRYP_SetKey()
3036 hcryp->Instance->KEYR4 = *(uint32_t *)(hcryp->Init.pKey + 3U); in CRYP_SetKey()
3037 hcryp->Instance->KEYR3 = *(uint32_t *)(hcryp->Init.pKey + 4U); in CRYP_SetKey()
3038 hcryp->Instance->KEYR2 = *(uint32_t *)(hcryp->Init.pKey + 5U); in CRYP_SetKey()
3039 hcryp->Instance->KEYR1 = *(uint32_t *)(hcryp->Init.pKey + 6U); in CRYP_SetKey()
3040 hcryp->Instance->KEYR0 = *(uint32_t *)(hcryp->Init.pKey + 7U); in CRYP_SetKey()
3043 hcryp->Instance->KEYR3 = *(uint32_t *)(hcryp->Init.pKey); in CRYP_SetKey()
3044 hcryp->Instance->KEYR2 = *(uint32_t *)(hcryp->Init.pKey + 1U); in CRYP_SetKey()
3045 hcryp->Instance->KEYR1 = *(uint32_t *)(hcryp->Init.pKey + 2U); in CRYP_SetKey()
3046 hcryp->Instance->KEYR0 = *(uint32_t *)(hcryp->Init.pKey + 3U); in CRYP_SetKey()
3074 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AESGCM_Process()
3108 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESGCM_Process()
3111 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AESGCM_Process()
3112 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1U); in CRYP_AESGCM_Process()
3113 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2U); in CRYP_AESGCM_Process()
3114 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3U); in CRYP_AESGCM_Process()
3289 if (hcryp->Init.HeaderWidthUnit == CRYP_HEADERWIDTHUNIT_WORD) in CRYP_AESGCM_Process_IT()
3291 headersize_in_bytes = hcryp->Init.HeaderSize * 4U; in CRYP_AESGCM_Process_IT()
3295 headersize_in_bytes = hcryp->Init.HeaderSize; in CRYP_AESGCM_Process_IT()
3298 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AESGCM_Process_IT()
3332 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESGCM_Process_IT()
3335 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AESGCM_Process_IT()
3336 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1U); in CRYP_AESGCM_Process_IT()
3337 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2U); in CRYP_AESGCM_Process_IT()
3338 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3U); in CRYP_AESGCM_Process_IT()
3378 if (hcryp->Init.HeaderSize == 0U) /*header phase is skipped*/ in CRYP_AESGCM_Process_IT()
3479 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESGCM_Process_IT()
3496 tmp = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESGCM_Process_IT()
3497 tmp &= mask[(hcryp->Init.DataType * 2U) + (headersize_in_bytes % 4U)]; in CRYP_AESGCM_Process_IT()
3514 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESGCM_Process_IT()
3516 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESGCM_Process_IT()
3518 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESGCM_Process_IT()
3520 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESGCM_Process_IT()
3636 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AESGCM_Process_DMA()
3670 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESGCM_Process_DMA()
3673 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AESGCM_Process_DMA()
3674 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1U); in CRYP_AESGCM_Process_DMA()
3675 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2U); in CRYP_AESGCM_Process_DMA()
3676 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3U); in CRYP_AESGCM_Process_DMA()
3747 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AESCCM_Process()
3780 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESCCM_Process()
3783 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.B0); in CRYP_AESCCM_Process()
3784 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.B0 + 1U); in CRYP_AESCCM_Process()
3785 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.B0 + 2U); in CRYP_AESCCM_Process()
3786 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.B0 + 3U); in CRYP_AESCCM_Process()
3956 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AESCCM_Process_IT()
3990 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESCCM_Process_IT()
3993 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.B0); in CRYP_AESCCM_Process_IT()
3994 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.B0 + 1U); in CRYP_AESCCM_Process_IT()
3995 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.B0 + 2U); in CRYP_AESCCM_Process_IT()
3996 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.B0 + 3U); in CRYP_AESCCM_Process_IT()
4036 if (hcryp->Init.HeaderWidthUnit == CRYP_HEADERWIDTHUNIT_WORD) in CRYP_AESCCM_Process_IT()
4038 headersize_in_bytes = hcryp->Init.HeaderSize * 4U; in CRYP_AESCCM_Process_IT()
4042 headersize_in_bytes = hcryp->Init.HeaderSize; in CRYP_AESCCM_Process_IT()
4054 if (hcryp->Init.Algorithm == CRYP_AES_CCM) in CRYP_AESCCM_Process_IT()
4100 … if (((mode == CRYP_OPERATINGMODE_ENCRYPT) && (hcryp->Init.Algorithm == CRYP_AES_GCM_GMAC)) || in CRYP_AESCCM_Process_IT()
4101 ((mode == CRYP_OPERATINGMODE_DECRYPT) && (hcryp->Init.Algorithm == CRYP_AES_CCM))) in CRYP_AESCCM_Process_IT()
4145 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process_IT()
4161 tmp = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process_IT()
4162 tmp &= mask[(hcryp->Init.DataType * 2U) + (headersize_in_bytes % 4U)]; in CRYP_AESCCM_Process_IT()
4186 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process_IT()
4188 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process_IT()
4190 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process_IT()
4192 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process_IT()
4241 if (((mode == CRYP_OPERATINGMODE_ENCRYPT) && (hcryp->Init.Algorithm == CRYP_AES_GCM_GMAC)) || in CRYP_AESCCM_Process_IT()
4242 ((mode == CRYP_OPERATINGMODE_DECRYPT) && (hcryp->Init.Algorithm == CRYP_AES_CCM))) in CRYP_AESCCM_Process_IT()
4297 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AESCCM_Process_DMA()
4332 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESCCM_Process_DMA()
4335 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.B0); in CRYP_AESCCM_Process_DMA()
4336 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.B0 + 1U); in CRYP_AESCCM_Process_DMA()
4337 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.B0 + 2U); in CRYP_AESCCM_Process_DMA()
4338 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.B0 + 3U); in CRYP_AESCCM_Process_DMA()
4426 if (!((hcryp->Init.Algorithm == CRYP_AES_CCM) && (hcryp->KeyIVConfig == 1U))) in CRYP_GCMCCM_SetPayloadPhase_IT()
4502 if (((mode == CRYP_OPERATINGMODE_ENCRYPT) && (hcryp->Init.Algorithm == CRYP_AES_GCM_GMAC)) || in CRYP_GCMCCM_SetPayloadPhase_IT()
4503 ((mode == CRYP_OPERATINGMODE_DECRYPT) && (hcryp->Init.Algorithm == CRYP_AES_CCM))) in CRYP_GCMCCM_SetPayloadPhase_IT()
4693 if (hcryp->Init.HeaderWidthUnit == CRYP_HEADERWIDTHUNIT_WORD) in CRYP_GCMCCM_SetHeaderPhase()
4695 size_in_bytes = hcryp->Init.HeaderSize * 4U; in CRYP_GCMCCM_SetHeaderPhase()
4699 size_in_bytes = hcryp->Init.HeaderSize; in CRYP_GCMCCM_SetHeaderPhase()
4717 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4719 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4721 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4723 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4749 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4751 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4753 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4755 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4777 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4793 tmp = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4794 tmp &= mask[(hcryp->Init.DataType * 2U) + (size_in_bytes % 4U)]; in CRYP_GCMCCM_SetHeaderPhase()
4825 MODIFY_REG(hcryp->Instance->CR, AES_CR_DATATYPE, hcryp->Init.DataType); in CRYP_GCMCCM_SetHeaderPhase()
4853 if (hcryp->Init.HeaderWidthUnit == CRYP_HEADERWIDTHUNIT_WORD) in CRYP_GCMCCM_SetHeaderPhase_DMA()
4855 headersize_in_bytes = hcryp->Init.HeaderSize * 4U; in CRYP_GCMCCM_SetHeaderPhase_DMA()
4859 headersize_in_bytes = hcryp->Init.HeaderSize; in CRYP_GCMCCM_SetHeaderPhase_DMA()
4877 …if (CRYP_SetHeaderDMAConfig(hcryp, (uint32_t)(hcryp->Init.Header), (uint16_t)((headersize_in_bytes… in CRYP_GCMCCM_SetHeaderPhase_DMA()
4890 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_DMA()
4906 tmp = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_DMA()
4907 tmp &= mask[(hcryp->Init.DataType * 2U) + (headersize_in_bytes % 4U)]; in CRYP_GCMCCM_SetHeaderPhase_DMA()
4973 if (hcryp->Init.HeaderWidthUnit == CRYP_HEADERWIDTHUNIT_WORD) in CRYP_GCMCCM_SetHeaderPhase_IT()
4975 headersize_in_bytes = hcryp->Init.HeaderSize * 4U; in CRYP_GCMCCM_SetHeaderPhase_IT()
4979 headersize_in_bytes = hcryp->Init.HeaderSize; in CRYP_GCMCCM_SetHeaderPhase_IT()
4994 if (hcryp->Init.Algorithm == CRYP_AES_CCM) in CRYP_GCMCCM_SetHeaderPhase_IT()
5039 if (((mode == CRYP_OPERATINGMODE_ENCRYPT) && (hcryp->Init.Algorithm == CRYP_AES_GCM_GMAC)) || in CRYP_GCMCCM_SetHeaderPhase_IT()
5040 ((mode == CRYP_OPERATINGMODE_DECRYPT) && (hcryp->Init.Algorithm == CRYP_AES_CCM))) in CRYP_GCMCCM_SetHeaderPhase_IT()
5105 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_IT()
5107 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_IT()
5109 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_IT()
5111 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_IT()
5120 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_IT()
5137 tmp = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_IT()
5138 tmp &= mask[(hcryp->Init.DataType * 2U) + (headersize_in_bytes % 4U)]; in CRYP_GCMCCM_SetHeaderPhase_IT()
5376 *(uint32_t*)(keyaddr) = *(uint32_t *)(hcryp->Init.pKey); in CRYP_Read_KeyRegisters()
5378 *(uint32_t*)(keyaddr) = *(uint32_t *)(hcryp->Init.pKey + 1U); in CRYP_Read_KeyRegisters()
5380 *(uint32_t*)(keyaddr) = *(uint32_t *)(hcryp->Init.pKey + 2U); in CRYP_Read_KeyRegisters()
5382 *(uint32_t*)(keyaddr) = *(uint32_t *)(hcryp->Init.pKey + 3U); in CRYP_Read_KeyRegisters()
5384 *(uint32_t*)(keyaddr) = *(uint32_t *)(hcryp->Init.pKey + 4U); in CRYP_Read_KeyRegisters()
5386 *(uint32_t*)(keyaddr) = *(uint32_t *)(hcryp->Init.pKey + 5U); in CRYP_Read_KeyRegisters()
5388 *(uint32_t*)(keyaddr) = *(uint32_t *)(hcryp->Init.pKey + 6U); in CRYP_Read_KeyRegisters()
5390 *(uint32_t*)(keyaddr) = *(uint32_t *)(hcryp->Init.pKey + 7U); in CRYP_Read_KeyRegisters()
5393 *(uint32_t*)(keyaddr) = *(uint32_t *)(hcryp->Init.pKey); in CRYP_Read_KeyRegisters()
5395 *(uint32_t*)(keyaddr) = *(uint32_t *)(hcryp->Init.pKey + 1U); in CRYP_Read_KeyRegisters()
5397 *(uint32_t*)(keyaddr) = *(uint32_t *)(hcryp->Init.pKey + 2U); in CRYP_Read_KeyRegisters()
5399 *(uint32_t*)(keyaddr) = *(uint32_t *)(hcryp->Init.pKey + 3U); in CRYP_Read_KeyRegisters()
5473 if ((((hcryp->Init.HeaderSize) - (hcryp->CrypHeaderCount)) >= 4U)) in CRYP_PhaseProcessingResume()
5476 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount ); in CRYP_PhaseProcessingResume()
5478 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount ); in CRYP_PhaseProcessingResume()
5480 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount ); in CRYP_PhaseProcessingResume()
5482 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount ); in CRYP_PhaseProcessingResume()
5488 for(loopcounter = 0U; loopcounter < (hcryp->Init.HeaderSize %4U ); loopcounter++) in CRYP_PhaseProcessingResume()
5490 hcryp->Instance->DINR = *(uint32_t*)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_PhaseProcessingResume()
5544 …if((((cr_temp & AES_CR_MODE) == CRYP_OPERATINGMODE_ENCRYPT) && (hcryp->Init.Algorithm == CRYP_AES_… in CRYP_PhaseProcessingResume()
5545 …(((cr_temp& AES_CR_MODE) == CRYP_OPERATINGMODE_DECRYPT) && (hcryp->Init.Algorithm == CRYP_AES_CCM)… in CRYP_PhaseProcessingResume()