Lines Matching full:iv
28 /* start WEP IV from a random value */ in ieee80211_wep_init()
32 static inline bool ieee80211_wep_weak_iv(u32 iv, int keylen) in ieee80211_wep_weak_iv() argument
39 if ((iv & 0xff00) == 0xff00) { in ieee80211_wep_weak_iv()
40 u8 B = (iv >> 16) & 0xff; in ieee80211_wep_weak_iv()
49 int keylen, int keyidx, u8 *iv) in ieee80211_wep_get_iv() argument
55 if (!iv) in ieee80211_wep_get_iv()
58 *iv++ = (local->wep_iv >> 16) & 0xff; in ieee80211_wep_get_iv()
59 *iv++ = (local->wep_iv >> 8) & 0xff; in ieee80211_wep_get_iv()
60 *iv++ = local->wep_iv & 0xff; in ieee80211_wep_get_iv()
61 *iv++ = keyidx << 6; in ieee80211_wep_get_iv()
83 /* the HW only needs room for the IV, but not the actual IV */ in ieee80211_wep_add_iv()
108 * does _not_ add IV. data = RC4(data | CRC32(data)) */
125 /* Perform WEP encryption on given skb. 4 bytes of extra space (IV) in the
127 * buffer will be added. Both IV and ICV will be transmitted, so the
130 * WEP frame payload: IV + TX key idx, RC4(data), ICV = RC4(CRC32(data))
136 u8 *iv; in ieee80211_wep_encrypt() local
143 iv = ieee80211_wep_add_iv(local, skb, keylen, keyidx); in ieee80211_wep_encrypt()
144 if (!iv) in ieee80211_wep_encrypt()
147 len = skb->len - (iv + IEEE80211_WEP_IV_LEN - skb->data); in ieee80211_wep_encrypt()
149 /* Prepend 24-bit IV to RC4 key */ in ieee80211_wep_encrypt()
150 memcpy(rc4key, iv, 3); in ieee80211_wep_encrypt()
159 iv + IEEE80211_WEP_IV_LEN, len); in ieee80211_wep_encrypt()
164 * payload, including 4-byte ICV, but _not_ IV. data_len must not include ICV.
185 * the frame: IV (4 bytes), encrypted payload (including SNAP header),
186 * ICV (4 bytes). skb->len includes both IV and ICV.
189 * failure. If frame is OK, IV and ICV will be removed, i.e., decrypted payload
220 /* Prepend 24-bit IV to RC4 key */ in ieee80211_wep_decrypt()
234 /* Remove IV */ in ieee80211_wep_decrypt()