xref: /freebsd/contrib/wpa/hostapd/README (revision 39beb93c3f8bdbf72a61fda42300b5ebed7390c8)
139beb93cSSam Lefflerhostapd - user space IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP
239beb93cSSam Leffler	  Authenticator and RADIUS authentication server
339beb93cSSam Leffler================================================================
439beb93cSSam Leffler
539beb93cSSam LefflerCopyright (c) 2002-2009, Jouni Malinen <j@w1.fi> and contributors
639beb93cSSam LefflerAll Rights Reserved.
739beb93cSSam Leffler
839beb93cSSam LefflerThis program is dual-licensed under both the GPL version 2 and BSD
939beb93cSSam Lefflerlicense. Either license may be used at your option.
1039beb93cSSam Leffler
1139beb93cSSam Leffler
1239beb93cSSam Leffler
1339beb93cSSam LefflerLicense
1439beb93cSSam Leffler-------
1539beb93cSSam Leffler
1639beb93cSSam LefflerGPL v2:
1739beb93cSSam Leffler
1839beb93cSSam LefflerThis program is free software; you can redistribute it and/or modify
1939beb93cSSam Lefflerit under the terms of the GNU General Public License version 2 as
2039beb93cSSam Lefflerpublished by the Free Software Foundation.
2139beb93cSSam Leffler
2239beb93cSSam LefflerThis program is distributed in the hope that it will be useful,
2339beb93cSSam Lefflerbut WITHOUT ANY WARRANTY; without even the implied warranty of
2439beb93cSSam LefflerMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2539beb93cSSam LefflerGNU General Public License for more details.
2639beb93cSSam Leffler
2739beb93cSSam LefflerYou should have received a copy of the GNU General Public License
2839beb93cSSam Leffleralong with this program; if not, write to the Free Software
2939beb93cSSam LefflerFoundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
3039beb93cSSam Leffler
3139beb93cSSam Leffler(this copy of the license is in COPYING file)
3239beb93cSSam Leffler
3339beb93cSSam Leffler
3439beb93cSSam LefflerAlternatively, this software may be distributed, used, and modified
3539beb93cSSam Lefflerunder the terms of BSD license:
3639beb93cSSam Leffler
3739beb93cSSam LefflerRedistribution and use in source and binary forms, with or without
3839beb93cSSam Lefflermodification, are permitted provided that the following conditions are
3939beb93cSSam Lefflermet:
4039beb93cSSam Leffler
4139beb93cSSam Leffler1. Redistributions of source code must retain the above copyright
4239beb93cSSam Leffler   notice, this list of conditions and the following disclaimer.
4339beb93cSSam Leffler
4439beb93cSSam Leffler2. Redistributions in binary form must reproduce the above copyright
4539beb93cSSam Leffler   notice, this list of conditions and the following disclaimer in the
4639beb93cSSam Leffler   documentation and/or other materials provided with the distribution.
4739beb93cSSam Leffler
4839beb93cSSam Leffler3. Neither the name(s) of the above-listed copyright holder(s) nor the
4939beb93cSSam Leffler   names of its contributors may be used to endorse or promote products
5039beb93cSSam Leffler   derived from this software without specific prior written permission.
5139beb93cSSam Leffler
5239beb93cSSam LefflerTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
5339beb93cSSam Leffler"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5439beb93cSSam LefflerLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
5539beb93cSSam LefflerA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
5639beb93cSSam LefflerOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
5739beb93cSSam LefflerSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
5839beb93cSSam LefflerLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
5939beb93cSSam LefflerDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
6039beb93cSSam LefflerTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
6139beb93cSSam Leffler(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
6239beb93cSSam LefflerOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6339beb93cSSam Leffler
6439beb93cSSam Leffler
6539beb93cSSam Leffler
6639beb93cSSam LefflerIntroduction
6739beb93cSSam Leffler============
6839beb93cSSam Leffler
6939beb93cSSam LefflerOriginally, hostapd was an optional user space component for Host AP
7039beb93cSSam Lefflerdriver. It adds more features to the basic IEEE 802.11 management
7139beb93cSSam Lefflerincluded in the kernel driver: using external RADIUS authentication
7239beb93cSSam Lefflerserver for MAC address based access control, IEEE 802.1X Authenticator
7339beb93cSSam Lefflerand dynamic WEP keying, RADIUS accounting, WPA/WPA2 (IEEE 802.11i/RSN)
7439beb93cSSam LefflerAuthenticator and dynamic TKIP/CCMP keying.
7539beb93cSSam Leffler
7639beb93cSSam LefflerThe current version includes support for other drivers, an integrated
7739beb93cSSam LefflerEAP server (i.e., allow full authentication without requiring
7839beb93cSSam Leffleran external RADIUS authentication server), and RADIUS authentication
7939beb93cSSam Lefflerserver for EAP authentication.
8039beb93cSSam Leffler
8139beb93cSSam Leffler
8239beb93cSSam LefflerRequirements
8339beb93cSSam Leffler------------
8439beb93cSSam Leffler
8539beb93cSSam LefflerCurrent hardware/software requirements:
8639beb93cSSam Leffler- drivers:
8739beb93cSSam Leffler	Host AP driver for Prism2/2.5/3.
8839beb93cSSam Leffler	(http://hostap.epitest.fi/)
8939beb93cSSam Leffler	Please note that station firmware version needs to be 1.7.0 or newer
9039beb93cSSam Leffler	to work in WPA mode.
9139beb93cSSam Leffler
9239beb93cSSam Leffler	madwifi driver for cards based on Atheros chip set (ar521x)
9339beb93cSSam Leffler	(http://sourceforge.net/projects/madwifi/)
9439beb93cSSam Leffler	Please note that you will need to add the correct path for
9539beb93cSSam Leffler	madwifi driver root directory in .config (see defconfig file for
9639beb93cSSam Leffler	an example: CFLAGS += -I<path>)
9739beb93cSSam Leffler
9839beb93cSSam Leffler	Prism54 driver for Intersil/Conexant Prism GT/Duette/Indigo
9939beb93cSSam Leffler	(http://www.prism54.org/)
10039beb93cSSam Leffler
10139beb93cSSam Leffler	mac80211-based drivers that support AP mode (with driver=nl80211).
10239beb93cSSam Leffler	This includes drivers for Atheros (ath9k) and Broadcom (b43)
10339beb93cSSam Leffler	chipsets.
10439beb93cSSam Leffler
10539beb93cSSam Leffler	Any wired Ethernet driver for wired IEEE 802.1X authentication
10639beb93cSSam Leffler	(experimental code)
10739beb93cSSam Leffler
10839beb93cSSam Leffler	FreeBSD -current (with some kernel mods that have not yet been
10939beb93cSSam Leffler	committed when hostapd v0.3.0 was released)
11039beb93cSSam Leffler	BSD net80211 layer (e.g., Atheros driver)
11139beb93cSSam Leffler
11239beb93cSSam Leffler
11339beb93cSSam LefflerBuild configuration
11439beb93cSSam Leffler-------------------
11539beb93cSSam Leffler
11639beb93cSSam LefflerIn order to be able to build hostapd, you will need to create a build
11739beb93cSSam Lefflertime configuration file, .config that selects which optional
11839beb93cSSam Lefflercomponents are included. See defconfig file for example configuration
11939beb93cSSam Lefflerand list of available options.
12039beb93cSSam Leffler
12139beb93cSSam Leffler
12239beb93cSSam Leffler
12339beb93cSSam LefflerIEEE 802.1X
12439beb93cSSam Leffler===========
12539beb93cSSam Leffler
12639beb93cSSam LefflerIEEE Std 802.1X-2001 is a standard for port-based network access
12739beb93cSSam Lefflercontrol. In case of IEEE 802.11 networks, a "virtual port" is used
12839beb93cSSam Lefflerbetween each associated station and the AP. IEEE 802.11 specifies
12939beb93cSSam Lefflerminimal authentication mechanism for stations, whereas IEEE 802.1X
13039beb93cSSam Lefflerintroduces a extensible mechanism for authenticating and authorizing
13139beb93cSSam Lefflerusers.
13239beb93cSSam Leffler
13339beb93cSSam LefflerIEEE 802.1X uses elements called Supplicant, Authenticator, Port
13439beb93cSSam LefflerAccess Entity, and Authentication Server. Supplicant is a component in
13539beb93cSSam Lefflera station and it performs the authentication with the Authentication
13639beb93cSSam LefflerServer. An access point includes an Authenticator that relays the packets
13739beb93cSSam Lefflerbetween a Supplicant and an Authentication Server. In addition, it has a
13839beb93cSSam LefflerPort Access Entity (PAE) with Authenticator functionality for
13939beb93cSSam Lefflercontrolling the virtual port authorization, i.e., whether to accept
14039beb93cSSam Lefflerpackets from or to the station.
14139beb93cSSam Leffler
14239beb93cSSam LefflerIEEE 802.1X uses Extensible Authentication Protocol (EAP). The frames
14339beb93cSSam Lefflerbetween a Supplicant and an Authenticator are sent using EAP over LAN
14439beb93cSSam Leffler(EAPOL) and the Authenticator relays these frames to the Authentication
14539beb93cSSam LefflerServer (and similarly, relays the messages from the Authentication
14639beb93cSSam LefflerServer to the Supplicant). The Authentication Server can be colocated with the
14739beb93cSSam LefflerAuthenticator, in which case there is no need for additional protocol
14839beb93cSSam Lefflerfor EAP frame transmission. However, a more common configuration is to
14939beb93cSSam Leffleruse an external Authentication Server and encapsulate EAP frame in the
15039beb93cSSam Lefflerframes used by that server. RADIUS is suitable for this, but IEEE
15139beb93cSSam Leffler802.1X would also allow other mechanisms.
15239beb93cSSam Leffler
15339beb93cSSam LefflerHost AP driver includes PAE functionality in the kernel driver. It
15439beb93cSSam Leffleris a relatively simple mechanism for denying normal frames going to
15539beb93cSSam Leffleror coming from an unauthorized port. PAE allows IEEE 802.1X related
15639beb93cSSam Lefflerframes to be passed between the Supplicant and the Authenticator even
15739beb93cSSam Leffleron an unauthorized port.
15839beb93cSSam Leffler
15939beb93cSSam LefflerUser space daemon, hostapd, includes Authenticator functionality. It
16039beb93cSSam Lefflerreceives 802.1X (EAPOL) frames from the Supplicant using the wlan#ap
16139beb93cSSam Lefflerdevice that is also used with IEEE 802.11 management frames. The
16239beb93cSSam Lefflerframes to the Supplicant are sent using the same device.
16339beb93cSSam Leffler
16439beb93cSSam LefflerThe normal configuration of the Authenticator would use an external
16539beb93cSSam LefflerAuthentication Server. hostapd supports RADIUS encapsulation of EAP
16639beb93cSSam Lefflerpackets, so the Authentication Server should be a RADIUS server, like
16739beb93cSSam LefflerFreeRADIUS (http://www.freeradius.org/). The Authenticator in hostapd
16839beb93cSSam Lefflerrelays the frames between the Supplicant and the Authentication
16939beb93cSSam LefflerServer. It also controls the PAE functionality in the kernel driver by
17039beb93cSSam Lefflercontrolling virtual port authorization, i.e., station-AP
17139beb93cSSam Lefflerconnection, based on the IEEE 802.1X state.
17239beb93cSSam Leffler
17339beb93cSSam LefflerWhen a station would like to use the services of an access point, it
17439beb93cSSam Lefflerwill first perform IEEE 802.11 authentication. This is normally done
17539beb93cSSam Lefflerwith open systems authentication, so there is no security. After
17639beb93cSSam Lefflerthis, IEEE 802.11 association is performed. If IEEE 802.1X is
17739beb93cSSam Lefflerconfigured to be used, the virtual port for the station is set in
17839beb93cSSam LefflerUnauthorized state and only IEEE 802.1X frames are accepted at this
17939beb93cSSam Lefflerpoint. The Authenticator will then ask the Supplicant to authenticate
18039beb93cSSam Lefflerwith the Authentication Server. After this is completed successfully,
18139beb93cSSam Lefflerthe virtual port is set to Authorized state and frames from and to the
18239beb93cSSam Lefflerstation are accepted.
18339beb93cSSam Leffler
18439beb93cSSam LefflerHost AP configuration for IEEE 802.1X
18539beb93cSSam Leffler-------------------------------------
18639beb93cSSam Leffler
18739beb93cSSam LefflerThe user space daemon has its own configuration file that can be used to
18839beb93cSSam Lefflerdefine AP options. Distribution package contains an example
18939beb93cSSam Lefflerconfiguration file (hostapd/hostapd.conf) that can be used as a basis
19039beb93cSSam Lefflerfor configuration. It includes examples of all supported configuration
19139beb93cSSam Leffleroptions and short description of each option. hostapd should be started
19239beb93cSSam Lefflerwith full path to the configuration file as the command line argument,
19339beb93cSSam Lefflere.g., './hostapd /etc/hostapd.conf'. If you have more that one wireless
19439beb93cSSam LefflerLAN card, you can use one hostapd process for multiple interfaces by
19539beb93cSSam Lefflergiving a list of configuration files (one per interface) in the command
19639beb93cSSam Lefflerline.
19739beb93cSSam Leffler
19839beb93cSSam Lefflerhostapd includes a minimal co-located IEEE 802.1X server which can be
19939beb93cSSam Lefflerused to test IEEE 802.1X authentication. However, it should not be
20039beb93cSSam Lefflerused in normal use since it does not provide any security. This can be
20139beb93cSSam Lefflerconfigured by setting ieee8021x and minimal_eap options in the
20239beb93cSSam Lefflerconfiguration file.
20339beb93cSSam Leffler
20439beb93cSSam LefflerAn external Authentication Server (RADIUS) is configured with
20539beb93cSSam Lefflerauth_server_{addr,port,shared_secret} options. In addition,
20639beb93cSSam Lefflerieee8021x and own_ip_addr must be set for this mode. With such
20739beb93cSSam Lefflerconfiguration, the co-located Authentication Server is not used and EAP
20839beb93cSSam Lefflerframes will be relayed using EAPOL between the Supplicant and the
20939beb93cSSam LefflerAuthenticator and RADIUS encapsulation between the Authenticator and
21039beb93cSSam Lefflerthe Authentication Server. Other than this, the functionality is similar
21139beb93cSSam Lefflerto the case with the co-located Authentication Server.
21239beb93cSSam Leffler
21339beb93cSSam LefflerAuthentication Server and Supplicant
21439beb93cSSam Leffler------------------------------------
21539beb93cSSam Leffler
21639beb93cSSam LefflerAny RADIUS server supporting EAP should be usable as an IEEE 802.1X
21739beb93cSSam LefflerAuthentication Server with hostapd Authenticator. FreeRADIUS
21839beb93cSSam Leffler(http://www.freeradius.org/) has been successfully tested with hostapd
21939beb93cSSam LefflerAuthenticator and both Xsupplicant (http://www.open1x.org) and Windows
22039beb93cSSam LefflerXP Supplicants. EAP/TLS was used with Xsupplicant and
22139beb93cSSam LefflerEAP/MD5-Challenge with Windows XP.
22239beb93cSSam Leffler
22339beb93cSSam Lefflerhttp://www.missl.cs.umd.edu/wireless/eaptls/ has useful information
22439beb93cSSam Lefflerabout using EAP/TLS with FreeRADIUS and Xsupplicant (just replace
22539beb93cSSam LefflerCisco access point with Host AP driver, hostapd daemon, and a Prism2
22639beb93cSSam Lefflercard ;-). http://www.freeradius.org/doc/EAP-MD5.html has information
22739beb93cSSam Lefflerabout using EAP/MD5 with FreeRADIUS, including instructions for WinXP
22839beb93cSSam Lefflerconfiguration. http://www.denobula.com/EAPTLS.pdf has a HOWTO on
22939beb93cSSam LefflerEAP/TLS use with WinXP Supplicant.
23039beb93cSSam Leffler
23139beb93cSSam LefflerAutomatic WEP key configuration
23239beb93cSSam Leffler-------------------------------
23339beb93cSSam Leffler
23439beb93cSSam LefflerEAP/TLS generates a session key that can be used to send WEP keys from
23539beb93cSSam Leffleran AP to authenticated stations. The Authenticator in hostapd can be
23639beb93cSSam Lefflerconfigured to automatically select a random default/broadcast key
23739beb93cSSam Leffler(shared by all authenticated stations) with wep_key_len_broadcast
23839beb93cSSam Leffleroption (5 for 40-bit WEP or 13 for 104-bit WEP). In addition,
23939beb93cSSam Lefflerwep_key_len_unicast option can be used to configure individual unicast
24039beb93cSSam Lefflerkeys for stations. This requires support for individual keys in the
24139beb93cSSam Lefflerstation driver.
24239beb93cSSam Leffler
24339beb93cSSam LefflerWEP keys can be automatically updated by configuring rekeying. This
24439beb93cSSam Lefflerwill improve security of the network since same WEP key will only be
24539beb93cSSam Lefflerused for a limited period of time. wep_rekey_period option sets the
24639beb93cSSam Lefflerinterval for rekeying in seconds.
24739beb93cSSam Leffler
24839beb93cSSam Leffler
24939beb93cSSam LefflerWPA/WPA2
25039beb93cSSam Leffler========
25139beb93cSSam Leffler
25239beb93cSSam LefflerFeatures
25339beb93cSSam Leffler--------
25439beb93cSSam Leffler
25539beb93cSSam LefflerSupported WPA/IEEE 802.11i features:
25639beb93cSSam Leffler- WPA-PSK ("WPA-Personal")
25739beb93cSSam Leffler- WPA with EAP (e.g., with RADIUS authentication server) ("WPA-Enterprise")
25839beb93cSSam Leffler- key management for CCMP, TKIP, WEP104, WEP40
25939beb93cSSam Leffler- RSN/WPA2 (IEEE 802.11i), including PMKSA caching and pre-authentication
26039beb93cSSam Leffler
26139beb93cSSam LefflerWPA
26239beb93cSSam Leffler---
26339beb93cSSam Leffler
26439beb93cSSam LefflerThe original security mechanism of IEEE 802.11 standard was not
26539beb93cSSam Lefflerdesigned to be strong and has proved to be insufficient for most
26639beb93cSSam Lefflernetworks that require some kind of security. Task group I (Security)
26739beb93cSSam Lefflerof IEEE 802.11 working group (http://www.ieee802.org/11/) has worked
26839beb93cSSam Lefflerto address the flaws of the base standard and has in practice
26939beb93cSSam Lefflercompleted its work in May 2004. The IEEE 802.11i amendment to the IEEE
27039beb93cSSam Leffler802.11 standard was approved in June 2004 and this amendment is likely
27139beb93cSSam Lefflerto be published in July 2004.
27239beb93cSSam Leffler
27339beb93cSSam LefflerWi-Fi Alliance (http://www.wi-fi.org/) used a draft version of the
27439beb93cSSam LefflerIEEE 802.11i work (draft 3.0) to define a subset of the security
27539beb93cSSam Lefflerenhancements that can be implemented with existing wlan hardware. This
27639beb93cSSam Leffleris called Wi-Fi Protected Access<TM> (WPA). This has now become a
27739beb93cSSam Lefflermandatory component of interoperability testing and certification done
27839beb93cSSam Lefflerby Wi-Fi Alliance. Wi-Fi provides information about WPA at its web
27939beb93cSSam Lefflersite (http://www.wi-fi.org/OpenSection/protected_access.asp).
28039beb93cSSam Leffler
28139beb93cSSam LefflerIEEE 802.11 standard defined wired equivalent privacy (WEP) algorithm
28239beb93cSSam Lefflerfor protecting wireless networks. WEP uses RC4 with 40-bit keys,
28339beb93cSSam Leffler24-bit initialization vector (IV), and CRC32 to protect against packet
28439beb93cSSam Lefflerforgery. All these choices have proven to be insufficient: key space is
28539beb93cSSam Lefflertoo small against current attacks, RC4 key scheduling is insufficient
28639beb93cSSam Leffler(beginning of the pseudorandom stream should be skipped), IV space is
28739beb93cSSam Lefflertoo small and IV reuse makes attacks easier, there is no replay
28839beb93cSSam Lefflerprotection, and non-keyed authentication does not protect against bit
28939beb93cSSam Lefflerflipping packet data.
29039beb93cSSam Leffler
29139beb93cSSam LefflerWPA is an intermediate solution for the security issues. It uses
29239beb93cSSam LefflerTemporal Key Integrity Protocol (TKIP) to replace WEP. TKIP is a
29339beb93cSSam Lefflercompromise on strong security and possibility to use existing
29439beb93cSSam Lefflerhardware. It still uses RC4 for the encryption like WEP, but with
29539beb93cSSam Lefflerper-packet RC4 keys. In addition, it implements replay protection,
29639beb93cSSam Lefflerkeyed packet authentication mechanism (Michael MIC).
29739beb93cSSam Leffler
29839beb93cSSam LefflerKeys can be managed using two different mechanisms. WPA can either use
29939beb93cSSam Leffleran external authentication server (e.g., RADIUS) and EAP just like
30039beb93cSSam LefflerIEEE 802.1X is using or pre-shared keys without need for additional
30139beb93cSSam Lefflerservers. Wi-Fi calls these "WPA-Enterprise" and "WPA-Personal",
30239beb93cSSam Lefflerrespectively. Both mechanisms will generate a master session key for
30339beb93cSSam Lefflerthe Authenticator (AP) and Supplicant (client station).
30439beb93cSSam Leffler
30539beb93cSSam LefflerWPA implements a new key handshake (4-Way Handshake and Group Key
30639beb93cSSam LefflerHandshake) for generating and exchanging data encryption keys between
30739beb93cSSam Lefflerthe Authenticator and Supplicant. This handshake is also used to
30839beb93cSSam Lefflerverify that both Authenticator and Supplicant know the master session
30939beb93cSSam Lefflerkey. These handshakes are identical regardless of the selected key
31039beb93cSSam Lefflermanagement mechanism (only the method for generating master session
31139beb93cSSam Lefflerkey changes).
31239beb93cSSam Leffler
31339beb93cSSam Leffler
31439beb93cSSam LefflerIEEE 802.11i / WPA2
31539beb93cSSam Leffler-------------------
31639beb93cSSam Leffler
31739beb93cSSam LefflerThe design for parts of IEEE 802.11i that were not included in WPA has
31839beb93cSSam Lefflerfinished (May 2004) and this amendment to IEEE 802.11 was approved in
31939beb93cSSam LefflerJune 2004. Wi-Fi Alliance is using the final IEEE 802.11i as a new
32039beb93cSSam Lefflerversion of WPA called WPA2. This includes, e.g., support for more
32139beb93cSSam Lefflerrobust encryption algorithm (CCMP: AES in Counter mode with CBC-MAC)
32239beb93cSSam Lefflerto replace TKIP and optimizations for handoff (reduced number of
32339beb93cSSam Lefflermessages in initial key handshake, pre-authentication, and PMKSA caching).
32439beb93cSSam Leffler
32539beb93cSSam LefflerSome wireless LAN vendors are already providing support for CCMP in
32639beb93cSSam Lefflertheir WPA products. There is no "official" interoperability
32739beb93cSSam Lefflercertification for CCMP and/or mixed modes using both TKIP and CCMP, so
32839beb93cSSam Lefflersome interoperability issues can be expected even though many
32939beb93cSSam Lefflercombinations seem to be working with equipment from different vendors.
33039beb93cSSam LefflerTesting for WPA2 is likely to start during the second half of 2004.
33139beb93cSSam Leffler
33239beb93cSSam Lefflerhostapd configuration for WPA/WPA2
33339beb93cSSam Leffler----------------------------------
33439beb93cSSam Leffler
33539beb93cSSam LefflerTODO
33639beb93cSSam Leffler
33739beb93cSSam Leffler# Enable WPA. Setting this variable configures the AP to require WPA (either
33839beb93cSSam Leffler# WPA-PSK or WPA-RADIUS/EAP based on other configuration). For WPA-PSK, either
33939beb93cSSam Leffler# wpa_psk or wpa_passphrase must be set and wpa_key_mgmt must include WPA-PSK.
34039beb93cSSam Leffler# For WPA-RADIUS/EAP, ieee8021x must be set (but without dynamic WEP keys),
34139beb93cSSam Leffler# RADIUS authentication server must be configured, and WPA-EAP must be included
34239beb93cSSam Leffler# in wpa_key_mgmt.
34339beb93cSSam Leffler# This field is a bit field that can be used to enable WPA (IEEE 802.11i/D3.0)
34439beb93cSSam Leffler# and/or WPA2 (full IEEE 802.11i/RSN):
34539beb93cSSam Leffler# bit0 = WPA
34639beb93cSSam Leffler# bit1 = IEEE 802.11i/RSN (WPA2)
34739beb93cSSam Leffler#wpa=1
34839beb93cSSam Leffler
34939beb93cSSam Leffler# WPA pre-shared keys for WPA-PSK. This can be either entered as a 256-bit
35039beb93cSSam Leffler# secret in hex format (64 hex digits), wpa_psk, or as an ASCII passphrase
35139beb93cSSam Leffler# (8..63 characters) that will be converted to PSK. This conversion uses SSID
35239beb93cSSam Leffler# so the PSK changes when ASCII passphrase is used and the SSID is changed.
35339beb93cSSam Leffler#wpa_psk=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
35439beb93cSSam Leffler#wpa_passphrase=secret passphrase
35539beb93cSSam Leffler
35639beb93cSSam Leffler# Set of accepted key management algorithms (WPA-PSK, WPA-EAP, or both). The
35739beb93cSSam Leffler# entries are separated with a space.
35839beb93cSSam Leffler#wpa_key_mgmt=WPA-PSK WPA-EAP
35939beb93cSSam Leffler
36039beb93cSSam Leffler# Set of accepted cipher suites (encryption algorithms) for pairwise keys
36139beb93cSSam Leffler# (unicast packets). This is a space separated list of algorithms:
36239beb93cSSam Leffler# CCMP = AES in Counter mode with CBC-MAC [RFC 3610, IEEE 802.11i]
36339beb93cSSam Leffler# TKIP = Temporal Key Integrity Protocol [IEEE 802.11i]
36439beb93cSSam Leffler# Group cipher suite (encryption algorithm for broadcast and multicast frames)
36539beb93cSSam Leffler# is automatically selected based on this configuration. If only CCMP is
36639beb93cSSam Leffler# allowed as the pairwise cipher, group cipher will also be CCMP. Otherwise,
36739beb93cSSam Leffler# TKIP will be used as the group cipher.
36839beb93cSSam Leffler#wpa_pairwise=TKIP CCMP
36939beb93cSSam Leffler
37039beb93cSSam Leffler# Time interval for rekeying GTK (broadcast/multicast encryption keys) in
37139beb93cSSam Leffler# seconds.
37239beb93cSSam Leffler#wpa_group_rekey=600
37339beb93cSSam Leffler
37439beb93cSSam Leffler# Time interval for rekeying GMK (master key used internally to generate GTKs
37539beb93cSSam Leffler# (in seconds).
37639beb93cSSam Leffler#wpa_gmk_rekey=86400
37739beb93cSSam Leffler
37839beb93cSSam Leffler# Enable IEEE 802.11i/RSN/WPA2 pre-authentication. This is used to speed up
37939beb93cSSam Leffler# roaming be pre-authenticating IEEE 802.1X/EAP part of the full RSN
38039beb93cSSam Leffler# authentication and key handshake before actually associating with a new AP.
38139beb93cSSam Leffler#rsn_preauth=1
38239beb93cSSam Leffler#
38339beb93cSSam Leffler# Space separated list of interfaces from which pre-authentication frames are
38439beb93cSSam Leffler# accepted (e.g., 'eth0' or 'eth0 wlan0wds0'. This list should include all
38539beb93cSSam Leffler# interface that are used for connections to other APs. This could include
38639beb93cSSam Leffler# wired interfaces and WDS links. The normal wireless data interface towards
38739beb93cSSam Leffler# associated stations (e.g., wlan0) should not be added, since
38839beb93cSSam Leffler# pre-authentication is only used with APs other than the currently associated
38939beb93cSSam Leffler# one.
39039beb93cSSam Leffler#rsn_preauth_interfaces=eth0
391