Home
last modified time | relevance | path

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

123456

/Linux-v4.19/crypto/
Dechainiv.c39 unsigned int ivsize = crypto_aead_ivsize(geniv); in echainiv_encrypt() local
42 if (req->cryptlen < ivsize) in echainiv_encrypt()
70 memcpy(&nseqno, info + ivsize - 8, 8); in echainiv_encrypt()
72 memset(info, 0, ivsize); in echainiv_encrypt()
74 scatterwalk_map_and_copy(info, req->dst, req->assoclen, ivsize, 1); in echainiv_encrypt()
79 memcpy(&a, ctx->salt + ivsize - 8, 8); in echainiv_encrypt()
84 memcpy(info + ivsize - 8, &a, 8); in echainiv_encrypt()
85 } while ((ivsize -= 8)); in echainiv_encrypt()
97 unsigned int ivsize = crypto_aead_ivsize(geniv); in echainiv_decrypt() local
99 if (req->cryptlen < ivsize) in echainiv_decrypt()
[all …]
Dseqiv.c63 unsigned int ivsize = 8; in seqiv_aead_encrypt() local
66 if (req->cryptlen < ivsize) in seqiv_aead_encrypt()
92 info = kmalloc(ivsize, req->base.flags & in seqiv_aead_encrypt()
98 memcpy(info, req->iv, ivsize); in seqiv_aead_encrypt()
105 req->cryptlen - ivsize, info); in seqiv_aead_encrypt()
106 aead_request_set_ad(subreq, req->assoclen + ivsize); in seqiv_aead_encrypt()
108 crypto_xor(info, ctx->salt, ivsize); in seqiv_aead_encrypt()
109 scatterwalk_map_and_copy(info, req->dst, req->assoclen, ivsize, 1); in seqiv_aead_encrypt()
124 unsigned int ivsize = 8; in seqiv_aead_decrypt() local
126 if (req->cryptlen < ivsize + crypto_aead_authsize(geniv)) in seqiv_aead_decrypt()
[all …]
Dablkcipher.c136 memcpy(req->info, walk->iv, tfm->crt_ablkcipher.ivsize); in ablkcipher_walk_done()
187 unsigned int ivsize = tfm->crt_ablkcipher.ivsize; in ablkcipher_copy_iv() local
189 unsigned int size = aligned_bs * 2 + ivsize + max(aligned_bs, ivsize) - in ablkcipher_copy_iv()
201 iv = ablkcipher_get_spot(iv, ivsize); in ablkcipher_copy_iv()
203 walk->iv = memcpy(iv, walk->iv, ivsize); in ablkcipher_copy_iv()
351 if (alg->ivsize > PAGE_SIZE / 8) in crypto_init_ablkcipher_ops()
358 crt->ivsize = alg->ivsize; in crypto_init_ablkcipher_ops()
376 rblkcipher.ivsize = alg->cra_ablkcipher.ivsize; in crypto_ablkcipher_report()
405 seq_printf(m, "ivsize : %u\n", ablkcipher->ivsize); in crypto_ablkcipher_show()
425 if (alg->ivsize > PAGE_SIZE / 8) in crypto_init_givcipher_ops()
[all …]
Dblkcipher.c135 memcpy(desc->info, walk->iv, walk->ivsize); in blkcipher_walk_done()
279 walk->ivsize + max(aligned_bs, walk->ivsize) - in blkcipher_copy_iv()
291 iv = blkcipher_get_spot(iv, walk->ivsize); in blkcipher_copy_iv()
293 walk->iv = memcpy(iv, walk->iv, walk->ivsize); in blkcipher_copy_iv()
303 walk->ivsize = crypto_blkcipher_ivsize(desc->tfm); in blkcipher_walk_virt()
315 walk->ivsize = crypto_blkcipher_ivsize(desc->tfm); in blkcipher_walk_phys()
353 walk->ivsize = crypto_blkcipher_ivsize(desc->tfm); in blkcipher_walk_virt_block()
367 walk->ivsize = crypto_aead_ivsize(tfm); in blkcipher_aead_walk_virt_block()
451 cipher->ivsize) { in crypto_blkcipher_ctxsize()
453 len += cipher->ivsize; in crypto_blkcipher_ctxsize()
[all …]
Daead.c127 raead.ivsize = aead->ivsize; in crypto_aead_report()
154 seq_printf(m, "ivsize : %u\n", aead->ivsize); in crypto_aead_show()
209 unsigned int ivsize; in aead_geniv_alloc() local
240 ivsize = crypto_aead_alg_ivsize(alg); in aead_geniv_alloc()
244 if (ivsize < sizeof(u64)) in aead_geniv_alloc()
266 inst->alg.ivsize = ivsize; in aead_geniv_alloc()
359 if (max3(alg->maxauthsize, alg->ivsize, alg->chunksize) > in aead_prepare_alg()
Dskcipher.c166 memcpy(walk->oiv, walk->iv, walk->ivsize); in skcipher_walk_done()
205 memcpy(walk->oiv, walk->iv, walk->ivsize); in skcipher_walk_complete()
396 unsigned ivsize = walk->ivsize; in skcipher_copy_iv() local
408 size += ivsize; in skcipher_copy_iv()
410 size += aligned_bs + ivsize; in skcipher_copy_iv()
423 walk->iv = memcpy(iv, walk->iv, walk->ivsize); in skcipher_copy_iv()
466 walk->ivsize = crypto_skcipher_ivsize(tfm); in skcipher_walk_skcipher()
535 walk->ivsize = crypto_aead_ivsize(tfm); in skcipher_walk_aead_common()
676 skcipher->ivsize = crypto_blkcipher_ivsize(blkcipher); in crypto_init_skcipher_ops_blkcipher()
773 skcipher->ivsize = crypto_ablkcipher_ivsize(ablkcipher); in crypto_init_skcipher_ops_ablkcipher()
[all …]
/Linux-v4.19/drivers/crypto/caam/
Dcaamalg_desc.h58 struct alginfo *adata, unsigned int ivsize,
64 struct alginfo *adata, unsigned int ivsize,
70 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 unsigned int ivsize, const bool is_rfc3686,
[all …]
Dcaamalg_qi.c70 unsigned int ivsize = crypto_aead_ivsize(aead); in aead_set_sh_desc() local
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()
292 unsigned int ivsize = crypto_aead_ivsize(aead); in gcm_set_sh_desc() local
311 cnstr_shdsc_gcm_encap(ctx->sh_desc_enc, &ctx->cdata, ivsize, in gcm_set_sh_desc()
326 cnstr_shdsc_gcm_decap(ctx->sh_desc_dec, &ctx->cdata, ivsize, in gcm_set_sh_desc()
387 unsigned int ivsize = crypto_aead_ivsize(aead); in rfc4106_set_sh_desc() local
407 cnstr_shdsc_rfc4106_encap(ctx->sh_desc_enc, &ctx->cdata, ivsize, in rfc4106_set_sh_desc()
421 cnstr_shdsc_rfc4106_decap(ctx->sh_desc_dec, &ctx->cdata, ivsize, in rfc4106_set_sh_desc()
[all …]
Dcaamalg.c172 unsigned int ivsize = crypto_aead_ivsize(aead); in aead_set_sh_desc() local
240 cnstr_shdsc_aead_encap(desc, &ctx->cdata, &ctx->adata, ivsize, in aead_set_sh_desc()
272 cnstr_shdsc_aead_decap(desc, &ctx->cdata, &ctx->adata, ivsize, in aead_set_sh_desc()
306 cnstr_shdsc_aead_givencap(desc, &ctx->cdata, &ctx->adata, ivsize, in aead_set_sh_desc()
331 unsigned int ivsize = crypto_aead_ivsize(aead); in gcm_set_sh_desc() local
353 cnstr_shdsc_gcm_encap(desc, &ctx->cdata, ivsize, ctx->authsize, false); in gcm_set_sh_desc()
370 cnstr_shdsc_gcm_decap(desc, &ctx->cdata, ivsize, ctx->authsize, false); in gcm_set_sh_desc()
391 unsigned int ivsize = crypto_aead_ivsize(aead); in rfc4106_set_sh_desc() local
413 cnstr_shdsc_rfc4106_encap(desc, &ctx->cdata, ivsize, ctx->authsize, in rfc4106_set_sh_desc()
431 cnstr_shdsc_rfc4106_decap(desc, &ctx->cdata, ivsize, ctx->authsize, in rfc4106_set_sh_desc()
[all …]
Dcaamalg_desc.c293 struct alginfo *adata, unsigned int ivsize, in cnstr_shdsc_aead_encap() argument
319 append_seq_load(desc, ivsize, LDST_CLASS_1_CCB | in cnstr_shdsc_aead_encap()
388 struct alginfo *adata, unsigned int ivsize, in cnstr_shdsc_aead_decap() argument
415 append_seq_load(desc, ivsize, LDST_CLASS_1_CCB | in cnstr_shdsc_aead_decap()
425 ivsize); in cnstr_shdsc_aead_decap()
433 ivsize); in cnstr_shdsc_aead_decap()
447 append_seq_load(desc, ivsize, LDST_CLASS_1_CCB | in cnstr_shdsc_aead_decap()
451 (ctx1_iv_off << MOVE_OFFSET_SHIFT) | ivsize); in cnstr_shdsc_aead_decap()
506 struct alginfo *adata, unsigned int ivsize, in cnstr_shdsc_aead_givencap() argument
533 append_seq_load(desc, ivsize, LDST_CLASS_1_CCB | in cnstr_shdsc_aead_givencap()
[all …]
/Linux-v4.19/drivers/crypto/ccree/
Dcc_cipher.c387 unsigned int ivsize, unsigned int nbytes, in cc_setup_cipher_desc() argument
415 set_din_type(&desc[*seq_size], DMA_DLLI, iv_dma_addr, ivsize, in cc_setup_cipher_desc()
634 unsigned int ivsize = crypto_skcipher_ivsize(sk_tfm); in cc_cipher_complete() local
647 memcpy(req->iv, req_ctx->backup_info, ivsize); in cc_cipher_complete()
650 len = req->cryptlen - ivsize; in cc_cipher_complete()
652 ivsize, 0); in cc_cipher_complete()
666 cc_unmap_cipher_request(dev, req_ctx, ivsize, src, dst); in cc_cipher_complete()
678 unsigned int ivsize = crypto_skcipher_ivsize(sk_tfm); in cc_cipher_process() local
713 req_ctx->iv = kmemdup(iv, ivsize, flags); in cc_cipher_process()
728 rc = cc_map_cipher_request(ctx_p->drvdata, req_ctx, ivsize, nbytes, in cc_cipher_process()
[all …]
Dcc_buffer_mgr.h44 unsigned int ivsize, unsigned int nbytes,
48 void cc_unmap_cipher_request(struct device *dev, void *ctx, unsigned int ivsize,
/Linux-v4.19/drivers/crypto/cavium/nitrox/
Dnitrox_algs.c171 int ivsize = crypto_skcipher_ivsize(cipher); in nitrox_skcipher_crypt() local
187 creq->gph.param2 = cpu_to_be16(ivsize); in nitrox_skcipher_crypt()
194 memcpy(creq->iv, skreq->iv, ivsize); in nitrox_skcipher_crypt()
195 creq->ivsize = ivsize; in nitrox_skcipher_crypt()
304 .ivsize = AES_BLOCK_SIZE,
323 .ivsize = AES_BLOCK_SIZE,
342 .ivsize = AES_BLOCK_SIZE,
361 .ivsize = AES_BLOCK_SIZE,
380 .ivsize = CTR_RFC3686_IV_SIZE,
400 .ivsize = AES_BLOCK_SIZE,
[all …]
/Linux-v4.19/drivers/crypto/qce/
Dablkcipher.c74 rctx->ivsize = crypto_ablkcipher_ivsize(ablkcipher); in qce_ablkcipher_async_req_handle()
266 unsigned int ivsize; member
277 .ivsize = AES_BLOCK_SIZE,
286 .ivsize = AES_BLOCK_SIZE,
295 .ivsize = AES_BLOCK_SIZE,
304 .ivsize = AES_BLOCK_SIZE,
313 .ivsize = 0,
322 .ivsize = DES_BLOCK_SIZE,
331 .ivsize = 0,
340 .ivsize = DES3_EDE_BLOCK_SIZE,
[all …]
Dcommon.c180 static void qce_xts_swapiv(__be32 *dst, const u8 *src, unsigned int ivsize) in qce_xts_swapiv() argument
185 if (ivsize > QCE_AES_IV_LENGTH) in qce_xts_swapiv()
190 for (i = (QCE_AES_IV_LENGTH - ivsize), j = ivsize - 1; in qce_xts_swapiv()
328 unsigned int ivsize = rctx->ivsize; in qce_setup_regs_ablkcipher() local
364 qce_xts_swapiv(enciv, rctx->iv, ivsize); in qce_setup_regs_ablkcipher()
366 qce_cpu_to_be32p_array(enciv, rctx->iv, ivsize); in qce_setup_regs_ablkcipher()
/Linux-v4.19/drivers/crypto/rockchip/
Drk3288_crypto_ablkcipher.c202 u32 ivsize, block, conf_reg = 0; in rk_ablk_hw_init() local
205 ivsize = crypto_ablkcipher_ivsize(cipher); in rk_ablk_hw_init()
212 memcpy_toio(dev->reg + RK_CRYPTO_TDES_IV_0, req->info, ivsize); in rk_ablk_hw_init()
224 memcpy_toio(dev->reg + RK_CRYPTO_AES_IV_0, req->info, ivsize); in rk_ablk_hw_init()
279 u32 ivsize = crypto_ablkcipher_ivsize(tfm); in rk_iv_copyback() local
281 if (ivsize == DES_BLOCK_SIZE) in rk_iv_copyback()
283 ivsize); in rk_iv_copyback()
284 else if (ivsize == AES_BLOCK_SIZE) in rk_iv_copyback()
285 memcpy_fromio(req->info, dev->reg + RK_CRYPTO_AES_IV_0, ivsize); in rk_iv_copyback()
399 .ivsize = AES_BLOCK_SIZE,
[all …]
/Linux-v4.19/drivers/crypto/ccp/
Dccp-crypto-aes.c266 unsigned int ivsize; member
277 .ivsize = 0,
286 .ivsize = AES_BLOCK_SIZE,
295 .ivsize = AES_BLOCK_SIZE,
304 .ivsize = AES_BLOCK_SIZE,
313 .ivsize = AES_BLOCK_SIZE,
322 .ivsize = CTR_RFC3686_IV_SIZE,
349 alg->cra_ablkcipher.ivsize = def->ivsize; in ccp_register_aes_alg()
Dccp-crypto-aes-galois.c161 .ivsize = GCM_AES_IV_SIZE,
183 unsigned int ivsize; member
194 .ivsize = AES_BLOCK_SIZE,
221 alg->base.cra_ablkcipher.ivsize = def->ivsize; in ccp_register_aes_aead()
Dccp-crypto-des3.c178 unsigned int ivsize; member
189 .ivsize = 0,
198 .ivsize = DES3_EDE_BLOCK_SIZE,
225 alg->cra_ablkcipher.ivsize = def->ivsize; in ccp_register_des3_alg()
/Linux-v4.19/include/crypto/
Dskcipher.h61 unsigned int ivsize; member
135 unsigned int ivsize; member
261 return alg->base.cra_blkcipher.ivsize; in crypto_skcipher_alg_ivsize()
264 return alg->base.cra_ablkcipher.ivsize; in crypto_skcipher_alg_ivsize()
266 return alg->ivsize; in crypto_skcipher_alg_ivsize()
280 return tfm->ivsize; in crypto_skcipher_ivsize()
/Linux-v4.19/drivers/crypto/
Datmel-aes.c512 int ivsize = crypto_ablkcipher_ivsize(ablkcipher); in atmel_aes_complete() local
516 req->nbytes - ivsize, ivsize, 0); in atmel_aes_complete()
519 memcpy(req->info, rctx->lastc, ivsize); in atmel_aes_complete()
522 req->nbytes - ivsize, ivsize, 0); in atmel_aes_complete()
1131 int ivsize = crypto_ablkcipher_ivsize(ablkcipher); in atmel_aes_crypt() local
1134 (req->nbytes - ivsize), ivsize, 0); in atmel_aes_crypt()
1302 .ivsize = AES_BLOCK_SIZE,
1322 .ivsize = AES_BLOCK_SIZE,
1342 .ivsize = AES_BLOCK_SIZE,
1362 .ivsize = AES_BLOCK_SIZE,
[all …]
Dtalitos.c980 unsigned int ivsize = crypto_aead_ivsize(aead); in ipsec_esp_unmap() local
999 sg_pcopy_to_buffer(areq->dst, dst_nents, ctx->iv, ivsize, in ipsec_esp_unmap()
1000 areq->assoclen + areq->cryptlen - ivsize); in ipsec_esp_unmap()
1016 unsigned int ivsize = crypto_aead_ivsize(authenc); in ipsec_esp_encrypt_done() local
1037 dma_unmap_single(dev, edesc->iv_dma, ivsize, DMA_TO_DEVICE); in ipsec_esp_encrypt_done()
1209 unsigned int ivsize = crypto_aead_ivsize(aead); in ipsec_esp() local
1242 to_talitos_ptr(civ_ptr, edesc->iv_dma, ivsize, is_sec1); in ipsec_esp()
1325 map_single_talitos_ptr(dev, &desc->ptr[6], ivsize, ctx->iv, in ipsec_esp()
1351 unsigned int ivsize, in talitos_edesc_alloc() argument
1371 if (ivsize) in talitos_edesc_alloc()
[all …]
/Linux-v4.19/include/uapi/linux/
Dcryptouser.h91 unsigned int ivsize; member
99 unsigned int ivsize; member
/Linux-v4.19/drivers/crypto/marvell/
Dcipher.c206 unsigned int ivsize; in mv_cesa_skcipher_complete() local
209 ivsize = crypto_skcipher_ivsize(crypto_skcipher_reqtfm(skreq)); in mv_cesa_skcipher_complete()
216 ivsize); in mv_cesa_skcipher_complete()
220 ivsize); in mv_cesa_skcipher_complete()
325 unsigned int ivsize; in mv_cesa_skcipher_dma_req_init() local
384 ivsize = crypto_skcipher_ivsize(crypto_skcipher_reqtfm(req)); in mv_cesa_skcipher_dma_req_init()
570 .ivsize = DES_BLOCK_SIZE,
628 .ivsize = DES3_EDE_BLOCK_SIZE,
681 .ivsize = DES3_EDE_BLOCK_SIZE,
802 .ivsize = AES_BLOCK_SIZE,
/Linux-v4.19/security/keys/encrypted-keys/
Dencrypted.c48 static unsigned int ivsize; variable
91 ivsize = crypto_skcipher_ivsize(tfm); in aes_get_sizes()
642 + strlen(datalen) + 1 + ivsize + 1 + encrypted_datalen; in encrypted_key_alloc()
674 asciilen = (ivsize + 1 + encrypted_datalen + HASH_SIZE) * 2; in encrypted_key_decrypt()
678 hex_encoded_data = hex_encoded_iv + (2 * ivsize) + 2; in encrypted_key_decrypt()
679 ret = hex2bin(epayload->iv, hex_encoded_iv, ivsize); in encrypted_key_decrypt()
728 epayload->encrypted_data = epayload->iv + ivsize + 1; in __ekey_init()
769 get_random_bytes(epayload->iv, ivsize); in encrypted_init()
886 memcpy(new_epayload->iv, epayload->iv, ivsize); in encrypted_update()
920 asciiblob_len = epayload->datablob_len + ivsize + 1 in encrypted_read()

123456