unicast WEP + key index >0

Jouni Malinen jkmaline
Sun Oct 23 11:51:14 PDT 2005


On Sun, Oct 23, 2005 at 02:24:27PM -0400, Volker Braun wrote:

> I am having trouble connecting wpa_supplicant-0.4.5 + ipw2200-1.0.8 +
> ieee80211-1.1.6 to an access point using dynamic WEP rekeying. I am
> using kernel 2.6.13.4 and wpa_supplicant -D wext. Turning on debugging,
> I see that the ap gives me broadcast keys with key index 1 and 2, and
> then gives me a unicast key with index 3. 

Common configuration for Cisco APs is to rotate broadcast keys with key
indexes 0 and 1 and unicast indexes with 2 and 3. I'm assuming that your
are starting indexes from 1 whereas I used 0-based indexes.

> Is this legal behaviour? The driver_wext.c states:

Well, legal.. I don't think there is any law against that. ;-)

Standard compliance is another question.. My interpretation of IEEE
Std-802.11 is that individual WEP keys (per-STA unicast keys) must use
key index 0. Default keys can uses indexes 0..3. Anyway, since there are
commonly used APs that do not follow this rule, we have to live with
other possible combinations.

>  * @key_idx: Key index (0..3), always 0 for unicast keys

Some time ago, I changed the comment in driver.h to say "usually 0 for
unicast keys"..

> However, the document at
> www.ieee802.org/1/files/public/docs2002/aboba-pre-authentication.pdf
> states that

Please note that this document is not a standard; it looks like a
private submission for IEEE 802.11i.

> ------ snip on -------
> Note: A station shall also support a single Pairwise key, since Group keys shall not use
> index 0, Pairwise keys can always be implemented as default key 0 on the station.
> ------ snip off -------

IEEE 802.11i is quite clear on this use for TKIP and CCMP, i.e.,
Pairwise keys are always using key index 0 and Group keys indexes 1..3.

> So I think that driver_wext.c gets it wrong, and propose the following
> patch below. Is that correct, or am I confused?

The comment in driver_wext.c is not valid for all existing APs, but I
would probably just change "always" to "usually" in the same way as in
driver.h.

> --- wpa_supplicant-0.4.5-original/driver_wext.c	2005-09-24 12:14:38.000000000 -0400
> +++ wpa_supplicant-0.4.5/driver_wext.c	2005-10-23 14:21:28.000000000 -0400
> @@ -1326,7 +1326,8 @@
>   *	%WPA_ALG_TKIP, %WPA_ALG_CCMP); %WPA_ALG_NONE clears the key.
>   * @addr: Address of the peer STA or ff:ff:ff:ff:ff:ff for
>   *	broadcast/default keys
> - * @key_idx: Key index (0..3), always 0 for unicast keys
> + * @key_idx: Key index (0..3), always >0 for broadcast key (=group key). 
> + *	Can be anything for unicast key (=pairwise key).

This change is not correct. Key index 0 is used with default keys (which
are also used for broadcast) with static WEP keys. Unicast keys is in
most cases 0 (always--well I hope--for TKIP/CCMP).

-- 
Jouni Malinen                                            PGP id EFC895FA




More information about the Hostap mailing list