/linux-6.1.9/drivers/crypto/aspeed/ |
D | aspeed-hace-hash.c | 89 struct aspeed_sham_reqctx *rctx) in aspeed_ahash_fill_padding() argument 94 AHASH_DBG(hace_dev, "rctx flags:0x%x\n", (u32)rctx->flags); in aspeed_ahash_fill_padding() 96 switch (rctx->flags & SHA_FLAGS_MASK) { in aspeed_ahash_fill_padding() 100 bits[0] = cpu_to_be64(rctx->digcnt[0] << 3); in aspeed_ahash_fill_padding() 101 index = rctx->bufcnt & 0x3f; in aspeed_ahash_fill_padding() 103 *(rctx->buffer + rctx->bufcnt) = 0x80; in aspeed_ahash_fill_padding() 104 memset(rctx->buffer + rctx->bufcnt + 1, 0, padlen - 1); in aspeed_ahash_fill_padding() 105 memcpy(rctx->buffer + rctx->bufcnt + padlen, bits, 8); in aspeed_ahash_fill_padding() 106 rctx->bufcnt += padlen + 8; in aspeed_ahash_fill_padding() 109 bits[1] = cpu_to_be64(rctx->digcnt[0] << 3); in aspeed_ahash_fill_padding() [all …]
|
/linux-6.1.9/drivers/crypto/keembay/ |
D | keembay-ocs-hcu-core.c | 115 static inline unsigned int kmb_get_total_data(struct ocs_hcu_rctx *rctx) in kmb_get_total_data() argument 117 return rctx->sg_data_total + rctx->buf_cnt; in kmb_get_total_data() 121 static int flush_sg_to_ocs_buffer(struct ocs_hcu_rctx *rctx) in flush_sg_to_ocs_buffer() argument 125 if (rctx->sg_data_total > (sizeof(rctx->buffer) - rctx->buf_cnt)) { in flush_sg_to_ocs_buffer() 130 while (rctx->sg_data_total) { in flush_sg_to_ocs_buffer() 131 if (!rctx->sg) { in flush_sg_to_ocs_buffer() 139 if (rctx->sg_data_offset == rctx->sg->length) { in flush_sg_to_ocs_buffer() 140 rctx->sg = sg_next(rctx->sg); in flush_sg_to_ocs_buffer() 141 rctx->sg_data_offset = 0; in flush_sg_to_ocs_buffer() 149 count = min(rctx->sg->length - rctx->sg_data_offset, in flush_sg_to_ocs_buffer() [all …]
|
D | keembay-ocs-aes-core.c | 243 static void ocs_aes_init_rctx(struct ocs_aes_rctx *rctx) in ocs_aes_init_rctx() argument 246 memset(rctx, 0, sizeof(*rctx)); in ocs_aes_init_rctx() 249 rctx->src_dll.dma_addr = DMA_MAPPING_ERROR; in ocs_aes_init_rctx() 250 rctx->dst_dll.dma_addr = DMA_MAPPING_ERROR; in ocs_aes_init_rctx() 251 rctx->aad_src_dll.dma_addr = DMA_MAPPING_ERROR; in ocs_aes_init_rctx() 252 rctx->aad_dst_dll.dma_addr = DMA_MAPPING_ERROR; in ocs_aes_init_rctx() 317 struct ocs_aes_rctx *rctx = skcipher_request_ctx(req); in kmb_ocs_sk_common() local 360 ocs_aes_init_rctx(rctx); in kmb_ocs_sk_common() 361 rctx->instruction = instruction; in kmb_ocs_sk_common() 362 rctx->mode = mode; in kmb_ocs_sk_common() [all …]
|
/linux-6.1.9/drivers/crypto/qce/ |
D | aead.c | 27 struct qce_aead_reqctx *rctx = aead_request_ctx(req); in qce_aead_done() local 49 dma_unmap_sg(qce->dev, rctx->src_sg, rctx->src_nents, dir_src); in qce_aead_done() 51 dma_unmap_sg(qce->dev, rctx->dst_sg, rctx->dst_nents, dir_dst); in qce_aead_done() 53 if (IS_CCM(rctx->flags)) { in qce_aead_done() 55 sg_free_table(&rctx->src_tbl); in qce_aead_done() 57 sg_free_table(&rctx->dst_tbl); in qce_aead_done() 59 if (!(IS_DECRYPT(rctx->flags) && !diff_dst)) in qce_aead_done() 60 sg_free_table(&rctx->dst_tbl); in qce_aead_done() 63 sg_free_table(&rctx->dst_tbl); in qce_aead_done() 70 if (IS_ENCRYPT(rctx->flags)) { in qce_aead_done() [all …]
|
D | sha.c | 41 struct qce_sha_reqctx *rctx = ahash_request_ctx(req); in qce_ahash_done() local 53 dma_unmap_sg(qce->dev, req->src, rctx->src_nents, DMA_TO_DEVICE); in qce_ahash_done() 54 dma_unmap_sg(qce->dev, &rctx->result_sg, 1, DMA_FROM_DEVICE); in qce_ahash_done() 56 memcpy(rctx->digest, result->auth_iv, digestsize); in qce_ahash_done() 57 if (req->result && rctx->last_blk) in qce_ahash_done() 60 rctx->byte_count[0] = cpu_to_be32(result->auth_byte_count[0]); in qce_ahash_done() 61 rctx->byte_count[1] = cpu_to_be32(result->auth_byte_count[1]); in qce_ahash_done() 67 req->src = rctx->src_orig; in qce_ahash_done() 68 req->nbytes = rctx->nbytes_orig; in qce_ahash_done() 69 rctx->last_blk = false; in qce_ahash_done() [all …]
|
D | skcipher.c | 31 struct qce_cipher_reqctx *rctx = skcipher_request_ctx(req); in qce_skcipher_done() local 50 dma_unmap_sg(qce->dev, rctx->src_sg, rctx->src_nents, dir_src); in qce_skcipher_done() 51 dma_unmap_sg(qce->dev, rctx->dst_sg, rctx->dst_nents, dir_dst); in qce_skcipher_done() 53 sg_free_table(&rctx->dst_tbl); in qce_skcipher_done() 59 memcpy(rctx->iv, result_buf->encr_cntr_iv, rctx->ivsize); in qce_skcipher_done() 67 struct qce_cipher_reqctx *rctx = skcipher_request_ctx(req); in qce_skcipher_async_req_handle() local 77 rctx->iv = req->iv; in qce_skcipher_async_req_handle() 78 rctx->ivsize = crypto_skcipher_ivsize(skcipher); in qce_skcipher_async_req_handle() 79 rctx->cryptlen = req->cryptlen; in qce_skcipher_async_req_handle() 85 rctx->src_nents = sg_nents_for_len(req->src, req->cryptlen); in qce_skcipher_async_req_handle() [all …]
|
D | common.c | 150 struct qce_sha_reqctx *rctx = ahash_request_ctx(req); in qce_setup_regs_ahash() local 161 if (!rctx->last_blk && req->nbytes % blocksize) in qce_setup_regs_ahash() 166 if (IS_CMAC(rctx->flags)) { in qce_setup_regs_ahash() 174 auth_cfg = qce_auth_cfg(rctx->flags, rctx->authklen, digestsize); in qce_setup_regs_ahash() 177 if (IS_SHA_HMAC(rctx->flags) || IS_CMAC(rctx->flags)) { in qce_setup_regs_ahash() 178 u32 authkey_words = rctx->authklen / sizeof(u32); in qce_setup_regs_ahash() 180 qce_cpu_to_be32p_array(mackey, rctx->authkey, rctx->authklen); in qce_setup_regs_ahash() 185 if (IS_CMAC(rctx->flags)) in qce_setup_regs_ahash() 188 if (rctx->first_blk) in qce_setup_regs_ahash() 189 memcpy(auth, rctx->digest, digestsize); in qce_setup_regs_ahash() [all …]
|
/linux-6.1.9/drivers/crypto/ccp/ |
D | ccp-crypto-aes-cmac.c | 28 struct ccp_aes_cmac_req_ctx *rctx = ahash_request_ctx(req); in ccp_aes_cmac_complete() local 34 if (rctx->hash_rem) { in ccp_aes_cmac_complete() 36 unsigned int offset = rctx->nbytes - rctx->hash_rem; in ccp_aes_cmac_complete() 38 scatterwalk_map_and_copy(rctx->buf, rctx->src, in ccp_aes_cmac_complete() 39 offset, rctx->hash_rem, 0); in ccp_aes_cmac_complete() 40 rctx->buf_count = rctx->hash_rem; in ccp_aes_cmac_complete() 42 rctx->buf_count = 0; in ccp_aes_cmac_complete() 46 if (req->result && rctx->final) in ccp_aes_cmac_complete() 47 memcpy(req->result, rctx->iv, digest_size); in ccp_aes_cmac_complete() 50 sg_free_table(&rctx->data_sg); in ccp_aes_cmac_complete() [all …]
|
D | ccp-crypto-sha.c | 31 struct ccp_sha_req_ctx *rctx = ahash_request_ctx(req); in ccp_sha_complete() local 37 if (rctx->hash_rem) { in ccp_sha_complete() 39 unsigned int offset = rctx->nbytes - rctx->hash_rem; in ccp_sha_complete() 41 scatterwalk_map_and_copy(rctx->buf, rctx->src, in ccp_sha_complete() 42 offset, rctx->hash_rem, 0); in ccp_sha_complete() 43 rctx->buf_count = rctx->hash_rem; in ccp_sha_complete() 45 rctx->buf_count = 0; in ccp_sha_complete() 49 if (req->result && rctx->final) in ccp_sha_complete() 50 memcpy(req->result, rctx->ctx, digest_size); in ccp_sha_complete() 53 sg_free_table(&rctx->data_sg); in ccp_sha_complete() [all …]
|
D | ccp-crypto-aes-xts.c | 65 struct ccp_aes_req_ctx *rctx = skcipher_request_ctx(req); in ccp_aes_xts_complete() local 70 memcpy(req->iv, rctx->iv, AES_BLOCK_SIZE); in ccp_aes_xts_complete() 109 struct ccp_aes_req_ctx *rctx = skcipher_request_ctx(req); in ccp_aes_xts_crypt() local 151 skcipher_request_set_tfm(&rctx->fallback_req, in ccp_aes_xts_crypt() 153 skcipher_request_set_callback(&rctx->fallback_req, in ccp_aes_xts_crypt() 157 skcipher_request_set_crypt(&rctx->fallback_req, req->src, in ccp_aes_xts_crypt() 159 ret = encrypt ? crypto_skcipher_encrypt(&rctx->fallback_req) : in ccp_aes_xts_crypt() 160 crypto_skcipher_decrypt(&rctx->fallback_req); in ccp_aes_xts_crypt() 164 memcpy(rctx->iv, req->iv, AES_BLOCK_SIZE); in ccp_aes_xts_crypt() 165 sg_init_one(&rctx->iv_sg, rctx->iv, AES_BLOCK_SIZE); in ccp_aes_xts_crypt() [all …]
|
D | ccp-crypto-aes-galois.c | 80 struct ccp_aes_req_ctx *rctx = aead_request_ctx(req); in ccp_aes_gcm_crypt() local 105 memcpy(rctx->iv, req->iv, GCM_AES_IV_SIZE); in ccp_aes_gcm_crypt() 107 rctx->iv[i + GCM_AES_IV_SIZE] = 0; in ccp_aes_gcm_crypt() 108 rctx->iv[AES_BLOCK_SIZE - 1] = 1; in ccp_aes_gcm_crypt() 111 iv_sg = &rctx->iv_sg; in ccp_aes_gcm_crypt() 113 sg_init_one(iv_sg, rctx->iv, iv_len); in ccp_aes_gcm_crypt() 116 memset(&rctx->cmd, 0, sizeof(rctx->cmd)); in ccp_aes_gcm_crypt() 117 INIT_LIST_HEAD(&rctx->cmd.entry); in ccp_aes_gcm_crypt() 118 rctx->cmd.engine = CCP_ENGINE_AES; in ccp_aes_gcm_crypt() 119 rctx->cmd.u.aes.authsize = crypto_aead_authsize(tfm); in ccp_aes_gcm_crypt() [all …]
|
D | ccp-crypto-des3.c | 25 struct ccp_des3_req_ctx *rctx = skcipher_request_ctx(req); in ccp_des3_complete() local 31 memcpy(req->iv, rctx->iv, DES3_EDE_BLOCK_SIZE); in ccp_des3_complete() 64 struct ccp_des3_req_ctx *rctx = skcipher_request_ctx(req); in ccp_des3_crypt() local 80 memcpy(rctx->iv, req->iv, DES3_EDE_BLOCK_SIZE); in ccp_des3_crypt() 81 iv_sg = &rctx->iv_sg; in ccp_des3_crypt() 83 sg_init_one(iv_sg, rctx->iv, iv_len); in ccp_des3_crypt() 86 memset(&rctx->cmd, 0, sizeof(rctx->cmd)); in ccp_des3_crypt() 87 INIT_LIST_HEAD(&rctx->cmd.entry); in ccp_des3_crypt() 88 rctx->cmd.engine = CCP_ENGINE_DES3; in ccp_des3_crypt() 89 rctx->cmd.u.des3.type = ctx->u.des3.type; in ccp_des3_crypt() [all …]
|
/linux-6.1.9/drivers/crypto/cavium/nitrox/ |
D | nitrox_aead.c | 151 static int nitrox_set_creq(struct nitrox_aead_rctx *rctx) in nitrox_set_creq() argument 153 struct se_crypto_request *creq = &rctx->nkreq.creq; in nitrox_set_creq() 157 creq->flags = rctx->flags; in nitrox_set_creq() 158 creq->gfp = (rctx->flags & CRYPTO_TFM_REQ_MAY_SLEEP) ? GFP_KERNEL : in nitrox_set_creq() 163 creq->ctrl.s.arg = rctx->ctrl_arg; in nitrox_set_creq() 165 creq->gph.param0 = cpu_to_be16(rctx->cryptlen); in nitrox_set_creq() 166 creq->gph.param1 = cpu_to_be16(rctx->cryptlen + rctx->assoclen); in nitrox_set_creq() 167 creq->gph.param2 = cpu_to_be16(rctx->ivsize + rctx->assoclen); in nitrox_set_creq() 169 param3.auth_offset = rctx->ivsize; in nitrox_set_creq() 172 creq->ctx_handle = rctx->ctx_handle; in nitrox_set_creq() [all …]
|
/linux-6.1.9/drivers/crypto/bcm/ |
D | cipher.c | 135 struct iproc_reqctx_s *rctx, in spu_skcipher_rx_sg_create() argument 141 struct iproc_ctx_s *ctx = rctx->ctx; in spu_skcipher_rx_sg_create() 145 rctx->gfp); in spu_skcipher_rx_sg_create() 152 sg_set_buf(sg++, rctx->msg_buf.spu_resp_hdr, ctx->spu_resp_hdr_len); in spu_skcipher_rx_sg_create() 157 sg_set_buf(sg++, rctx->msg_buf.c.supdt_tweak, in spu_skcipher_rx_sg_create() 161 datalen = spu_msg_sg_add(&sg, &rctx->dst_sg, &rctx->dst_skip, in spu_skcipher_rx_sg_create() 162 rctx->dst_nents, chunksize); in spu_skcipher_rx_sg_create() 170 sg_set_buf(sg++, rctx->msg_buf.rx_stat_pad, stat_pad_len); in spu_skcipher_rx_sg_create() 172 memset(rctx->msg_buf.rx_stat, 0, SPU_RX_STATUS_LEN); in spu_skcipher_rx_sg_create() 173 sg_set_buf(sg, rctx->msg_buf.rx_stat, spu->spu_rx_status_len()); in spu_skcipher_rx_sg_create() [all …]
|
/linux-6.1.9/drivers/crypto/allwinner/sun8i-ss/ |
D | sun8i-ss-hash.c | 166 struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq); in sun8i_ss_hash_init() local 170 memset(rctx, 0, sizeof(struct sun8i_ss_hash_reqctx)); in sun8i_ss_hash_init() 172 ahash_request_set_tfm(&rctx->fallback_req, tfmctx->fallback_tfm); in sun8i_ss_hash_init() 173 rctx->fallback_req.base.flags = areq->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP; in sun8i_ss_hash_init() 175 return crypto_ahash_init(&rctx->fallback_req); in sun8i_ss_hash_init() 180 struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq); in sun8i_ss_hash_export() local 184 ahash_request_set_tfm(&rctx->fallback_req, tfmctx->fallback_tfm); in sun8i_ss_hash_export() 185 rctx->fallback_req.base.flags = areq->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP; in sun8i_ss_hash_export() 187 return crypto_ahash_export(&rctx->fallback_req, out); in sun8i_ss_hash_export() 192 struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq); in sun8i_ss_hash_import() local [all …]
|
D | sun8i-ss-cipher.c | 93 struct sun8i_cipher_req_ctx *rctx = skcipher_request_ctx(areq); in sun8i_ss_cipher_fallback() local 103 skcipher_request_set_tfm(&rctx->fallback_req, op->fallback_tfm); in sun8i_ss_cipher_fallback() 104 skcipher_request_set_callback(&rctx->fallback_req, areq->base.flags, in sun8i_ss_cipher_fallback() 106 skcipher_request_set_crypt(&rctx->fallback_req, areq->src, areq->dst, in sun8i_ss_cipher_fallback() 108 if (rctx->op_dir & SS_DECRYPTION) in sun8i_ss_cipher_fallback() 109 err = crypto_skcipher_decrypt(&rctx->fallback_req); in sun8i_ss_cipher_fallback() 111 err = crypto_skcipher_encrypt(&rctx->fallback_req); in sun8i_ss_cipher_fallback() 120 struct sun8i_cipher_req_ctx *rctx = skcipher_request_ctx(areq); in sun8i_ss_setup_ivs() local 125 struct sun8i_ss_flow *sf = &ss->flows[rctx->flow]; in sun8i_ss_setup_ivs() 130 rctx->ivlen = ivsize; in sun8i_ss_setup_ivs() [all …]
|
/linux-6.1.9/drivers/crypto/stm32/ |
D | stm32-hash.c | 254 struct stm32_hash_request_ctx *rctx = ahash_request_ctx(hdev->req); in stm32_hash_write_ctrl() local 261 switch (rctx->flags & HASH_FLAGS_ALGO_MASK) { in stm32_hash_write_ctrl() 278 reg |= (rctx->data_type << HASH_CR_DATATYPE_POS); in stm32_hash_write_ctrl() 280 if (rctx->flags & HASH_FLAGS_HMAC) { in stm32_hash_write_ctrl() 297 static void stm32_hash_append_sg(struct stm32_hash_request_ctx *rctx) in stm32_hash_append_sg() argument 301 while ((rctx->bufcnt < rctx->buflen) && rctx->total) { in stm32_hash_append_sg() 302 count = min(rctx->sg->length - rctx->offset, rctx->total); in stm32_hash_append_sg() 303 count = min(count, rctx->buflen - rctx->bufcnt); in stm32_hash_append_sg() 306 if ((rctx->sg->length == 0) && !sg_is_last(rctx->sg)) { in stm32_hash_append_sg() 307 rctx->sg = sg_next(rctx->sg); in stm32_hash_append_sg() [all …]
|
/linux-6.1.9/crypto/ |
D | chacha20poly1305.c | 74 struct chachapoly_req_ctx *rctx = aead_request_ctx(req); in async_done_continue() local 76 rctx->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; in async_done_continue() 97 struct chachapoly_req_ctx *rctx = aead_request_ctx(req); in poly_verify_tag() local 98 u8 tag[sizeof(rctx->tag)]; in poly_verify_tag() 101 req->assoclen + rctx->cryptlen, in poly_verify_tag() 103 if (crypto_memneq(tag, rctx->tag, sizeof(tag))) in poly_verify_tag() 110 struct chachapoly_req_ctx *rctx = aead_request_ctx(req); in poly_copy_tag() local 112 scatterwalk_map_and_copy(rctx->tag, req->dst, in poly_copy_tag() 113 req->assoclen + rctx->cryptlen, in poly_copy_tag() 114 sizeof(rctx->tag), 1); in poly_copy_tag() [all …]
|
/linux-6.1.9/drivers/crypto/rockchip/ |
D | rk3288_crypto_ahash.c | 39 struct rk_ahash_rctx *rctx = ahash_request_ctx(areq); in rk_ahash_digest_fb() local 43 ahash_request_set_tfm(&rctx->fallback_req, tfmctx->fallback_tfm); in rk_ahash_digest_fb() 44 rctx->fallback_req.base.flags = areq->base.flags & in rk_ahash_digest_fb() 47 rctx->fallback_req.nbytes = areq->nbytes; in rk_ahash_digest_fb() 48 rctx->fallback_req.src = areq->src; in rk_ahash_digest_fb() 49 rctx->fallback_req.result = areq->result; in rk_ahash_digest_fb() 51 return crypto_ahash_digest(&rctx->fallback_req); in rk_ahash_digest_fb() 78 struct rk_ahash_rctx *rctx = ahash_request_ctx(req); in rk_ahash_reg_init() local 101 CRYPTO_WRITE(dev, RK_CRYPTO_HASH_CTRL, rctx->mode | in rk_ahash_reg_init() 113 struct rk_ahash_rctx *rctx = ahash_request_ctx(req); in rk_ahash_init() local [all …]
|
D | rk3288_crypto_skcipher.c | 59 struct rk_cipher_rctx *rctx = skcipher_request_ctx(areq); in rk_cipher_fallback() local 62 skcipher_request_set_tfm(&rctx->fallback_req, op->fallback_tfm); in rk_cipher_fallback() 63 skcipher_request_set_callback(&rctx->fallback_req, areq->base.flags, in rk_cipher_fallback() 65 skcipher_request_set_crypt(&rctx->fallback_req, areq->src, areq->dst, in rk_cipher_fallback() 67 if (rctx->mode & RK_CRYPTO_DEC) in rk_cipher_fallback() 68 err = crypto_skcipher_decrypt(&rctx->fallback_req); in rk_cipher_fallback() 70 err = crypto_skcipher_encrypt(&rctx->fallback_req); in rk_cipher_fallback() 136 struct rk_cipher_rctx *rctx = skcipher_request_ctx(req); in rk_aes_ecb_encrypt() local 139 rctx->mode = RK_CRYPTO_AES_ECB_MODE; in rk_aes_ecb_encrypt() 147 struct rk_cipher_rctx *rctx = skcipher_request_ctx(req); in rk_aes_ecb_decrypt() local [all …]
|
/linux-6.1.9/drivers/crypto/ |
D | sahara.c | 556 struct sahara_aes_reqctx *rctx; in sahara_aes_process() local 570 rctx = skcipher_request_ctx(req); in sahara_aes_process() 572 rctx->mode &= FLAGS_MODE_MASK; in sahara_aes_process() 573 dev->flags = (dev->flags & ~FLAGS_MODE_MASK) | rctx->mode; in sahara_aes_process() 630 struct sahara_aes_reqctx *rctx = skcipher_request_ctx(req); in sahara_aes_crypt() local 643 rctx->mode = mode; in sahara_aes_crypt() 656 struct sahara_aes_reqctx *rctx = skcipher_request_ctx(req); in sahara_aes_ecb_encrypt() local 661 skcipher_request_set_tfm(&rctx->fallback_req, ctx->fallback); in sahara_aes_ecb_encrypt() 662 skcipher_request_set_callback(&rctx->fallback_req, in sahara_aes_ecb_encrypt() 666 skcipher_request_set_crypt(&rctx->fallback_req, req->src, in sahara_aes_ecb_encrypt() [all …]
|
D | omap-aes-gcm.c | 46 struct omap_aes_reqctx *rctx; in omap_aes_gcm_done_task() local 50 rctx = aead_request_ctx(dd->aead_req); in omap_aes_gcm_done_task() 65 scatterwalk_map_and_copy(rctx->auth_tag, in omap_aes_gcm_done_task() 77 tag = (u8 *)rctx->auth_tag; in omap_aes_gcm_done_task() 185 struct omap_aes_reqctx *rctx; in omap_aes_gcm_dma_out_callback() local 194 rctx = aead_request_ctx(dd->aead_req); in omap_aes_gcm_dma_out_callback() 195 auth_tag = (u32 *)rctx->auth_tag; in omap_aes_gcm_dma_out_callback() 219 struct omap_aes_reqctx *rctx = aead_request_ctx(req); in omap_aes_gcm_prepare_req() local 220 struct omap_aes_dev *dd = rctx->dd; in omap_aes_gcm_prepare_req() 226 rctx->mode &= FLAGS_MODE_MASK; in omap_aes_gcm_prepare_req() [all …]
|
/linux-6.1.9/drivers/crypto/allwinner/sun8i-ce/ |
D | sun8i-ce-hash.c | 76 struct sun8i_ce_hash_reqctx *rctx = ahash_request_ctx(areq); in sun8i_ce_hash_init() local 80 memset(rctx, 0, sizeof(struct sun8i_ce_hash_reqctx)); in sun8i_ce_hash_init() 82 ahash_request_set_tfm(&rctx->fallback_req, tfmctx->fallback_tfm); in sun8i_ce_hash_init() 83 rctx->fallback_req.base.flags = areq->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP; in sun8i_ce_hash_init() 85 return crypto_ahash_init(&rctx->fallback_req); in sun8i_ce_hash_init() 90 struct sun8i_ce_hash_reqctx *rctx = ahash_request_ctx(areq); in sun8i_ce_hash_export() local 94 ahash_request_set_tfm(&rctx->fallback_req, tfmctx->fallback_tfm); in sun8i_ce_hash_export() 95 rctx->fallback_req.base.flags = areq->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP; in sun8i_ce_hash_export() 97 return crypto_ahash_export(&rctx->fallback_req, out); in sun8i_ce_hash_export() 102 struct sun8i_ce_hash_reqctx *rctx = ahash_request_ctx(areq); in sun8i_ce_hash_import() local [all …]
|
D | sun8i-ce-cipher.c | 93 struct sun8i_cipher_req_ctx *rctx = skcipher_request_ctx(areq); in sun8i_ce_cipher_fallback() local 103 skcipher_request_set_tfm(&rctx->fallback_req, op->fallback_tfm); in sun8i_ce_cipher_fallback() 104 skcipher_request_set_callback(&rctx->fallback_req, areq->base.flags, in sun8i_ce_cipher_fallback() 106 skcipher_request_set_crypt(&rctx->fallback_req, areq->src, areq->dst, in sun8i_ce_cipher_fallback() 108 if (rctx->op_dir & CE_DECRYPTION) in sun8i_ce_cipher_fallback() 109 err = crypto_skcipher_decrypt(&rctx->fallback_req); in sun8i_ce_cipher_fallback() 111 err = crypto_skcipher_encrypt(&rctx->fallback_req); in sun8i_ce_cipher_fallback() 121 struct sun8i_cipher_req_ctx *rctx = skcipher_request_ctx(areq); in sun8i_ce_cipher_prepare() local 141 rctx->op_dir, areq->iv, crypto_skcipher_ivsize(tfm), in sun8i_ce_cipher_prepare() 148 flow = rctx->flow; in sun8i_ce_cipher_prepare() [all …]
|
/linux-6.1.9/drivers/crypto/gemini/ |
D | sl3516-ce-cipher.c | 103 struct sl3516_ce_cipher_req_ctx *rctx = skcipher_request_ctx(areq); in sl3516_ce_cipher_fallback() local 111 skcipher_request_set_tfm(&rctx->fallback_req, op->fallback_tfm); in sl3516_ce_cipher_fallback() 112 skcipher_request_set_callback(&rctx->fallback_req, areq->base.flags, in sl3516_ce_cipher_fallback() 114 skcipher_request_set_crypt(&rctx->fallback_req, areq->src, areq->dst, in sl3516_ce_cipher_fallback() 116 if (rctx->op_dir == CE_DECRYPTION) in sl3516_ce_cipher_fallback() 117 err = crypto_skcipher_decrypt(&rctx->fallback_req); in sl3516_ce_cipher_fallback() 119 err = crypto_skcipher_encrypt(&rctx->fallback_req); in sl3516_ce_cipher_fallback() 128 struct sl3516_ce_cipher_req_ctx *rctx = skcipher_request_ctx(areq); in sl3516_ce_cipher() local 144 rctx->op_dir, areq->iv, crypto_skcipher_ivsize(tfm), in sl3516_ce_cipher() 181 rctx->t_src[i].addr = sg_dma_address(sg); in sl3516_ce_cipher() [all …]
|