/linux-6.3-rc2/crypto/ |
A D | echainiv.c | 34 unsigned int ivsize = crypto_aead_ivsize(geniv); in echainiv_encrypt() local 37 if (req->cryptlen < ivsize) in echainiv_encrypt() 65 memcpy(&nseqno, info + ivsize - 8, 8); in echainiv_encrypt() 67 memset(info, 0, ivsize); in echainiv_encrypt() 74 memcpy(&a, ctx->salt + ivsize - 8, 8); in echainiv_encrypt() 79 memcpy(info + ivsize - 8, &a, 8); in echainiv_encrypt() 80 } while ((ivsize -= 8)); in echainiv_encrypt() 94 if (req->cryptlen < ivsize) in echainiv_decrypt() 104 req->cryptlen - ivsize, req->iv); in echainiv_decrypt() 124 if (inst->alg.ivsize & (sizeof(u64) - 1) || !inst->alg.ivsize) in echainiv_aead_create() [all …]
|
A D | seqiv.c | 55 unsigned int ivsize = 8; in seqiv_aead_encrypt() local 58 if (req->cryptlen < ivsize) in seqiv_aead_encrypt() 84 info = kmemdup(req->iv, ivsize, req->base.flags & in seqiv_aead_encrypt() 96 req->cryptlen - ivsize, info); in seqiv_aead_encrypt() 97 aead_request_set_ad(subreq, req->assoclen + ivsize); in seqiv_aead_encrypt() 99 crypto_xor(info, ctx->salt, ivsize); in seqiv_aead_encrypt() 115 unsigned int ivsize = 8; in seqiv_aead_decrypt() local 127 req->cryptlen - ivsize, req->iv); in seqiv_aead_decrypt() 128 aead_request_set_ad(subreq, req->assoclen + ivsize); in seqiv_aead_decrypt() 146 if (inst->alg.ivsize != sizeof(u64)) in seqiv_aead_create() [all …]
|
A D | essiv.c | 206 int ivsize = crypto_aead_ivsize(tfm); in essiv_aead_crypt() local 207 int ssize = req->assoclen - ivsize; in essiv_aead_crypt() 218 memcpy(iv, req->iv, ivsize); in essiv_aead_crypt() 238 sg_set_buf(rctx->sg + 1, iv, ivsize); in essiv_aead_crypt() 415 int ivsize) in essiv_supported_algorithms() argument 430 if (ivsize != alg->cra_blocksize) in essiv_supported_algorithms() 457 int ivsize; in essiv_create() local 518 ivsize = aead_alg->ivsize; in essiv_create() 543 ivsize)) { in essiv_create() 586 skcipher_inst->alg.ivsize = ivsize; in essiv_create() [all …]
|
A D | geniv.c | 47 unsigned int ivsize; in aead_geniv_alloc() local 69 ivsize = crypto_aead_alg_ivsize(alg); in aead_geniv_alloc() 73 if (ivsize < sizeof(u64)) in aead_geniv_alloc() 94 inst->alg.ivsize = ivsize; in aead_geniv_alloc()
|
/linux-6.3-rc2/drivers/crypto/caam/ |
A D | caamalg_desc.h | 58 struct alginfo *adata, unsigned int ivsize, 64 struct alginfo *adata, unsigned int ivsize, 76 unsigned int ivsize, unsigned int icvsize, 80 unsigned int ivsize, unsigned int icvsize, 84 unsigned int ivsize, unsigned int icvsize, 88 unsigned int ivsize, unsigned int icvsize, 92 unsigned int ivsize, unsigned int icvsize, 96 unsigned int ivsize, unsigned int icvsize, 100 struct alginfo *adata, unsigned int ivsize, 105 unsigned int ivsize, const bool is_rfc3686, [all …]
|
A D | caamalg.c | 971 edesc->iv_dma, ivsize, in skcipher_unmap() 1040 if (ivsize && !ecode) { in skcipher_crypt_done() 1045 ivsize, 1); in skcipher_crypt_done() 1178 assoclen -= ivsize; in init_chachapoly_job() 1686 !!ivsize); in skcipher_edesc_alloc() 1719 if (ivsize) { in skcipher_edesc_alloc() 1736 !!ivsize, 0); in skcipher_edesc_alloc() 1742 if (ivsize) in skcipher_edesc_alloc() 2109 .ivsize = NULL_IV_SIZE, 2130 .ivsize = NULL_IV_SIZE, [all …]
|
A D | caamalg_qi.c | 955 int ivsize = 0; in aead_edesc_alloc() local 1069 qm_sg_ents, ivsize); in aead_edesc_alloc() 1076 if (ivsize) { in aead_edesc_alloc() 1112 if (ivsize) { in aead_edesc_alloc() 1334 len += ivsize; in skcipher_edesc_alloc() 1338 qm_sg_ents, ivsize); in skcipher_edesc_alloc() 1383 ivsize, 0); in skcipher_edesc_alloc() 1494 .ivsize = AES_BLOCK_SIZE, 1602 .ivsize = 8, 1621 .ivsize = 8, [all …]
|
A D | caamalg_desc.c | 421 ivsize); in cnstr_shdsc_aead_decap() 429 ivsize); in cnstr_shdsc_aead_decap() 546 (ivsize << MOVE_LEN_SHIFT)); in cnstr_shdsc_aead_givencap() 553 (ivsize << MOVE_LEN_SHIFT)); in cnstr_shdsc_aead_givencap() 598 append_seq_fifo_load(desc, ivsize, in cnstr_shdsc_aead_givencap() 635 unsigned int ivsize, unsigned int icvsize, in cnstr_shdsc_gcm_encap() argument 673 ivsize); in cnstr_shdsc_gcm_encap() 1411 if (ivsize) in cnstr_shdsc_skcipher_encap() 1432 if (!is_chacha20 && ivsize) in cnstr_shdsc_skcipher_encap() 1486 if (ivsize) in cnstr_shdsc_skcipher_decap() [all …]
|
A D | caamalg_qi2.c | 368 int ivsize = 0; in aead_edesc_alloc() local 467 1 + !!ivsize + in aead_edesc_alloc() 484 if (ivsize) { in aead_edesc_alloc() 525 if (ivsize) { in aead_edesc_alloc() 1228 ivsize, 0); in skcipher_edesc_alloc() 1423 ivsize); in skcipher_encrypt_done() 1461 ivsize); in skcipher_decrypt_done() 1810 .ivsize = 8, 1829 .ivsize = 8, 1849 .ivsize = 12, [all …]
|
/linux-6.3-rc2/drivers/crypto/cavium/nitrox/ |
A D | nitrox_skcipher.c | 98 ivsize, 0); in nitrox_cbc_cipher_callback() 275 ret = alloc_src_sglist(skreq, ivsize); in nitrox_skcipher_crypt() 279 ret = alloc_dst_sglist(skreq, ivsize); in nitrox_skcipher_crypt() 397 .ivsize = AES_BLOCK_SIZE, 416 .ivsize = AES_BLOCK_SIZE, 435 .ivsize = AES_BLOCK_SIZE, 454 .ivsize = AES_BLOCK_SIZE, 473 .ivsize = CTR_RFC3686_IV_SIZE, 492 .ivsize = AES_BLOCK_SIZE, 511 .ivsize = DES3_EDE_BLOCK_SIZE, [all …]
|
A D | nitrox_aead.c | 94 struct scatterlist *src, char *iv, int ivsize, in alloc_src_sglist() argument 106 ret = alloc_src_req_buf(nkreq, nents, ivsize); in alloc_src_sglist() 110 nitrox_creq_copy_iv(nkreq->src, iv, ivsize); in alloc_src_sglist() 117 struct scatterlist *dst, int ivsize, int buflen) in alloc_dst_sglist() argument 169 param3.auth_offset = rctx->ivsize; in nitrox_set_creq() 232 rctx->ivsize = GCM_AES_IV_SIZE - GCM_AES_SALT_SIZE; in nitrox_aes_gcm_enc() 266 rctx->ivsize = GCM_AES_IV_SIZE - GCM_AES_SALT_SIZE; in nitrox_aes_gcm_dec() 454 aead_rctx->ivsize = GCM_RFC4106_IV_SIZE; in nitrox_rfc4106_enc() 487 aead_rctx->ivsize = GCM_RFC4106_IV_SIZE; in nitrox_rfc4106_dec() 536 .ivsize = GCM_AES_IV_SIZE, [all …]
|
A D | nitrox_req.h | 241 int ivsize; member 621 int nents, int ivsize) in alloc_src_req_buf() argument 625 nkreq->src = alloc_req_buf(nents, ivsize, creq->gfp); in alloc_src_req_buf() 637 static inline struct scatterlist *nitrox_creq_src_sg(char *iv, int ivsize) in nitrox_creq_src_sg() argument 639 return (struct scatterlist *)(iv + ivsize); in nitrox_creq_src_sg() 643 int nents, int ivsize, in nitrox_creq_set_src_sg() argument 650 creq->src = nitrox_creq_src_sg(iv, ivsize); in nitrox_creq_set_src_sg() 661 sg = create_single_sg(sg, iv, ivsize); in nitrox_creq_set_src_sg() 701 int nents, int ivsize, in nitrox_creq_set_dst_sg() argument 721 sg = create_single_sg(sg, iv, ivsize); in nitrox_creq_set_dst_sg()
|
/linux-6.3-rc2/drivers/crypto/rockchip/ |
A D | rk3288_crypto_skcipher.c | 323 offset, ivsize, 0); in rk_cipher_run() 338 offset = sgs->length - ivsize; in rk_cipher_run() 361 if (ivsize) { in rk_cipher_run() 362 if (ivsize == DES_BLOCK_SIZE) in rk_cipher_run() 387 memcpy(iv, biv, ivsize); in rk_cipher_run() 390 offset = sgd->length - ivsize; in rk_cipher_run() 398 if (areq->iv && ivsize > 0) { in rk_cipher_run() 405 ivsize, 0); in rk_cipher_run() 496 .ivsize = AES_BLOCK_SIZE, 541 .ivsize = DES_BLOCK_SIZE, [all …]
|
/linux-6.3-rc2/drivers/crypto/allwinner/sun8i-ce/ |
A D | sun8i-ce-cipher.c | 190 ivsize = crypto_skcipher_ivsize(tfm); in sun8i_ce_cipher_prepare() 192 rctx->ivlen = ivsize; in sun8i_ce_cipher_prepare() 194 offset = areq->cryptlen - ivsize; in sun8i_ce_cipher_prepare() 196 offset, ivsize, 0); in sun8i_ce_cipher_prepare() 277 if (areq->iv && ivsize > 0) { in sun8i_ce_cipher_prepare() 280 offset = areq->cryptlen - ivsize; in sun8i_ce_cipher_prepare() 286 ivsize, 0); in sun8i_ce_cipher_prepare() 323 unsigned int ivsize, offset; in sun8i_ce_cipher_unprepare() local 341 if (areq->iv && ivsize > 0) { in sun8i_ce_cipher_unprepare() 344 offset = areq->cryptlen - ivsize; in sun8i_ce_cipher_unprepare() [all …]
|
/linux-6.3-rc2/drivers/crypto/allwinner/sun8i-ss/ |
A D | sun8i-ss-cipher.c | 130 rctx->ivlen = ivsize; in sun8i_ss_setup_ivs() 132 offset = areq->cryptlen - ivsize; in sun8i_ss_setup_ivs() 134 ivsize, 0); in sun8i_ss_setup_ivs() 160 offset = sg->length - ivsize; in sun8i_ss_setup_ivs() 172 memzero_explicit(sf->iv[i], ivsize); in sun8i_ss_setup_ivs() 219 ivsize = crypto_skcipher_ivsize(tfm); in sun8i_ss_cipher() 303 if (areq->iv && ivsize > 0) { in sun8i_ss_cipher() 309 offset = areq->cryptlen - ivsize; in sun8i_ss_cipher() 311 memcpy(areq->iv, sf->biv, ivsize); in sun8i_ss_cipher() 312 memzero_explicit(sf->biv, ivsize); in sun8i_ss_cipher() [all …]
|
/linux-6.3-rc2/drivers/crypto/ccree/ |
A D | cc_cipher.c | 1020 .ivsize = AES_BLOCK_SIZE, 1038 .ivsize = AES_BLOCK_SIZE, 1056 .ivsize = 0, 1074 .ivsize = AES_BLOCK_SIZE, 1092 .ivsize = AES_BLOCK_SIZE, 1110 .ivsize = AES_BLOCK_SIZE, 1128 .ivsize = AES_BLOCK_SIZE, 1184 .ivsize = 0, 1286 .ivsize = 0, 1320 .ivsize = 0, [all …]
|
/linux-6.3-rc2/drivers/crypto/amlogic/ |
A D | amlogic-gxl-cipher.c | 129 ivsize = crypto_skcipher_ivsize(tfm); in meson_cipher() 130 if (areq->iv && ivsize > 0) { in meson_cipher() 131 if (ivsize > areq->cryptlen) { in meson_cipher() 136 memcpy(bkeyiv + 32, areq->iv, ivsize); in meson_cipher() 139 backup_iv = kzalloc(ivsize, GFP_KERNEL); in meson_cipher() 144 offset = areq->cryptlen - ivsize; in meson_cipher() 146 ivsize, 0); in meson_cipher() 245 if (areq->iv && ivsize > 0) { in meson_cipher() 247 memcpy(areq->iv, backup_iv, ivsize); in meson_cipher() 250 areq->cryptlen - ivsize, in meson_cipher() [all …]
|
/linux-6.3-rc2/drivers/crypto/allwinner/sun4i-ss/ |
A D | sun4i-ss-cipher.c | 20 unsigned int ivsize = crypto_skcipher_ivsize(tfm); in sun4i_ss_opti_poll() local 51 areq->cryptlen - ivsize, ivsize, 0); in sun4i_ss_opti_poll() 66 for (i = 0; i < 4 && i < ivsize / 4; i++) { in sun4i_ss_opti_poll() 134 memcpy(areq->iv, ctx->backup_iv, ivsize); in sun4i_ss_opti_poll() 135 memzero_explicit(ctx->backup_iv, ivsize); in sun4i_ss_opti_poll() 138 ivsize, 0); in sun4i_ss_opti_poll() 244 areq->cryptlen - ivsize, ivsize, 0); in sun4i_ss_cipher_poll() 258 for (i = 0; i < 4 && i < ivsize / 4; i++) { in sun4i_ss_cipher_poll() 381 memcpy(areq->iv, ctx->backup_iv, ivsize); in sun4i_ss_cipher_poll() 382 memzero_explicit(ctx->backup_iv, ivsize); in sun4i_ss_cipher_poll() [all …]
|
/linux-6.3-rc2/drivers/crypto/qce/ |
A D | skcipher.c | 78 rctx->ivsize = crypto_skcipher_ivsize(skcipher); in qce_skcipher_async_req_handle() 355 unsigned int ivsize; member 366 .ivsize = 0, 375 .ivsize = AES_BLOCK_SIZE, 385 .ivsize = AES_BLOCK_SIZE, 394 .ivsize = AES_BLOCK_SIZE, 403 .ivsize = 0, 412 .ivsize = DES_BLOCK_SIZE, 421 .ivsize = 0, 430 .ivsize = DES3_EDE_BLOCK_SIZE, [all …]
|
A D | aead.c | 363 unsigned int msglen_size, ivsize; in qce_aead_create_ccm_nonce() local 376 ivsize = rctx->ivsize; in qce_aead_create_ccm_nonce() 384 rctx->iv[ivsize - i - 1] = 0; in qce_aead_create_ccm_nonce() 426 rctx->ivsize = AES_BLOCK_SIZE; in qce_aead_async_req_handle() 696 unsigned int ivsize; member 706 .ivsize = DES_BLOCK_SIZE, 722 .ivsize = DES_BLOCK_SIZE, 738 .ivsize = AES_BLOCK_SIZE, 746 .ivsize = AES_BLOCK_SIZE, 754 .ivsize = 8, [all …]
|
/linux-6.3-rc2/drivers/crypto/ccp/ |
A D | ccp-crypto-aes.c | 246 unsigned int ivsize; member 257 .ivsize = 0, 266 .ivsize = AES_BLOCK_SIZE, 275 .ivsize = AES_BLOCK_SIZE, 284 .ivsize = AES_BLOCK_SIZE, 293 .ivsize = AES_BLOCK_SIZE, 302 .ivsize = CTR_RFC3686_IV_SIZE, 329 alg->ivsize = def->ivsize; in ccp_register_aes_alg()
|
/linux-6.3-rc2/block/ |
A D | blk-crypto.c | 25 .ivsize = 16, 31 .ivsize = 16, 37 .ivsize = 32, 43 .ivsize = 16, 81 BUG_ON(blk_crypto_modes[i].ivsize > BLK_CRYPTO_MAX_IV_SIZE); in bio_crypt_ctx_init() 343 if (dun_bytes == 0 || dun_bytes > mode->ivsize) in blk_crypto_init_key()
|
/linux-6.3-rc2/fs/crypto/ |
A D | keysetup.c | 22 .ivsize = 16, 30 .ivsize = 16, 37 .ivsize = 16, 45 .ivsize = 16, 52 .ivsize = 16, 60 .ivsize = 16, 67 .ivsize = 32, 75 .ivsize = 32, 128 if (WARN_ON(crypto_skcipher_ivsize(tfm) != mode->ivsize)) { in fscrypt_allocate_skcipher() 580 WARN_ON(mode->ivsize > FSCRYPT_MAX_IV_SIZE); in fscrypt_setup_encryption_info()
|
/linux-6.3-rc2/drivers/crypto/ |
A D | ixp4xx_crypto.c | 395 if (ivsize > 0) { in one_packet() 399 offset, ivsize, 0); in one_packet() 1010 BUG_ON(ivsize && !req->iv); in ablk_perform() 1132 BUG_ON(ivsize && !req->iv); in aead_perform() 1317 .ivsize = DES_BLOCK_SIZE, 1361 .ivsize = AES_BLOCK_SIZE, 1382 .ivsize = AES_BLOCK_SIZE, 1393 .ivsize = AES_BLOCK_SIZE, 1409 .ivsize = DES_BLOCK_SIZE, 1459 .ivsize = AES_BLOCK_SIZE, [all …]
|
A D | atmel-aes.c | 493 if (req->cryptlen < ivsize) in atmel_aes_set_iv_as_last_ciphertext_block() 498 req->cryptlen - ivsize, ivsize, 0); in atmel_aes_set_iv_as_last_ciphertext_block() 505 ivsize, 0); in atmel_aes_set_iv_as_last_ciphertext_block() 1155 ivsize, 0); in atmel_aes_crypt() 1325 .ivsize = AES_BLOCK_SIZE, 1539 memcpy(data, iv, ivsize); in atmel_aes_gcm_start() 2237 .ivsize = AES_BLOCK_SIZE, 2253 .ivsize = AES_BLOCK_SIZE, 2269 .ivsize = AES_BLOCK_SIZE, 2285 .ivsize = AES_BLOCK_SIZE, [all …]
|