Age | Commit message (Collapse) | Author |
|
add some RSNA authenticator state machine bits.
|
|
message 2/4 of the 4-way handshake because the authenticator must
derive the PTK first (the MIC is computed using the KCK).
Move calls to ieee80211_eapol_key_check_mic() - and as a consequence
ieee80211_eapol_key_decrypt() - directly in the
ieee80211_recv_{group,4way}_msg*() functions.
Unconstify the first parameter since checking the MIC modifies the
frame. Remove ni->ni_ptk_ok field while i'm here.
|
|
information element in a management frame.
the authenticator has to make a copy of the RSN/WPA1 IE from
(Re)Association requests so that it can be compared with the
one included in message 2/4 of the 4-way handshake.
|
|
of a management or data frame (check if the i_qos, i_ht or i_addr4
are present).
|
|
message 4 based on the EAPOL-Key frame secure bit.
the only thing that differentiate these messages is the presence of
the RSN/WPA1 IE in the EAPOL-Key frame data field.
only message 2/4 contains this IE.
|
|
|
|
|
|
transmitting a frame to a given node.
change ieee80211_encrypt() so that it now takes the key as parameter.
this change is required because drivers doing hardware crypto need to
know what key is being used.
|
|
Tx/Rx MIC for TKIP.
- add two functions to map a PTK and a GTK to an IEEE 802.11 key and
use them in ieee80211_input.c instead of duplicating the same code.
properly set Tx/Rx MIC in the IEEE 802.11 key in the case of TKIP.
- add ic_psk to struct ieee80211com to store the pre-shared key.
- fix setting of the SECURE bit in outgoing EAPOL-Key frames.
- when receiving msg 2 of the 4-way handshake, deauthenticate the
station if the RSN IE does not match that of the (Re)Association
request.
- before parsing an RSN or WPA IE, check that there's enough room for
the version field (2 bytes) which is mandatory.
- various tweaks while i'm here.
|
|
from damien
|
|
ok damien@, put it ok deraadt@
|
|
Even no bit was set we copied the full 225bytes bitmaks into the beacon.
Found the hard way with acx(4) by mglocker@ and myself.
OK mglocker@ damien@
|
|
|
|
a station is using WPA1 or RSN descriptors.
make sure that a station that advertises WPA1 capability in an IE
uses the WPA1 EAPOL-Key descriptor type and not the RSN one.
fix construction of EAPOL-Key frames for WPA1.
i can now successfuly complete a 4-way and group-key handshake
with both a WPA1 and a WPA2 access point.
add some TKIP encapsulation code (no SW crypto yet).
ok deraadt@
|
|
(for instance if they don't support HW crypto).
|
|
passing the frame to the handlers.
|
|
i only converted ieee80211_recv_rsn_group_msg1() in my previous commit.
|
|
can handle multiple ciphers (the key to use is determined automatically
by these functions based on the frame's destination address).
add ieee80211_ccmp_encrypt() and ieee80211_ccmp_decrypt().
those two functions only do encapsulation/decapsulation of CCMP frames
for now (they don't do SW crypto). they will help to test things with
drivers that can do HW crypto.
add a ni_pairwise_key field to struct ieee80211_node to actually install
the pairwise transient key.
install the GTK in ic_nw_keys[].
|
|
|
|
change ieee80211_recv_eapol() so that it is called without the
ethernet header striped.
|
|
|
|
RSN uses a GTK KDE while WPA1 stores the GTK in the EAPOL-Key frame
data field (encrypted) and uses some bits in the info field.
split ieee80211_recv_group_msg1() in two separate functions.
|
|
4-way handshake to ieee80211_send_4way_msg2().
|
|
fix a test for ni_replaycnt_ok while i'm here.
|
|
TKIP sequence counter (TKIP) or the PN (packet number, CCMP).
|
|
when using WPA-PSK).
add a ni_replaycnt_ok flag to struct ieee80211_node to mark the replay
counter as valid. the replay counter is marked valid only when message
3 of the 4-way handshake is received since message 1 contains no MIC.
|
|
|
|
so use that too and remove a check in ieee80211_recv_eapol().
WPA1 stores the group key id into bits 4-5 of the EAPOL-Key frame info
field and uses bit 6 to indicate if the key is Rx/Tx or Rx only.
remove a check in ieee80211_eapol_key_decrypt() because WPA1 encrypts
the payload of message 1 of the group-key handshake without setting the
encrypted bit in the info field.
|
|
this simplifies ieee80211_eapol_key_mic() and ieee80211_eapol_key_check_mic()
quite a bit.
set the EAPOL-Key body length before computing the MIC since the MIC is
computed with the 802.1X header too.
add a missing htons() while i'm here.
|
|
it is set in message 3.
|
|
|
|
the 4-way and group-key handshake.
the state machine is still missing though so this is not used
anywhere yet.
|
|
add a 64-bit replay counter for sending EAPOL-Key request frames.
add a ic_recv_eapol callback to process EAPOL frames.
drivers can redefine this callback but net80211 will implement it.
|
|
states. those fields will be put in a separate structure (ieee80211_rsna)
in a future cleanup phase to save some space.
add a ni_port_valid field to manage PAE state.
in pre-RSNA networks, this field will be set to 1 after a successful
open authentication. in RSNA networks, this field will be set to 1
after a successful 4-way handshake.
|
|
and a 64-bit receive sequence counter (for group keys).
add a ieee80211_cipher_keylen() function to retrieve the key length
in bytes used by a specific cipher.
account for 802.1X header size when computing the Key MIC.
some cleanup in comments and variable names while i'm here.
|
|
Remove a double definition.
Add definitions for Key Data Encapsulations.
|
|
|
|
fix ieee80211_eapol_key_encrypt() so that we don't add more padding
bytes than necessary in the case of AES Key Wrap encryption.
|
|
we won't support PeerKey handshake in a first time.
|
|
|
|
EAPOL-Key Data fields.
|
|
in an RSNA, each STA must maintain a 256-bit global key counter that
must be initialized to a random value (see 8.5.7).
|
|
prepend 802.1X header.
use byte-arrays to prevent access to unaligned fields.
|
|
explicitly use ovbcopy() even if our kernel memcpy() supports
overlapping buffers.
|
|
this will be used to encrypt/decrypt EAPOL-Key frames payload.
|
|
one that can be used with other ciphers than WEP.
|
|
|
|
add a parameter to ieee80211_decap() to handle different 802.11
header sizes.
cleanup and clarify ieee80211_classify().
|
|
ieee80211_get_cts_to_self() if mbuf allocation fails.
|
|
|