/linux/crypto/ |
A D | authencesn.c | 97 unsigned int cryptlen = req->cryptlen; in crypto_authenc_esn_genicv_tail() local 131 unsigned int cryptlen = req->cryptlen; in crypto_authenc_esn_genicv() local 147 ahash_request_set_crypt(ahreq, dst, hash, assoclen + cryptlen); in crypto_authenc_esn_genicv() 190 unsigned int cryptlen = req->cryptlen; in crypto_authenc_esn_encrypt() local 210 skcipher_request_set_crypt(skreq, src, dst, cryptlen, req->iv); in crypto_authenc_esn_encrypt() 231 unsigned int cryptlen = req->cryptlen - authsize; in crypto_authenc_esn_decrypt_tail() local 256 skcipher_request_set_crypt(skreq, dst, dst, cryptlen, req->iv); in crypto_authenc_esn_decrypt_tail() 281 unsigned int cryptlen = req->cryptlen; in crypto_authenc_esn_decrypt() local 287 cryptlen -= authsize; in crypto_authenc_esn_decrypt() 290 err = crypto_authenc_esn_copy(req, assoclen + cryptlen); in crypto_authenc_esn_decrypt() [all …]
|
A D | aegis128-core.c | 346 u64 assoclen, u64 cryptlen) in crypto_aegis128_final() argument 349 u64 cryptbits = cryptlen * 8; in crypto_aegis128_final() 394 unsigned int cryptlen = req->cryptlen; in crypto_aegis128_encrypt_generic() local 403 crypto_aegis128_final(&state, &tag, req->assoclen, cryptlen); in crypto_aegis128_encrypt_generic() 405 scatterwalk_map_and_copy(tag.bytes, req->dst, req->assoclen + cryptlen, in crypto_aegis128_encrypt_generic() 416 unsigned int cryptlen = req->cryptlen - authsize; in crypto_aegis128_decrypt_generic() local 429 crypto_aegis128_final(&state, &tag, req->assoclen, cryptlen); in crypto_aegis128_decrypt_generic() 455 unsigned int cryptlen = req->cryptlen; in crypto_aegis128_encrypt_simd() local 467 crypto_aegis128_final_simd(&state, &tag, req->assoclen, cryptlen, 0); in crypto_aegis128_encrypt_simd() 479 unsigned int cryptlen = req->cryptlen - authsize; in crypto_aegis128_decrypt_simd() local [all …]
|
A D | chacha20poly1305.c | 39 __le64 cryptlen; member 59 unsigned int cryptlen; member 131 if (rctx->cryptlen == 0) in chacha_decrypt() 145 rctx->cryptlen, creq->iv); in chacha_decrypt() 158 if (rctx->cryptlen == req->cryptlen) /* encrypting */ in poly_tail_continue() 178 preq->tail.cryptlen = cpu_to_le64(rctx->cryptlen); in poly_tail() 236 if (rctx->cryptlen == req->cryptlen) /* encrypting */ in poly_cipher() 407 if (req->cryptlen == 0) in chacha_encrypt() 421 req->cryptlen, creq->iv); in chacha_encrypt() 434 rctx->cryptlen = req->cryptlen; in chachapoly_encrypt() [all …]
|
A D | keywrap.c | 130 u64 t = 6 * ((req->cryptlen) >> 3); in crypto_kw_decrypt() 138 if (req->cryptlen < (2 * SEMIBSIZE) || req->cryptlen % SEMIBSIZE) in crypto_kw_decrypt() 154 unsigned int nbytes = req->cryptlen; in crypto_kw_decrypt() 208 if (req->cryptlen < (2 * SEMIBSIZE) || req->cryptlen % SEMIBSIZE) in crypto_kw_encrypt() 227 unsigned int nbytes = req->cryptlen; in crypto_kw_encrypt()
|
A D | ccm.c | 128 unsigned int cryptlen) in format_input() argument 169 unsigned int cryptlen) in crypto_ccm_auth() argument 182 err = format_input(odata, req, cryptlen); in crypto_ccm_auth() 218 cryptlen += ilen; in crypto_ccm_auth() 236 req->assoclen + req->cryptlen, in crypto_ccm_encrypt_done() 292 unsigned int cryptlen = req->cryptlen; in crypto_ccm_encrypt() local 330 unsigned int cryptlen = req->cryptlen - authsize; in crypto_ccm_decrypt_done() local 338 err = crypto_ccm_auth(req, dst, cryptlen); in crypto_ccm_decrypt_done() 353 unsigned int cryptlen = req->cryptlen; in crypto_ccm_decrypt() local 359 cryptlen -= authsize; in crypto_ccm_decrypt() [all …]
|
A D | gcm.c | 58 unsigned int cryptlen; member 178 unsigned int cryptlen) in crypto_gcm_init_crypt() argument 321 if (gctx->cryptlen) in gcm_hash_assoc_remain_continue() 419 req->assoclen + req->cryptlen, in gcm_enc_copy_hash() 430 gctx->cryptlen = req->cryptlen; in gcm_encrypt_continue() 472 unsigned int cryptlen = req->cryptlen - authsize; in crypto_gcm_verify() local 507 unsigned int cryptlen = req->cryptlen; in crypto_gcm_decrypt() local 510 cryptlen -= authsize; in crypto_gcm_decrypt() 515 gctx->cryptlen = cryptlen; in crypto_gcm_decrypt() 757 req->cryptlen, iv); in crypto_rfc4106_crypt() [all …]
|
A D | aead.c | 87 unsigned int cryptlen = req->cryptlen; in crypto_aead_encrypt() local 95 crypto_stats_aead_encrypt(cryptlen, alg, ret); in crypto_aead_encrypt() 104 unsigned int cryptlen = req->cryptlen; in crypto_aead_decrypt() local 110 else if (req->cryptlen < crypto_aead_authsize(aead)) in crypto_aead_decrypt() 114 crypto_stats_aead_decrypt(cryptlen, alg, ret); in crypto_aead_decrypt()
|
A D | echainiv.c | 37 if (req->cryptlen < ivsize) in echainiv_encrypt() 51 req->assoclen + req->cryptlen, in echainiv_encrypt() 62 req->cryptlen, info); in echainiv_encrypt() 94 if (req->cryptlen < ivsize) in echainiv_decrypt() 104 req->cryptlen - ivsize, req->iv); in echainiv_decrypt()
|
A D | xts.c | 87 const bool cts = (req->cryptlen % XTS_BLOCK_SIZE); in xts_xor_tweak() 164 int offset = req->cryptlen & ~(XTS_BLOCK_SIZE - 1); in xts_cts_final() 167 int tail = req->cryptlen % XTS_BLOCK_SIZE; in xts_cts_final() 209 if (!err && unlikely(req->cryptlen % XTS_BLOCK_SIZE)) { in xts_encrypt_done() 229 if (!err && unlikely(req->cryptlen % XTS_BLOCK_SIZE)) { in xts_decrypt_done() 247 if (req->cryptlen < XTS_BLOCK_SIZE) in xts_init_crypt() 253 req->cryptlen & ~(XTS_BLOCK_SIZE - 1), NULL); in xts_init_crypt() 272 if (err || likely((req->cryptlen % XTS_BLOCK_SIZE) == 0)) in xts_encrypt() 289 if (err || likely((req->cryptlen % XTS_BLOCK_SIZE) == 0)) in xts_decrypt()
|
A D | seqiv.c | 59 if (req->cryptlen < ivsize) in seqiv_aead_encrypt() 75 req->assoclen + req->cryptlen, in seqiv_aead_encrypt() 97 req->cryptlen - ivsize, info); in seqiv_aead_encrypt() 118 if (req->cryptlen < ivsize + crypto_aead_authsize(geniv)) in seqiv_aead_decrypt() 128 req->cryptlen - ivsize, req->iv); in seqiv_aead_decrypt()
|
/linux/arch/x86/crypto/ |
A D | aegis128-aesni-glue.c | 44 void *state, void *tag_xor, unsigned int cryptlen, 167 unsigned int cryptlen, in crypto_aegis128_aesni_crypt() argument 182 crypto_aegis128_aesni_final(&state, tag_xor, req->assoclen, cryptlen); in crypto_aegis128_aesni_crypt() 198 unsigned int cryptlen = req->cryptlen; in crypto_aegis128_aesni_encrypt() local 200 crypto_aegis128_aesni_crypt(req, &tag, cryptlen, &OPS); in crypto_aegis128_aesni_encrypt() 203 req->assoclen + cryptlen, authsize, 1); in crypto_aegis128_aesni_encrypt() 220 unsigned int cryptlen = req->cryptlen - authsize; in crypto_aegis128_aesni_decrypt() local 223 req->assoclen + cryptlen, authsize, 0); in crypto_aegis128_aesni_decrypt() 225 crypto_aegis128_aesni_crypt(req, &tag, cryptlen, &OPS); in crypto_aegis128_aesni_decrypt()
|
A D | aesni-intel_glue.c | 381 if (req->cryptlen <= AES_BLOCK_SIZE) { in cts_cbc_encrypt() 382 if (req->cryptlen < AES_BLOCK_SIZE) in cts_cbc_encrypt() 396 if (req->cryptlen == AES_BLOCK_SIZE) in cts_cbc_encrypt() 402 subreq.cryptlen); in cts_cbc_encrypt() 437 if (req->cryptlen <= AES_BLOCK_SIZE) { in cts_cbc_decrypt() 438 if (req->cryptlen < AES_BLOCK_SIZE) in cts_cbc_decrypt() 452 if (req->cryptlen == AES_BLOCK_SIZE) in cts_cbc_decrypt() 458 subreq.cryptlen); in cts_cbc_decrypt() 611 unsigned long left = req->cryptlen; in gcmaes_crypt_by_sg() 728 req->assoclen + req->cryptlen, in gcmaes_encrypt() [all …]
|
/linux/arch/arm/crypto/ |
A D | aes-ce-glue.c | 282 if (req->cryptlen <= AES_BLOCK_SIZE) { in cts_cbc_encrypt() 283 if (req->cryptlen < AES_BLOCK_SIZE) in cts_cbc_encrypt() 298 if (req->cryptlen == AES_BLOCK_SIZE) in cts_cbc_encrypt() 304 subreq.cryptlen); in cts_cbc_encrypt() 340 if (req->cryptlen <= AES_BLOCK_SIZE) { in cts_cbc_decrypt() 341 if (req->cryptlen < AES_BLOCK_SIZE) in cts_cbc_decrypt() 356 if (req->cryptlen == AES_BLOCK_SIZE) in cts_cbc_decrypt() 362 subreq.cryptlen); in cts_cbc_decrypt() 449 int tail = req->cryptlen % AES_BLOCK_SIZE; in xts_encrypt() 455 if (req->cryptlen < AES_BLOCK_SIZE) in xts_encrypt() [all …]
|
/linux/drivers/crypto/qce/ |
A D | aead.c | 71 totallen = req->cryptlen + req->assoclen; in qce_aead_done() 124 totallen = rctx->cryptlen + assoclen; in qce_aead_prepare_dst_buf() 198 cryptlen = rctx->cryptlen + ctx->authsize; in qce_aead_ccm_prepare_buf_assoclen() 200 cryptlen = rctx->cryptlen; in qce_aead_ccm_prepare_buf_assoclen() 201 totallen = cryptlen + req->assoclen; in qce_aead_ccm_prepare_buf_assoclen() 278 totallen = cryptlen + rctx->assoclen; in qce_aead_ccm_prepare_buf_assoclen() 336 unsigned int cryptlen; in qce_aead_ccm_prepare_buf() local 344 cryptlen = rctx->cryptlen + ctx->authsize; in qce_aead_ccm_prepare_buf() 514 rctx->cryptlen = req->cryptlen; in qce_aead_crypt() 516 rctx->cryptlen = req->cryptlen - ctx->authsize; in qce_aead_crypt() [all …]
|
A D | skcipher.c | 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() 87 rctx->dst_nents = sg_nents_for_len(req->dst, req->cryptlen); in qce_skcipher_async_req_handle() 110 sg = qce_sgtable_add(&rctx->dst_tbl, req->dst, req->cryptlen); in qce_skcipher_async_req_handle() 271 if (!req->cryptlen) in qce_skcipher_crypt() 279 if (!IS_ALIGNED(req->cryptlen, blocksize)) in qce_skcipher_crypt() 292 (IS_XTS(rctx->flags) && ((req->cryptlen <= aes_sw_max_len) || in qce_skcipher_crypt() 293 (req->cryptlen > QCE_SECTOR_SIZE && in qce_skcipher_crypt() 294 req->cryptlen % QCE_SECTOR_SIZE))))) { in qce_skcipher_crypt() 301 req->dst, req->cryptlen, req->iv); in qce_skcipher_crypt()
|
/linux/drivers/crypto/ |
A D | omap-aes-gcm.c | 91 int alen, clen, cryptlen, assoclen, ret; in omap_aes_gcm_copy_buffers() local 99 cryptlen = req->cryptlen; in omap_aes_gcm_copy_buffers() 105 cryptlen -= authlen; in omap_aes_gcm_copy_buffers() 108 clen = ALIGN(cryptlen, AES_BLOCK_SIZE); in omap_aes_gcm_copy_buffers() 110 nsg = !!(assoclen && cryptlen); in omap_aes_gcm_copy_buffers() 128 if (cryptlen) { in omap_aes_gcm_copy_buffers() 134 ret = omap_crypto_align_sg(&tmp, cryptlen, in omap_aes_gcm_copy_buffers() 146 dd->total = cryptlen; in omap_aes_gcm_copy_buffers() 159 if (cryptlen) { in omap_aes_gcm_copy_buffers() 160 ret = omap_crypto_align_sg(&dd->out_sg, cryptlen, in omap_aes_gcm_copy_buffers() [all …]
|
/linux/drivers/crypto/allwinner/sun4i-ss/ |
A D | sun4i-ss-cipher.c | 31 unsigned int ileft = areq->cryptlen; in sun4i_ss_opti_poll() 32 unsigned int oleft = areq->cryptlen; in sun4i_ss_opti_poll() 42 if (!areq->cryptlen) in sun4i_ss_opti_poll() 60 algt->stat_bytes += areq->cryptlen; in sun4i_ss_opti_poll() 77 ileft = areq->cryptlen / 4; in sun4i_ss_opti_poll() 78 oleft = areq->cryptlen / 4; in sun4i_ss_opti_poll() 169 areq->cryptlen, areq->iv); in sun4i_ss_cipher_poll_fallback() 199 unsigned int ileft = areq->cryptlen; in sun4i_ss_cipher_poll() 213 if (!areq->cryptlen) in sun4i_ss_cipher_poll() 271 ileft = areq->cryptlen; in sun4i_ss_cipher_poll() [all …]
|
/linux/drivers/crypto/allwinner/sun8i-ce/ |
A D | sun8i-ce-cipher.c | 31 if (areq->cryptlen < crypto_skcipher_ivsize(tfm)) in sun8i_ce_cipher_need_fallback() 34 if (areq->cryptlen == 0 || areq->cryptlen % 16) in sun8i_ce_cipher_need_fallback() 70 areq->cryptlen, areq->iv); in sun8i_ce_cipher_fallback() 101 areq->cryptlen, in sun8i_ce_cipher_prepare() 122 cet->t_dlen = cpu_to_le32(areq->cryptlen); in sun8i_ce_cipher_prepare() 165 offset = areq->cryptlen - ivsize; in sun8i_ce_cipher_prepare() 206 len = areq->cryptlen; in sun8i_ce_cipher_prepare() 221 len = areq->cryptlen; in sun8i_ce_cipher_prepare() 236 chan->timeout = areq->cryptlen; in sun8i_ce_cipher_prepare() 257 offset = areq->cryptlen - ivsize; in sun8i_ce_cipher_prepare() [all …]
|
/linux/arch/arm64/crypto/ |
A D | aes-glue.c | 288 if (req->cryptlen <= AES_BLOCK_SIZE) { in cts_cbc_encrypt() 289 if (req->cryptlen < AES_BLOCK_SIZE) in cts_cbc_encrypt() 304 if (req->cryptlen == AES_BLOCK_SIZE) in cts_cbc_encrypt() 310 subreq.cryptlen); in cts_cbc_encrypt() 345 if (req->cryptlen <= AES_BLOCK_SIZE) { in cts_cbc_decrypt() 346 if (req->cryptlen < AES_BLOCK_SIZE) in cts_cbc_decrypt() 361 if (req->cryptlen == AES_BLOCK_SIZE) in cts_cbc_decrypt() 367 subreq.cryptlen); in cts_cbc_decrypt() 493 int tail = req->cryptlen % AES_BLOCK_SIZE; in xts_encrypt() 499 if (req->cryptlen < AES_BLOCK_SIZE) in xts_encrypt() [all …]
|
/linux/drivers/crypto/cavium/nitrox/ |
A D | nitrox_aead.c | 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() 227 rctx->cryptlen = areq->cryptlen; in nitrox_aes_gcm_enc() 229 rctx->srclen = areq->assoclen + areq->cryptlen; in nitrox_aes_gcm_enc() 261 rctx->cryptlen = areq->cryptlen - aead->authsize; in nitrox_aes_gcm_dec() 263 rctx->srclen = areq->cryptlen + areq->assoclen; in nitrox_aes_gcm_dec() 449 aead_rctx->cryptlen = areq->cryptlen; in nitrox_rfc4106_enc() 451 aead_rctx->srclen = aead_rctx->assoclen + aead_rctx->cryptlen; in nitrox_rfc4106_enc() 481 aead_rctx->cryptlen = areq->cryptlen - aead->authsize; in nitrox_rfc4106_dec() 484 areq->cryptlen - GCM_RFC4106_IV_SIZE + areq->assoclen; in nitrox_rfc4106_dec()
|
/linux/drivers/crypto/gemini/ |
A D | sl3516-ce-cipher.c | 30 if (areq->cryptlen == 0 || areq->cryptlen % 16) { in sl3516_ce_need_fallback() 115 areq->cryptlen, areq->iv); in sl3516_ce_cipher_fallback() 143 areq->cryptlen, in sl3516_ce_cipher() 175 len = areq->cryptlen; in sl3516_ce_cipher() 185 areq->cryptlen, i, rctx->t_src[i].len, sg->offset, todo); in sl3516_ce_cipher() 192 dev_err(ce->dev, "remaining len %d/%u nr_sgs=%d\n", len, areq->cryptlen, nr_sgs); in sl3516_ce_cipher() 197 len = areq->cryptlen; in sl3516_ce_cipher() 207 areq->cryptlen, i, rctx->t_dst[i].len, sg->offset, todo); in sl3516_ce_cipher() 230 ecb->cipher.algorithm_len = areq->cryptlen; in sl3516_ce_cipher()
|
/linux/drivers/crypto/keembay/ |
A D | keembay-ocs-aes-core.c | 292 if (req->cryptlen < AES_BLOCK_SIZE) in kmb_ocs_sk_validate_input() 329 req->cryptlen, req->iv); in kmb_ocs_sk_common() 437 req->cryptlen, 0); in kmb_ocs_sk_prepare_inplace() 472 req->cryptlen, 0); in kmb_ocs_sk_prepare_notinplace() 487 req->cryptlen, 0); in kmb_ocs_sk_prepare_notinplace() 554 req->cryptlen, req->iv, iv_size); in kmb_ocs_sk_run() 574 req->cryptlen - iv_size, in kmb_ocs_sk_run() 583 req->cryptlen - iv_size, in kmb_ocs_sk_run() 655 req->cryptlen, req->iv); in kmb_ocs_aead_common() 748 in_size = req->cryptlen - tag_size; in kmb_ocs_aead_dma_prepare() [all …]
|
/linux/include/linux/ |
A D | crypto.h | 514 void crypto_stats_aead_encrypt(unsigned int cryptlen, struct crypto_alg *alg, int ret); 515 void crypto_stats_aead_decrypt(unsigned int cryptlen, struct crypto_alg *alg, int ret); 529 void crypto_stats_skcipher_encrypt(unsigned int cryptlen, int ret, struct crypto_alg *alg); 530 void crypto_stats_skcipher_decrypt(unsigned int cryptlen, int ret, struct crypto_alg *alg); 536 static inline void crypto_stats_aead_encrypt(unsigned int cryptlen, struct crypto_alg *alg, int ret) in crypto_stats_aead_encrypt() argument 538 static inline void crypto_stats_aead_decrypt(unsigned int cryptlen, struct crypto_alg *alg, int ret) in crypto_stats_aead_decrypt() argument 566 static inline void crypto_stats_skcipher_encrypt(unsigned int cryptlen, int ret, struct crypto_alg … in crypto_stats_skcipher_encrypt() argument 568 static inline void crypto_stats_skcipher_decrypt(unsigned int cryptlen, int ret, struct crypto_alg … in crypto_stats_skcipher_decrypt() argument
|
/linux/drivers/crypto/allwinner/sun8i-ss/ |
A D | sun8i-ss-cipher.c | 28 if (areq->cryptlen == 0 || areq->cryptlen % 16) in sun8i_ss_need_fallback() 87 areq->cryptlen, areq->iv); in sun8i_ss_cipher_fallback() 115 areq->cryptlen, in sun8i_ss_cipher() 148 offset = areq->cryptlen - ivsize; in sun8i_ss_cipher() 187 len = areq->cryptlen; in sun8i_ss_cipher() 197 areq->cryptlen, i, rctx->t_src[i].len, sg->offset, todo); in sun8i_ss_cipher() 209 len = areq->cryptlen; in sun8i_ss_cipher() 219 areq->cryptlen, i, rctx->t_dst[i].len, sg->offset, todo); in sun8i_ss_cipher() 251 offset = areq->cryptlen - ivsize; in sun8i_ss_cipher()
|
/linux/drivers/crypto/virtio/ |
A D | virtio_crypto_algs.c | 359 src_nents = sg_nents_for_len(req->src, req->cryptlen); in __virtio_crypto_skcipher_do_req() 401 cpu_to_le32(req->cryptlen); in __virtio_crypto_skcipher_do_req() 410 dst_len = min_t(unsigned int, req->cryptlen, dst_len); in __virtio_crypto_skcipher_do_req() 412 req->cryptlen, dst_len); in __virtio_crypto_skcipher_do_req() 414 if (unlikely(req->cryptlen + dst_len + ivsize + in __virtio_crypto_skcipher_do_req() 443 req->cryptlen - AES_BLOCK_SIZE, in __virtio_crypto_skcipher_do_req() 493 if (!req->cryptlen) in virtio_crypto_skcipher_encrypt() 495 if (req->cryptlen % AES_BLOCK_SIZE) in virtio_crypto_skcipher_encrypt() 518 if (!req->cryptlen) in virtio_crypto_skcipher_decrypt() 520 if (req->cryptlen % AES_BLOCK_SIZE) in virtio_crypto_skcipher_decrypt() [all …]
|