Lines Matching refs:Init
253 assert_param(IS_CRYP_KEYSIZE(hcryp->Init.KeySize)); in HAL_CRYP_Init()
254 assert_param(IS_CRYP_DATATYPE(hcryp->Init.DataType)); in HAL_CRYP_Init()
255 assert_param(IS_CRYP_ALGOMODE(hcryp->Init.OperatingMode)); in HAL_CRYP_Init()
257 if (hcryp->Init.OperatingMode != CRYP_ALGOMODE_KEYDERIVATION) in HAL_CRYP_Init()
259 assert_param(IS_CRYP_CHAINMODE(hcryp->Init.ChainingMode)); in HAL_CRYP_Init()
261 assert_param(IS_CRYP_WRITE(hcryp->Init.KeyWriteFlag)); in HAL_CRYP_Init()
268 if ((hcryp->Init.OperatingMode == CRYP_ALGOMODE_KEYDERIVATION_DECRYPT) &&\ in HAL_CRYP_Init()
269 ((hcryp->Init.ChainingMode == CRYP_CHAINMODE_AES_CTR) \ in HAL_CRYP_Init()
270 || (hcryp->Init.ChainingMode == CRYP_CHAINMODE_AES_GCM_GMAC) \ in HAL_CRYP_Init()
271 || (hcryp->Init.ChainingMode == CRYP_CHAINMODE_AES_CCM))) in HAL_CRYP_Init()
273 if ((hcryp->Init.OperatingMode == CRYP_ALGOMODE_KEYDERIVATION_DECRYPT) &&\ in HAL_CRYP_Init()
274 ((hcryp->Init.ChainingMode == CRYP_CHAINMODE_AES_CTR) \ in HAL_CRYP_Init()
275 || (hcryp->Init.ChainingMode == CRYP_CHAINMODE_AES_GCM_GMAC) \ in HAL_CRYP_Init()
276 || (hcryp->Init.ChainingMode == CRYP_CHAINMODE_AES_CMAC))) in HAL_CRYP_Init()
283 if ((hcryp->Init.OperatingMode == CRYP_ALGOMODE_KEYDERIVATION) in HAL_CRYP_Init()
284 && (hcryp->Init.ChainingMode == CRYP_CHAINMODE_AES_CCM)) in HAL_CRYP_Init()
286 if ((hcryp->Init.OperatingMode == CRYP_ALGOMODE_KEYDERIVATION) in HAL_CRYP_Init()
287 && (hcryp->Init.ChainingMode == CRYP_CHAINMODE_AES_CMAC)) in HAL_CRYP_Init()
338 MODIFY_REG(hcryp->Instance->CR, AES_CR_KEYSIZE, hcryp->Init.KeySize); in HAL_CRYP_Init()
350 if (hcryp->Init.OperatingMode == CRYP_ALGOMODE_KEYDERIVATION) in HAL_CRYP_Init()
366 if (hcryp->Init.ChainingMode == CRYP_CHAINMODE_AES_GCM_GMAC) in HAL_CRYP_Init()
368 …stance->CR, AES_CR_DATATYPE|AES_CR_MODE|AES_CR_CHMOD, hcryp->Init.OperatingMode|hcryp->Init.Chaini… in HAL_CRYP_Init()
373 …, AES_CR_DATATYPE|AES_CR_MODE|AES_CR_CHMOD, hcryp->Init.DataType|hcryp->Init.OperatingMode|hcryp->… in HAL_CRYP_Init()
381 if ((hcryp->Init.ChainingMode == CRYP_CHAINMODE_AES_GCM_GMAC) in HAL_CRYP_Init()
382 || (hcryp->Init.ChainingMode == CRYP_CHAINMODE_AES_CCM)) in HAL_CRYP_Init()
384 if ((hcryp->Init.ChainingMode == CRYP_CHAINMODE_AES_GCM_GMAC) in HAL_CRYP_Init()
385 || (hcryp->Init.ChainingMode == CRYP_CHAINMODE_AES_CMAC)) in HAL_CRYP_Init()
388 MODIFY_REG(hcryp->Instance->CR, AES_CR_GCMPH, hcryp->Init.GCMCMACPhase); in HAL_CRYP_Init()
394 if (hcryp->Init.KeyWriteFlag == CRYP_KEY_WRITE_ENABLE) in HAL_CRYP_Init()
403 if (hcryp->Init.ChainingMode != CRYP_CHAINMODE_AES_ECB) in HAL_CRYP_Init()
562 hcryp->Init.OperatingMode = CRYP_ALGOMODE_ENCRYPT; in HAL_CRYP_AESECB_Encrypt()
563 hcryp->Init.ChainingMode = CRYP_CHAINMODE_AES_ECB; in HAL_CRYP_AESECB_Encrypt()
564 hcryp->Init.KeyWriteFlag = CRYP_KEY_WRITE_ENABLE; in HAL_CRYP_AESECB_Encrypt()
593 hcryp->Init.OperatingMode = CRYP_ALGOMODE_ENCRYPT; in HAL_CRYP_AESCBC_Encrypt()
594 hcryp->Init.ChainingMode = CRYP_CHAINMODE_AES_CBC; in HAL_CRYP_AESCBC_Encrypt()
595 hcryp->Init.KeyWriteFlag = CRYP_KEY_WRITE_ENABLE; in HAL_CRYP_AESCBC_Encrypt()
624 hcryp->Init.OperatingMode = CRYP_ALGOMODE_ENCRYPT; in HAL_CRYP_AESCTR_Encrypt()
625 hcryp->Init.ChainingMode = CRYP_CHAINMODE_AES_CTR; in HAL_CRYP_AESCTR_Encrypt()
626 hcryp->Init.KeyWriteFlag = CRYP_KEY_WRITE_ENABLE; in HAL_CRYP_AESCTR_Encrypt()
655 hcryp->Init.OperatingMode = CRYP_ALGOMODE_KEYDERIVATION_DECRYPT; in HAL_CRYP_AESECB_Decrypt()
656 hcryp->Init.ChainingMode = CRYP_CHAINMODE_AES_ECB; in HAL_CRYP_AESECB_Decrypt()
657 hcryp->Init.KeyWriteFlag = CRYP_KEY_WRITE_ENABLE; in HAL_CRYP_AESECB_Decrypt()
686 hcryp->Init.OperatingMode = CRYP_ALGOMODE_KEYDERIVATION_DECRYPT; in HAL_CRYP_AESCBC_Decrypt()
687 hcryp->Init.ChainingMode = CRYP_CHAINMODE_AES_CBC; in HAL_CRYP_AESCBC_Decrypt()
688 hcryp->Init.KeyWriteFlag = CRYP_KEY_WRITE_ENABLE; in HAL_CRYP_AESCBC_Decrypt()
717 hcryp->Init.OperatingMode = CRYP_ALGOMODE_DECRYPT; in HAL_CRYP_AESCTR_Decrypt()
718 hcryp->Init.ChainingMode = CRYP_CHAINMODE_AES_CTR; in HAL_CRYP_AESCTR_Decrypt()
719 hcryp->Init.KeyWriteFlag = CRYP_KEY_WRITE_ENABLE; in HAL_CRYP_AESCTR_Decrypt()
747 hcryp->Init.OperatingMode = CRYP_ALGOMODE_ENCRYPT; in HAL_CRYP_AESECB_Encrypt_IT()
748 hcryp->Init.ChainingMode = CRYP_CHAINMODE_AES_ECB; in HAL_CRYP_AESECB_Encrypt_IT()
749 hcryp->Init.KeyWriteFlag = CRYP_KEY_WRITE_ENABLE; in HAL_CRYP_AESECB_Encrypt_IT()
777 hcryp->Init.OperatingMode = CRYP_ALGOMODE_ENCRYPT; in HAL_CRYP_AESCBC_Encrypt_IT()
778 hcryp->Init.ChainingMode = CRYP_CHAINMODE_AES_CBC; in HAL_CRYP_AESCBC_Encrypt_IT()
779 hcryp->Init.KeyWriteFlag = CRYP_KEY_WRITE_ENABLE; in HAL_CRYP_AESCBC_Encrypt_IT()
808 hcryp->Init.OperatingMode = CRYP_ALGOMODE_ENCRYPT; in HAL_CRYP_AESCTR_Encrypt_IT()
809 hcryp->Init.ChainingMode = CRYP_CHAINMODE_AES_CTR; in HAL_CRYP_AESCTR_Encrypt_IT()
810 hcryp->Init.KeyWriteFlag = CRYP_KEY_WRITE_ENABLE; in HAL_CRYP_AESCTR_Encrypt_IT()
838 hcryp->Init.OperatingMode = CRYP_ALGOMODE_KEYDERIVATION_DECRYPT; in HAL_CRYP_AESECB_Decrypt_IT()
839 hcryp->Init.ChainingMode = CRYP_CHAINMODE_AES_ECB; in HAL_CRYP_AESECB_Decrypt_IT()
840 hcryp->Init.KeyWriteFlag = CRYP_KEY_WRITE_ENABLE; in HAL_CRYP_AESECB_Decrypt_IT()
868 hcryp->Init.OperatingMode = CRYP_ALGOMODE_KEYDERIVATION_DECRYPT; in HAL_CRYP_AESCBC_Decrypt_IT()
869 hcryp->Init.ChainingMode = CRYP_CHAINMODE_AES_CBC; in HAL_CRYP_AESCBC_Decrypt_IT()
870 hcryp->Init.KeyWriteFlag = CRYP_KEY_WRITE_ENABLE; in HAL_CRYP_AESCBC_Decrypt_IT()
898 hcryp->Init.OperatingMode = CRYP_ALGOMODE_DECRYPT; in HAL_CRYP_AESCTR_Decrypt_IT()
899 hcryp->Init.ChainingMode = CRYP_CHAINMODE_AES_CTR; in HAL_CRYP_AESCTR_Decrypt_IT()
900 hcryp->Init.KeyWriteFlag = CRYP_KEY_WRITE_ENABLE; in HAL_CRYP_AESCTR_Decrypt_IT()
929 hcryp->Init.OperatingMode = CRYP_ALGOMODE_ENCRYPT; in HAL_CRYP_AESECB_Encrypt_DMA()
930 hcryp->Init.ChainingMode = CRYP_CHAINMODE_AES_ECB; in HAL_CRYP_AESECB_Encrypt_DMA()
931 hcryp->Init.KeyWriteFlag = CRYP_KEY_WRITE_ENABLE; in HAL_CRYP_AESECB_Encrypt_DMA()
962 hcryp->Init.OperatingMode = CRYP_ALGOMODE_ENCRYPT; in HAL_CRYP_AESCBC_Encrypt_DMA()
963 hcryp->Init.ChainingMode = CRYP_CHAINMODE_AES_CBC; in HAL_CRYP_AESCBC_Encrypt_DMA()
964 hcryp->Init.KeyWriteFlag = CRYP_KEY_WRITE_ENABLE; in HAL_CRYP_AESCBC_Encrypt_DMA()
993 hcryp->Init.OperatingMode = CRYP_ALGOMODE_ENCRYPT; in HAL_CRYP_AESCTR_Encrypt_DMA()
994 hcryp->Init.ChainingMode = CRYP_CHAINMODE_AES_CTR; in HAL_CRYP_AESCTR_Encrypt_DMA()
995 hcryp->Init.KeyWriteFlag = CRYP_KEY_WRITE_ENABLE; in HAL_CRYP_AESCTR_Encrypt_DMA()
1024 hcryp->Init.OperatingMode = CRYP_ALGOMODE_KEYDERIVATION_DECRYPT; in HAL_CRYP_AESECB_Decrypt_DMA()
1025 hcryp->Init.ChainingMode = CRYP_CHAINMODE_AES_ECB; in HAL_CRYP_AESECB_Decrypt_DMA()
1026 hcryp->Init.KeyWriteFlag = CRYP_KEY_WRITE_ENABLE; in HAL_CRYP_AESECB_Decrypt_DMA()
1055 hcryp->Init.OperatingMode = CRYP_ALGOMODE_KEYDERIVATION_DECRYPT; in HAL_CRYP_AESCBC_Decrypt_DMA()
1056 hcryp->Init.ChainingMode = CRYP_CHAINMODE_AES_CBC; in HAL_CRYP_AESCBC_Decrypt_DMA()
1057 hcryp->Init.KeyWriteFlag = CRYP_KEY_WRITE_ENABLE; in HAL_CRYP_AESCBC_Decrypt_DMA()
1086 hcryp->Init.OperatingMode = CRYP_ALGOMODE_DECRYPT; in HAL_CRYP_AESCTR_Decrypt_DMA()
1087 hcryp->Init.ChainingMode = CRYP_CHAINMODE_AES_CTR; in HAL_CRYP_AESCTR_Decrypt_DMA()
1088 hcryp->Init.KeyWriteFlag = CRYP_KEY_WRITE_ENABLE; in HAL_CRYP_AESCTR_Decrypt_DMA()
1425 if ((hcryp->Init.ChainingMode == CRYP_CHAINMODE_AES_GCM_GMAC) in HAL_CRYP_IRQHandler()
1426 || (hcryp->Init.ChainingMode == CRYP_CHAINMODE_AES_CCM)) in HAL_CRYP_IRQHandler()
1428 if ((hcryp->Init.ChainingMode == CRYP_CHAINMODE_AES_GCM_GMAC) in HAL_CRYP_IRQHandler()
1429 || (hcryp->Init.ChainingMode == CRYP_CHAINMODE_AES_CMAC)) in HAL_CRYP_IRQHandler()
1526 if (hcryp->Init.pKey == NULL) in CRYP_SetKey()
1532 keyaddr = (uint32_t)(hcryp->Init.pKey); in CRYP_SetKey()
1534 if (hcryp->Init.KeySize == CRYP_KEYSIZE_256B) in CRYP_SetKey()
1568 if (hcryp->Init.ChainingMode == CRYP_CHAINMODE_AES_CMAC) in CRYP_SetInitVector()
1578 if (hcryp->Init.pInitVect == NULL) in CRYP_SetInitVector()
1583 ivaddr = (uint32_t)(hcryp->Init.pInitVect); in CRYP_SetInitVector()
1613 if (hcryp->Init.OperatingMode != CRYP_ALGOMODE_KEYDERIVATION) in CRYP_AES_IT()
1630 if (hcryp->Init.KeySize == CRYP_KEYSIZE_256B) in CRYP_AES_IT()
1653 if ((hcryp->CrypOutCount == 0U) || (hcryp->Init.OperatingMode == CRYP_ALGOMODE_KEYDERIVATION)) in CRYP_AES_IT()