Lines Matching refs:session

69 static inline void free_session(struct crypto_dcp_session *session)  in free_session()  argument
71 session->in_use = false; in free_session()
84 struct crypto_dcp_session *session = ctx->drv_sessn_state; in crypto_dcp_aes_cbc_encrypt() local
103 status = DCP_AES_EncryptCbc(cfg->base, &session->handle, pkt->in_buf, in crypto_dcp_aes_cbc_encrypt()
119 struct crypto_dcp_session *session = ctx->drv_sessn_state; in crypto_dcp_aes_cbc_decrypt() local
134 status = DCP_AES_DecryptCbc(cfg->base, &session->handle, pkt->in_buf + iv_bytes, in crypto_dcp_aes_cbc_decrypt()
150 struct crypto_dcp_session *session = ctx->drv_sessn_state; in crypto_dcp_aes_ecb_encrypt() local
154 status = DCP_AES_EncryptEcb(cfg->base, &session->handle, pkt->in_buf, pkt->out_buf, in crypto_dcp_aes_ecb_encrypt()
170 struct crypto_dcp_session *session = ctx->drv_sessn_state; in crypto_dcp_aes_ecb_decrypt() local
174 status = DCP_AES_DecryptEcb(cfg->base, &session->handle, pkt->in_buf, pkt->out_buf, in crypto_dcp_aes_ecb_decrypt()
192 struct crypto_dcp_session *session; in crypto_dcp_cipher_begin_session() local
204 session = get_session(dev); in crypto_dcp_cipher_begin_session()
205 if (session == NULL) { in crypto_dcp_cipher_begin_session()
223 ctx->drv_sessn_state = session; in crypto_dcp_cipher_begin_session()
225 status = DCP_AES_SetKey(cfg->base, &session->handle, ctx->key.bit_stream, ctx->keylen); in crypto_dcp_cipher_begin_session()
227 free_session(session); in crypto_dcp_cipher_begin_session()
236 struct crypto_dcp_session *session; in crypto_dcp_cipher_free_session() local
240 session = ctx->drv_sessn_state; in crypto_dcp_cipher_free_session()
241 free_session(session); in crypto_dcp_cipher_free_session()
249 struct crypto_dcp_session *session = ctx->drv_sessn_state; in crypto_dcp_sha256() local
253 status = DCP_HASH_Update(cfg->base, &session->hash_ctx, pkt->in_buf, pkt->in_len); in crypto_dcp_sha256()
262 status = DCP_HASH_Finish(cfg->base, &session->hash_ctx, pkt->out_buf, NULL); in crypto_dcp_sha256()
273 struct crypto_dcp_session *session; in crypto_dcp_hash_begin_session() local
284 session = get_session(dev); in crypto_dcp_hash_begin_session()
285 if (session == NULL) { in crypto_dcp_hash_begin_session()
289 status = DCP_HASH_Init(cfg->base, &session->handle, &session->hash_ctx, kDCP_Sha256); in crypto_dcp_hash_begin_session()
291 free_session(session); in crypto_dcp_hash_begin_session()
295 ctx->drv_sessn_state = session; in crypto_dcp_hash_begin_session()
303 struct crypto_dcp_session *session; in crypto_dcp_hash_free_session() local
307 session = ctx->drv_sessn_state; in crypto_dcp_hash_free_session()
308 free_session(session); in crypto_dcp_hash_free_session()