Age | Commit message (Collapse) | Author |
|
constified.
|
|
ok deraadt@
|
|
|
|
|
|
do not parse RSN IE from beacons/probe responses if not scanning.
|
|
|
|
move ieee80211_setup_rates() to ieee80211_node.c
move some prototypes from ieee80211_proto.h to ieee80211_crypto.h
|
|
|
|
- add a ieee80211_recv_action() function (will be used later)
- some cleanup, remove unused prototypes, get rid of the
IEEE80211_VERIFY_* macros
|
|
4-way handshake, regardless of what protocol the supplicant is using.
Ignore the IEs we don't care about instead of deauthenticating with a
reason code of 'RSN_DIFFERENT_IE'.
|
|
crc in addition to the existing "oneshot" mode and use them to replace
ieee80211_crc_update() with the new ether_crc32_le_update(). Saves 1k
kernel bss + some code.
Mark the new ether_crc32_[lb]e_update functions as __pure for a
~25x speedup (on my i386 at least).
feedback and ok damien@
|
|
attaches instead of at every attach.
discussed with deraadt@
|
|
handshake protocols (both supplicant and authenticator state
machines) as defined in the IEEE 802.11i standard.
Software implementation of the TKIP (Temporal Key Integrity
Protocol) and CCMP (CTR with CBC-MAC Protocol) protocols.
This diff doesn't implement any of the 802.1X authentication
protocols and thus only PSK authentication (using pre-shared
keys) is currently supported.
In concrete terms, this adds support for WPA-PSK and WPA2-PSK
protocols, both in station and hostap modes.
The following drivers are marked as WPA-capable and should
work: bwi(4), malo(4), ral(4), iwn(4), wpi(4), ural(4),
rum(4), upgt(4), and zyd(4)
The following options have been added to ifconfig(8):
wpa, wpapsk, wpaprotos, wpaakms, wpaciphers, wpagroupcipher
wpa-psk(8) can be used to generate keys from passphrases.
tested by many@
ok deraadt@
|
|
ok reyk@ deraadt@ jsg@ dlg@
|
|
plcp2rate functions use plcp codes in most-significant-bit-first format
(R4-R1).
some drivers like wpi(4) and iwn(4) want plcp codes in lsb-first format
so they can't use those functions.
also the IEEE standard uses R1-R4 notation so this can be a bit confusing
for those refering to it.
use u_int8_t for plcp code and rate instead of int.
|
|
convert the PLCP header signal field to a rate value and vice versa.
This implementation has been discussed with Damien and doesn't change
any existing net80211 structures.
ok damien@
|
|
ieee80211_plcp2rate() because I've got a late feedback from Damien that
he dislike the implementation method a lot.
|
|
Help and OK reyk@
|
|
ok krw@
|
|
Diff has been done in co-work with damien@, jsg@, reyk@, and claudio@.
OK damien@
|
|
"looks ok" markus@
|
|
|
|
|
|
|
|
|
|
- discard all EAPOL-Key frames with an unknown descriptor version.
- when receiving message 3/4 of the 4-way handshake, do not install
the PTK if the INSTALL bit is not set. this fixes 4-way handshake
with APs using group keys only.
- similarly, do not mark the 802.1X port as valid if the SECURE bit
is not set (it will be marked as valid after group key handshake).
|
|
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.
|