Home
last modified time | relevance | path

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

12

/Linux-v4.19/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 …]
/Linux-v4.19/arch/x86/crypto/
Dmorus640_glue.c132 unsigned int authsize) in crypto_morus640_glue_setauthsize() argument
134 return (authsize <= MORUS_MAX_AUTH_SIZE) ? 0 : -EINVAL; in crypto_morus640_glue_setauthsize()
168 unsigned int authsize = crypto_aead_authsize(tfm); in crypto_morus640_glue_encrypt() local
174 req->assoclen + cryptlen, authsize, 1); in crypto_morus640_glue_encrypt()
192 unsigned int authsize = crypto_aead_authsize(tfm); in crypto_morus640_glue_decrypt() local
193 unsigned int cryptlen = req->cryptlen - authsize; in crypto_morus640_glue_decrypt()
196 req->assoclen + cryptlen, authsize, 0); in crypto_morus640_glue_decrypt()
200 return crypto_memneq(tag.bytes, zeros, authsize) ? -EBADMSG : 0; in crypto_morus640_glue_decrypt()
223 unsigned int authsize) in cryptd_morus640_glue_setauthsize() argument
228 return crypto_aead_setauthsize(&cryptd_tfm->base, authsize); in cryptd_morus640_glue_setauthsize()
Daegis128l-aesni-glue.c173 unsigned int authsize) in crypto_aegis128l_aesni_setauthsize() argument
175 if (authsize > AEGIS128L_MAX_AUTH_SIZE) in crypto_aegis128l_aesni_setauthsize()
177 if (authsize < AEGIS128L_MIN_AUTH_SIZE) in crypto_aegis128l_aesni_setauthsize()
211 unsigned int authsize = crypto_aead_authsize(tfm); in crypto_aegis128l_aesni_encrypt() local
217 req->assoclen + cryptlen, authsize, 1); in crypto_aegis128l_aesni_encrypt()
233 unsigned int authsize = crypto_aead_authsize(tfm); in crypto_aegis128l_aesni_decrypt() local
234 unsigned int cryptlen = req->cryptlen - authsize; in crypto_aegis128l_aesni_decrypt()
237 req->assoclen + cryptlen, authsize, 0); in crypto_aegis128l_aesni_decrypt()
241 return crypto_memneq(tag.bytes, zeros.bytes, authsize) ? -EBADMSG : 0; in crypto_aegis128l_aesni_decrypt()
263 unsigned int authsize) in cryptd_aegis128l_aesni_setauthsize() argument
[all …]
Daegis128-aesni-glue.c173 unsigned int authsize) in crypto_aegis128_aesni_setauthsize() argument
175 if (authsize > AEGIS128_MAX_AUTH_SIZE) in crypto_aegis128_aesni_setauthsize()
177 if (authsize < AEGIS128_MIN_AUTH_SIZE) in crypto_aegis128_aesni_setauthsize()
211 unsigned int authsize = crypto_aead_authsize(tfm); in crypto_aegis128_aesni_encrypt() local
217 req->assoclen + cryptlen, authsize, 1); in crypto_aegis128_aesni_encrypt()
233 unsigned int authsize = crypto_aead_authsize(tfm); in crypto_aegis128_aesni_decrypt() local
234 unsigned int cryptlen = req->cryptlen - authsize; in crypto_aegis128_aesni_decrypt()
237 req->assoclen + cryptlen, authsize, 0); in crypto_aegis128_aesni_decrypt()
241 return crypto_memneq(tag.bytes, zeros.bytes, authsize) ? -EBADMSG : 0; in crypto_aegis128_aesni_decrypt()
263 unsigned int authsize) in cryptd_aegis128_aesni_setauthsize() argument
[all …]
Daegis256-aesni-glue.c173 unsigned int authsize) in crypto_aegis256_aesni_setauthsize() argument
175 if (authsize > AEGIS256_MAX_AUTH_SIZE) in crypto_aegis256_aesni_setauthsize()
177 if (authsize < AEGIS256_MIN_AUTH_SIZE) in crypto_aegis256_aesni_setauthsize()
211 unsigned int authsize = crypto_aead_authsize(tfm); in crypto_aegis256_aesni_encrypt() local
217 req->assoclen + cryptlen, authsize, 1); in crypto_aegis256_aesni_encrypt()
233 unsigned int authsize = crypto_aead_authsize(tfm); in crypto_aegis256_aesni_decrypt() local
234 unsigned int cryptlen = req->cryptlen - authsize; in crypto_aegis256_aesni_decrypt()
237 req->assoclen + cryptlen, authsize, 0); in crypto_aegis256_aesni_decrypt()
241 return crypto_memneq(tag.bytes, zeros.bytes, authsize) ? -EBADMSG : 0; in crypto_aegis256_aesni_decrypt()
263 unsigned int authsize) in cryptd_aegis256_aesni_setauthsize() argument
[all …]
Dmorus1280_glue.c136 unsigned int authsize) in crypto_morus1280_glue_setauthsize() argument
138 return (authsize <= MORUS_MAX_AUTH_SIZE) ? 0 : -EINVAL; in crypto_morus1280_glue_setauthsize()
172 unsigned int authsize = crypto_aead_authsize(tfm); in crypto_morus1280_glue_encrypt() local
178 req->assoclen + cryptlen, authsize, 1); in crypto_morus1280_glue_encrypt()
196 unsigned int authsize = crypto_aead_authsize(tfm); in crypto_morus1280_glue_decrypt() local
197 unsigned int cryptlen = req->cryptlen - authsize; in crypto_morus1280_glue_decrypt()
200 req->assoclen + cryptlen, authsize, 0); in crypto_morus1280_glue_decrypt()
204 return crypto_memneq(tag.bytes, zeros, authsize) ? -EBADMSG : 0; in crypto_morus1280_glue_decrypt()
227 unsigned int authsize) in cryptd_morus1280_glue_setauthsize() argument
232 return crypto_aead_setauthsize(&cryptd_tfm->base, authsize); in cryptd_morus1280_glue_setauthsize()
/Linux-v4.19/crypto/
Dauthencesn.c55 unsigned int authsize) in crypto_authenc_esn_setauthsize() argument
57 if (authsize > 0 && authsize < 4) in crypto_authenc_esn_setauthsize()
110 unsigned int authsize = crypto_aead_authsize(authenc_esn); in crypto_authenc_esn_genicv_tail() local
121 scatterwalk_map_and_copy(hash, dst, assoclen + cryptlen, authsize, 1); in crypto_authenc_esn_genicv_tail()
144 unsigned int authsize = crypto_aead_authsize(authenc_esn); in crypto_authenc_esn_genicv() local
150 if (!authsize) in crypto_authenc_esn_genicv()
238 unsigned int authsize = crypto_aead_authsize(authenc_esn); in crypto_authenc_esn_decrypt_tail() local
246 unsigned int cryptlen = req->cryptlen - authsize; in crypto_authenc_esn_decrypt_tail()
252 if (!authsize) in crypto_authenc_esn_decrypt_tail()
260 if (crypto_memneq(ihash, ohash, authsize)) in crypto_authenc_esn_decrypt_tail()
[all …]
Daegis128.c346 unsigned int authsize) in crypto_aegis128_setauthsize() argument
348 if (authsize > AEGIS128_MAX_AUTH_SIZE) in crypto_aegis128_setauthsize()
350 if (authsize < AEGIS128_MIN_AUTH_SIZE) in crypto_aegis128_setauthsize()
379 unsigned int authsize = crypto_aead_authsize(tfm); in crypto_aegis128_encrypt() local
385 authsize, 1); in crypto_aegis128_encrypt()
399 unsigned int authsize = crypto_aead_authsize(tfm); in crypto_aegis128_decrypt() local
400 unsigned int cryptlen = req->cryptlen - authsize; in crypto_aegis128_decrypt()
403 authsize, 0); in crypto_aegis128_decrypt()
407 return crypto_memneq(tag.bytes, zeros, authsize) ? -EBADMSG : 0; in crypto_aegis128_decrypt()
Daead.c72 int crypto_aead_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in crypto_aead_setauthsize() argument
76 if (authsize > crypto_aead_maxauthsize(tfm)) in crypto_aead_setauthsize()
80 err = crypto_aead_alg(tfm)->setauthsize(tfm, authsize); in crypto_aead_setauthsize()
85 tfm->authsize = authsize; in crypto_aead_setauthsize()
105 aead->authsize = alg->maxauthsize; in crypto_aead_init_tfm()
194 unsigned int authsize) in aead_geniv_setauthsize() argument
198 return crypto_aead_setauthsize(ctx->child, authsize); in aead_geniv_setauthsize()
Daegis256.c361 unsigned int authsize) in crypto_aegis256_setauthsize() argument
363 if (authsize > AEGIS256_MAX_AUTH_SIZE) in crypto_aegis256_setauthsize()
365 if (authsize < AEGIS256_MIN_AUTH_SIZE) in crypto_aegis256_setauthsize()
394 unsigned int authsize = crypto_aead_authsize(tfm); in crypto_aegis256_encrypt() local
400 authsize, 1); in crypto_aegis256_encrypt()
414 unsigned int authsize = crypto_aead_authsize(tfm); in crypto_aegis256_decrypt() local
415 unsigned int cryptlen = req->cryptlen - authsize; in crypto_aegis256_decrypt()
418 authsize, 0); in crypto_aegis256_decrypt()
422 return crypto_memneq(tag.bytes, zeros, authsize) ? -EBADMSG : 0; in crypto_aegis256_decrypt()
Daegis128l.c410 unsigned int authsize) in crypto_aegis128l_setauthsize() argument
412 if (authsize > AEGIS128L_MAX_AUTH_SIZE) in crypto_aegis128l_setauthsize()
414 if (authsize < AEGIS128L_MIN_AUTH_SIZE) in crypto_aegis128l_setauthsize()
443 unsigned int authsize = crypto_aead_authsize(tfm); in crypto_aegis128l_encrypt() local
449 authsize, 1); in crypto_aegis128l_encrypt()
463 unsigned int authsize = crypto_aead_authsize(tfm); in crypto_aegis128l_decrypt() local
464 unsigned int cryptlen = req->cryptlen - authsize; in crypto_aegis128l_decrypt()
467 authsize, 0); in crypto_aegis128l_decrypt()
471 return crypto_memneq(tag.bytes, zeros, authsize) ? -EBADMSG : 0; in crypto_aegis128l_decrypt()
Dgcm.c156 unsigned int authsize) in crypto_gcm_setauthsize() argument
158 switch (authsize) { in crypto_gcm_setauthsize()
493 unsigned int authsize = crypto_aead_authsize(aead); in crypto_gcm_verify() local
494 unsigned int cryptlen = req->cryptlen - authsize; in crypto_gcm_verify()
498 req->assoclen + cryptlen, authsize, 0); in crypto_gcm_verify()
499 return crypto_memneq(iauth_tag, auth_tag, authsize) ? -EBADMSG : 0; in crypto_gcm_verify()
528 unsigned int authsize = crypto_aead_authsize(aead); in crypto_gcm_decrypt() local
532 cryptlen -= authsize; in crypto_gcm_decrypt()
789 unsigned int authsize) in crypto_rfc4106_setauthsize() argument
793 switch (authsize) { in crypto_rfc4106_setauthsize()
[all …]
Dmorus1280.c430 unsigned int authsize) in crypto_morus1280_setauthsize() argument
432 return (authsize <= MORUS_MAX_AUTH_SIZE) ? 0 : -EINVAL; in crypto_morus1280_setauthsize()
460 unsigned int authsize = crypto_aead_authsize(tfm); in crypto_morus1280_encrypt() local
467 req->assoclen + cryptlen, authsize, 1); in crypto_morus1280_encrypt()
482 unsigned int authsize = crypto_aead_authsize(tfm); in crypto_morus1280_decrypt() local
483 unsigned int cryptlen = req->cryptlen - authsize; in crypto_morus1280_decrypt()
486 req->assoclen + cryptlen, authsize, 0); in crypto_morus1280_decrypt()
492 return crypto_memneq(tag_in.bytes, zeros, authsize) ? -EBADMSG : 0; in crypto_morus1280_decrypt()
Dmorus640.c427 unsigned int authsize) in crypto_morus640_setauthsize() argument
429 return (authsize <= MORUS_MAX_AUTH_SIZE) ? 0 : -EINVAL; in crypto_morus640_setauthsize()
457 unsigned int authsize = crypto_aead_authsize(tfm); in crypto_morus640_encrypt() local
464 req->assoclen + cryptlen, authsize, 1); in crypto_morus640_encrypt()
479 unsigned int authsize = crypto_aead_authsize(tfm); in crypto_morus640_decrypt() local
480 unsigned int cryptlen = req->cryptlen - authsize; in crypto_morus640_decrypt()
483 req->assoclen + cryptlen, authsize, 0); in crypto_morus640_decrypt()
489 return crypto_memneq(tag_in.bytes, zeros, authsize) ? -EBADMSG : 0; in crypto_morus640_decrypt()
Dccm.c119 unsigned int authsize) in crypto_ccm_setauthsize() argument
121 switch (authsize) { in crypto_ccm_setauthsize()
339 unsigned int authsize = crypto_aead_authsize(aead); in crypto_ccm_decrypt_done() local
340 unsigned int cryptlen = req->cryptlen - authsize; in crypto_ccm_decrypt_done()
349 if (!err && crypto_memneq(pctx->auth_tag, pctx->odata, authsize)) in crypto_ccm_decrypt_done()
362 unsigned int authsize = crypto_aead_authsize(aead); in crypto_ccm_decrypt() local
369 cryptlen -= authsize; in crypto_ccm_decrypt()
376 authsize, 0); in crypto_ccm_decrypt()
397 if (crypto_memneq(authtag, odata, authsize)) in crypto_ccm_decrypt()
648 unsigned int authsize) in crypto_rfc4309_setauthsize() argument
[all …]
Dauthenc.c247 unsigned int authsize = crypto_aead_authsize(authenc); in crypto_authenc_decrypt_tail() local
248 u8 *ihash = ahreq->result + authsize; in crypto_authenc_decrypt_tail()
251 scatterwalk_map_and_copy(ihash, req->src, ahreq->nbytes, authsize, 0); in crypto_authenc_decrypt_tail()
253 if (crypto_memneq(ihash, ahreq->result, authsize)) in crypto_authenc_decrypt_tail()
266 req->cryptlen - authsize, req->iv); in crypto_authenc_decrypt_tail()
288 unsigned int authsize = crypto_aead_authsize(authenc); in crypto_authenc_decrypt() local
303 req->assoclen + req->cryptlen - authsize); in crypto_authenc_decrypt()
/Linux-v4.19/drivers/crypto/ccree/
Dcc_buffer_mgr.c662 unsigned int sgl_nents, unsigned int authsize, in cc_get_aead_icv_nents() argument
667 unsigned int icv_required_size = authsize > last_entry_data_size ? in cc_get_aead_icv_nents()
668 (authsize - last_entry_data_size) : in cc_get_aead_icv_nents()
669 authsize; in cc_get_aead_icv_nents()
687 if (last_entry_data_size > authsize) { in cc_get_aead_icv_nents()
691 } else if (last_entry_data_size == authsize) { in cc_get_aead_icv_nents()
852 unsigned int authsize = areq_ctx->req_authsize; in cc_prepare_aead_data_dlli() local
858 (*src_last_bytes - authsize); in cc_prepare_aead_data_dlli()
860 (*src_last_bytes - authsize); in cc_prepare_aead_data_dlli()
864 (*src_last_bytes - authsize); in cc_prepare_aead_data_dlli()
[all …]
Dcc_aead.c60 unsigned int authsize; /* Actual (reduced?) size of the MAC/ICv */ member
224 ctx->authsize) != 0) { in cc_aead_complete()
226 ctx->authsize, ctx->cipher_mode); in cc_aead_complete()
239 (skip + ctx->authsize), in cc_aead_complete()
661 unsigned int authsize) in cc_aead_setauthsize() argument
667 if (authsize == 0 || in cc_aead_setauthsize()
668 authsize > crypto_aead_maxauthsize(authenc)) { in cc_aead_setauthsize()
672 ctx->authsize = authsize; in cc_aead_setauthsize()
673 dev_dbg(dev, "authlen=%d\n", ctx->authsize); in cc_aead_setauthsize()
679 unsigned int authsize) in cc_rfc4309_ccm_setauthsize() argument
[all …]
/Linux-v4.19/arch/arm64/crypto/
Daes-ce-ccm-glue.c64 static int ccm_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in ccm_setauthsize() argument
66 if ((authsize & 1) || authsize < 4) in ccm_setauthsize()
299 unsigned int authsize = crypto_aead_authsize(aead); in ccm_decrypt() local
303 u32 len = req->cryptlen - authsize; in ccm_decrypt()
349 req->assoclen + req->cryptlen - authsize, in ccm_decrypt()
350 authsize, 0); in ccm_decrypt()
352 if (crypto_memneq(mac, buf, authsize)) in ccm_decrypt()
/Linux-v4.19/drivers/crypto/caam/
Dcaamalg_qi.c59 unsigned int authsize; member
80 if (!ctx->cdata.keylen || !ctx->authsize) in aead_set_sh_desc()
128 ivsize, ctx->authsize, is_rfc3686, nonce, in aead_set_sh_desc()
153 ivsize, ctx->authsize, alg->caam.geniv, in aead_set_sh_desc()
181 ivsize, ctx->authsize, is_rfc3686, nonce, in aead_set_sh_desc()
188 static int aead_setauthsize(struct crypto_aead *authenc, unsigned int authsize) in aead_setauthsize() argument
192 ctx->authsize = authsize; in aead_setauthsize()
296 if (!ctx->cdata.keylen || !ctx->authsize) in gcm_set_sh_desc()
312 ctx->authsize, true); in gcm_set_sh_desc()
327 ctx->authsize, true); in gcm_set_sh_desc()
[all …]
Dcaamalg.c115 unsigned int authsize; member
141 cnstr_shdsc_aead_null_encap(desc, &ctx->adata, ctx->authsize, in aead_null_set_sh_desc()
160 cnstr_shdsc_aead_null_decap(desc, &ctx->adata, ctx->authsize, in aead_null_set_sh_desc()
184 if (!ctx->authsize) in aead_set_sh_desc()
241 ctx->authsize, is_rfc3686, nonce, ctx1_iv_off, in aead_set_sh_desc()
273 ctx->authsize, alg->caam.geniv, is_rfc3686, in aead_set_sh_desc()
307 ctx->authsize, is_rfc3686, nonce, in aead_set_sh_desc()
317 unsigned int authsize) in aead_setauthsize() argument
321 ctx->authsize = authsize; in aead_setauthsize()
336 if (!ctx->cdata.keylen || !ctx->authsize) in gcm_set_sh_desc()
[all …]
/Linux-v4.19/include/crypto/
Daead.h139 int (*setauthsize)(struct crypto_aead *tfm, unsigned int authsize);
155 unsigned int authsize; member
235 return tfm->authsize; in crypto_aead_authsize()
302 int crypto_aead_setauthsize(struct crypto_aead *tfm, unsigned int authsize);
/Linux-v4.19/drivers/crypto/
Dixp4xx_crypto.c349 int authsize = crypto_aead_authsize(tfm); in finish_scattered_hmac() local
350 int decryptlen = req->assoclen + req->cryptlen - authsize; in finish_scattered_hmac()
354 req->dst, decryptlen, authsize, 1); in finish_scattered_hmac()
657 static int setup_auth(struct crypto_tfm *tfm, int encrypt, unsigned authsize, in setup_auth() argument
673 cfgword = algo->cfgword | ( authsize << 6); /* (authsize/4) << 8 */ in setup_auth()
989 unsigned authsize = crypto_aead_authsize(tfm); in aead_perform() local
1012 cryptlen = req->cryptlen -authsize; in aead_perform()
1013 eff_cryptlen -= authsize; in aead_perform()
1040 if (lastlen >= authsize) in aead_perform()
1042 buf->buf_len - authsize; in aead_perform()
[all …]
/Linux-v4.19/drivers/crypto/chelsio/
Dchcr_algo.c180 int authsize = crypto_aead_authsize(tfm); in chcr_verify_tag() local
187 cmp = crypto_memneq(&fw6_pld->data[2], (fw6_pld + 1), authsize); in chcr_verify_tag()
191 authsize, req->assoclen + in chcr_verify_tag()
192 req->cryptlen - authsize); in chcr_verify_tag()
193 cmp = crypto_memneq(temp, (fw6_pld + 1), authsize); in chcr_verify_tag()
2199 unsigned int authsize = crypto_aead_authsize(tfm); in chcr_aead_common_init() local
2205 if (reqctx->op && req->cryptlen < authsize) in chcr_aead_common_init()
2231 unsigned int authsize = crypto_aead_authsize(crypto_aead_reqtfm(req)); in chcr_aead_need_fallback() local
2233 if (((req->cryptlen - (op_type ? authsize : 0)) == 0) || in chcr_aead_need_fallback()
2273 unsigned int authsize = crypto_aead_authsize(tfm); in create_authenc_wr() local
[all …]
Dchcr_ipsec.c110 int authsize = x->aead->alg_icv_len / 8; in chcr_ipsec_setauthsize() local
112 sa_entry->authsize = authsize; in chcr_ipsec_setauthsize()
114 switch (authsize) { in chcr_ipsec_setauthsize()
506 sa_entry->authsize, in chcr_crypto_wreq()
507 sa_entry->authsize); in chcr_crypto_wreq()

12