Home
last modified time | relevance | path

Searched refs:authsize (Results 1 – 17 of 17) sorted by relevance

/drivers/crypto/nx/
Dnx-aes-ccm.c82 unsigned int authsize) in ccm_aes_nx_setauthsize() argument
84 switch (authsize) { in ccm_aes_nx_setauthsize()
101 unsigned int authsize) in ccm4309_aes_nx_setauthsize() argument
103 switch (authsize) { in ccm4309_aes_nx_setauthsize()
145 static int generate_b0(u8 *iv, unsigned int assoclen, unsigned int authsize, in generate_b0() argument
148 unsigned int l, lp, m = authsize; in generate_b0()
171 unsigned int authsize, in generate_pat() argument
223 rc = generate_b0(iv, assoclen, authsize, nbytes, b0); in generate_pat()
348 unsigned int authsize = crypto_aead_authsize(crypto_aead_reqtfm(req)); in ccm_nx_decrypt() local
356 nbytes -= authsize; in ccm_nx_decrypt()
[all …]
Dnx-aes-gcm.c96 unsigned int authsize) in gcm4106_aes_nx_setauthsize() argument
98 switch (authsize) { in gcm4106_aes_nx_setauthsize()
/drivers/staging/ccree/
Dssi_buffer_mgr.c725 unsigned int authsize, in ssi_buffer_mgr_get_aead_icv_nents() argument
730 …unsigned int icv_required_size = authsize > last_entry_data_size ? (authsize - last_entry_data_siz… in ssi_buffer_mgr_get_aead_icv_nents()
748 if (last_entry_data_size > authsize) { in ssi_buffer_mgr_get_aead_icv_nents()
751 } else if (last_entry_data_size == authsize) { in ssi_buffer_mgr_get_aead_icv_nents()
913 unsigned int authsize = areq_ctx->req_authsize; in ssi_buffer_mgr_prepare_aead_data_dlli() local
920 (*src_last_bytes - authsize); in ssi_buffer_mgr_prepare_aead_data_dlli()
923 (*src_last_bytes - authsize); in ssi_buffer_mgr_prepare_aead_data_dlli()
928 (*src_last_bytes - authsize); in ssi_buffer_mgr_prepare_aead_data_dlli()
931 (*src_last_bytes - authsize); in ssi_buffer_mgr_prepare_aead_data_dlli()
936 (*dst_last_bytes - authsize); in ssi_buffer_mgr_prepare_aead_data_dlli()
[all …]
Dssi_aead.c82 unsigned int authsize; /* Actual (reduced?) size of the MAC/ICv */ member
242 ctx->authsize) != 0) { in ssi_aead_complete()
245 ctx->authsize, ctx->cipher_mode); in ssi_aead_complete()
256 areq->cryptlen + areq_ctx->dst_offset + ctx->authsize, SSI_SG_FROM_BUF); in ssi_aead_complete()
670 unsigned int authsize) in ssi_aead_setauthsize() argument
675 if ((authsize == 0) || in ssi_aead_setauthsize()
676 (authsize > crypto_aead_maxauthsize(authenc))) { in ssi_aead_setauthsize()
680 ctx->authsize = authsize; in ssi_aead_setauthsize()
681 SSI_LOG_DEBUG("authlen=%d\n", ctx->authsize); in ssi_aead_setauthsize()
688 unsigned int authsize) in ssi_rfc4309_ccm_setauthsize() argument
[all …]
/drivers/crypto/
Dixp4xx_crypto.c350 int authsize = crypto_aead_authsize(tfm); in finish_scattered_hmac() local
351 int decryptlen = req->assoclen + req->cryptlen - authsize; in finish_scattered_hmac()
355 req->dst, decryptlen, authsize, 1); in finish_scattered_hmac()
659 static int setup_auth(struct crypto_tfm *tfm, int encrypt, unsigned authsize, in setup_auth() argument
675 cfgword = algo->cfgword | ( authsize << 6); /* (authsize/4) << 8 */ in setup_auth()
991 unsigned authsize = crypto_aead_authsize(tfm); in aead_perform() local
1014 cryptlen = req->cryptlen -authsize; in aead_perform()
1015 eff_cryptlen -= authsize; in aead_perform()
1042 if (lastlen >= authsize) in aead_perform()
1044 buf->buf_len - authsize; in aead_perform()
[all …]
Dtalitos.c951 unsigned int authsize = crypto_aead_authsize(aead); in ipsec_esp_unmap() local
952 unsigned int cryptlen = areq->cryptlen - (encrypt ? 0 : authsize); in ipsec_esp_unmap()
987 unsigned int authsize = crypto_aead_authsize(authenc); in ipsec_esp_encrypt_done() local
1003 authsize, areq->assoclen + areq->cryptlen); in ipsec_esp_encrypt_done()
1017 unsigned int authsize = crypto_aead_authsize(authenc); in ipsec_esp_decrypt_swauth_done() local
1034 sg_pcopy_to_buffer(req->dst, nents, icvdata, authsize, in ipsec_esp_decrypt_swauth_done()
1035 len - authsize); in ipsec_esp_decrypt_swauth_done()
1038 icv = (char *)sg_virt(req->dst) + len - authsize; in ipsec_esp_decrypt_swauth_done()
1050 icv = oicv + authsize; in ipsec_esp_decrypt_swauth_done()
1054 err = crypto_memneq(oicv, icv, authsize) ? -EBADMSG : 0; in ipsec_esp_decrypt_swauth_done()
[all …]
Datmel-aes.c1550 u32 authsize; in atmel_aes_gcm_process() local
1553 authsize = crypto_aead_authsize(tfm); in atmel_aes_gcm_process()
1554 ctx->textlen = req->cryptlen - (enc ? 0 : authsize); in atmel_aes_gcm_process()
1701 u32 offset, authsize, itag[4], *otag = ctx->tag; in atmel_aes_gcm_finalize() local
1711 authsize = crypto_aead_authsize(tfm); in atmel_aes_gcm_finalize()
1713 scatterwalk_map_and_copy(otag, req->dst, offset, authsize, 1); in atmel_aes_gcm_finalize()
1716 scatterwalk_map_and_copy(itag, req->src, offset, authsize, 0); in atmel_aes_gcm_finalize()
1717 err = crypto_memneq(itag, otag, authsize) ? -EBADMSG : 0; in atmel_aes_gcm_finalize()
1762 unsigned int authsize) in atmel_aes_gcm_setauthsize() argument
1765 switch (authsize) { in atmel_aes_gcm_setauthsize()
[all …]
Domap-aes-gcm.c68 dd->authsize, 1); in omap_aes_gcm_done_task()
78 for (i = 0; i < dd->authsize; i++) { in omap_aes_gcm_done_task()
143 dd->authsize = authlen; in omap_aes_gcm_copy_buffers()
235 dd->authsize, 0); in omap_aes_gcm_dma_out_callback()
Domap-aes.h177 size_t authsize; member
Dpicoxcell_crypto.c510 unsigned int authsize) in spacc_aead_setauthsize() argument
514 return crypto_aead_setauthsize(ctx->sw_cipher, authsize); in spacc_aead_setauthsize()
571 unsigned int authsize = crypto_aead_authsize(aead); in spacc_aead_submit() local
596 proc_len -= authsize; in spacc_aead_submit()
600 writel(authsize, engine->regs + SPA_ICV_LEN_REG_OFFSET); in spacc_aead_submit()
/drivers/crypto/caam/
Dcaamalg.c114 unsigned int authsize; member
139 cnstr_shdsc_aead_null_encap(desc, &ctx->adata, ctx->authsize); in aead_null_set_sh_desc()
157 cnstr_shdsc_aead_null_decap(desc, &ctx->adata, ctx->authsize); in aead_null_set_sh_desc()
179 if (!ctx->authsize) in aead_set_sh_desc()
236 ctx->authsize, is_rfc3686, nonce, ctx1_iv_off, in aead_set_sh_desc()
268 ctx->authsize, alg->caam.geniv, is_rfc3686, in aead_set_sh_desc()
302 ctx->authsize, is_rfc3686, nonce, in aead_set_sh_desc()
312 unsigned int authsize) in aead_setauthsize() argument
316 ctx->authsize = authsize; in aead_setauthsize()
330 if (!ctx->cdata.keylen || !ctx->authsize) in gcm_set_sh_desc()
[all …]
Dcaamalg_qi.c58 unsigned int authsize; member
78 if (!ctx->cdata.keylen || !ctx->authsize) in aead_set_sh_desc()
126 ivsize, ctx->authsize, is_rfc3686, nonce, in aead_set_sh_desc()
151 ivsize, ctx->authsize, alg->caam.geniv, in aead_set_sh_desc()
178 ivsize, ctx->authsize, is_rfc3686, nonce, in aead_set_sh_desc()
185 static int aead_setauthsize(struct crypto_aead *authenc, unsigned int authsize) in aead_setauthsize() argument
189 ctx->authsize = authsize; in aead_setauthsize()
563 unsigned int authsize = ctx->authsize; in aead_edesc_alloc() local
584 (encrypt ? authsize : 0)); in aead_edesc_alloc()
588 (encrypt ? authsize : 0)); in aead_edesc_alloc()
[all …]
/drivers/crypto/chelsio/
Dchcr_algo.c124 int authsize = crypto_aead_authsize(tfm); in chcr_verify_tag() local
131 cmp = crypto_memneq(&fw6_pld->data[2], (fw6_pld + 1), authsize); in chcr_verify_tag()
135 authsize, req->assoclen + in chcr_verify_tag()
136 req->cryptlen - authsize); in chcr_verify_tag()
137 cmp = crypto_memneq(temp, (fw6_pld + 1), authsize); in chcr_verify_tag()
1914 unsigned int authsize = crypto_aead_authsize(crypto_aead_reqtfm(req)); in chcr_aead_need_fallback() local
1916 if (((req->cryptlen - (op_type ? authsize : 0)) == 0) || in chcr_aead_need_fallback()
1962 unsigned int authsize = crypto_aead_authsize(tfm); in create_authenc_wr() local
1970 dst_size = req->assoclen + req->cryptlen + (op_type ? -authsize : in create_authenc_wr()
1971 authsize); in create_authenc_wr()
[all …]
/drivers/crypto/ccp/
Dccp-crypto-aes-galois.c64 unsigned int authsize) in ccp_aes_gcm_setauthsize() argument
66 switch (authsize) { in ccp_aes_gcm_setauthsize()
125 rctx->cmd.u.aes.authsize = crypto_aead_authsize(tfm); in ccp_aes_gcm_crypt()
Dccp-ops.c628 unsigned int authsize; in ccp_run_aes_gcm_cmd() local
651 authsize = aes->authsize ? aes->authsize : AES_BLOCK_SIZE; in ccp_run_aes_gcm_cmd()
652 switch (authsize) { in ccp_run_aes_gcm_cmd()
679 ilen = aes->src_len - authsize; in ccp_run_aes_gcm_cmd()
860 ccp_get_dm_area(&final_wa, 0, p_tag, 0, authsize); in ccp_run_aes_gcm_cmd()
863 ret = ccp_init_dm_workarea(&tag, cmd_q, authsize, in ccp_run_aes_gcm_cmd()
867 ret = ccp_set_dm_area(&tag, 0, p_tag, 0, authsize); in ccp_run_aes_gcm_cmd()
872 authsize) ? -EBADMSG : 0; in ccp_run_aes_gcm_cmd()
/drivers/crypto/mediatek/
Dmtk-aes.c134 u32 authsize; member
838 info->cmd[cnt++] = AES_GCM_CMD4 | cpu_to_le32(gctx->authsize); in mtk_aes_gcm_info_init()
841 info->cmd[cnt++] = AES_GCM_CMD5 | cpu_to_le32(gctx->authsize); in mtk_aes_gcm_info_init()
842 info->cmd[cnt++] = AES_GCM_CMD6 | cpu_to_le32(gctx->authsize); in mtk_aes_gcm_info_init()
914 aes->total = len + gctx->authsize; in mtk_aes_gcm_start()
918 scatterwalk_map_and_copy(tag, req->dst, len, gctx->authsize, 1); in mtk_aes_gcm_start()
922 gctx->textlen = req->cryptlen - gctx->authsize; in mtk_aes_gcm_start()
1035 u32 authsize) in mtk_aes_gcm_setauthsize() argument
1041 switch (authsize) { in mtk_aes_gcm_setauthsize()
1050 gctx->authsize = authsize; in mtk_aes_gcm_setauthsize()
/drivers/crypto/bcm/
Dcipher.c3127 static int aead_setauthsize(struct crypto_aead *cipher, unsigned int authsize) in aead_setauthsize() argument
3133 __func__, ctx->authkeylen, authsize); in aead_setauthsize()
3135 ctx->digestsize = authsize; in aead_setauthsize()
3141 ret = crypto_aead_setauthsize(ctx->fallback_cipher, authsize); in aead_setauthsize()