Home
last modified time | relevance | path

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

12

/linux/drivers/crypto/caam/
H A Dcaamalg_desc.h61 struct alginfo *adata, unsigned int ivsize,
67 struct alginfo *adata, unsigned int ivsize,
73 struct alginfo *adata, unsigned int ivsize,
79 unsigned int ivsize, unsigned int icvsize,
83 unsigned int ivsize, unsigned int icvsize,
87 unsigned int ivsize, unsigned int icvsize,
91 unsigned int ivsize, unsigned int icvsize,
95 unsigned int ivsize, unsigned int icvsize,
99 unsigned int ivsize, unsigned int icvsize,
103 struct alginfo *adata, unsigned int ivsize,
[all …]
H A Dcaamalg_desc.c290 struct alginfo *adata, unsigned int ivsize, in cnstr_shdsc_aead_encap() argument
316 append_seq_load(desc, ivsize, LDST_CLASS_1_CCB | in cnstr_shdsc_aead_encap()
385 struct alginfo *adata, unsigned int ivsize, in cnstr_shdsc_aead_decap() argument
412 append_seq_load(desc, ivsize, LDST_CLASS_1_CCB | in cnstr_shdsc_aead_decap()
422 ivsize); in cnstr_shdsc_aead_decap()
430 ivsize); in cnstr_shdsc_aead_decap()
444 append_seq_load(desc, ivsize, LDST_CLASS_1_CCB | in cnstr_shdsc_aead_decap()
448 (ctx1_iv_off << MOVE_OFFSET_SHIFT) | ivsize); in cnstr_shdsc_aead_decap()
502 struct alginfo *adata, unsigned int ivsize, in cnstr_shdsc_aead_givencap() argument
530 append_seq_load(desc, ivsize, LDST_CLASS_1_CCB | in cnstr_shdsc_aead_givencap()
[all …]
/linux/crypto/
H A Dseqiv.c56 unsigned int ivsize = 8; in seqiv_aead_encrypt() local
59 if (req->cryptlen < ivsize) in seqiv_aead_encrypt()
75 info = kmemdup(req->iv, ivsize, req->base.flags & in seqiv_aead_encrypt()
87 req->cryptlen - ivsize, info); in seqiv_aead_encrypt()
88 aead_request_set_ad(subreq, req->assoclen + ivsize); in seqiv_aead_encrypt()
90 crypto_xor(info, ctx->salt, ivsize); in seqiv_aead_encrypt()
91 scatterwalk_map_and_copy(info, req->dst, req->assoclen, ivsize, 1); in seqiv_aead_encrypt()
106 unsigned int ivsize = 8; in seqiv_aead_decrypt() local
108 if (req->cryptlen < ivsize + crypto_aead_authsize(geniv)) in seqiv_aead_decrypt()
118 req->cryptlen - ivsize, req->iv); in seqiv_aead_decrypt()
[all …]
H A Dessiv.c189 int ivsize = crypto_aead_ivsize(tfm); in essiv_aead_crypt() local
190 int ssize = req->assoclen - ivsize; in essiv_aead_crypt()
206 scatterwalk_map_and_copy(req->iv, req->dst, ssize, ivsize, 1); in essiv_aead_crypt()
216 memcpy(iv, req->iv, ivsize); in essiv_aead_crypt()
236 sg_set_buf(rctx->sg + 1, iv, ivsize); in essiv_aead_crypt()
412 int ivsize) in essiv_supported_algorithms() argument
427 if (ivsize != alg->cra_blocksize) in essiv_supported_algorithms()
454 int ivsize; in essiv_create() local
492 ivsize = skcipher_alg->ivsize; in essiv_create()
516 ivsize = aead_alg->ivsize; in essiv_create()
[all …]
H A Dchacha.c114 .ivsize = CHACHA_IV_SIZE,
130 .ivsize = XCHACHA_IV_SIZE,
146 .ivsize = XCHACHA_IV_SIZE,
/linux/drivers/crypto/cavium/nitrox/
H A Dnitrox_skcipher.c84 int ivsize = crypto_skcipher_ivsize(cipher); in nitrox_cbc_cipher_callback() local
85 unsigned int start = skreq->cryptlen - ivsize; in nitrox_cbc_cipher_callback()
93 scatterwalk_map_and_copy(skreq->iv, skreq->dst, start, ivsize, in nitrox_cbc_cipher_callback()
98 ivsize, 0); in nitrox_cbc_cipher_callback()
100 memcpy(skreq->iv, nkreq->iv_out, ivsize); in nitrox_cbc_cipher_callback()
208 static int alloc_src_sglist(struct skcipher_request *skreq, int ivsize) in alloc_src_sglist() argument
215 ret = alloc_src_req_buf(nkreq, nents, ivsize); in alloc_src_sglist()
219 nitrox_creq_copy_iv(nkreq->src, skreq->iv, ivsize); in alloc_src_sglist()
220 nitrox_creq_set_src_sg(nkreq, nents, ivsize, skreq->src, in alloc_src_sglist()
226 static int alloc_dst_sglist(struct skcipher_request *skreq, int ivsize) in alloc_dst_sglist() argument
[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()
111 nitrox_creq_set_src_sg(nkreq, nents, ivsize, src, buflen); in alloc_src_sglist()
117 struct scatterlist *dst, int ivsize, int buflen) in alloc_dst_sglist() argument
136 nitrox_creq_set_dst_sg(nkreq, nents, ivsize, dst, buflen); in alloc_dst_sglist()
167 creq->gph.param2 = cpu_to_be16(rctx->ivsize + rctx->assoclen); in nitrox_set_creq()
169 param3.auth_offset = rctx->ivsize; in nitrox_set_creq()
175 ret = alloc_src_sglist(&rctx->nkreq, rctx->src, rctx->iv, rctx->ivsize, in nitrox_set_creq()
180 ret = alloc_dst_sglist(&rctx->nkreq, rctx->dst, rctx->ivsize, in nitrox_set_creq()
[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/rockchip/
H A Drk3288_crypto_skcipher.c306 int ivsize = crypto_skcipher_ivsize(tfm); in rk_cipher_run() local
324 if (areq->iv && ivsize > 0) { in rk_cipher_run()
326 offset = areq->cryptlen - ivsize; in rk_cipher_run()
328 offset, ivsize, 0); in rk_cipher_run()
343 offset = sgs->length - ivsize; in rk_cipher_run()
344 scatterwalk_map_and_copy(biv, sgs, offset, ivsize, 0); in rk_cipher_run()
366 if (ivsize) { in rk_cipher_run()
367 if (ivsize == DES_BLOCK_SIZE) in rk_cipher_run()
368 memcpy_toio(rkc->reg + RK_CRYPTO_TDES_IV_0, ivtouse, ivsize); in rk_cipher_run()
370 memcpy_toio(rkc->reg + RK_CRYPTO_AES_IV_0, ivtouse, ivsize); in rk_cipher_run()
[all …]
/linux/drivers/crypto/amlogic/
H A Damlogic-gxl-cipher.c99 unsigned int keyivlen, ivsize, offset, tloffset; in meson_cipher() local
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()
132 dev_err(mc->dev, "invalid ivsize=%d vs len=%d\n", 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()
[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
49 if (areq->iv && ivsize > 0 && mode & SS_DECRYPTION) { in sun4i_ss_opti_poll()
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()
137 scatterwalk_map_and_copy(areq->iv, areq->dst, areq->cryptlen - ivsize, in sun4i_ss_opti_poll()
138 ivsize, 0); in sun4i_ss_opti_poll()
184 unsigned int ivsize = crypto_skcipher_ivsize(tfm); in sun4i_ss_cipher_poll() local
242 if (areq->iv && ivsize > 0 && mode & SS_DECRYPTION) { in sun4i_ss_cipher_poll()
[all …]
/linux/fs/crypto/
H A Dkeysetup.c23 .ivsize = 16,
31 .ivsize = 16,
38 .ivsize = 16,
46 .ivsize = 16,
53 .ivsize = 16,
61 .ivsize = 16,
68 .ivsize = 32,
76 .ivsize = 32,
129 if (WARN_ON_ONCE(crypto_sync_skcipher_ivsize(tfm) != mode->ivsize)) { in fscrypt_allocate_skcipher()
608 WARN_ON_ONCE(mode->ivsize > FSCRYPT_MAX_IV_SIZE); in fscrypt_setup_encryption_info()
/linux/drivers/crypto/marvell/octeontx/
H A Dotx_cptvf_algs.c152 u32 start, ivsize; in output_iv_copyback() local
161 ivsize = crypto_skcipher_ivsize(stfm); in output_iv_copyback()
162 start = sreq->cryptlen - ivsize; in output_iv_copyback()
166 ivsize, 0); in output_iv_copyback()
170 start, ivsize, 0); in output_iv_copyback()
172 memcpy(sreq->iv, req_info->iv_out, ivsize); in output_iv_copyback()
242 int ivsize = crypto_skcipher_ivsize(stfm); in create_ctx_hdr() local
243 u32 start = req->cryptlen - ivsize; in create_ctx_hdr()
260 req_info->iv_out = kmalloc(ivsize, flags); in create_ctx_hdr()
265 start, ivsize, 0); in create_ctx_hdr()
[all …]
/linux/drivers/crypto/
H A Dtalitos.c1068 unsigned int ivsize = crypto_aead_ivsize(aead); in ipsec_esp_unmap() local
1089 sg_pcopy_to_buffer(areq->dst, dst_nents, ctx->iv, ivsize, in ipsec_esp_unmap()
1090 areq->assoclen + cryptlen - ivsize); in ipsec_esp_unmap()
1103 unsigned int ivsize = crypto_aead_ivsize(authenc); in ipsec_esp_encrypt_done() local
1110 dma_unmap_single(dev, edesc->iv_dma, ivsize, DMA_TO_DEVICE); in ipsec_esp_encrypt_done()
1280 unsigned int ivsize = crypto_aead_ivsize(aead); in ipsec_esp() local
1314 to_talitos_ptr(civ_ptr, edesc->iv_dma, ivsize, is_sec1); in ipsec_esp()
1375 map_single_talitos_ptr(dev, &desc->ptr[6], ivsize, ctx->iv, in ipsec_esp()
1401 unsigned int ivsize, in talitos_edesc_alloc() argument
1465 alloc_len += ivsize; in talitos_edesc_alloc()
[all …]
H A Datmel-aes.c478 unsigned int ivsize = crypto_skcipher_ivsize(skcipher); in atmel_aes_set_iv_as_last_ciphertext_block() local
480 if (req->cryptlen < ivsize) in atmel_aes_set_iv_as_last_ciphertext_block()
485 req->cryptlen - ivsize, ivsize, 0); in atmel_aes_set_iv_as_last_ciphertext_block()
487 memcpy(req->iv, rctx->lastc, ivsize); in atmel_aes_set_iv_as_last_ciphertext_block()
501 unsigned int ivsize = crypto_skcipher_ivsize(skcipher); in atmel_aes_ctr_update_req_iv() local
513 memcpy(req->iv, ctx->iv, ivsize); in atmel_aes_ctr_update_req_iv()
1091 unsigned int ivsize = crypto_skcipher_ivsize(skcipher); in atmel_aes_crypt() local
1093 if (req->cryptlen >= ivsize) in atmel_aes_crypt()
1095 req->cryptlen - ivsize, in atmel_aes_crypt()
1096 ivsize, 0); in atmel_aes_crypt()
[all …]
H A Datmel-tdes.c517 unsigned int ivsize = crypto_skcipher_ivsize(skcipher); in atmel_tdes_set_iv_as_last_ciphertext_block() local
519 if (req->cryptlen < ivsize) in atmel_tdes_set_iv_as_last_ciphertext_block()
524 req->cryptlen - ivsize, ivsize, 0); in atmel_tdes_set_iv_as_last_ciphertext_block()
526 memcpy(req->iv, rctx->lastc, ivsize); in atmel_tdes_set_iv_as_last_ciphertext_block()
644 unsigned int ivsize = crypto_skcipher_ivsize(skcipher); in atmel_tdes_crypt() local
646 if (req->cryptlen >= ivsize) in atmel_tdes_crypt()
648 req->cryptlen - ivsize, in atmel_tdes_crypt()
649 ivsize, 0); in atmel_tdes_crypt()
803 .ivsize = DES_BLOCK_SIZE,
831 .ivsize = DES_BLOCK_SIZE,
H A Dhifn_795x.c605 unsigned int ivsize; member
1055 u8 *key, int keylen, u8 *iv, int ivsize, u16 mode) in hifn_setup_crypto_command() argument
1084 if (ivsize) { in hifn_setup_crypto_command()
1085 memcpy(buf_pos, iv, ivsize); in hifn_setup_crypto_command()
1086 buf_pos += ivsize; in hifn_setup_crypto_command()
1184 rctx->iv, rctx->ivsize, md); in hifn_setup_cmd_desc()
1516 if (rctx->iv && !rctx->ivsize && rctx->mode != ACRYPTO_MODE_ECB) in hifn_setup_session()
1568 rctx->iv, rctx->ivsize, in hifn_setup_session()
1987 unsigned ivsize; in hifn_setup_crypto_req() local
1989 ivsize = crypto_skcipher_ivsize(crypto_skcipher_reqtfm(req)); in hifn_setup_crypto_req()
[all …]
/linux/security/keys/encrypted-keys/
H A Dencrypted.c44 static unsigned int ivsize;
92 ivsize = crypto_skcipher_ivsize(tfm); in aes_get_sizes()
636 + strlen(datalen) + 1 + ivsize + 1 + encrypted_datalen; in encrypted_key_alloc()
668 asciilen = (ivsize + 1 + encrypted_datalen + HASH_SIZE) * 2; in encrypted_key_decrypt()
672 hex_encoded_data = hex_encoded_iv + (2 * ivsize) + 2; in encrypted_key_decrypt()
673 ret = hex2bin(epayload->iv, hex_encoded_iv, ivsize); in encrypted_key_decrypt()
722 epayload->encrypted_data = epayload->iv + ivsize + 1; in __ekey_init()
766 get_random_bytes(epayload->iv, ivsize); in encrypted_init()
770 get_random_bytes(epayload->iv, ivsize); in encrypted_init()
887 memcpy(new_epayload->iv, epayload->iv, ivsize); in encrypted_update()
43 static unsigned int ivsize; global() variable
[all...]
/linux/drivers/crypto/ccree/
H A Dcc_buffer_mgr.h45 unsigned int ivsize, unsigned int nbytes,
49 void cc_unmap_cipher_request(struct device *dev, void *ctx, unsigned int ivsize,
H A Dcc_buffer_mgr.c340 unsigned int ivsize, struct scatterlist *src, in cc_unmap_cipher_request() argument
347 &req_ctx->gen_ctx.iv_dma_addr, ivsize); in cc_unmap_cipher_request()
349 ivsize, DMA_BIDIRECTIONAL); in cc_unmap_cipher_request()
371 unsigned int ivsize, unsigned int nbytes, in cc_map_cipher_request() argument
389 if (ivsize) { in cc_map_cipher_request()
390 dump_byte_array("iv", info, ivsize); in cc_map_cipher_request()
392 dma_map_single(dev, info, ivsize, DMA_BIDIRECTIONAL); in cc_map_cipher_request()
395 ivsize, info); in cc_map_cipher_request()
399 ivsize, info, &req_ctx->gen_ctx.iv_dma_addr); in cc_map_cipher_request()
453 cc_unmap_cipher_request(dev, req_ctx, ivsize, src, dst); in cc_map_cipher_request()
/linux/drivers/crypto/virtio/
H A Dvirtio_crypto_skcipher_algs.c329 unsigned int ivsize = crypto_skcipher_ivsize(tfm); in __virtio_crypto_skcipher_do_req() local
382 req_data->u.sym_req.u.cipher.para.iv_len = cpu_to_le32(ivsize); in __virtio_crypto_skcipher_do_req()
397 if (unlikely(req->cryptlen + dst_len + ivsize + in __virtio_crypto_skcipher_do_req()
417 iv = kzalloc_node(ivsize, GFP_ATOMIC, in __virtio_crypto_skcipher_do_req()
423 memcpy(iv, req->iv, ivsize); in __virtio_crypto_skcipher_do_req()
429 sg_init_one(&iv_sg, iv, ivsize); in __virtio_crypto_skcipher_do_req()
583 .ivsize = AES_BLOCK_SIZE,
/linux/drivers/crypto/cavium/cpt/
H A Dcptvf_algs.c346 .ivsize = AES_BLOCK_SIZE,
364 .ivsize = AES_BLOCK_SIZE,
401 .ivsize = DES_BLOCK_SIZE,
419 .ivsize = DES_BLOCK_SIZE,
/linux/net/sunrpc/auth_gss/
H A Dgss_krb5_crypto.c479 krb5_cbc_cts_encrypt(struct crypto_sync_skcipher * cts_tfm,struct crypto_sync_skcipher * cbc_tfm,u32 offset,struct xdr_buf * buf,struct page ** pages,u8 * iv,unsigned int ivsize) krb5_cbc_cts_encrypt() argument
734 unsigned int ivsize = crypto_sync_skcipher_ivsize(cipher); krb5_etm_checksum() local
/linux/drivers/crypto/qce/
H A Dcipher.h37 unsigned int ivsize; member
/linux/include/linux/
H A Dbpf_crypto.h14 unsigned int (*ivsize)(void *tfm); member

12