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()
492 hcryp->Init.DataType | hcryp->Init.KeySize | hcryp->Init.Algorithm); in HAL_CRYP_Init()
591 hcryp->Init.DataType = pConf->DataType; in HAL_CRYP_SetConfig()
592 hcryp->Init.pKey = pConf->pKey; in HAL_CRYP_SetConfig()
593 hcryp->Init.Algorithm = pConf->Algorithm; in HAL_CRYP_SetConfig()
594 hcryp->Init.KeySize = pConf->KeySize; in HAL_CRYP_SetConfig()
595 hcryp->Init.pInitVect = pConf->pInitVect; in HAL_CRYP_SetConfig()
596 hcryp->Init.Header = pConf->Header; in HAL_CRYP_SetConfig()
597 hcryp->Init.HeaderSize = pConf->HeaderSize; in HAL_CRYP_SetConfig()
598 hcryp->Init.B0 = pConf->B0; in HAL_CRYP_SetConfig()
599 hcryp->Init.DataWidthUnit = pConf->DataWidthUnit; in HAL_CRYP_SetConfig()
600 hcryp->Init.HeaderWidthUnit = pConf->HeaderWidthUnit; in HAL_CRYP_SetConfig()
601 hcryp->Init.KeyIVConfigSkip = pConf->KeyIVConfigSkip; in HAL_CRYP_SetConfig()
605 hcryp->Init.DataType | hcryp->Init.KeySize | hcryp->Init.Algorithm); in HAL_CRYP_SetConfig()
660 pConf->DataType = hcryp->Init.DataType; in HAL_CRYP_GetConfig()
661 pConf->pKey = hcryp->Init.pKey; in HAL_CRYP_GetConfig()
662 pConf->Algorithm = hcryp->Init.Algorithm; in HAL_CRYP_GetConfig()
663 pConf->KeySize = hcryp->Init.KeySize ; in HAL_CRYP_GetConfig()
664 pConf->pInitVect = hcryp->Init.pInitVect; in HAL_CRYP_GetConfig()
665 pConf->Header = hcryp->Init.Header ; in HAL_CRYP_GetConfig()
666 pConf->HeaderSize = hcryp->Init.HeaderSize; in HAL_CRYP_GetConfig()
667 pConf->B0 = hcryp->Init.B0; in HAL_CRYP_GetConfig()
668 pConf->DataWidthUnit = hcryp->Init.DataWidthUnit; in HAL_CRYP_GetConfig()
669 pConf->HeaderWidthUnit = hcryp->Init.HeaderWidthUnit; in HAL_CRYP_GetConfig()
670 pConf->KeyIVConfigSkip = hcryp->Init.KeyIVConfigSkip; in HAL_CRYP_GetConfig()
959 if ((hcryp->Init.Algorithm == CRYP_AES_GCM_GMAC) || \ in HAL_CRYP_Suspend()
960 (hcryp->Init.Algorithm == CRYP_AES_CCM)) in HAL_CRYP_Suspend()
965 CRYP_Read_KeyRegisters(hcryp, hcryp->Key_saved, hcryp->Init.KeySize); in HAL_CRYP_Suspend()
973 hcryp->Init_saved = hcryp->Init; in HAL_CRYP_Suspend()
980 …hcryp->Size_saved = ((hcryp->Init.DataWidthUnit == CRYP_DATAWIDTHUNIT_WORD) ? (hcryp-… in HAL_CRYP_Suspend()
986 if ((hcryp->Init.Algorithm == CRYP_AES_CBC) || \ in HAL_CRYP_Suspend()
987 (hcryp->Init.Algorithm == CRYP_AES_CTR)) in HAL_CRYP_Suspend()
1026 hcryp->Init = hcryp->Init_saved; in HAL_CRYP_Resume()
1037 if ((hcryp->Init.Algorithm == CRYP_AES_CBC) || \ in HAL_CRYP_Resume()
1038 (hcryp->Init.Algorithm == CRYP_AES_CTR)) in HAL_CRYP_Resume()
1040 hcryp->Init.pInitVect = hcryp->IV_saved; in HAL_CRYP_Resume()
1058 CRYP_Write_KeyRegisters(hcryp, hcryp->Key_saved, hcryp->Init.KeySize); in HAL_CRYP_Resume()
1215 assert_param(IS_CRYP_BUFFERSIZE(algo_assert, hcryp->Init.DataWidthUnit, Size)); in HAL_CRYP_Encrypt()
1233 if (hcryp->Init.DataWidthUnit == CRYP_DATAWIDTHUNIT_WORD) in HAL_CRYP_Encrypt()
1316 assert_param(IS_CRYP_BUFFERSIZE(algo_assert, hcryp->Init.DataWidthUnit, Size)); in HAL_CRYP_Decrypt()
1334 if (hcryp->Init.DataWidthUnit == CRYP_DATAWIDTHUNIT_WORD) in HAL_CRYP_Decrypt()
1415 assert_param(IS_CRYP_BUFFERSIZE(algo_assert, hcryp->Init.DataWidthUnit, Size)); in HAL_CRYP_Encrypt_IT()
1453 if (hcryp->Init.DataWidthUnit == CRYP_DATAWIDTHUNIT_WORD) in HAL_CRYP_Encrypt_IT()
1525 assert_param(IS_CRYP_BUFFERSIZE(algo_assert, hcryp->Init.DataWidthUnit, Size)); in HAL_CRYP_Decrypt_IT()
1562 if (hcryp->Init.DataWidthUnit == CRYP_DATAWIDTHUNIT_WORD) in HAL_CRYP_Decrypt_IT()
1635 assert_param(IS_CRYP_BUFFERSIZE(algo_assert, hcryp->Init.DataWidthUnit, Size)); in HAL_CRYP_Encrypt_DMA()
1653 if (hcryp->Init.DataWidthUnit == CRYP_DATAWIDTHUNIT_WORD) in HAL_CRYP_Encrypt_DMA()
1675 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in HAL_CRYP_Encrypt_DMA()
1695 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in HAL_CRYP_Encrypt_DMA()
1698 if (hcryp->Init.Algorithm != CRYP_AES_ECB) in HAL_CRYP_Encrypt_DMA()
1700 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in HAL_CRYP_Encrypt_DMA()
1701 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1U); in HAL_CRYP_Encrypt_DMA()
1702 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2U); in HAL_CRYP_Encrypt_DMA()
1703 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3U); in HAL_CRYP_Encrypt_DMA()
1761 assert_param(IS_CRYP_BUFFERSIZE(algo_assert, hcryp->Init.DataWidthUnit, Size)); in HAL_CRYP_Decrypt_DMA()
1780 if (hcryp->Init.DataWidthUnit == CRYP_DATAWIDTHUNIT_WORD) in HAL_CRYP_Decrypt_DMA()
1887 if ((hcryp->Init.Algorithm == CRYP_AES_GCM_GMAC) || (hcryp->Init.Algorithm == CRYP_AES_CCM)) in HAL_CRYP_IRQHandler()
2002 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AES_Encrypt()
2022 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Encrypt()
2024 if (hcryp->Init.Algorithm != CRYP_AES_ECB) in CRYP_AES_Encrypt()
2027 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AES_Encrypt()
2028 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1U); in CRYP_AES_Encrypt()
2029 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2U); in CRYP_AES_Encrypt()
2030 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3U); in CRYP_AES_Encrypt()
2070 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AES_Encrypt_IT()
2090 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Encrypt_IT()
2092 if (hcryp->Init.Algorithm != CRYP_AES_ECB) in CRYP_AES_Encrypt_IT()
2095 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AES_Encrypt_IT()
2096 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1U); in CRYP_AES_Encrypt_IT()
2097 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2U); in CRYP_AES_Encrypt_IT()
2098 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3U); in CRYP_AES_Encrypt_IT()
2151 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AES_Decrypt()
2171 if (hcryp->Init.Algorithm != CRYP_AES_CTR) /*ECB or CBC*/ in CRYP_AES_Decrypt()
2179 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt()
2207 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt()
2216 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt()
2220 if (hcryp->Init.Algorithm != CRYP_AES_ECB) in CRYP_AES_Decrypt()
2223 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AES_Decrypt()
2224 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1U); in CRYP_AES_Decrypt()
2225 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2U); in CRYP_AES_Decrypt()
2226 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3U); in CRYP_AES_Decrypt()
2266 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AES_Decrypt_IT()
2286 if (hcryp->Init.Algorithm != CRYP_AES_CTR) in CRYP_AES_Decrypt_IT()
2294 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt_IT()
2328 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt_IT()
2337 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt_IT()
2341 if (hcryp->Init.Algorithm != CRYP_AES_ECB) in CRYP_AES_Decrypt_IT()
2344 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AES_Decrypt_IT()
2345 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1U); in CRYP_AES_Decrypt_IT()
2346 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2U); in CRYP_AES_Decrypt_IT()
2347 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3U); in CRYP_AES_Decrypt_IT()
2396 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AES_Decrypt_DMA()
2416 if (hcryp->Init.Algorithm != CRYP_AES_CTR) in CRYP_AES_Decrypt_DMA()
2424 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt_DMA()
2458 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt_DMA()
2467 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AES_Decrypt_DMA()
2470 if (hcryp->Init.Algorithm != CRYP_AES_ECB) in CRYP_AES_Decrypt_DMA()
2473 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AES_Decrypt_DMA()
2474 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1U); in CRYP_AES_Decrypt_DMA()
2475 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2U); in CRYP_AES_Decrypt_DMA()
2476 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3U); in CRYP_AES_Decrypt_DMA()
2529 if (hcryp->Init.HeaderWidthUnit == CRYP_HEADERWIDTHUNIT_WORD) in CRYP_DMAInCplt()
2531 headersize_in_bytes = hcryp->Init.HeaderSize * 4U; in CRYP_DMAInCplt()
2535 headersize_in_bytes = hcryp->Init.HeaderSize; in CRYP_DMAInCplt()
2544 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_DMAInCplt()
2560 tmp = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_DMAInCplt()
2561 tmp &= mask[(hcryp->Init.DataType * 2U) + (headersize_in_bytes % 4U)]; in CRYP_DMAInCplt()
2644 if (((mode == CRYP_OPERATINGMODE_ENCRYPT) && (hcryp->Init.Algorithm == CRYP_AES_GCM_GMAC)) || in CRYP_DMAOutCplt()
2645 ((mode == CRYP_OPERATINGMODE_DECRYPT) && (hcryp->Init.Algorithm == CRYP_AES_CCM))) in CRYP_DMAOutCplt()
2701 if (((hcryp->Init.Algorithm & CRYP_AES_GCM_GMAC) != CRYP_AES_GCM_GMAC) in CRYP_DMAOutCplt()
2702 && ((hcryp->Init.Algorithm & CRYP_AES_CCM) != CRYP_AES_CCM)) in CRYP_DMAOutCplt()
2775 if ((hcryp->Init.Algorithm & CRYP_AES_GCM_GMAC) != CRYP_AES_GCM_GMAC) in CRYP_SetDMAConfig()
3037 if (hcryp->Init.pKey != NULL) in CRYP_SetKey()
3042 hcryp->Instance->KEYR7 = *(uint32_t *)(hcryp->Init.pKey); in CRYP_SetKey()
3043 hcryp->Instance->KEYR6 = *(uint32_t *)(hcryp->Init.pKey + 1U); in CRYP_SetKey()
3044 hcryp->Instance->KEYR5 = *(uint32_t *)(hcryp->Init.pKey + 2U); in CRYP_SetKey()
3045 hcryp->Instance->KEYR4 = *(uint32_t *)(hcryp->Init.pKey + 3U); in CRYP_SetKey()
3046 hcryp->Instance->KEYR3 = *(uint32_t *)(hcryp->Init.pKey + 4U); in CRYP_SetKey()
3047 hcryp->Instance->KEYR2 = *(uint32_t *)(hcryp->Init.pKey + 5U); in CRYP_SetKey()
3048 hcryp->Instance->KEYR1 = *(uint32_t *)(hcryp->Init.pKey + 6U); in CRYP_SetKey()
3049 hcryp->Instance->KEYR0 = *(uint32_t *)(hcryp->Init.pKey + 7U); in CRYP_SetKey()
3052 hcryp->Instance->KEYR3 = *(uint32_t *)(hcryp->Init.pKey); in CRYP_SetKey()
3053 hcryp->Instance->KEYR2 = *(uint32_t *)(hcryp->Init.pKey + 1U); in CRYP_SetKey()
3054 hcryp->Instance->KEYR1 = *(uint32_t *)(hcryp->Init.pKey + 2U); in CRYP_SetKey()
3055 hcryp->Instance->KEYR0 = *(uint32_t *)(hcryp->Init.pKey + 3U); in CRYP_SetKey()
3083 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AESGCM_Process()
3117 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESGCM_Process()
3120 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AESGCM_Process()
3121 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1U); in CRYP_AESGCM_Process()
3122 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2U); in CRYP_AESGCM_Process()
3123 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3U); in CRYP_AESGCM_Process()
3299 if (hcryp->Init.HeaderWidthUnit == CRYP_HEADERWIDTHUNIT_WORD) in CRYP_AESGCM_Process_IT()
3301 headersize_in_bytes = hcryp->Init.HeaderSize * 4U; in CRYP_AESGCM_Process_IT()
3305 headersize_in_bytes = hcryp->Init.HeaderSize; in CRYP_AESGCM_Process_IT()
3308 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AESGCM_Process_IT()
3342 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESGCM_Process_IT()
3345 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AESGCM_Process_IT()
3346 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1U); in CRYP_AESGCM_Process_IT()
3347 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2U); in CRYP_AESGCM_Process_IT()
3348 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3U); in CRYP_AESGCM_Process_IT()
3387 if (hcryp->Init.HeaderSize == 0U) /*header phase is skipped*/ in CRYP_AESGCM_Process_IT()
3488 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESGCM_Process_IT()
3505 tmp = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESGCM_Process_IT()
3506 tmp &= mask[(hcryp->Init.DataType * 2U) + (headersize_in_bytes % 4U)]; in CRYP_AESGCM_Process_IT()
3523 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESGCM_Process_IT()
3525 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESGCM_Process_IT()
3527 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESGCM_Process_IT()
3529 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESGCM_Process_IT()
3645 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AESGCM_Process_DMA()
3679 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESGCM_Process_DMA()
3682 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.pInitVect); in CRYP_AESGCM_Process_DMA()
3683 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.pInitVect + 1U); in CRYP_AESGCM_Process_DMA()
3684 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.pInitVect + 2U); in CRYP_AESGCM_Process_DMA()
3685 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.pInitVect + 3U); in CRYP_AESGCM_Process_DMA()
3755 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AESCCM_Process()
3788 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESCCM_Process()
3791 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.B0); in CRYP_AESCCM_Process()
3792 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.B0 + 1U); in CRYP_AESCCM_Process()
3793 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.B0 + 2U); in CRYP_AESCCM_Process()
3794 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.B0 + 3U); in CRYP_AESCCM_Process()
3965 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AESCCM_Process_IT()
3999 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESCCM_Process_IT()
4002 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.B0); in CRYP_AESCCM_Process_IT()
4003 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.B0 + 1U); in CRYP_AESCCM_Process_IT()
4004 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.B0 + 2U); in CRYP_AESCCM_Process_IT()
4005 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.B0 + 3U); in CRYP_AESCCM_Process_IT()
4044 if (hcryp->Init.HeaderWidthUnit == CRYP_HEADERWIDTHUNIT_WORD) in CRYP_AESCCM_Process_IT()
4046 headersize_in_bytes = hcryp->Init.HeaderSize * 4U; in CRYP_AESCCM_Process_IT()
4050 headersize_in_bytes = hcryp->Init.HeaderSize; in CRYP_AESCCM_Process_IT()
4062 if (hcryp->Init.Algorithm == CRYP_AES_CCM) in CRYP_AESCCM_Process_IT()
4108 … if (((mode == CRYP_OPERATINGMODE_ENCRYPT) && (hcryp->Init.Algorithm == CRYP_AES_GCM_GMAC)) || in CRYP_AESCCM_Process_IT()
4109 ((mode == CRYP_OPERATINGMODE_DECRYPT) && (hcryp->Init.Algorithm == CRYP_AES_CCM))) in CRYP_AESCCM_Process_IT()
4153 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process_IT()
4169 tmp = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process_IT()
4170 tmp &= mask[(hcryp->Init.DataType * 2U) + (headersize_in_bytes % 4U)]; in CRYP_AESCCM_Process_IT()
4194 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process_IT()
4196 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process_IT()
4198 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process_IT()
4200 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_AESCCM_Process_IT()
4249 if (((mode == CRYP_OPERATINGMODE_ENCRYPT) && (hcryp->Init.Algorithm == CRYP_AES_GCM_GMAC)) || in CRYP_AESCCM_Process_IT()
4250 ((mode == CRYP_OPERATINGMODE_DECRYPT) && (hcryp->Init.Algorithm == CRYP_AES_CCM))) in CRYP_AESCCM_Process_IT()
4305 if (hcryp->Init.KeyIVConfigSkip == CRYP_KEYIVCONFIG_ONCE) in CRYP_AESCCM_Process_DMA()
4340 CRYP_SetKey(hcryp, hcryp->Init.KeySize); in CRYP_AESCCM_Process_DMA()
4343 hcryp->Instance->IVR3 = *(uint32_t *)(hcryp->Init.B0); in CRYP_AESCCM_Process_DMA()
4344 hcryp->Instance->IVR2 = *(uint32_t *)(hcryp->Init.B0 + 1U); in CRYP_AESCCM_Process_DMA()
4345 hcryp->Instance->IVR1 = *(uint32_t *)(hcryp->Init.B0 + 2U); in CRYP_AESCCM_Process_DMA()
4346 hcryp->Instance->IVR0 = *(uint32_t *)(hcryp->Init.B0 + 3U); in CRYP_AESCCM_Process_DMA()
4433 if (!((hcryp->Init.Algorithm == CRYP_AES_CCM) && (hcryp->KeyIVConfig == 1U))) in CRYP_GCMCCM_SetPayloadPhase_IT()
4509 if (((mode == CRYP_OPERATINGMODE_ENCRYPT) && (hcryp->Init.Algorithm == CRYP_AES_GCM_GMAC)) || in CRYP_GCMCCM_SetPayloadPhase_IT()
4510 ((mode == CRYP_OPERATINGMODE_DECRYPT) && (hcryp->Init.Algorithm == CRYP_AES_CCM))) in CRYP_GCMCCM_SetPayloadPhase_IT()
4700 if (hcryp->Init.HeaderWidthUnit == CRYP_HEADERWIDTHUNIT_WORD) in CRYP_GCMCCM_SetHeaderPhase()
4702 size_in_bytes = hcryp->Init.HeaderSize * 4U; in CRYP_GCMCCM_SetHeaderPhase()
4706 size_in_bytes = hcryp->Init.HeaderSize; in CRYP_GCMCCM_SetHeaderPhase()
4724 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4726 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4728 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4730 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4756 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4758 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4760 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4762 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4784 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4800 tmp = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase()
4801 tmp &= mask[(hcryp->Init.DataType * 2U) + (size_in_bytes % 4U)]; in CRYP_GCMCCM_SetHeaderPhase()
4832 MODIFY_REG(hcryp->Instance->CR, AES_CR_DATATYPE, hcryp->Init.DataType); in CRYP_GCMCCM_SetHeaderPhase()
4861 if (hcryp->Init.HeaderWidthUnit == CRYP_HEADERWIDTHUNIT_WORD) in CRYP_GCMCCM_SetHeaderPhase_DMA()
4863 headersize_in_bytes = hcryp->Init.HeaderSize * 4U; in CRYP_GCMCCM_SetHeaderPhase_DMA()
4867 headersize_in_bytes = hcryp->Init.HeaderSize; in CRYP_GCMCCM_SetHeaderPhase_DMA()
4885 if (CRYP_SetHeaderDMAConfig(hcryp, (uint32_t)(hcryp->Init.Header), in CRYP_GCMCCM_SetHeaderPhase_DMA()
4899 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_DMA()
4915 tmp = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_DMA()
4916 tmp &= mask[(hcryp->Init.DataType * 2U) + (headersize_in_bytes % 4U)]; in CRYP_GCMCCM_SetHeaderPhase_DMA()
4983 if (hcryp->Init.HeaderWidthUnit == CRYP_HEADERWIDTHUNIT_WORD) in CRYP_GCMCCM_SetHeaderPhase_IT()
4985 headersize_in_bytes = hcryp->Init.HeaderSize * 4U; in CRYP_GCMCCM_SetHeaderPhase_IT()
4989 headersize_in_bytes = hcryp->Init.HeaderSize; in CRYP_GCMCCM_SetHeaderPhase_IT()
5004 if (hcryp->Init.Algorithm == CRYP_AES_CCM) in CRYP_GCMCCM_SetHeaderPhase_IT()
5049 if (((mode == CRYP_OPERATINGMODE_ENCRYPT) && (hcryp->Init.Algorithm == CRYP_AES_GCM_GMAC)) || in CRYP_GCMCCM_SetHeaderPhase_IT()
5050 ((mode == CRYP_OPERATINGMODE_DECRYPT) && (hcryp->Init.Algorithm == CRYP_AES_CCM))) in CRYP_GCMCCM_SetHeaderPhase_IT()
5115 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_IT()
5117 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_IT()
5119 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_IT()
5121 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_IT()
5130 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_IT()
5147 tmp = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_GCMCCM_SetHeaderPhase_IT()
5148 tmp &= mask[(hcryp->Init.DataType * 2U) + (headersize_in_bytes % 4U)]; in CRYP_GCMCCM_SetHeaderPhase_IT()
5385 *(uint32_t *)(keyaddr) = *(uint32_t *)(hcryp->Init.pKey); in CRYP_Read_KeyRegisters()
5387 *(uint32_t *)(keyaddr) = *(uint32_t *)(hcryp->Init.pKey + 1U); in CRYP_Read_KeyRegisters()
5389 *(uint32_t *)(keyaddr) = *(uint32_t *)(hcryp->Init.pKey + 2U); in CRYP_Read_KeyRegisters()
5391 *(uint32_t *)(keyaddr) = *(uint32_t *)(hcryp->Init.pKey + 3U); in CRYP_Read_KeyRegisters()
5393 *(uint32_t *)(keyaddr) = *(uint32_t *)(hcryp->Init.pKey + 4U); in CRYP_Read_KeyRegisters()
5395 *(uint32_t *)(keyaddr) = *(uint32_t *)(hcryp->Init.pKey + 5U); in CRYP_Read_KeyRegisters()
5397 *(uint32_t *)(keyaddr) = *(uint32_t *)(hcryp->Init.pKey + 6U); in CRYP_Read_KeyRegisters()
5399 *(uint32_t *)(keyaddr) = *(uint32_t *)(hcryp->Init.pKey + 7U); in CRYP_Read_KeyRegisters()
5402 *(uint32_t *)(keyaddr) = *(uint32_t *)(hcryp->Init.pKey); in CRYP_Read_KeyRegisters()
5404 *(uint32_t *)(keyaddr) = *(uint32_t *)(hcryp->Init.pKey + 1U); in CRYP_Read_KeyRegisters()
5406 *(uint32_t *)(keyaddr) = *(uint32_t *)(hcryp->Init.pKey + 2U); in CRYP_Read_KeyRegisters()
5408 *(uint32_t *)(keyaddr) = *(uint32_t *)(hcryp->Init.pKey + 3U); in CRYP_Read_KeyRegisters()
5482 if ((((hcryp->Init.HeaderSize) - (hcryp->CrypHeaderCount)) >= 4U)) in CRYP_PhaseProcessingResume()
5485 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_PhaseProcessingResume()
5487 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_PhaseProcessingResume()
5489 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_PhaseProcessingResume()
5491 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_PhaseProcessingResume()
5497 for (loopcounter = 0U; loopcounter < (hcryp->Init.HeaderSize % 4U); loopcounter++) in CRYP_PhaseProcessingResume()
5499 hcryp->Instance->DINR = *(uint32_t *)(hcryp->Init.Header + hcryp->CrypHeaderCount); in CRYP_PhaseProcessingResume()
5553 …if ((((cr_temp & AES_CR_MODE) == CRYP_OPERATINGMODE_ENCRYPT) && (hcryp->Init.Algorithm == CRYP_AES… in CRYP_PhaseProcessingResume()
5554 …(((cr_temp & AES_CR_MODE) == CRYP_OPERATINGMODE_DECRYPT) && (hcryp->Init.Algorithm == CRYP_AES_CCM… in CRYP_PhaseProcessingResume()