Home
last modified time | relevance | path

Searched refs:rc4key (Results 1 – 9 of 9) sorted by relevance

/linux-6.1.9/net/mac80211/
Dwep.c108 int ieee80211_wep_encrypt_data(struct arc4_ctx *ctx, u8 *rc4key, in ieee80211_wep_encrypt_data() argument
116 arc4_setkey(ctx, rc4key, klen); in ieee80211_wep_encrypt_data()
137 u8 rc4key[3 + WLAN_KEY_LEN_WEP104]; in ieee80211_wep_encrypt() local
149 memcpy(rc4key, iv, 3); in ieee80211_wep_encrypt()
152 memcpy(rc4key + 3, key, keylen); in ieee80211_wep_encrypt()
157 return ieee80211_wep_encrypt_data(&local->wep_tx_ctx, rc4key, keylen + 3, in ieee80211_wep_encrypt()
165 int ieee80211_wep_decrypt_data(struct arc4_ctx *ctx, u8 *rc4key, in ieee80211_wep_decrypt_data() argument
170 arc4_setkey(ctx, rc4key, klen); in ieee80211_wep_decrypt_data()
196 u8 rc4key[3 + WLAN_KEY_LEN_WEP104]; in ieee80211_wep_decrypt() local
220 memcpy(rc4key, skb->data + hdrlen, 3); in ieee80211_wep_decrypt()
[all …]
Dtkip.c107 u16 tsc_IV16, u8 *rc4key) in tkip_mixing_phase2() argument
133 rc4key = write_tkip_iv(rc4key, tsc_IV16); in tkip_mixing_phase2()
134 *rc4key++ = ((ppk[5] ^ get_unaligned_le16(tk)) >> 1) & 0xFF; in tkip_mixing_phase2()
137 put_unaligned_le16(ppk[i], rc4key + 2 * i); in tkip_mixing_phase2()
227 u8 rc4key[16]; in ieee80211_tkip_encrypt_data() local
229 ieee80211_get_tkip_p2k(&key->conf, skb, rc4key); in ieee80211_tkip_encrypt_data()
231 return ieee80211_wep_encrypt_data(ctx, rc4key, 16, in ieee80211_tkip_encrypt_data()
247 u8 rc4key[16], keyid, *pos = payload; in ieee80211_tkip_decrypt_data() local
307 tkip_mixing_phase2(tk, &rx_ctx->ctx, iv16, rc4key); in ieee80211_tkip_decrypt_data()
309 res = ieee80211_wep_decrypt_data(ctx, rc4key, 16, pos, payload_len - 12); in ieee80211_tkip_decrypt_data()
Dwep.h17 int ieee80211_wep_encrypt_data(struct arc4_ctx *ctx, u8 *rc4key,
22 int ieee80211_wep_decrypt_data(struct arc4_ctx *ctx, u8 *rc4key,
/linux-6.1.9/net/wireless/
Dlib80211_crypt_tkip.c284 u8 * rc4key, int keylen, void *priv) in lib80211_tkip_hdr() argument
295 if (rc4key == NULL || keylen < 16) in lib80211_tkip_hdr()
303 tkip_mixing_phase2(rc4key, tkey->key, tkey->tx_ttak, tkey->tx_iv16); in lib80211_tkip_hdr()
309 *pos++ = *rc4key; in lib80211_tkip_hdr()
310 *pos++ = *(rc4key + 1); in lib80211_tkip_hdr()
311 *pos++ = *(rc4key + 2); in lib80211_tkip_hdr()
331 u8 rc4key[16], *pos, *icv; in lib80211_tkip_encrypt() local
347 if ((lib80211_tkip_hdr(skb, hdr_len, rc4key, 16, priv)) < 0) in lib80211_tkip_encrypt()
357 arc4_setkey(&tkey->tx_ctx_arc4, rc4key, 16); in lib80211_tkip_encrypt()
379 u8 rc4key[16]; in lib80211_tkip_decrypt() local
[all …]
/linux-6.1.9/drivers/staging/rtl8192e/
Drtllib_crypt_tkip.c276 u8 rc4key[16], *icv; in rtllib_tkip_encrypt() local
291 tkip_mixing_phase2(rc4key, tkey->key, tkey->tx_ttak, in rtllib_tkip_encrypt()
307 *pos++ = rc4key[0]; in rtllib_tkip_encrypt()
308 *pos++ = rc4key[1]; in rtllib_tkip_encrypt()
309 *pos++ = rc4key[2]; in rtllib_tkip_encrypt()
326 arc4_setkey(&tkey->tx_ctx_arc4, rc4key, 16); in rtllib_tkip_encrypt()
352 u8 rc4key[16]; in rtllib_tkip_decrypt() local
410 tkip_mixing_phase2(rc4key, tkey->key, tkey->rx_ttak, iv16); in rtllib_tkip_decrypt()
414 arc4_setkey(&tkey->rx_ctx_arc4, rc4key, 16); in rtllib_tkip_decrypt()
/linux-6.1.9/drivers/staging/rtl8192u/ieee80211/
Dieee80211_crypt_tkip.c276 u8 rc4key[16], *icv; in ieee80211_tkip_encrypt() local
291 tkip_mixing_phase2(rc4key, tkey->key, tkey->tx_ttak, tkey->tx_iv16); in ieee80211_tkip_encrypt()
306 *pos++ = rc4key[0]; in ieee80211_tkip_encrypt()
307 *pos++ = rc4key[1]; in ieee80211_tkip_encrypt()
308 *pos++ = rc4key[2]; in ieee80211_tkip_encrypt()
325 arc4_setkey(&tkey->tx_ctx_arc4, rc4key, 16); in ieee80211_tkip_encrypt()
346 u8 rc4key[16]; in ieee80211_tkip_decrypt() local
399 tkip_mixing_phase2(rc4key, tkey->key, tkey->rx_ttak, iv16); in ieee80211_tkip_decrypt()
403 arc4_setkey(&tkey->rx_ctx_arc4, rc4key, 16); in ieee80211_tkip_decrypt()
/linux-6.1.9/drivers/staging/r8188eu/core/
Drtw_security.c394 static void phase2(u8 *rc4key, const u8 *tk, const u16 *p1k, u16 iv16) in phase2() argument
425 rc4key[0] = Hi8(iv16); /* RC4KEY[0..2] is the WEP IV */ in phase2()
426 rc4key[1] = (Hi8(iv16) | 0x20) & 0x7F; /* Help avoid weak (FMS) keys */ in phase2()
427 rc4key[2] = Lo8(iv16); in phase2()
428 rc4key[3] = Lo8((PPK[5] ^ TK16(0)) >> 1); in phase2()
432 rc4key[4 + 2 * i] = Lo8(PPK[i]); in phase2()
433 rc4key[5 + 2 * i] = Hi8(PPK[i]); in phase2()
443 u8 rc4key[16]; in rtw_tkip_encrypt() local
489 phase2(&rc4key[0], prwskey, (u16 *)&ttkey[0], pnl); in rtw_tkip_encrypt()
495 arc4_setkey(ctx, rc4key, 16); in rtw_tkip_encrypt()
[all …]
/linux-6.1.9/drivers/staging/rtl8723bs/core/
Drtw_security.c411 static void phase2(u8 *rc4key, const u8 *tk, const u16 *p1k, u16 iv16) in phase2() argument
443 rc4key[0] = Hi8(iv16); /* RC4KEY[0..2] is the WEP IV */ in phase2()
444 rc4key[1] = (Hi8(iv16) | 0x20) & 0x7F; /* Help avoid weak (FMS) keys */ in phase2()
445 rc4key[2] = Lo8(iv16); in phase2()
446 rc4key[3] = Lo8((PPK[5] ^ TK16(0)) >> 1); in phase2()
451 rc4key[4+2*i] = Lo8(PPK[i]); in phase2()
452 rc4key[5+2*i] = Hi8(PPK[i]); in phase2()
462 u8 rc4key[16]; in rtw_tkip_encrypt() local
505 phase2(&rc4key[0], prwskey, (u16 *)&ttkey[0], pnl); in rtw_tkip_encrypt()
511 arc4_setkey(ctx, rc4key, 16); in rtw_tkip_encrypt()
[all …]
/linux-6.1.9/drivers/staging/rtl8712/
Drtl871x_security.c518 static void phase2(u8 *rc4key, const u8 *tk, const u16 *p1k, u16 iv16) in phase2() argument
546 rc4key[0] = Hi8(iv16); /* RC4KEY[0..2] is the WEP IV */ in phase2()
547 rc4key[1] = (Hi8(iv16) | 0x20) & 0x7F; /* Help avoid weak (FMS) keys */ in phase2()
548 rc4key[2] = Lo8(iv16); in phase2()
549 rc4key[3] = Lo8((PPK[5] ^ TK16(0)) >> 1); in phase2()
552 rc4key[4 + 2 * i] = Lo8(PPK[i]); in phase2()
553 rc4key[5 + 2 * i] = Hi8(PPK[i]); in phase2()
562 u8 rc4key[16]; in r8712_tkip_encrypt() local
598 phase2(&rc4key[0], prwskey, (u16 *)&ttkey[0], in r8712_tkip_encrypt()
608 arcfour_init(&mycontext, rc4key, 16); in r8712_tkip_encrypt()
[all …]