/net/qrtr/ |
D | ns.c | 114 struct kvec iv; in service_announce_new() local 119 iv.iov_base = &pkt; in service_announce_new() 120 iv.iov_len = sizeof(pkt); in service_announce_new() 132 return kernel_sendmsg(qrtr_ns.sock, &msg, &iv, 1, sizeof(pkt)); in service_announce_new() 140 struct kvec iv; in service_announce_del() local 146 iv.iov_base = &pkt; in service_announce_del() 147 iv.iov_len = sizeof(pkt); in service_announce_del() 159 ret = kernel_sendmsg(qrtr_ns.sock, &msg, &iv, 1, sizeof(pkt)); in service_announce_del() 171 struct kvec iv; in lookup_notify() local 174 iv.iov_base = &pkt; in lookup_notify() [all …]
|
/net/mac80211/ |
D | wep.c | 31 static inline bool ieee80211_wep_weak_iv(u32 iv, int keylen) in ieee80211_wep_weak_iv() argument 38 if ((iv & 0xff00) == 0xff00) { in ieee80211_wep_weak_iv() 39 u8 B = (iv >> 16) & 0xff; in ieee80211_wep_weak_iv() 48 int keylen, int keyidx, u8 *iv) in ieee80211_wep_get_iv() argument 54 if (!iv) in ieee80211_wep_get_iv() 57 *iv++ = (local->wep_iv >> 16) & 0xff; in ieee80211_wep_get_iv() 58 *iv++ = (local->wep_iv >> 8) & 0xff; in ieee80211_wep_get_iv() 59 *iv++ = local->wep_iv & 0xff; in ieee80211_wep_get_iv() 60 *iv++ = keyidx << 6; in ieee80211_wep_get_iv() 135 u8 *iv; in ieee80211_wep_encrypt() local [all …]
|
D | aes_gmac.c | 21 u8 *zero, *__aad, iv[AES_BLOCK_SIZE]; in ieee80211_aes_gmac() local 55 memcpy(iv, nonce, GMAC_NONCE_LEN); in ieee80211_aes_gmac() 56 memset(iv + GMAC_NONCE_LEN, 0, sizeof(iv) - GMAC_NONCE_LEN); in ieee80211_aes_gmac() 57 iv[AES_BLOCK_SIZE - 1] = 0x01; in ieee80211_aes_gmac() 60 aead_request_set_crypt(aead_req, sg, sg, 0, iv); in ieee80211_aes_gmac()
|
D | fils_aead.c | 155 u8 frame_iv[AES_BLOCK_SIZE], iv[AES_BLOCK_SIZE]; in aes_siv_decrypt() local 164 memcpy(iv, iv_crypt, AES_BLOCK_SIZE); in aes_siv_decrypt() 170 iv[8] &= 0x7f; in aes_siv_decrypt() 171 iv[12] &= 0x7f; in aes_siv_decrypt() 193 skcipher_request_set_crypt(req, src, dst, crypt_len, iv); in aes_siv_decrypt()
|
/net/rxrpc/ |
D | rxkad.c | 189 struct rxrpc_crypt iv; in rxkad_prime_packet_security() local 209 memcpy(&iv, token->kad->session_key, sizeof(iv)); in rxkad_prime_packet_security() 219 skcipher_request_set_crypt(req, &sg, &sg, tmpsize, iv.x); in rxkad_prime_packet_security() 255 struct rxrpc_crypt iv; in rxkad_secure_packet_auth() local 275 memset(&iv, 0, sizeof(iv)); in rxkad_secure_packet_auth() 280 skcipher_request_set_crypt(req, &sg, &sg, 8, iv.x); in rxkad_secure_packet_auth() 297 struct rxrpc_crypt iv; in rxkad_secure_packet_encrypt() local 321 memcpy(&iv, token->kad->session_key, sizeof(iv)); in rxkad_secure_packet_encrypt() 326 skcipher_request_set_crypt(req, &sg, &sg, txb->len, iv.x); in rxkad_secure_packet_encrypt() 338 struct rxrpc_crypt iv; in rxkad_secure_packet() local [all …]
|
/net/sunrpc/auth_gss/ |
D | gss_krb5_crypto.c | 105 void * iv, in krb5_encrypt() argument 124 if (iv) in krb5_encrypt() 125 memcpy(local_iv, iv, crypto_sync_skcipher_ivsize(tfm)); in krb5_encrypt() 160 void * iv, in krb5_decrypt() argument 178 if (iv) in krb5_decrypt() 179 memcpy(local_iv, iv, crypto_sync_skcipher_ivsize(tfm)); in krb5_decrypt() 369 u8 iv[GSS_KRB5_MAX_BLOCKSIZE]; member 422 thislen, desc->iv); in encryptor() 458 memset(desc.iv, 0, sizeof(desc.iv)); in gss_encrypt_xdr_buf() 475 u8 iv[GSS_KRB5_MAX_BLOCKSIZE]; member [all …]
|
D | gss_krb5_internal.h | 166 u32 krb5_encrypt(struct crypto_sync_skcipher *key, void *iv, void *in, 169 u32 krb5_decrypt(struct crypto_sync_skcipher *key, void *iv, void *in, 200 u8 *iv, unsigned int ivsize);
|
D | gss_krb5_test.c | 533 void *iv, *text; in rfc3962_encrypt_case() local 551 iv = kunit_kzalloc(test, crypto_sync_skcipher_ivsize(cts_tfm), GFP_KERNEL); in rfc3962_encrypt_case() 552 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, iv); in rfc3962_encrypt_case() 565 iv, crypto_sync_skcipher_ivsize(cts_tfm)); in rfc3962_encrypt_case() 577 memcmp(param->next_iv->data, iv, in rfc3962_encrypt_case()
|
/net/wireless/ |
D | lib80211_crypt_wep.c | 30 u32 iv; member 52 get_random_bytes(&priv->iv, 4); in lib80211_wep_init() 79 wep->iv++; in lib80211_wep_build_iv() 84 if ((wep->iv & 0xff00) == 0xff00) { in lib80211_wep_build_iv() 85 u8 B = (wep->iv >> 16) & 0xff; in lib80211_wep_build_iv() 87 wep->iv += 0x0100; in lib80211_wep_build_iv() 91 *pos++ = (wep->iv >> 16) & 0xff; in lib80211_wep_build_iv() 92 *pos++ = (wep->iv >> 8) & 0xff; in lib80211_wep_build_iv() 93 *pos++ = wep->iv & 0xff; in lib80211_wep_build_iv()
|
D | lib80211_crypt_ccmp.c | 95 const u8 *pn, u8 *iv, u8 *aad) in ccmp_init_iv_and_aad() argument 122 iv[0] = 0x1; in ccmp_init_iv_and_aad() 125 iv[1] = qc; in ccmp_init_iv_and_aad() 126 memcpy(iv + 2, hdr->addr2, ETH_ALEN); in ccmp_init_iv_and_aad() 127 memcpy(iv + 8, pn, CCMP_PN_LEN); in ccmp_init_iv_and_aad() 197 u8 iv[AES_BLOCK_LEN]; in lib80211_ccmp_encrypt() local 214 aad_len = ccmp_init_iv_and_aad(hdr, key->tx_pn, iv, aad); in lib80211_ccmp_encrypt() 225 aead_request_set_crypt(req, sg, sg, data_len, iv); in lib80211_ccmp_encrypt() 262 u8 iv[AES_BLOCK_LEN]; in lib80211_ccmp_decrypt() local 317 aad_len = ccmp_init_iv_and_aad(hdr, pn, iv, aad); in lib80211_ccmp_decrypt() [all …]
|
/net/tls/ |
D | tls_device_fallback.c | 52 char *iv, __be64 rcd_sn, in tls_enc_record() argument 74 buf_size = TLS_HEADER_SIZE + cipher_desc->iv; in tls_enc_record() 88 len -= cipher_desc->iv; in tls_enc_record() 92 memcpy(iv + cipher_desc->salt, buf + TLS_HEADER_SIZE, cipher_desc->iv); in tls_enc_record() 125 aead_request_set_crypt(aead_req, sg_in, sg_out, len, iv); in tls_enc_record() 154 struct scatterlist *sg_out, char *aad, char *iv, in tls_enc_records() argument 164 rc = tls_enc_record(aead_req, aead, aad, iv, in tls_enc_records() 332 void *buf, *iv, *aad, *dummy_buf, *salt; in tls_enc_skb() local 352 buf_len = cipher_desc->salt + cipher_desc->iv + TLS_AAD_SPACE_SIZE + in tls_enc_skb() 358 iv = buf; in tls_enc_skb() [all …]
|
D | tls_device.c | 62 kfree(ctx->tx.iv); in tls_device_free_ctx() 904 orig_buf = kmalloc(rxm->full_len + TLS_HEADER_SIZE + cipher_desc->iv, in tls_device_reencrypt() 920 rxm->full_len + TLS_HEADER_SIZE + cipher_desc->iv); in tls_device_reencrypt() 921 err = skb_copy_bits(skb, offset, buf, TLS_HEADER_SIZE + cipher_desc->iv); in tls_device_reencrypt() 1054 char *iv, *rec_seq; in tls_set_device_offload() local 1088 iv = crypto_info_iv(crypto_info, cipher_desc); in tls_set_device_offload() 1093 prot->prepend_size = TLS_HEADER_SIZE + cipher_desc->iv; in tls_set_device_offload() 1096 prot->iv_size = cipher_desc->iv; in tls_set_device_offload() 1098 ctx->tx.iv = kmalloc(cipher_desc->iv + cipher_desc->salt, GFP_KERNEL); in tls_set_device_offload() 1099 if (!ctx->tx.iv) { in tls_set_device_offload() [all …]
|
D | tls.h | 56 unsigned int iv; member 312 tls_bigint_increment(ctx->iv + prot->salt_size, in tls_advance_record_sn() 317 tls_xor_iv_with_seq(struct tls_prot_info *prot, char *iv, char *seq) in tls_xor_iv_with_seq() argument 324 iv[i + 4] ^= seq[i]; in tls_xor_iv_with_seq() 341 ctx->tx.iv + prot->salt_size, iv_size); in tls_fill_prepend()
|
D | tls_sw.c | 64 u8 iv[MAX_IV_SIZE]; member 557 memcpy(&rec->iv_data[iv_offset], tls_ctx->tx.iv, in tls_do_encryption() 1531 dctx->iv[0] = TLS_AES_CCM_IV_B0_BYTE; in tls_decrypt_sg() 1535 dctx->iv[0] = TLS_SM4_CCM_IV_B0_BYTE; in tls_decrypt_sg() 1543 memcpy(&dctx->iv[iv_offset], tls_ctx->rx.iv, in tls_decrypt_sg() 1547 &dctx->iv[iv_offset] + prot->salt_size, in tls_decrypt_sg() 1551 memcpy(&dctx->iv[iv_offset], tls_ctx->rx.iv, prot->salt_size); in tls_decrypt_sg() 1553 tls_xor_iv_with_seq(prot, &dctx->iv[iv_offset], tls_ctx->rx.rec_seq); in tls_decrypt_sg() 1598 err = tls_do_decryption(sk, sgin, sgout, dctx->iv, in tls_decrypt_sg() 2505 kfree(tls_ctx->rx.iv); in tls_sw_release_resources_rx() [all …]
|
D | tls_main.c | 65 static_assert(sizeof_field(struct ci, iv) == cipher ## _IV_SIZE); \ 71 .iv_offset = offsetof(struct ci, iv), \ 79 .iv = cipher ## _IV_SIZE, \ 91 .iv = cipher ## _IV_SIZE, \ 352 kfree(ctx->tx.iv); in tls_sk_proto_cleanup() 488 cctx->iv + cipher_desc->salt, cipher_desc->iv); in do_tls_getsockopt_conf()
|
/net/mac802154/ |
D | llsec.c | 604 static void llsec_geniv(u8 iv[16], __le64 addr, in llsec_geniv() 610 iv[0] = 1; /* L' = L - 1 = 1 */ in llsec_geniv() 611 memcpy(iv + 1, &addr_bytes, sizeof(addr_bytes)); in llsec_geniv() 612 memcpy(iv + 9, &frame_counter, sizeof(frame_counter)); in llsec_geniv() 613 iv[13] = sec->level; in llsec_geniv() 614 iv[14] = 0; in llsec_geniv() 615 iv[15] = 1; in llsec_geniv() 623 u8 iv[16]; in llsec_do_encrypt_unauth() local 629 llsec_geniv(iv, sec->params.hwaddr, &hdr->sec); in llsec_do_encrypt_unauth() 637 skcipher_request_set_crypt(req, &src, &src, datalen, iv); in llsec_do_encrypt_unauth() [all …]
|
/net/ipv4/ |
D | esp4.c | 80 static inline struct aead_request *esp_tmp_req(struct crypto_aead *aead, u8 *iv) in esp_tmp_req() argument 84 req = (void *)PTR_ALIGN(iv + crypto_aead_ivsize(aead), in esp_tmp_req() 102 u8 *iv; in esp_ssg_unref() local 109 iv = esp_tmp_iv(aead, tmp, extralen); in esp_ssg_unref() 110 req = esp_tmp_req(aead, iv); in esp_ssg_unref() 533 u8 *iv; in esp_output_tail() local 564 iv = esp_tmp_iv(aead, tmp, extralen); in esp_output_tail() 565 req = esp_tmp_req(aead, iv); in esp_output_tail() 617 aead_request_set_crypt(req, sg, dsg, ivlen + esp->clen, iv); in esp_output_tail() 620 memset(iv, 0, ivlen); in esp_output_tail() [all …]
|
/net/ipv6/ |
D | esp6.c | 97 static inline struct aead_request *esp_tmp_req(struct crypto_aead *aead, u8 *iv) in esp_tmp_req() argument 101 req = (void *)PTR_ALIGN(iv + crypto_aead_ivsize(aead), in esp_tmp_req() 119 u8 *iv; in esp_ssg_unref() local 126 iv = esp_tmp_iv(aead, tmp, extralen); in esp_ssg_unref() 127 req = esp_tmp_req(aead, iv); in esp_ssg_unref() 570 u8 *iv; in esp6_output_tail() local 601 iv = esp_tmp_iv(aead, tmp, extralen); in esp6_output_tail() 602 req = esp_tmp_req(aead, iv); in esp6_output_tail() 654 aead_request_set_crypt(req, sg, dsg, ivlen + esp->clen, iv); in esp6_output_tail() 657 memset(iv, 0, ivlen); in esp6_output_tail() [all …]
|
/net/bluetooth/bnep/ |
D | core.c | 74 struct kvec iv = { data, len }; in bnep_send() local 76 return kernel_sendmsg(sock, &s->msg, &iv, 1, len); in bnep_send() 424 struct kvec iv[3]; in bnep_tx_frame() local 435 iv[il++] = (struct kvec) { &type, 1 }; in bnep_tx_frame() 450 iv[il++] = (struct kvec) { eh->h_source, ETH_ALEN }; in bnep_tx_frame() 455 iv[il++] = (struct kvec) { eh->h_dest, ETH_ALEN }; in bnep_tx_frame() 461 iv[il++] = (struct kvec) { skb->data, skb->len }; in bnep_tx_frame() 466 len = kernel_sendmsg(sock, &s->msg, iv, il, len); in bnep_tx_frame()
|
/net/ceph/ |
D | crypto.c | 225 char iv[AES_BLOCK_SIZE] __aligned(8); in ceph_aes_crypt() local 237 memcpy(iv, aes_iv, AES_BLOCK_SIZE); in ceph_aes_crypt() 240 skcipher_request_set_crypt(req, sgt.sgl, sgt.sgl, crypt_len, iv); in ceph_aes_crypt()
|
/net/tipc/ |
D | crypto.c | 264 u8 **iv, struct aead_request **req, 687 u8 **iv, struct aead_request **req, in tipc_aead_mem_alloc() argument 709 *iv = (u8 *)PTR_ALIGN(mem + crypto_ctx_size, in tipc_aead_mem_alloc() 711 *req = (struct aead_request *)PTR_ALIGN(*iv + iv_size, in tipc_aead_mem_alloc() 746 u8 *iv; in tipc_aead_encrypt() local 773 ctx = tipc_aead_mem_alloc(tfm, sizeof(*tx_ctx), &iv, &req, &sg, nsg); in tipc_aead_encrypt() 797 memcpy(iv, &salt, 4); in tipc_aead_encrypt() 798 memcpy(iv + 4, (u8 *)&ehdr->seqno, 8); in tipc_aead_encrypt() 804 aead_request_set_crypt(req, sg, sg, len - ehsz, iv); in tipc_aead_encrypt() 889 u8 *iv; in tipc_aead_decrypt() local [all …]
|
/net/bluetooth/rfcomm/ |
D | core.c | 834 struct kvec iv = { data, len }; in rfcomm_send_frame() local 841 return kernel_sendmsg(s->sock, &msg, &iv, 1, len); in rfcomm_send_frame() 1135 struct kvec iv[3]; in rfcomm_send_test() local 1152 iv[0].iov_base = hdr; in rfcomm_send_test() 1153 iv[0].iov_len = 5; in rfcomm_send_test() 1154 iv[1].iov_base = pattern; in rfcomm_send_test() 1155 iv[1].iov_len = len; in rfcomm_send_test() 1156 iv[2].iov_base = crc; in rfcomm_send_test() 1157 iv[2].iov_len = 1; in rfcomm_send_test() 1161 return kernel_sendmsg(sock, &msg, iv, 3, 6 + len); in rfcomm_send_test()
|
/net/bluetooth/cmtp/ |
D | core.c | 196 struct kvec iv = { data, len }; in cmtp_send_frame() local 206 return kernel_sendmsg(sock, &msg, &iv, 1, len); in cmtp_send_frame()
|
/net/bluetooth/ |
D | 6lowpan.c | 432 struct kvec iv; in send_pkt() local 440 iv.iov_base = skb->data; in send_pkt() 441 iv.iov_len = skb->len; in send_pkt() 444 iov_iter_kvec(&msg.msg_iter, ITER_SOURCE, &iv, 1, skb->len); in send_pkt()
|
D | smp.c | 594 struct kvec iv[2]; in smp_send_cmd() local 602 iv[0].iov_base = &code; in smp_send_cmd() 603 iv[0].iov_len = 1; in smp_send_cmd() 605 iv[1].iov_base = data; in smp_send_cmd() 606 iv[1].iov_len = len; in smp_send_cmd() 610 iov_iter_kvec(&msg.msg_iter, ITER_SOURCE, iv, 2, 1 + len); in smp_send_cmd()
|