Home
last modified time | relevance | path

Searched refs:ivsize (Results 1 – 25 of 173) sorted by relevance

1234567

/linux/crypto/
H A Dechainiv.c34 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 …]
H A Dseqiv.c55 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 …]
H A Dessiv.c206 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()
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
495 ivsize = skcipher_alg->ivsize; in essiv_create()
519 ivsize = aead_alg->ivsize; in essiv_create()
544 ivsize)) { in essiv_create()
587 skcipher_inst->alg.ivsize = ivsize; in essiv_create()
[all …]
H A Dgeniv.c47 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()
H A Dlskcipher.c75 unsigned ivsize = crypto_lskcipher_ivsize(tfm); in crypto_lskcipher_crypt_unaligned() local
89 memcpy(tiv, iv, ivsize + statesize); in crypto_lskcipher_crypt_unaligned()
117 memcpy(iv, tiv, ivsize + statesize); in crypto_lskcipher_crypt_unaligned()
169 unsigned ivsize; in crypto_lskcipher_crypt_sg() local
173 ivsize = crypto_lskcipher_ivsize(tfm); in crypto_lskcipher_crypt_sg()
175 memcpy(ivs, req->iv, ivsize); in crypto_lskcipher_crypt_sg()
196 memcpy(req->iv, ivs, ivsize); in crypto_lskcipher_crypt_sg()
258 seq_printf(m, "ivsize : %u\n", skcipher->co.ivsize); in crypto_lskcipher_show()
277 rblkcipher.ivsize = skcipher->co.ivsize; in crypto_lskcipher_report()
566 if (cipher_alg->co.ivsize) in lskcipher_alloc_instance_simple()
[all …]
/linux/drivers/crypto/caam/
H A Dcaamalg_desc.h58 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 …]
H A Dcaamalg_qi.c955 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 …]
H A Dcaamalg.c975 edesc->iv_dma, ivsize, in skcipher_unmap()
1044 if (ivsize && !ecode) { in skcipher_crypt_done()
1049 ivsize, 1); in skcipher_crypt_done()
1182 assoclen -= ivsize; in init_chachapoly_job()
1691 !!ivsize); in skcipher_edesc_alloc()
1724 if (ivsize) { in skcipher_edesc_alloc()
1741 !!ivsize, 0); in skcipher_edesc_alloc()
1747 if (ivsize) in skcipher_edesc_alloc()
2150 .ivsize = NULL_IV_SIZE,
2174 .ivsize = NULL_IV_SIZE,
[all …]
H A Dcaamalg_desc.c421 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 …]
H A Dcaamalg_qi2.c368 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()
1229 ivsize, 0); in skcipher_edesc_alloc()
1424 ivsize); in skcipher_encrypt_done()
1462 ivsize); in skcipher_decrypt_done()
1811 .ivsize = 8,
1830 .ivsize = 8,
1850 .ivsize = 12,
[all …]
/linux/drivers/crypto/cavium/nitrox/
H A Dnitrox_skcipher.c98 ivsize, 0); in nitrox_cbc_cipher_callback()
269 creq->gph.param2 = cpu_to_be16(ivsize); in nitrox_skcipher_crypt()
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 = CTR_RFC3686_IV_SIZE,
473 .ivsize = AES_BLOCK_SIZE,
492 .ivsize = DES3_EDE_BLOCK_SIZE,
[all …]
H A Dnitrox_aead.c94 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 …]
H A Dnitrox_req.h241 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/drivers/crypto/allwinner/sun8i-ss/
H A Dsun8i-ss-cipher.c135 rctx->ivlen = ivsize; in sun8i_ss_setup_ivs()
137 offset = areq->cryptlen - ivsize; in sun8i_ss_setup_ivs()
139 ivsize, 0); in sun8i_ss_setup_ivs()
165 offset = sg->length - ivsize; in sun8i_ss_setup_ivs()
177 memzero_explicit(sf->iv[i], ivsize); in sun8i_ss_setup_ivs()
224 ivsize = crypto_skcipher_ivsize(tfm); in sun8i_ss_cipher()
308 if (areq->iv && ivsize > 0) { in sun8i_ss_cipher()
314 offset = areq->cryptlen - ivsize; in sun8i_ss_cipher()
316 memcpy(areq->iv, sf->biv, ivsize); in sun8i_ss_cipher()
317 memzero_explicit(sf->biv, ivsize); in sun8i_ss_cipher()
[all …]
/linux/drivers/crypto/allwinner/sun8i-ce/
H A Dsun8i-ce-cipher.c195 ivsize = crypto_skcipher_ivsize(tfm); in sun8i_ce_cipher_prepare()
197 rctx->ivlen = ivsize; in sun8i_ce_cipher_prepare()
199 offset = areq->cryptlen - ivsize; in sun8i_ce_cipher_prepare()
201 offset, ivsize, 0); in sun8i_ce_cipher_prepare()
282 if (areq->iv && ivsize > 0) { in sun8i_ce_cipher_prepare()
285 offset = areq->cryptlen - ivsize; in sun8i_ce_cipher_prepare()
291 ivsize, 0); in sun8i_ce_cipher_prepare()
312 unsigned int ivsize, offset; in sun8i_ce_cipher_unprepare() local
330 if (areq->iv && ivsize > 0) { in sun8i_ce_cipher_unprepare()
333 offset = areq->cryptlen - ivsize; in sun8i_ce_cipher_unprepare()
[all …]
/linux/drivers/crypto/rockchip/
H A Drk3288_crypto_skcipher.c329 offset, ivsize, 0); in rk_cipher_run()
344 offset = sgs->length - ivsize; in rk_cipher_run()
367 if (ivsize) { in rk_cipher_run()
368 if (ivsize == DES_BLOCK_SIZE) in rk_cipher_run()
393 memcpy(iv, biv, ivsize); in rk_cipher_run()
396 offset = sgd->length - ivsize; in rk_cipher_run()
404 if (areq->iv && ivsize > 0) { in rk_cipher_run()
411 ivsize, 0); in rk_cipher_run()
503 .ivsize = AES_BLOCK_SIZE,
554 .ivsize = DES_BLOCK_SIZE,
[all …]
/linux/drivers/crypto/ccree/
H A Dcc_cipher.c1020 .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,
1132 .ivsize = AES_BLOCK_SIZE,
1166 .ivsize = 0,
1251 .ivsize = 0,
1285 .ivsize = 0,
[all …]
/linux/drivers/crypto/amlogic/
H A Damlogic-gxl-cipher.c129 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/drivers/crypto/allwinner/sun4i-ss/
H A Dsun4i-ss-cipher.c20 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/drivers/crypto/qce/
H A Dskcipher.c78 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 …]
H A Daead.c363 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/block/
H A Dblk-crypto.c26 .ivsize = 16,
32 .ivsize = 16,
38 .ivsize = 32,
44 .ivsize = 16,
82 BUG_ON(blk_crypto_modes[i].ivsize > BLK_CRYPTO_MAX_IV_SIZE); in bio_crypt_ctx_init()
344 if (dun_bytes == 0 || dun_bytes > mode->ivsize) in blk_crypto_init_key()
/linux/drivers/crypto/intel/ixp4xx/
H A Dixp4xx_crypto.c397 if (ivsize > 0) { in one_packet()
401 offset, ivsize, 0); in one_packet()
1012 BUG_ON(ivsize && !req->iv); in ablk_perform()
1134 BUG_ON(ivsize && !req->iv); in aead_perform()
1320 .ivsize = DES_BLOCK_SIZE,
1364 .ivsize = AES_BLOCK_SIZE,
1385 .ivsize = AES_BLOCK_SIZE,
1396 .ivsize = AES_BLOCK_SIZE,
1412 .ivsize = DES_BLOCK_SIZE,
1462 .ivsize = AES_BLOCK_SIZE,
[all …]
/linux/drivers/crypto/ccp/
H A Dccp-crypto-aes.c246 unsigned int ivsize; member
257 .ivsize = 0,
266 .ivsize = AES_BLOCK_SIZE,
275 .ivsize = AES_BLOCK_SIZE,
284 .ivsize = CTR_RFC3686_IV_SIZE,
311 alg->ivsize = def->ivsize; in ccp_register_aes_alg()
/linux/fs/crypto/
H A Dkeysetup.c22 .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_ONCE(crypto_skcipher_ivsize(tfm) != mode->ivsize)) { in fscrypt_allocate_skcipher()
582 WARN_ON_ONCE(mode->ivsize > FSCRYPT_MAX_IV_SIZE); in fscrypt_setup_encryption_info()

1234567