Home
last modified time | relevance | path

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

12

/linux-2.6.39/crypto/
Deseqiv.c81 unsigned int ivsize; in eseqiv_givencrypt() local
99 ivsize = crypto_ablkcipher_ivsize(geniv); in eseqiv_givencrypt()
101 if (vsrc != giv + ivsize && vdst != giv + ivsize) { in eseqiv_givencrypt()
112 sg_set_buf(reqctx->src, giv, ivsize); in eseqiv_givencrypt()
113 scatterwalk_crypto_chain(reqctx->src, osrc, vsrc == giv + ivsize, 2); in eseqiv_givencrypt()
118 sg_set_buf(reqctx->dst, giv, ivsize); in eseqiv_givencrypt()
119 scatterwalk_crypto_chain(reqctx->dst, odst, vdst == giv + ivsize, 2); in eseqiv_givencrypt()
125 req->creq.nbytes + ivsize, in eseqiv_givencrypt()
128 memcpy(req->creq.info, ctx->salt, ivsize); in eseqiv_givencrypt()
130 len = ivsize; in eseqiv_givencrypt()
[all …]
Dseqiv.c85 unsigned int ivsize) in seqiv_geniv() argument
87 unsigned int len = ivsize; in seqiv_geniv()
89 if (ivsize > sizeof(u64)) { in seqiv_geniv()
90 memset(info, 0, ivsize - sizeof(u64)); in seqiv_geniv()
94 memcpy(info + ivsize - len, &seq, len); in seqiv_geniv()
95 crypto_xor(info, ctx->salt, ivsize); in seqiv_geniv()
106 unsigned int ivsize; in seqiv_givencrypt() local
115 ivsize = crypto_ablkcipher_ivsize(geniv); in seqiv_givencrypt()
119 info = kmalloc(ivsize, req->creq.base.flags & in seqiv_givencrypt()
134 seqiv_geniv(ctx, info, req->seq, ivsize); in seqiv_givencrypt()
[all …]
Dablkcipher.c143 memcpy(req->info, walk->iv, tfm->crt_ablkcipher.ivsize); in ablkcipher_walk_done()
195 unsigned int ivsize = tfm->crt_ablkcipher.ivsize; in ablkcipher_copy_iv() local
197 unsigned int size = aligned_bs * 2 + ivsize + max(aligned_bs, ivsize) - in ablkcipher_copy_iv()
209 iv = ablkcipher_get_spot(iv, ivsize); in ablkcipher_copy_iv()
211 walk->iv = memcpy(iv, walk->iv, ivsize); in ablkcipher_copy_iv()
368 if (alg->ivsize > PAGE_SIZE / 8) in crypto_init_ablkcipher_ops()
374 if (!alg->ivsize) { in crypto_init_ablkcipher_ops()
379 crt->ivsize = alg->ivsize; in crypto_init_ablkcipher_ops()
396 seq_printf(m, "ivsize : %u\n", ablkcipher->ivsize); in crypto_ablkcipher_show()
420 if (alg->ivsize > PAGE_SIZE / 8) in crypto_init_givcipher_ops()
[all …]
Dchainiv.c53 unsigned int ivsize; in chainiv_givencrypt() local
66 ivsize = crypto_ablkcipher_ivsize(geniv); in chainiv_givencrypt()
68 memcpy(req->giv, ctx->iv, ivsize); in chainiv_givencrypt()
69 memcpy(subreq->info, ctx->iv, ivsize); in chainiv_givencrypt()
75 memcpy(ctx->iv, subreq->info, ivsize); in chainiv_givencrypt()
166 unsigned int ivsize = crypto_ablkcipher_ivsize(geniv); in async_chainiv_givencrypt_tail() local
168 memcpy(req->giv, ctx->iv, ivsize); in async_chainiv_givencrypt_tail()
169 memcpy(subreq->info, ctx->iv, ivsize); in async_chainiv_givencrypt_tail()
175 memcpy(ctx->iv, subreq->info, ivsize); in async_chainiv_givencrypt_tail()
325 inst->alg.cra_ctxsize += inst->alg.cra_ablkcipher.ivsize; in chainiv_alloc()
Daead.c96 if (max(alg->maxauthsize, alg->ivsize) > PAGE_SIZE / 8) in crypto_init_aead_ops()
106 crt->ivsize = alg->ivsize; in crypto_init_aead_ops()
122 seq_printf(m, "ivsize : %u\n", aead->ivsize); in crypto_aead_show()
151 if (max(alg->maxauthsize, alg->ivsize) > PAGE_SIZE / 8) in crypto_init_nivaead_ops()
157 if (!alg->ivsize) { in crypto_init_nivaead_ops()
162 crt->ivsize = alg->ivsize; in crypto_init_nivaead_ops()
178 seq_printf(m, "ivsize : %u\n", aead->ivsize); in crypto_nivaead_show()
253 if (!alg->cra_aead.ivsize) in aead_geniv_alloc()
287 inst->alg.cra_aead.ivsize = alg->cra_aead.ivsize; in aead_geniv_alloc()
423 if (!alg->cra_aead.ivsize) in crypto_lookup_aead()
[all …]
Dblkcipher.c283 unsigned int ivsize = crypto_blkcipher_ivsize(tfm); in blkcipher_copy_iv() local
285 unsigned int size = aligned_bs * 2 + ivsize + max(aligned_bs, ivsize) - in blkcipher_copy_iv()
297 iv = blkcipher_get_spot(iv, ivsize); in blkcipher_copy_iv()
299 walk->iv = memcpy(iv, walk->iv, ivsize); in blkcipher_copy_iv()
437 cipher->ivsize) { in crypto_blkcipher_ctxsize()
439 len += cipher->ivsize; in crypto_blkcipher_ctxsize()
453 if (!alg->ivsize) { in crypto_init_blkcipher_ops_async()
458 crt->ivsize = alg->ivsize; in crypto_init_blkcipher_ops_async()
486 if (alg->ivsize > PAGE_SIZE / 8) in crypto_init_blkcipher_ops()
503 seq_printf(m, "ivsize : %u\n", alg->cra_blkcipher.ivsize); in crypto_blkcipher_show()
[all …]
Dauthenc.c321 unsigned int ivsize = crypto_aead_ivsize(authenc); in crypto_authenc_genicv() local
331 if (ivsize) { in crypto_authenc_genicv()
333 sg_set_buf(cipher, iv, ivsize); in crypto_authenc_genicv()
334 scatterwalk_crypto_chain(cipher, dst, vdst == iv + ivsize, 2); in crypto_authenc_genicv()
336 cryptlen += ivsize; in crypto_authenc_genicv()
477 unsigned int ivsize = crypto_aead_ivsize(authenc); in crypto_authenc_iverify() local
485 if (ivsize) { in crypto_authenc_iverify()
487 sg_set_buf(cipher, iv, ivsize); in crypto_authenc_iverify()
488 scatterwalk_crypto_chain(cipher, src, vsrc == iv + ivsize, 2); in crypto_authenc_iverify()
490 cryptlen += ivsize; in crypto_authenc_iverify()
[all …]
Dauthencesn.c416 unsigned int ivsize = crypto_aead_ivsize(authenc_esn); in crypto_authenc_esn_genicv() local
425 if (ivsize) { in crypto_authenc_esn_genicv()
427 sg_set_buf(cipher, iv, ivsize); in crypto_authenc_esn_genicv()
428 scatterwalk_crypto_chain(cipher, dst, vdst == iv + ivsize, 2); in crypto_authenc_esn_genicv()
430 cryptlen += ivsize; in crypto_authenc_esn_genicv()
586 unsigned int ivsize = crypto_aead_ivsize(authenc_esn); in crypto_authenc_esn_iverify() local
593 if (ivsize) { in crypto_authenc_esn_iverify()
595 sg_set_buf(cipher, iv, ivsize); in crypto_authenc_esn_iverify()
596 scatterwalk_crypto_chain(cipher, src, vsrc == iv + ivsize, 2); in crypto_authenc_esn_iverify()
598 cryptlen += ivsize; in crypto_authenc_esn_iverify()
[all …]
Dalgboss.c252 CRYPTO_ALG_TYPE_BLKCIPHER ? alg->cra_blkcipher.ivsize : in cryptomgr_schedule_test()
253 alg->cra_ablkcipher.ivsize)) || in cryptomgr_schedule_test()
255 alg->cra_type == &crypto_nivaead_type && alg->cra_aead.ivsize)) in cryptomgr_schedule_test()
Dctr.c209 inst->alg.cra_blkcipher.ivsize = alg->cra_blocksize; in crypto_ctr_alloc()
343 if (alg->cra_blkcipher.ivsize != CTR_RFC3686_BLOCK_SIZE) in crypto_rfc3686_alloc()
360 inst->alg.cra_blkcipher.ivsize = CTR_RFC3686_IV_SIZE; in crypto_rfc3686_alloc()
Dalgif_skcipher.c249 unsigned ivsize = crypto_ablkcipher_ivsize(tfm); in skcipher_sendmsg() local
273 if (con.iv && con.iv->ivlen != ivsize) in skcipher_sendmsg()
286 memcpy(ctx->iv, con.iv->iv, ivsize); in skcipher_sendmsg()
Dgcm.c740 if (ctr->cra_ablkcipher.ivsize != 16) in crypto_gcm_alloc_common()
763 inst->alg.cra_aead.ivsize = 16; in crypto_gcm_alloc_common()
1002 if (alg->cra_aead.ivsize != 16) in crypto_rfc4106_alloc()
1024 inst->alg.cra_aead.ivsize = 8; in crypto_rfc4106_alloc()
1253 if (alg->cra_aead.ivsize != 16) in crypto_rfc4543_alloc()
1275 inst->alg.cra_aead.ivsize = 8; in crypto_rfc4543_alloc()
Dccm.c531 if (ctr->cra_ablkcipher.ivsize != 16) in crypto_ccm_alloc_common()
549 inst->alg.cra_aead.ivsize = 16; in crypto_ccm_alloc_common()
791 if (alg->cra_aead.ivsize != 16) in crypto_rfc4309_alloc()
813 inst->alg.cra_aead.ivsize = 8; in crypto_rfc4309_alloc()
Dcrypto_null.c153 .ivsize = NULL_IV_SIZE,
/linux-2.6.39/net/ceph/
Dcrypto.c102 int ivsize; in ceph_aes_encrypt() local
120 ivsize = crypto_blkcipher_ivsize(tfm); in ceph_aes_encrypt()
122 memcpy(iv, aes_iv, ivsize); in ceph_aes_encrypt()
153 int ivsize; in ceph_aes_encrypt2() local
172 ivsize = crypto_blkcipher_ivsize(tfm); in ceph_aes_encrypt2()
174 memcpy(iv, aes_iv, ivsize); in ceph_aes_encrypt2()
206 int ivsize; in ceph_aes_decrypt() local
221 ivsize = crypto_blkcipher_ivsize(tfm); in ceph_aes_decrypt()
223 memcpy(iv, aes_iv, ivsize); in ceph_aes_decrypt()
267 int ivsize; in ceph_aes_decrypt2() local
[all …]
/linux-2.6.39/drivers/crypto/
Dixp4xx_crypto.c881 unsigned ivsize = crypto_ablkcipher_ivsize(tfm); in ablk_perform() local
910 BUG_ON(ivsize && !req->info); in ablk_perform()
911 memcpy(crypt->iv, req->info, ivsize); in ablk_perform()
1005 unsigned ivsize = crypto_aead_ivsize(tfm); in aead_perform() local
1042 crypt->auth_len = req->assoclen + ivsize + cryptlen; in aead_perform()
1043 BUG_ON(ivsize && !req->iv); in aead_perform()
1044 memcpy(crypt->iv, req->iv, ivsize); in aead_perform()
1059 sg_set_buf(&req_ctx->ivlist, iv, ivsize); in aead_perform()
1060 buf = chainup_buffers(dev, &req_ctx->ivlist, ivsize, buf, flags, in aead_perform()
1193 unsigned ivsize = crypto_aead_ivsize(crypto_aead_reqtfm(req)); in aead_encrypt() local
[all …]
Dpicoxcell_crypto.c324 unsigned ivsize = crypto_aead_ivsize(crypto_aead_reqtfm(areq)); in spacc_aead_make_ddts() local
361 iv_addr = dma_map_single(engine->dev, iv, ivsize, in spacc_aead_make_ddts()
375 ddt_set(src_ddt++, iv_addr, ivsize); in spacc_aead_make_ddts()
378 ddt_set(dst_ddt++, iv_addr, ivsize); in spacc_aead_make_ddts()
408 unsigned ivsize = alg->alg.cra_aead.ivsize; in spacc_aead_free_ddts() local
422 dma_unmap_single(engine->dev, req->giv_pa, ivsize, DMA_BIDIRECTIONAL); in spacc_aead_free_ddts()
621 ctx->cipher_key_len, aead_req->iv, alg->cra_aead.ivsize, in spacc_aead_submit()
684 unsigned ivsize = crypto_aead_ivsize(crypto_aead_reqtfm(req)); in spacc_aead_setup() local
687 dev_req->giv_len = ivsize; in spacc_aead_setup()
736 size_t ivsize = crypto_aead_ivsize(tfm); in spacc_aead_givencrypt() local
[all …]
Dhifn_795x.c658 unsigned int ivsize; member
1126 u8 *key, int keylen, u8 *iv, int ivsize, u16 mode) in hifn_setup_crypto_command() argument
1155 if (ivsize) { in hifn_setup_crypto_command()
1156 memcpy(buf_pos, iv, ivsize); in hifn_setup_crypto_command()
1157 buf_pos += ivsize; in hifn_setup_crypto_command()
1255 rctx->iv, rctx->ivsize, md); in hifn_setup_cmd_desc()
1585 if (rctx->iv && !rctx->ivsize && rctx->mode != ACRYPTO_MODE_ECB) in hifn_setup_session()
1637 dev->name, rctx->iv, rctx->ivsize, in hifn_setup_session()
1663 rctx.ivsize = 0; in hifn_test()
2102 unsigned ivsize; in hifn_setup_crypto_req() local
[all …]
Dtalitos.c1021 unsigned int ivsize = crypto_aead_ivsize(aead); in ipsec_esp() local
1029 map_single_talitos_ptr(dev, &desc->ptr[1], areq->assoclen + ivsize, in ipsec_esp()
1032 map_single_talitos_ptr(dev, &desc->ptr[2], ivsize, giv ?: areq->iv, 0, in ipsec_esp()
1117 map_single_talitos_ptr(dev, &desc->ptr[6], ivsize, ctx->iv, 0, in ipsec_esp()
1446 unsigned int ivsize; in common_nonsnoop() local
1455 ivsize = crypto_ablkcipher_ivsize(cipher); in common_nonsnoop()
1456 map_single_talitos_ptr(dev, &desc->ptr[1], ivsize, giv ?: areq->info, 0, in common_nonsnoop()
1519 map_single_talitos_ptr(dev, &desc->ptr[5], ivsize, ctx->iv, 0, in common_nonsnoop()
1916 .ivsize = AES_BLOCK_SIZE,
1942 .ivsize = DES3_EDE_BLOCK_SIZE,
[all …]
/linux-2.6.39/security/keys/
Dencrypted.c40 static unsigned int ivsize; variable
78 ivsize = crypto_blkcipher_ivsize(tfm); in aes_get_sizes()
341 unsigned int ivsize) in init_blkcipher_desc() argument
359 crypto_blkcipher_set_iv(desc->tfm, iv, ivsize); in init_blkcipher_desc()
407 epayload->iv, ivsize); in derived_key_encrypt()
493 epayload->iv, ivsize); in derived_key_decrypt()
535 + ivsize + 1 + encrypted_datalen; in encrypted_key_alloc()
566 asciilen = (ivsize + 1 + encrypted_datalen + HASH_SIZE) * 2; in encrypted_key_decrypt()
570 hex_encoded_data = hex_encoded_iv + (2 * ivsize) + 2; in encrypted_key_decrypt()
571 hex2bin(epayload->iv, hex_encoded_iv, ivsize); in encrypted_key_decrypt()
[all …]
/linux-2.6.39/arch/x86/crypto/
Dsalsa20_glue.c40 u32 keysize, u32 ivsize);
108 .ivsize = SALSA20_IV_SIZE,
Dfpu.c125 inst->alg.cra_blkcipher.ivsize = alg->cra_blkcipher.ivsize; in crypto_fpu_alloc()
Daesni-intel_glue.c474 .ivsize = AES_BLOCK_SIZE,
621 .ivsize = AES_BLOCK_SIZE,
658 .ivsize = AES_BLOCK_SIZE,
697 .ivsize = CTR_RFC3686_IV_SIZE,
738 .ivsize = AES_BLOCK_SIZE,
777 .ivsize = AES_BLOCK_SIZE,
816 .ivsize = AES_BLOCK_SIZE,
1067 .ivsize = 8,
/linux-2.6.39/drivers/usb/wusbcore/
Dcrypto.c211 size_t ivsize, dst_size; in wusb_ccm_mac() local
238 ivsize = crypto_blkcipher_ivsize(tfm_cbc); in wusb_ccm_mac()
239 memset(iv, 0, ivsize); in wusb_ccm_mac()
/linux-2.6.39/include/linux/
Dcrypto.h203 unsigned int ivsize; member
217 unsigned int ivsize; member
235 unsigned int ivsize; member
330 unsigned int ivsize; member
344 unsigned int ivsize; member
607 return crypto_ablkcipher_crt(tfm)->ivsize; in crypto_ablkcipher_ivsize()
748 return crypto_aead_crt(tfm)->ivsize; in crypto_aead_ivsize()
926 return crypto_blkcipher_alg(tfm)->ivsize; in crypto_blkcipher_ivsize()

12