Lines Matching refs:session
120 struct crypto_stm32_session *session = CRYPTO_STM32_SESSN(ctx); in do_aes() local
128 memcpy(&data->hcryp.Init, &session->config, sizeof(session->config)); in do_aes()
130 status = HAL_CRYP_SetConfig(&data->hcryp, &session->config); in do_aes()
215 struct crypto_stm32_session *session = CRYPTO_STM32_SESSN(ctx); in crypto_stm32_cbc_encrypt() local
219 session->config.pInitVect = CAST_VEC(vec); in crypto_stm32_cbc_encrypt()
242 struct crypto_stm32_session *session = CRYPTO_STM32_SESSN(ctx); in crypto_stm32_cbc_decrypt() local
246 session->config.pInitVect = CAST_VEC(vec); in crypto_stm32_cbc_decrypt()
267 struct crypto_stm32_session *session = CRYPTO_STM32_SESSN(ctx); in crypto_stm32_ctr_encrypt() local
273 session->config.pInitVect = CAST_VEC(ctr); in crypto_stm32_ctr_encrypt()
290 struct crypto_stm32_session *session = CRYPTO_STM32_SESSN(ctx); in crypto_stm32_ctr_decrypt() local
296 session->config.pInitVect = CAST_VEC(ctr); in crypto_stm32_ctr_decrypt()
334 struct crypto_stm32_session *session; in crypto_stm32_session_setup() local
379 session = &crypto_stm32_sessions[ctx_idx]; in crypto_stm32_session_setup()
380 memset(&session->config, 0, sizeof(session->config)); in crypto_stm32_session_setup()
388 session->in_use = false; in crypto_stm32_session_setup()
396 session->config.KeySize = CRYP_KEYSIZE_128B; in crypto_stm32_session_setup()
400 session->config.KeySize = CRYP_KEYSIZE_192B; in crypto_stm32_session_setup()
404 session->config.KeySize = CRYP_KEYSIZE_256B; in crypto_stm32_session_setup()
412 session->config.Algorithm = CRYP_AES_ECB; in crypto_stm32_session_setup()
418 session->config.Algorithm = CRYP_AES_CBC; in crypto_stm32_session_setup()
424 session->config.Algorithm = CRYP_AES_CTR; in crypto_stm32_session_setup()
435 session->config.Algorithm = CRYP_AES_ECB; in crypto_stm32_session_setup()
441 session->config.Algorithm = CRYP_AES_CBC; in crypto_stm32_session_setup()
447 session->config.Algorithm = CRYP_AES_CTR; in crypto_stm32_session_setup()
456 ret = copy_words_adjust_endianness((uint8_t *)session->key, CRYPTO_STM32_AES_MAX_KEY_LEN, in crypto_stm32_session_setup()
462 session->config.pKey = CAST_VEC(session->key); in crypto_stm32_session_setup()
463 session->config.DataType = CRYP_DATATYPE_8B; in crypto_stm32_session_setup()
466 session->config.DataWidthUnit = CRYP_DATAWIDTHUNIT_BYTE; in crypto_stm32_session_setup()
469 ctx->drv_sessn_state = session; in crypto_stm32_session_setup()
482 struct crypto_stm32_session *session = CRYPTO_STM32_SESSN(ctx); in crypto_stm32_session_free() local
484 session->in_use = false; in crypto_stm32_session_free()