/kernel/linux/linux-6.6/drivers/md/ |
H A D | dm-crypt.c | 178 unsigned int iv_size; member 321 memset(iv, 0, cc->iv_size); in crypt_iv_plain_gen() 330 memset(iv, 0, cc->iv_size); in crypt_iv_plain64_gen() 339 memset(iv, 0, cc->iv_size); in crypt_iv_plain64be_gen() 340 /* iv_size is at least of size u64; usually it is 16 bytes */ in crypt_iv_plain64be_gen() 341 *(__be64 *)&iv[cc->iv_size - sizeof(u64)] = cpu_to_be64(dmreq->iv_sector); in crypt_iv_plain64be_gen() 353 memset(iv, 0, cc->iv_size); in crypt_iv_essiv_gen() 399 memset(iv, 0, cc->iv_size - sizeof(u64)); /* rest is cleared below */ in crypt_iv_benbi_gen() 402 put_unaligned(val, (__be64 *)(iv + cc->iv_size - sizeof(u64))); in crypt_iv_benbi_gen() 410 memset(iv, 0, cc->iv_size); in crypt_iv_null_gen() [all...] |
/kernel/linux/linux-5.10/drivers/md/ |
H A D | dm-crypt.c | 171 unsigned int iv_size; member 314 memset(iv, 0, cc->iv_size); in crypt_iv_plain_gen() 323 memset(iv, 0, cc->iv_size); in crypt_iv_plain64_gen() 332 memset(iv, 0, cc->iv_size); in crypt_iv_plain64be_gen() 333 /* iv_size is at least of size u64; usually it is 16 bytes */ in crypt_iv_plain64be_gen() 334 *(__be64 *)&iv[cc->iv_size - sizeof(u64)] = cpu_to_be64(dmreq->iv_sector); in crypt_iv_plain64be_gen() 346 memset(iv, 0, cc->iv_size); in crypt_iv_essiv_gen() 391 memset(iv, 0, cc->iv_size - sizeof(u64)); /* rest is cleared below */ in crypt_iv_benbi_gen() 394 put_unaligned(val, (__be64 *)(iv + cc->iv_size - sizeof(u64))); in crypt_iv_benbi_gen() 402 memset(iv, 0, cc->iv_size); in crypt_iv_null_gen() [all...] |
/kernel/linux/linux-6.6/net/tls/ |
H A D | tls.h | 313 prot->iv_size); in tls_advance_record_sn() 333 size_t pkt_len, iv_size = prot->iv_size; in tls_fill_prepend() local 338 pkt_len += iv_size; in tls_fill_prepend() 341 ctx->tx.iv + prot->salt_size, iv_size); in tls_fill_prepend()
|
H A D | tls_sw.c | 558 prot->iv_size + prot->salt_size); in tls_do_encryption() 1544 prot->iv_size + prot->salt_size); in tls_decrypt_sg() 1548 prot->iv_size); in tls_decrypt_sg() 2387 cipher_overhead += prot->iv_size; in tls_rx_msg_size() 2731 prot->iv_size = cipher_desc->iv; in tls_set_sw_offload()
|
H A D | tls_device.c | 1096 prot->iv_size = cipher_desc->iv; in tls_set_device_offload()
|
/kernel/linux/linux-6.6/drivers/crypto/intel/keembay/ |
H A D | keembay-ocs-aes-core.c | 256 int iv_size = crypto_skcipher_ivsize(tfm); in kmb_ocs_sk_validate_input() local 272 if (!req->iv || iv_size != AES_BLOCK_SIZE) in kmb_ocs_sk_validate_input() 277 * that: cryptlen >= iv_size in kmb_ocs_sk_validate_input() 283 if (!req->iv || iv_size != AES_BLOCK_SIZE) in kmb_ocs_sk_validate_input() 293 if (!req->iv || iv_size != AES_BLOCK_SIZE) in kmb_ocs_sk_validate_input() 403 int iv_size = crypto_skcipher_ivsize(tfm); in kmb_ocs_sk_prepare_inplace() local 409 * Note: if we are here, we already checked that cryptlen >= iv_size in kmb_ocs_sk_prepare_inplace() 410 * and iv_size == AES_BLOCK_SIZE (i.e., the size of last_ct_blk); see in kmb_ocs_sk_prepare_inplace() 415 req->cryptlen - iv_size, iv_size, in kmb_ocs_sk_prepare_inplace() 520 int iv_size = crypto_skcipher_ivsize(tfm); kmb_ocs_sk_run() local 600 int iv_size = crypto_aead_ivsize(tfm); kmb_ocs_aead_validate_input() local [all...] |
H A D | ocs-aes.c | 601 const u8 *iv, u32 iv_size, in ocs_aes_validate_inputs() 664 if (!iv || iv_size != AES_BLOCK_SIZE) in ocs_aes_validate_inputs() 680 if (!iv || iv_size != AES_BLOCK_SIZE) in ocs_aes_validate_inputs() 696 if (!iv || iv_size != AES_BLOCK_SIZE) in ocs_aes_validate_inputs() 703 if (!iv || iv_size != GCM_AES_IV_SIZE) in ocs_aes_validate_inputs() 730 if (!iv || iv_size != AES_BLOCK_SIZE) in ocs_aes_validate_inputs() 792 * @iv_size: The size (in bytes) of @iv. 804 u32 iv_size) in ocs_aes_op() 809 rc = ocs_aes_validate_inputs(src_dma_list, src_size, iv, iv_size, 0, 0, in ocs_aes_op() 600 ocs_aes_validate_inputs(dma_addr_t src_dma_list, u32 src_size, const u8 *iv, u32 iv_size, dma_addr_t aad_dma_list, u32 aad_size, const u8 *tag, u32 tag_size, enum ocs_cipher cipher, enum ocs_mode mode, enum ocs_instruction instruction, dma_addr_t dst_dma_list) ocs_aes_validate_inputs() argument 796 ocs_aes_op(struct ocs_aes_dev *aes_dev, enum ocs_mode mode, enum ocs_cipher cipher, enum ocs_instruction instruction, dma_addr_t dst_dma_list, dma_addr_t src_dma_list, u32 src_size, u8 *iv, u32 iv_size) ocs_aes_op() argument
|
H A D | ocs-aes.h | 78 u32 iv_size);
|
/kernel/linux/linux-5.10/include/net/ |
H A D | tls.h | 233 u16 iv_size; member 515 prot->iv_size); in tls_advance_record_sn() 525 size_t pkt_len, iv_size = prot->iv_size; in tls_fill_prepend() local 529 pkt_len += iv_size; in tls_fill_prepend() 532 ctx->tx.iv + TLS_CIPHER_AES_GCM_128_SALT_SIZE, iv_size); in tls_fill_prepend()
|
/kernel/linux/linux-5.10/drivers/s390/cio/ |
H A D | airq.c | 116 static inline unsigned long iv_size(unsigned long bits) in iv_size() function 138 size = iv_size(bits); in airq_iv_create() 208 cio_dma_free(iv->vector, iv_size(iv->bits)); in airq_iv_release()
|
/kernel/linux/linux-6.6/drivers/s390/cio/ |
H A D | airq.c | 114 static inline unsigned long iv_size(unsigned long bits) in iv_size() function 138 size = iv_size(bits); in airq_iv_create() 210 cio_dma_free(iv->vector, iv_size(iv->bits)); in airq_iv_release()
|
/kernel/linux/linux-6.6/drivers/gpu/drm/amd/amdgpu/ |
H A D | amdgpu_ih.c | 290 uint32_t iv_size = 32; in amdgpu_ih_decode_iv_ts_helper() local 294 rptr += iv_size * offset; in amdgpu_ih_decode_iv_ts_helper()
|
/kernel/linux/linux-5.10/drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/ |
H A D | chcr_ktls.h | 50 u32 iv_size; member
|
H A D | chcr_ktls.c | 89 tx_info->iv_size = TLS_CIPHER_AES_GCM_128_IV_SIZE; in chcr_ktls_save_keys() 1193 cipher_start = TLS_HEADER_SIZE + tx_info->iv_size + 1; in chcr_ktls_xmit_wr_complete() 1372 (!tls_rec_offset ? TLS_HEADER_SIZE + tx_info->iv_size : 0); in chcr_ktls_xmit_wr_short() 1429 memcpy(pos + tx_info->salt_size, &iv_record, tx_info->iv_size); in chcr_ktls_xmit_wr_short() 1430 *(__be32 *)(pos + tx_info->salt_size + tx_info->iv_size) = in chcr_ktls_xmit_wr_short() 1432 (TLS_HEADER_SIZE + tx_info->iv_size)) / AES_BLOCK_LEN) : 0)); in chcr_ktls_xmit_wr_short() 1813 if (tls_rec_offset + data_len <= (TLS_HEADER_SIZE + tx_info->iv_size)) { in chcr_short_record_handler() 1831 if (tls_rec_offset < (TLS_HEADER_SIZE + tx_info->iv_size)) { in chcr_short_record_handler() 1838 (TLS_HEADER_SIZE + tx_info->iv_size)) in chcr_short_record_handler()
|
/kernel/linux/linux-6.6/drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/ |
H A D | chcr_ktls.h | 50 u32 iv_size; member
|
H A D | chcr_ktls.c | 89 tx_info->iv_size = TLS_CIPHER_AES_GCM_128_IV_SIZE; in chcr_ktls_save_keys() 1187 cipher_start = TLS_HEADER_SIZE + tx_info->iv_size + 1; in chcr_ktls_xmit_wr_complete() 1366 (!tls_rec_offset ? TLS_HEADER_SIZE + tx_info->iv_size : 0); in chcr_ktls_xmit_wr_short() 1423 memcpy(pos + tx_info->salt_size, &iv_record, tx_info->iv_size); in chcr_ktls_xmit_wr_short() 1424 *(__be32 *)(pos + tx_info->salt_size + tx_info->iv_size) = in chcr_ktls_xmit_wr_short() 1426 (TLS_HEADER_SIZE + tx_info->iv_size)) / AES_BLOCK_LEN) : 0)); in chcr_ktls_xmit_wr_short() 1806 if (tls_rec_offset + data_len <= (TLS_HEADER_SIZE + tx_info->iv_size)) { in chcr_short_record_handler() 1824 if (tls_rec_offset < (TLS_HEADER_SIZE + tx_info->iv_size)) { in chcr_short_record_handler() 1831 (TLS_HEADER_SIZE + tx_info->iv_size)) in chcr_short_record_handler()
|
/kernel/linux/linux-5.10/net/tls/ |
H A D | tls_sw.c | 512 prot->iv_size + prot->salt_size); in tls_do_encryption() 1481 prot->iv_size); in decrypt_internal() 1488 prot->iv_size + prot->salt_size); in decrypt_internal() 2089 cipher_overhead += prot->iv_size; in tls_read_size() 2321 u16 nonce_size, tag_size, iv_size, rec_seq_size, salt_size; in tls_set_sw_offload() local 2380 iv_size = TLS_CIPHER_AES_GCM_128_IV_SIZE; in tls_set_sw_offload() 2397 iv_size = TLS_CIPHER_AES_GCM_256_IV_SIZE; in tls_set_sw_offload() 2414 iv_size = TLS_CIPHER_AES_CCM_128_IV_SIZE; in tls_set_sw_offload() 2434 if (iv_size > MAX_IV_SIZE || nonce_size > MAX_IV_SIZE || in tls_set_sw_offload() 2455 prot->iv_size in tls_set_sw_offload() [all...] |
H A D | tls_device.c | 1017 u16 nonce_size, tag_size, iv_size, rec_seq_size; in tls_set_device_offload() local 1055 iv_size = TLS_CIPHER_AES_GCM_128_IV_SIZE; in tls_set_device_offload() 1077 prot->iv_size = iv_size; in tls_set_device_offload() 1078 ctx->tx.iv = kmalloc(iv_size + TLS_CIPHER_AES_GCM_128_SALT_SIZE, in tls_set_device_offload() 1085 memcpy(ctx->tx.iv + TLS_CIPHER_AES_GCM_128_SALT_SIZE, iv, iv_size); in tls_set_device_offload()
|
/kernel/linux/linux-6.6/drivers/crypto/hisilicon/sec2/ |
H A D | sec_crypto.c | 1391 u32 iv_size = req->ctx->c_ctx.ivsize; in sec_update_iv() local 1411 sz = sg_pcopy_to_buffer(sgl, sg_nents(sgl), iv, iv_size, in sec_update_iv() 1412 cryptlen - iv_size); in sec_update_iv() 1413 if (unlikely(sz != iv_size)) in sec_update_iv() 1416 sz = cryptlen / iv_size; in sec_update_iv() 1417 if (cryptlen % iv_size) in sec_update_iv() 1419 ctr_iv_inc(iv, iv_size, sz); in sec_update_iv() 2148 sec_max_key_size, ctx_init, ctx_exit, blk_size, iv_size)\ 2167 .ivsize = iv_size,\ 2171 max_key_size, blk_size, iv_size) \ [all...] |
/kernel/linux/linux-5.10/drivers/crypto/hisilicon/sec2/ |
H A D | sec_crypto.c | 1040 u32 iv_size = req->ctx->c_ctx.ivsize; in sec_update_iv() local 1059 sz = sg_pcopy_to_buffer(sgl, sg_nents(sgl), iv, iv_size, in sec_update_iv() 1060 cryptlen - iv_size); in sec_update_iv() 1061 if (unlikely(sz != iv_size)) in sec_update_iv() 1476 sec_max_key_size, ctx_init, ctx_exit, blk_size, iv_size)\ 1494 .ivsize = iv_size,\ 1498 max_key_size, blk_size, iv_size) \ 1500 sec_skcipher_ctx_init, sec_skcipher_ctx_exit, blk_size, iv_size) 1601 ctx_exit, blk_size, iv_size, max_authsize)\ 1617 .ivsize = iv_size,\ [all...] |
/kernel/linux/linux-5.10/drivers/crypto/ |
H A D | sa2ul.c | 79 * @iv_size: Initialization Vector size 88 u8 iv_size; member 563 if (cfg->iv_size) in sa_format_cmdl_gen() 564 auth_offset += cfg->iv_size; in sa_format_cmdl_gen() 579 if (cfg->iv_size) { in sa_format_cmdl_gen() 583 upd_info->enc_iv.size = cfg->iv_size; in sa_format_cmdl_gen() 586 SA_CMDL_HEADER_SIZE_BYTES + cfg->iv_size; in sa_format_cmdl_gen() 589 (SA_CTX_ENC_AUX2_OFFSET | (cfg->iv_size >> 3)); in sa_format_cmdl_gen() 590 total += SA_CMDL_HEADER_SIZE_BYTES + cfg->iv_size; in sa_format_cmdl_gen() 875 cfg.iv_size in sa_cipher_setkey() [all...] |
/kernel/linux/linux-6.6/drivers/crypto/ |
H A D | sa2ul.c | 99 * @iv_size: Initialization Vector size 108 u8 iv_size; member 585 if (cfg->iv_size) in sa_format_cmdl_gen() 586 auth_offset += cfg->iv_size; in sa_format_cmdl_gen() 601 if (cfg->iv_size) { in sa_format_cmdl_gen() 605 upd_info->enc_iv.size = cfg->iv_size; in sa_format_cmdl_gen() 608 SA_CMDL_HEADER_SIZE_BYTES + cfg->iv_size; in sa_format_cmdl_gen() 611 (SA_CTX_ENC_AUX2_OFFSET | (cfg->iv_size >> 3)); in sa_format_cmdl_gen() 612 total += SA_CMDL_HEADER_SIZE_BYTES + cfg->iv_size; in sa_format_cmdl_gen() 903 cfg.iv_size in sa_cipher_setkey() [all...] |
/kernel/linux/linux-6.6/include/net/ |
H A D | tls.h | 212 u16 iv_size; member
|
/kernel/linux/linux-5.10/net/tipc/ |
H A D | crypto.c | 683 unsigned int iv_size, req_size; in tipc_aead_mem_alloc() local 687 iv_size = crypto_aead_ivsize(tfm); in tipc_aead_mem_alloc() 691 len += iv_size; in tipc_aead_mem_alloc() 704 *req = (struct aead_request *)PTR_ALIGN(*iv + iv_size, in tipc_aead_mem_alloc()
|
/kernel/linux/linux-6.6/net/tipc/ |
H A D | crypto.c | 690 unsigned int iv_size, req_size; in tipc_aead_mem_alloc() local 694 iv_size = crypto_aead_ivsize(tfm); in tipc_aead_mem_alloc() 698 len += iv_size; in tipc_aead_mem_alloc() 711 *req = (struct aead_request *)PTR_ALIGN(*iv + iv_size, in tipc_aead_mem_alloc()
|