/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/qrtr/ |
D | ns.c | 112 struct kvec iv; in service_announce_new() local 117 iv.iov_base = &pkt; in service_announce_new() 118 iv.iov_len = sizeof(pkt); in service_announce_new() 130 return kernel_sendmsg(qrtr_ns.sock, &msg, &iv, 1, sizeof(pkt)); in service_announce_new() 138 struct kvec iv; in service_announce_del() local 144 iv.iov_base = &pkt; in service_announce_del() 145 iv.iov_len = sizeof(pkt); in service_announce_del() 157 ret = kernel_sendmsg(qrtr_ns.sock, &msg, &iv, 1, sizeof(pkt)); in service_announce_del() 169 struct kvec iv; in lookup_notify() local 172 iv.iov_base = &pkt; in lookup_notify() [all …]
|
/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() 267 struct rxrpc_crypt iv; in rxkad_secure_packet_auth() local 287 memset(&iv, 0, sizeof(iv)); in rxkad_secure_packet_auth() 292 skcipher_request_set_crypt(req, &sg, &sg, 8, iv.x); in rxkad_secure_packet_auth() 311 struct rxrpc_crypt iv; in rxkad_secure_packet_encrypt() local 336 memcpy(&iv, token->kad->session_key, sizeof(iv)); in rxkad_secure_packet_encrypt() 341 skcipher_request_set_crypt(req, &sg[0], &sg[0], sizeof(rxkhdr), iv.x); in rxkad_secure_packet_encrypt() 355 skcipher_request_set_crypt(req, sg, sg, len, iv.x); in rxkad_secure_packet_encrypt() [all …]
|
/net/sunrpc/auth_gss/ |
D | gss_krb5_crypto.c | 57 void * iv, in krb5_encrypt() argument 76 if (iv) in krb5_encrypt() 77 memcpy(local_iv, iv, crypto_sync_skcipher_ivsize(tfm)); in krb5_encrypt() 96 void * iv, in krb5_decrypt() argument 114 if (iv) in krb5_decrypt() 115 memcpy(local_iv, iv, crypto_sync_skcipher_ivsize(tfm)); in krb5_decrypt() 319 u8 iv[GSS_KRB5_MAX_BLOCKSIZE]; member 372 thislen, desc->iv); in encryptor() 408 memset(desc.iv, 0, sizeof(desc.iv)); in gss_encrypt_xdr_buf() 425 u8 iv[GSS_KRB5_MAX_BLOCKSIZE]; member [all …]
|
/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/mac802154/ |
D | llsec.c | 596 static void llsec_geniv(u8 iv[16], __le64 addr, in llsec_geniv() 602 iv[0] = 1; /* L' = L - 1 = 1 */ in llsec_geniv() 603 memcpy(iv + 1, &addr_bytes, sizeof(addr_bytes)); in llsec_geniv() 604 memcpy(iv + 9, &frame_counter, sizeof(frame_counter)); in llsec_geniv() 605 iv[13] = sec->level; in llsec_geniv() 606 iv[14] = 0; in llsec_geniv() 607 iv[15] = 1; in llsec_geniv() 615 u8 iv[16]; in llsec_do_encrypt_unauth() local 621 llsec_geniv(iv, sec->params.hwaddr, &hdr->sec); in llsec_do_encrypt_unauth() 629 skcipher_request_set_crypt(req, &src, &src, datalen, iv); in llsec_do_encrypt_unauth() [all …]
|
/net/tls/ |
D | tls_device_fallback.c | 50 char *iv, __be64 rcd_sn, in tls_enc_record() argument 79 memcpy(iv + TLS_CIPHER_AES_GCM_128_SALT_SIZE, buf + TLS_HEADER_SIZE, in tls_enc_record() 113 aead_request_set_crypt(aead_req, sg_in, sg_out, len, iv); in tls_enc_record() 142 struct scatterlist *sg_out, char *aad, char *iv, in tls_enc_records() argument 152 rc = tls_enc_record(aead_req, aead, aad, iv, in tls_enc_records() 316 void *buf, *iv, *aad, *dummy_buf; in tls_enc_skb() local 334 iv = buf; in tls_enc_skb() 335 memcpy(iv, tls_ctx->crypto_send.aes_gcm_128.salt, in tls_enc_skb() 350 if (tls_enc_records(aead_req, ctx->aead_send, sg_in, sg_out, aad, iv, in tls_enc_skb()
|
D | tls_sw.c | 515 memcpy(&rec->iv_data[iv_offset], tls_ctx->tx.iv, in tls_do_encryption() 1427 u8 *aad, *iv, *mem = NULL; in decrypt_internal() local 1473 iv = aad + prot->aad_size; in decrypt_internal() 1477 iv[0] = 2; in decrypt_internal() 1483 iv + iv_offset + prot->salt_size, in decrypt_internal() 1491 memcpy(iv + iv_offset, tls_ctx->rx.iv, in decrypt_internal() 1494 memcpy(iv + iv_offset, tls_ctx->rx.iv, prot->salt_size); in decrypt_internal() 1496 xor_iv_with_seq(prot, iv + iv_offset, tls_ctx->rx.rec_seq); in decrypt_internal() 1539 err = tls_do_decryption(sk, skb, sgin, sgout, iv, in decrypt_internal() 2230 kfree(tls_ctx->rx.iv); in tls_sw_release_resources_rx() [all …]
|
D | tls_device.c | 61 kfree(ctx->tx.iv); in tls_device_free_ctx() 1008 char *iv, *rec_seq; in tls_set_device_offload() local 1040 iv = ((struct tls12_crypto_info_aes_gcm_128 *)crypto_info)->iv; in tls_set_device_offload() 1064 ctx->tx.iv = kmalloc(iv_size + TLS_CIPHER_AES_GCM_128_SALT_SIZE, in tls_set_device_offload() 1066 if (!ctx->tx.iv) { in tls_set_device_offload() 1071 memcpy(ctx->tx.iv + TLS_CIPHER_AES_GCM_128_SALT_SIZE, iv, iv_size); in tls_set_device_offload() 1169 kfree(ctx->tx.iv); in tls_set_device_offload()
|
D | tls_main.c | 283 kfree(ctx->tx.iv); in tls_sk_proto_cleanup() 390 memcpy(crypto_info_aes_gcm_128->iv, in do_tls_getsockopt_conf() 391 cctx->iv + TLS_CIPHER_AES_GCM_128_SALT_SIZE, in do_tls_getsockopt_conf() 412 memcpy(crypto_info_aes_gcm_256->iv, in do_tls_getsockopt_conf() 413 cctx->iv + TLS_CIPHER_AES_GCM_256_SALT_SIZE, in do_tls_getsockopt_conf()
|
/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() 120 u8 *iv; in esp_ssg_unref() local 127 iv = esp_tmp_iv(aead, tmp, extralen); in esp_ssg_unref() 128 req = esp_tmp_req(aead, iv); in esp_ssg_unref() 571 u8 *iv; in esp6_output_tail() local 602 iv = esp_tmp_iv(aead, tmp, extralen); in esp6_output_tail() 603 req = esp_tmp_req(aead, iv); in esp6_output_tail() 655 aead_request_set_crypt(req, sg, dsg, ivlen + esp->clen, iv); in esp6_output_tail() 658 memset(iv, 0, ivlen); in esp6_output_tail() [all …]
|
D | mcast.c | 159 int iv; in unsolicited_report_interval() local 162 iv = idev->cnf.mldv1_unsolicited_report_interval; in unsolicited_report_interval() 164 iv = idev->cnf.mldv2_unsolicited_report_interval; in unsolicited_report_interval() 166 return iv > 0 ? iv : 1; in unsolicited_report_interval()
|
/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() 535 u8 *iv; in esp_output_tail() local 566 iv = esp_tmp_iv(aead, tmp, extralen); in esp_output_tail() 567 req = esp_tmp_req(aead, iv); in esp_output_tail() 619 aead_request_set_crypt(req, sg, dsg, ivlen + esp->clen, iv); in esp_output_tail() 622 memset(iv, 0, ivlen); in esp_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() 423 struct kvec iv[3]; in bnep_tx_frame() local 434 iv[il++] = (struct kvec) { &type, 1 }; in bnep_tx_frame() 449 iv[il++] = (struct kvec) { eh->h_source, ETH_ALEN }; in bnep_tx_frame() 454 iv[il++] = (struct kvec) { eh->h_dest, ETH_ALEN }; in bnep_tx_frame() 460 iv[il++] = (struct kvec) { skb->data, skb->len }; in bnep_tx_frame() 465 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 784 ctx = tipc_aead_mem_alloc(tfm, sizeof(*tx_ctx), &iv, &req, &sg, nsg); in tipc_aead_encrypt() 808 memcpy(iv, &salt, 4); in tipc_aead_encrypt() 809 memcpy(iv + 4, (u8 *)&ehdr->seqno, 8); in tipc_aead_encrypt() 815 aead_request_set_crypt(req, sg, sg, len - ehsz, iv); in tipc_aead_encrypt() 900 u8 *iv; in tipc_aead_decrypt() local [all …]
|
/net/bluetooth/rfcomm/ |
D | core.c | 830 struct kvec iv = { data, len }; in rfcomm_send_frame() local 837 return kernel_sendmsg(s->sock, &msg, &iv, 1, len); in rfcomm_send_frame() 1131 struct kvec iv[3]; in rfcomm_send_test() local 1148 iv[0].iov_base = hdr; in rfcomm_send_test() 1149 iv[0].iov_len = 5; in rfcomm_send_test() 1150 iv[1].iov_base = pattern; in rfcomm_send_test() 1151 iv[1].iov_len = len; in rfcomm_send_test() 1152 iv[2].iov_base = crc; in rfcomm_send_test() 1153 iv[2].iov_len = 1; in rfcomm_send_test() 1157 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, WRITE, &iv, 1, skb->len); in send_pkt()
|
D | a2mp.c | 47 struct kvec iv; in a2mp_send() local 54 iv.iov_base = cmd; in a2mp_send() 55 iv.iov_len = total_len; in a2mp_send() 59 iov_iter_kvec(&msg.msg_iter, WRITE, &iv, 1, total_len); in a2mp_send()
|
D | smp.c | 592 struct kvec iv[2]; in smp_send_cmd() local 600 iv[0].iov_base = &code; in smp_send_cmd() 601 iv[0].iov_len = 1; in smp_send_cmd() 603 iv[1].iov_base = data; in smp_send_cmd() 604 iv[1].iov_len = len; in smp_send_cmd() 608 iov_iter_kvec(&msg.msg_iter, WRITE, iv, 2, 1 + len); in smp_send_cmd()
|
/net/bluetooth/hidp/ |
D | core.c | 617 struct kvec iv = { data, len }; in hidp_send_frame() local 627 return kernel_sendmsg(sock, &msg, &iv, 1, len); in hidp_send_frame()
|