/kernel/linux/linux-5.10/drivers/crypto/ccree/ |
H A D | cc_buffer_mgr.c | 55 struct aead_req_ctx *areq_ctx = aead_request_ctx(req); in cc_copy_mac() local 58 cc_copy_sg_portion(dev, areq_ctx->backup_mac, req->src, in cc_copy_mac() 59 (skip - areq_ctx->req_authsize), skip, dir); in cc_copy_mac() 289 cc_set_aead_conf_buf(struct device *dev, struct aead_req_ctx *areq_ctx, in cc_set_aead_conf_buf() argument 295 sg_init_one(&areq_ctx->ccm_adata_sg, config_data, in cc_set_aead_conf_buf() 296 AES_BLOCK_SIZE + areq_ctx->ccm_hdr_size); in cc_set_aead_conf_buf() 297 if (dma_map_sg(dev, &areq_ctx->ccm_adata_sg, 1, DMA_TO_DEVICE) != 1) { in cc_set_aead_conf_buf() 302 &sg_dma_address(&areq_ctx->ccm_adata_sg), in cc_set_aead_conf_buf() 303 sg_page(&areq_ctx->ccm_adata_sg), in cc_set_aead_conf_buf() 304 sg_virt(&areq_ctx in cc_set_aead_conf_buf() 315 cc_set_hash_buf(struct device *dev, struct ahash_req_ctx *areq_ctx, u8 *curr_buff, u32 curr_buff_cnt, struct buffer_array *sg_data) cc_set_hash_buf() argument 459 struct aead_req_ctx *areq_ctx = aead_request_ctx(req); cc_unmap_aead_request() local 549 struct aead_req_ctx *areq_ctx = aead_request_ctx(req); cc_aead_chain_iv() local 589 struct aead_req_ctx *areq_ctx = aead_request_ctx(req); cc_aead_chain_assoc() local 655 struct aead_req_ctx *areq_ctx = aead_request_ctx(req); cc_prepare_aead_data_dlli() local 681 struct aead_req_ctx *areq_ctx = aead_request_ctx(req); cc_prepare_aead_data_mlli() local 793 struct aead_req_ctx *areq_ctx = aead_request_ctx(req); cc_aead_chain_data() local 898 struct aead_req_ctx *areq_ctx = aead_request_ctx(req); cc_update_aead_mlli_nents() local 948 struct aead_req_ctx *areq_ctx = aead_request_ctx(req); cc_map_aead_request() local 1145 struct ahash_req_ctx *areq_ctx = (struct ahash_req_ctx *)ctx; cc_map_hash_request_final() local 1224 struct ahash_req_ctx *areq_ctx = (struct ahash_req_ctx *)ctx; cc_map_hash_request_update() local 1334 struct ahash_req_ctx *areq_ctx = (struct ahash_req_ctx *)ctx; cc_unmap_hash_request() local [all...] |
H A D | cc_aead.c | 211 struct aead_req_ctx *areq_ctx = aead_request_ctx(areq); in cc_aead_complete() local 222 areq->iv = areq_ctx->backup_iv; in cc_aead_complete() 227 if (areq_ctx->gen_ctx.op_type == DRV_CRYPTO_DIRECTION_DECRYPT) { in cc_aead_complete() 228 if (memcmp(areq_ctx->mac_buf, areq_ctx->icv_virt_addr, in cc_aead_complete() 240 } else if (areq_ctx->is_icv_fragmented) { in cc_aead_complete() 241 u32 skip = areq->cryptlen + areq_ctx->dst_offset; in cc_aead_complete() 243 cc_copy_sg_portion(dev, areq_ctx->mac_buf, areq_ctx->dst_sgl, in cc_aead_complete() 726 struct aead_req_ctx *areq_ctx in cc_set_assoc_desc() local 765 struct aead_req_ctx *areq_ctx = aead_request_ctx(areq); cc_proc_authen_desc() local 830 struct aead_req_ctx *areq_ctx = aead_request_ctx(areq); cc_proc_cipher_desc() local 1085 struct aead_req_ctx *areq_ctx = aead_request_ctx(req); cc_proc_header_desc() local 1315 struct aead_req_ctx *areq_ctx = aead_request_ctx(req); validate_data_size() local 1594 struct aead_req_ctx *areq_ctx = aead_request_ctx(req); cc_proc_rfc4309_ccm() local 1882 struct aead_req_ctx *areq_ctx = aead_request_ctx(req); cc_proc_rfc4_gcm() local 1899 struct aead_req_ctx *areq_ctx = aead_request_ctx(req); cc_proc_aead() local 2022 struct aead_req_ctx *areq_ctx = aead_request_ctx(req); cc_aead_encrypt() local 2042 struct aead_req_ctx *areq_ctx = aead_request_ctx(req); cc_rfc4309_ccm_encrypt() local 2066 struct aead_req_ctx *areq_ctx = aead_request_ctx(req); cc_aead_decrypt() local 2084 struct aead_req_ctx *areq_ctx = aead_request_ctx(req); cc_rfc4309_ccm_decrypt() local 2196 struct aead_req_ctx *areq_ctx = aead_request_ctx(req); cc_rfc4106_gcm_encrypt() local 2220 struct aead_req_ctx *areq_ctx = aead_request_ctx(req); cc_rfc4543_gcm_encrypt() local 2247 struct aead_req_ctx *areq_ctx = aead_request_ctx(req); cc_rfc4106_gcm_decrypt() local 2271 struct aead_req_ctx *areq_ctx = aead_request_ctx(req); cc_rfc4543_gcm_decrypt() local [all...] |
H A D | cc_hash.c | 103 static void cc_set_desc(struct ahash_req_ctx *areq_ctx, struct cc_hash_ctx *ctx, 2162 static void cc_set_desc(struct ahash_req_ctx *areq_ctx, in cc_set_desc() argument 2170 if (areq_ctx->data_dma_buf_type == CC_DMA_BUF_DLLI) { in cc_set_desc() 2173 sg_dma_address(areq_ctx->curr_sg), in cc_set_desc() 2174 areq_ctx->curr_sg->length, NS_BIT); in cc_set_desc() 2178 if (areq_ctx->data_dma_buf_type == CC_DMA_BUF_NULL) { in cc_set_desc() 2186 areq_ctx->mlli_params.mlli_dma_addr, in cc_set_desc() 2187 areq_ctx->mlli_params.mlli_len, NS_BIT); in cc_set_desc() 2189 areq_ctx->mlli_params.mlli_len); in cc_set_desc() 2196 areq_ctx in cc_set_desc() [all...] |
/kernel/linux/linux-6.6/drivers/crypto/ccree/ |
H A D | cc_buffer_mgr.c | 55 struct aead_req_ctx *areq_ctx = aead_request_ctx_dma(req); in cc_copy_mac() local 58 cc_copy_sg_portion(dev, areq_ctx->backup_mac, req->src, in cc_copy_mac() 59 (skip - areq_ctx->req_authsize), skip, dir); in cc_copy_mac() 289 cc_set_aead_conf_buf(struct device *dev, struct aead_req_ctx *areq_ctx, in cc_set_aead_conf_buf() argument 295 sg_init_one(&areq_ctx->ccm_adata_sg, config_data, in cc_set_aead_conf_buf() 296 AES_BLOCK_SIZE + areq_ctx->ccm_hdr_size); in cc_set_aead_conf_buf() 297 if (dma_map_sg(dev, &areq_ctx->ccm_adata_sg, 1, DMA_TO_DEVICE) != 1) { in cc_set_aead_conf_buf() 302 &sg_dma_address(&areq_ctx->ccm_adata_sg), in cc_set_aead_conf_buf() 303 sg_page(&areq_ctx->ccm_adata_sg), in cc_set_aead_conf_buf() 304 sg_virt(&areq_ctx in cc_set_aead_conf_buf() 315 cc_set_hash_buf(struct device *dev, struct ahash_req_ctx *areq_ctx, u8 *curr_buff, u32 curr_buff_cnt, struct buffer_array *sg_data) cc_set_hash_buf() argument 459 struct aead_req_ctx *areq_ctx = aead_request_ctx_dma(req); cc_unmap_aead_request() local 549 struct aead_req_ctx *areq_ctx = aead_request_ctx_dma(req); cc_aead_chain_iv() local 589 struct aead_req_ctx *areq_ctx = aead_request_ctx_dma(req); cc_aead_chain_assoc() local 655 struct aead_req_ctx *areq_ctx = aead_request_ctx_dma(req); cc_prepare_aead_data_dlli() local 681 struct aead_req_ctx *areq_ctx = aead_request_ctx_dma(req); cc_prepare_aead_data_mlli() local 793 struct aead_req_ctx *areq_ctx = aead_request_ctx_dma(req); cc_aead_chain_data() local 898 struct aead_req_ctx *areq_ctx = aead_request_ctx_dma(req); cc_update_aead_mlli_nents() local 948 struct aead_req_ctx *areq_ctx = aead_request_ctx_dma(req); cc_map_aead_request() local 1145 struct ahash_req_ctx *areq_ctx = (struct ahash_req_ctx *)ctx; cc_map_hash_request_final() local 1224 struct ahash_req_ctx *areq_ctx = (struct ahash_req_ctx *)ctx; cc_map_hash_request_update() local 1334 struct ahash_req_ctx *areq_ctx = (struct ahash_req_ctx *)ctx; cc_unmap_hash_request() local [all...] |
H A D | cc_aead.c | 211 struct aead_req_ctx *areq_ctx = aead_request_ctx_dma(areq); in cc_aead_complete() local 222 areq->iv = areq_ctx->backup_iv; in cc_aead_complete() 227 if (areq_ctx->gen_ctx.op_type == DRV_CRYPTO_DIRECTION_DECRYPT) { in cc_aead_complete() 228 if (memcmp(areq_ctx->mac_buf, areq_ctx->icv_virt_addr, in cc_aead_complete() 240 } else if (areq_ctx->is_icv_fragmented) { in cc_aead_complete() 241 u32 skip = areq->cryptlen + areq_ctx->dst_offset; in cc_aead_complete() 243 cc_copy_sg_portion(dev, areq_ctx->mac_buf, areq_ctx->dst_sgl, in cc_aead_complete() 726 struct aead_req_ctx *areq_ctx in cc_set_assoc_desc() local 765 struct aead_req_ctx *areq_ctx = aead_request_ctx_dma(areq); cc_proc_authen_desc() local 830 struct aead_req_ctx *areq_ctx = aead_request_ctx_dma(areq); cc_proc_cipher_desc() local 1085 struct aead_req_ctx *areq_ctx = aead_request_ctx_dma(req); cc_proc_header_desc() local 1315 struct aead_req_ctx *areq_ctx = aead_request_ctx_dma(req); validate_data_size() local 1594 struct aead_req_ctx *areq_ctx = aead_request_ctx_dma(req); cc_proc_rfc4309_ccm() local 1882 struct aead_req_ctx *areq_ctx = aead_request_ctx_dma(req); cc_proc_rfc4_gcm() local 1899 struct aead_req_ctx *areq_ctx = aead_request_ctx_dma(req); cc_proc_aead() local 2022 struct aead_req_ctx *areq_ctx = aead_request_ctx_dma(req); cc_aead_encrypt() local 2042 struct aead_req_ctx *areq_ctx = aead_request_ctx_dma(req); cc_rfc4309_ccm_encrypt() local 2066 struct aead_req_ctx *areq_ctx = aead_request_ctx_dma(req); cc_aead_decrypt() local 2084 struct aead_req_ctx *areq_ctx = aead_request_ctx_dma(req); cc_rfc4309_ccm_decrypt() local 2196 struct aead_req_ctx *areq_ctx = aead_request_ctx_dma(req); cc_rfc4106_gcm_encrypt() local 2220 struct aead_req_ctx *areq_ctx = aead_request_ctx_dma(req); cc_rfc4543_gcm_encrypt() local 2247 struct aead_req_ctx *areq_ctx = aead_request_ctx_dma(req); cc_rfc4106_gcm_decrypt() local 2271 struct aead_req_ctx *areq_ctx = aead_request_ctx_dma(req); cc_rfc4543_gcm_decrypt() local [all...] |
H A D | cc_hash.c | 103 static void cc_set_desc(struct ahash_req_ctx *areq_ctx, struct cc_hash_ctx *ctx, 2162 static void cc_set_desc(struct ahash_req_ctx *areq_ctx, in cc_set_desc() argument 2170 if (areq_ctx->data_dma_buf_type == CC_DMA_BUF_DLLI) { in cc_set_desc() 2173 sg_dma_address(areq_ctx->curr_sg), in cc_set_desc() 2174 areq_ctx->curr_sg->length, NS_BIT); in cc_set_desc() 2178 if (areq_ctx->data_dma_buf_type == CC_DMA_BUF_NULL) { in cc_set_desc() 2186 areq_ctx->mlli_params.mlli_dma_addr, in cc_set_desc() 2187 areq_ctx->mlli_params.mlli_len, NS_BIT); in cc_set_desc() 2189 areq_ctx->mlli_params.mlli_len); in cc_set_desc() 2196 areq_ctx in cc_set_desc() [all...] |
/kernel/linux/linux-5.10/crypto/ |
H A D | authencesn.c | 91 struct authenc_esn_request_ctx *areq_ctx = aead_request_ctx(req); in crypto_authenc_esn_genicv_tail() local 93 u8 *hash = PTR_ALIGN((u8 *)areq_ctx->tail, in crypto_authenc_esn_genicv_tail() 123 struct authenc_esn_request_ctx *areq_ctx = aead_request_ctx(req); in crypto_authenc_esn_genicv() local 126 u8 *hash = PTR_ALIGN((u8 *)areq_ctx->tail, in crypto_authenc_esn_genicv() 128 struct ahash_request *ahreq = (void *)(areq_ctx->tail + ctx->reqoff); in crypto_authenc_esn_genicv() 143 sg_init_table(areq_ctx->dst, 2); in crypto_authenc_esn_genicv() 144 dst = scatterwalk_ffwd(areq_ctx->dst, dst, 4); in crypto_authenc_esn_genicv() 184 struct authenc_esn_request_ctx *areq_ctx = aead_request_ctx(req); in crypto_authenc_esn_encrypt() local 186 struct skcipher_request *skreq = (void *)(areq_ctx->tail + in crypto_authenc_esn_encrypt() 194 sg_init_table(areq_ctx in crypto_authenc_esn_encrypt() 224 struct authenc_esn_request_ctx *areq_ctx = aead_request_ctx(req); crypto_authenc_esn_decrypt_tail() local 273 struct authenc_esn_request_ctx *areq_ctx = aead_request_ctx(req); crypto_authenc_esn_decrypt() local [all...] |
H A D | authenc.c | 118 struct authenc_request_ctx *areq_ctx = aead_request_ctx(req); in authenc_geniv_ahash_done() local 119 struct ahash_request *ahreq = (void *)(areq_ctx->tail + ictx->reqoff); in authenc_geniv_ahash_done() 139 struct authenc_request_ctx *areq_ctx = aead_request_ctx(req); in crypto_authenc_genicv() local 140 struct ahash_request *ahreq = (void *)(areq_ctx->tail + ictx->reqoff); in crypto_authenc_genicv() 141 u8 *hash = areq_ctx->tail; in crypto_authenc_genicv() 198 struct authenc_request_ctx *areq_ctx = aead_request_ctx(req); in crypto_authenc_encrypt() local 201 struct skcipher_request *skreq = (void *)(areq_ctx->tail + in crypto_authenc_encrypt() 206 src = scatterwalk_ffwd(areq_ctx->src, req->src, req->assoclen); in crypto_authenc_encrypt() 214 dst = scatterwalk_ffwd(areq_ctx->dst, req->dst, req->assoclen); in crypto_authenc_encrypt() 236 struct authenc_request_ctx *areq_ctx in crypto_authenc_decrypt_tail() local 286 struct authenc_request_ctx *areq_ctx = aead_request_ctx(req); crypto_authenc_decrypt() local [all...] |
/kernel/linux/linux-6.6/crypto/ |
H A D | authencesn.c | 91 struct authenc_esn_request_ctx *areq_ctx = aead_request_ctx(req); in crypto_authenc_esn_genicv_tail() local 93 u8 *hash = PTR_ALIGN((u8 *)areq_ctx->tail, in crypto_authenc_esn_genicv_tail() 122 struct authenc_esn_request_ctx *areq_ctx = aead_request_ctx(req); in crypto_authenc_esn_genicv() local 125 u8 *hash = PTR_ALIGN((u8 *)areq_ctx->tail, in crypto_authenc_esn_genicv() 127 struct ahash_request *ahreq = (void *)(areq_ctx->tail + ctx->reqoff); in crypto_authenc_esn_genicv() 142 sg_init_table(areq_ctx->dst, 2); in crypto_authenc_esn_genicv() 143 dst = scatterwalk_ffwd(areq_ctx->dst, dst, 4); in crypto_authenc_esn_genicv() 182 struct authenc_esn_request_ctx *areq_ctx = aead_request_ctx(req); in crypto_authenc_esn_encrypt() local 184 struct skcipher_request *skreq = (void *)(areq_ctx->tail + in crypto_authenc_esn_encrypt() 192 sg_init_table(areq_ctx in crypto_authenc_esn_encrypt() 222 struct authenc_esn_request_ctx *areq_ctx = aead_request_ctx(req); crypto_authenc_esn_decrypt_tail() local 270 struct authenc_esn_request_ctx *areq_ctx = aead_request_ctx(req); crypto_authenc_esn_decrypt() local [all...] |
H A D | authenc.c | 118 struct authenc_request_ctx *areq_ctx = aead_request_ctx(req); in authenc_geniv_ahash_done() local 119 struct ahash_request *ahreq = (void *)(areq_ctx->tail + ictx->reqoff); in authenc_geniv_ahash_done() 139 struct authenc_request_ctx *areq_ctx = aead_request_ctx(req); in crypto_authenc_genicv() local 140 struct ahash_request *ahreq = (void *)(areq_ctx->tail + ictx->reqoff); in crypto_authenc_genicv() 141 u8 *hash = areq_ctx->tail; in crypto_authenc_genicv() 197 struct authenc_request_ctx *areq_ctx = aead_request_ctx(req); in crypto_authenc_encrypt() local 200 struct skcipher_request *skreq = (void *)(areq_ctx->tail + in crypto_authenc_encrypt() 205 src = scatterwalk_ffwd(areq_ctx->src, req->src, req->assoclen); in crypto_authenc_encrypt() 213 dst = scatterwalk_ffwd(areq_ctx->dst, req->dst, req->assoclen); in crypto_authenc_encrypt() 235 struct authenc_request_ctx *areq_ctx in crypto_authenc_decrypt_tail() local 284 struct authenc_request_ctx *areq_ctx = aead_request_ctx(req); crypto_authenc_decrypt() local [all...] |