xref: /aosp_15_r20/external/wpa_supplicant_8/hostapd/README (revision 03f9172ca588f91df233974f4258bab95191f931)
1*03f9172cSAndroid Build Coastguard Workerhostapd - user space IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP
2*03f9172cSAndroid Build Coastguard Worker	  Authenticator and RADIUS authentication server
3*03f9172cSAndroid Build Coastguard Worker================================================================
4*03f9172cSAndroid Build Coastguard Worker
5*03f9172cSAndroid Build Coastguard WorkerCopyright (c) 2002-2024, Jouni Malinen <[email protected]> and contributors
6*03f9172cSAndroid Build Coastguard WorkerAll Rights Reserved.
7*03f9172cSAndroid Build Coastguard Worker
8*03f9172cSAndroid Build Coastguard WorkerThis program is licensed under the BSD license (the one with
9*03f9172cSAndroid Build Coastguard Workeradvertisement clause removed).
10*03f9172cSAndroid Build Coastguard Worker
11*03f9172cSAndroid Build Coastguard WorkerIf you are submitting changes to the project, please see CONTRIBUTIONS
12*03f9172cSAndroid Build Coastguard Workerfile for more instructions.
13*03f9172cSAndroid Build Coastguard Worker
14*03f9172cSAndroid Build Coastguard Worker
15*03f9172cSAndroid Build Coastguard Worker
16*03f9172cSAndroid Build Coastguard WorkerLicense
17*03f9172cSAndroid Build Coastguard Worker-------
18*03f9172cSAndroid Build Coastguard Worker
19*03f9172cSAndroid Build Coastguard WorkerThis software may be distributed, used, and modified under the terms of
20*03f9172cSAndroid Build Coastguard WorkerBSD license:
21*03f9172cSAndroid Build Coastguard Worker
22*03f9172cSAndroid Build Coastguard WorkerRedistribution and use in source and binary forms, with or without
23*03f9172cSAndroid Build Coastguard Workermodification, are permitted provided that the following conditions are
24*03f9172cSAndroid Build Coastguard Workermet:
25*03f9172cSAndroid Build Coastguard Worker
26*03f9172cSAndroid Build Coastguard Worker1. Redistributions of source code must retain the above copyright
27*03f9172cSAndroid Build Coastguard Worker   notice, this list of conditions and the following disclaimer.
28*03f9172cSAndroid Build Coastguard Worker
29*03f9172cSAndroid Build Coastguard Worker2. Redistributions in binary form must reproduce the above copyright
30*03f9172cSAndroid Build Coastguard Worker   notice, this list of conditions and the following disclaimer in the
31*03f9172cSAndroid Build Coastguard Worker   documentation and/or other materials provided with the distribution.
32*03f9172cSAndroid Build Coastguard Worker
33*03f9172cSAndroid Build Coastguard Worker3. Neither the name(s) of the above-listed copyright holder(s) nor the
34*03f9172cSAndroid Build Coastguard Worker   names of its contributors may be used to endorse or promote products
35*03f9172cSAndroid Build Coastguard Worker   derived from this software without specific prior written permission.
36*03f9172cSAndroid Build Coastguard Worker
37*03f9172cSAndroid Build Coastguard WorkerTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
38*03f9172cSAndroid Build Coastguard Worker"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
39*03f9172cSAndroid Build Coastguard WorkerLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
40*03f9172cSAndroid Build Coastguard WorkerA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
41*03f9172cSAndroid Build Coastguard WorkerOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
42*03f9172cSAndroid Build Coastguard WorkerSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
43*03f9172cSAndroid Build Coastguard WorkerLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
44*03f9172cSAndroid Build Coastguard WorkerDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
45*03f9172cSAndroid Build Coastguard WorkerTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
46*03f9172cSAndroid Build Coastguard Worker(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
47*03f9172cSAndroid Build Coastguard WorkerOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
48*03f9172cSAndroid Build Coastguard Worker
49*03f9172cSAndroid Build Coastguard Worker
50*03f9172cSAndroid Build Coastguard Worker
51*03f9172cSAndroid Build Coastguard WorkerIntroduction
52*03f9172cSAndroid Build Coastguard Worker============
53*03f9172cSAndroid Build Coastguard Worker
54*03f9172cSAndroid Build Coastguard WorkerOriginally, hostapd was an optional user space component for Host AP
55*03f9172cSAndroid Build Coastguard Workerdriver. It adds more features to the basic IEEE 802.11 management
56*03f9172cSAndroid Build Coastguard Workerincluded in the kernel driver: using external RADIUS authentication
57*03f9172cSAndroid Build Coastguard Workerserver for MAC address based access control, IEEE 802.1X Authenticator
58*03f9172cSAndroid Build Coastguard Workerand dynamic WEP keying, RADIUS accounting, WPA/WPA2 (IEEE 802.11i/RSN)
59*03f9172cSAndroid Build Coastguard WorkerAuthenticator and dynamic TKIP/CCMP keying.
60*03f9172cSAndroid Build Coastguard Worker
61*03f9172cSAndroid Build Coastguard WorkerThe current version includes support for other drivers, an integrated
62*03f9172cSAndroid Build Coastguard WorkerEAP server (i.e., allow full authentication without requiring
63*03f9172cSAndroid Build Coastguard Workeran external RADIUS authentication server), and RADIUS authentication
64*03f9172cSAndroid Build Coastguard Workerserver for EAP authentication.
65*03f9172cSAndroid Build Coastguard Worker
66*03f9172cSAndroid Build Coastguard Worker
67*03f9172cSAndroid Build Coastguard WorkerRequirements
68*03f9172cSAndroid Build Coastguard Worker------------
69*03f9172cSAndroid Build Coastguard Worker
70*03f9172cSAndroid Build Coastguard WorkerCurrent hardware/software requirements:
71*03f9172cSAndroid Build Coastguard Worker- drivers:
72*03f9172cSAndroid Build Coastguard Worker	Host AP driver for Prism2/2.5/3.
73*03f9172cSAndroid Build Coastguard Worker	(http://w1.fi/hostap-driver.html)
74*03f9172cSAndroid Build Coastguard Worker	Please note that station firmware version needs to be 1.7.0 or newer
75*03f9172cSAndroid Build Coastguard Worker	to work in WPA mode.
76*03f9172cSAndroid Build Coastguard Worker
77*03f9172cSAndroid Build Coastguard Worker	mac80211-based drivers that support AP mode (with driver=nl80211).
78*03f9172cSAndroid Build Coastguard Worker	This includes drivers for Atheros (ath9k) and Broadcom (b43)
79*03f9172cSAndroid Build Coastguard Worker	chipsets.
80*03f9172cSAndroid Build Coastguard Worker
81*03f9172cSAndroid Build Coastguard Worker	Any wired Ethernet driver for wired IEEE 802.1X authentication
82*03f9172cSAndroid Build Coastguard Worker	(experimental code)
83*03f9172cSAndroid Build Coastguard Worker
84*03f9172cSAndroid Build Coastguard Worker	FreeBSD -current
85*03f9172cSAndroid Build Coastguard Worker	BSD net80211 layer (e.g., Atheros driver)
86*03f9172cSAndroid Build Coastguard Worker
87*03f9172cSAndroid Build Coastguard Worker
88*03f9172cSAndroid Build Coastguard WorkerBuild configuration
89*03f9172cSAndroid Build Coastguard Worker-------------------
90*03f9172cSAndroid Build Coastguard Worker
91*03f9172cSAndroid Build Coastguard WorkerIn order to be able to build hostapd, you will need to create a build
92*03f9172cSAndroid Build Coastguard Workertime configuration file, .config that selects which optional
93*03f9172cSAndroid Build Coastguard Workercomponents are included. See defconfig file for example configuration
94*03f9172cSAndroid Build Coastguard Workerand list of available options.
95*03f9172cSAndroid Build Coastguard Worker
96*03f9172cSAndroid Build Coastguard Worker
97*03f9172cSAndroid Build Coastguard Worker
98*03f9172cSAndroid Build Coastguard WorkerIEEE 802.1X
99*03f9172cSAndroid Build Coastguard Worker===========
100*03f9172cSAndroid Build Coastguard Worker
101*03f9172cSAndroid Build Coastguard WorkerIEEE Std 802.1X-2001 is a standard for port-based network access
102*03f9172cSAndroid Build Coastguard Workercontrol. In case of IEEE 802.11 networks, a "virtual port" is used
103*03f9172cSAndroid Build Coastguard Workerbetween each associated station and the AP. IEEE 802.11 specifies
104*03f9172cSAndroid Build Coastguard Workerminimal authentication mechanism for stations, whereas IEEE 802.1X
105*03f9172cSAndroid Build Coastguard Workerintroduces a extensible mechanism for authenticating and authorizing
106*03f9172cSAndroid Build Coastguard Workerusers.
107*03f9172cSAndroid Build Coastguard Worker
108*03f9172cSAndroid Build Coastguard WorkerIEEE 802.1X uses elements called Supplicant, Authenticator, Port
109*03f9172cSAndroid Build Coastguard WorkerAccess Entity, and Authentication Server. Supplicant is a component in
110*03f9172cSAndroid Build Coastguard Workera station and it performs the authentication with the Authentication
111*03f9172cSAndroid Build Coastguard WorkerServer. An access point includes an Authenticator that relays the packets
112*03f9172cSAndroid Build Coastguard Workerbetween a Supplicant and an Authentication Server. In addition, it has a
113*03f9172cSAndroid Build Coastguard WorkerPort Access Entity (PAE) with Authenticator functionality for
114*03f9172cSAndroid Build Coastguard Workercontrolling the virtual port authorization, i.e., whether to accept
115*03f9172cSAndroid Build Coastguard Workerpackets from or to the station.
116*03f9172cSAndroid Build Coastguard Worker
117*03f9172cSAndroid Build Coastguard WorkerIEEE 802.1X uses Extensible Authentication Protocol (EAP). The frames
118*03f9172cSAndroid Build Coastguard Workerbetween a Supplicant and an Authenticator are sent using EAP over LAN
119*03f9172cSAndroid Build Coastguard Worker(EAPOL) and the Authenticator relays these frames to the Authentication
120*03f9172cSAndroid Build Coastguard WorkerServer (and similarly, relays the messages from the Authentication
121*03f9172cSAndroid Build Coastguard WorkerServer to the Supplicant). The Authentication Server can be colocated with the
122*03f9172cSAndroid Build Coastguard WorkerAuthenticator, in which case there is no need for additional protocol
123*03f9172cSAndroid Build Coastguard Workerfor EAP frame transmission. However, a more common configuration is to
124*03f9172cSAndroid Build Coastguard Workeruse an external Authentication Server and encapsulate EAP frame in the
125*03f9172cSAndroid Build Coastguard Workerframes used by that server. RADIUS is suitable for this, but IEEE
126*03f9172cSAndroid Build Coastguard Worker802.1X would also allow other mechanisms.
127*03f9172cSAndroid Build Coastguard Worker
128*03f9172cSAndroid Build Coastguard WorkerHost AP driver includes PAE functionality in the kernel driver. It
129*03f9172cSAndroid Build Coastguard Workeris a relatively simple mechanism for denying normal frames going to
130*03f9172cSAndroid Build Coastguard Workeror coming from an unauthorized port. PAE allows IEEE 802.1X related
131*03f9172cSAndroid Build Coastguard Workerframes to be passed between the Supplicant and the Authenticator even
132*03f9172cSAndroid Build Coastguard Workeron an unauthorized port.
133*03f9172cSAndroid Build Coastguard Worker
134*03f9172cSAndroid Build Coastguard WorkerUser space daemon, hostapd, includes Authenticator functionality. It
135*03f9172cSAndroid Build Coastguard Workerreceives 802.1X (EAPOL) frames from the Supplicant using the wlan#ap
136*03f9172cSAndroid Build Coastguard Workerdevice that is also used with IEEE 802.11 management frames. The
137*03f9172cSAndroid Build Coastguard Workerframes to the Supplicant are sent using the same device.
138*03f9172cSAndroid Build Coastguard Worker
139*03f9172cSAndroid Build Coastguard WorkerThe normal configuration of the Authenticator would use an external
140*03f9172cSAndroid Build Coastguard WorkerAuthentication Server. hostapd supports RADIUS encapsulation of EAP
141*03f9172cSAndroid Build Coastguard Workerpackets, so the Authentication Server should be a RADIUS server, like
142*03f9172cSAndroid Build Coastguard WorkerFreeRADIUS (http://www.freeradius.org/). The Authenticator in hostapd
143*03f9172cSAndroid Build Coastguard Workerrelays the frames between the Supplicant and the Authentication
144*03f9172cSAndroid Build Coastguard WorkerServer. It also controls the PAE functionality in the kernel driver by
145*03f9172cSAndroid Build Coastguard Workercontrolling virtual port authorization, i.e., station-AP
146*03f9172cSAndroid Build Coastguard Workerconnection, based on the IEEE 802.1X state.
147*03f9172cSAndroid Build Coastguard Worker
148*03f9172cSAndroid Build Coastguard WorkerWhen a station would like to use the services of an access point, it
149*03f9172cSAndroid Build Coastguard Workerwill first perform IEEE 802.11 authentication. This is normally done
150*03f9172cSAndroid Build Coastguard Workerwith open systems authentication, so there is no security. After
151*03f9172cSAndroid Build Coastguard Workerthis, IEEE 802.11 association is performed. If IEEE 802.1X is
152*03f9172cSAndroid Build Coastguard Workerconfigured to be used, the virtual port for the station is set in
153*03f9172cSAndroid Build Coastguard WorkerUnauthorized state and only IEEE 802.1X frames are accepted at this
154*03f9172cSAndroid Build Coastguard Workerpoint. The Authenticator will then ask the Supplicant to authenticate
155*03f9172cSAndroid Build Coastguard Workerwith the Authentication Server. After this is completed successfully,
156*03f9172cSAndroid Build Coastguard Workerthe virtual port is set to Authorized state and frames from and to the
157*03f9172cSAndroid Build Coastguard Workerstation are accepted.
158*03f9172cSAndroid Build Coastguard Worker
159*03f9172cSAndroid Build Coastguard WorkerHost AP configuration for IEEE 802.1X
160*03f9172cSAndroid Build Coastguard Worker-------------------------------------
161*03f9172cSAndroid Build Coastguard Worker
162*03f9172cSAndroid Build Coastguard WorkerThe user space daemon has its own configuration file that can be used to
163*03f9172cSAndroid Build Coastguard Workerdefine AP options. Distribution package contains an example
164*03f9172cSAndroid Build Coastguard Workerconfiguration file (hostapd/hostapd.conf) that can be used as a basis
165*03f9172cSAndroid Build Coastguard Workerfor configuration. It includes examples of all supported configuration
166*03f9172cSAndroid Build Coastguard Workeroptions and short description of each option. hostapd should be started
167*03f9172cSAndroid Build Coastguard Workerwith full path to the configuration file as the command line argument,
168*03f9172cSAndroid Build Coastguard Workere.g., './hostapd /etc/hostapd.conf'. If you have more that one wireless
169*03f9172cSAndroid Build Coastguard WorkerLAN card, you can use one hostapd process for multiple interfaces by
170*03f9172cSAndroid Build Coastguard Workergiving a list of configuration files (one per interface) in the command
171*03f9172cSAndroid Build Coastguard Workerline.
172*03f9172cSAndroid Build Coastguard Worker
173*03f9172cSAndroid Build Coastguard Workerhostapd includes a minimal co-located IEEE 802.1X server which can be
174*03f9172cSAndroid Build Coastguard Workerused to test IEEE 802.1X authentication. However, it should not be
175*03f9172cSAndroid Build Coastguard Workerused in normal use since it does not provide any security. This can be
176*03f9172cSAndroid Build Coastguard Workerconfigured by setting ieee8021x and minimal_eap options in the
177*03f9172cSAndroid Build Coastguard Workerconfiguration file.
178*03f9172cSAndroid Build Coastguard Worker
179*03f9172cSAndroid Build Coastguard WorkerAn external Authentication Server (RADIUS) is configured with
180*03f9172cSAndroid Build Coastguard Workerauth_server_{addr,port,shared_secret} options. In addition,
181*03f9172cSAndroid Build Coastguard Workerieee8021x and own_ip_addr must be set for this mode. With such
182*03f9172cSAndroid Build Coastguard Workerconfiguration, the co-located Authentication Server is not used and EAP
183*03f9172cSAndroid Build Coastguard Workerframes will be relayed using EAPOL between the Supplicant and the
184*03f9172cSAndroid Build Coastguard WorkerAuthenticator and RADIUS encapsulation between the Authenticator and
185*03f9172cSAndroid Build Coastguard Workerthe Authentication Server. Other than this, the functionality is similar
186*03f9172cSAndroid Build Coastguard Workerto the case with the co-located Authentication Server.
187*03f9172cSAndroid Build Coastguard Worker
188*03f9172cSAndroid Build Coastguard WorkerAuthentication Server
189*03f9172cSAndroid Build Coastguard Worker---------------------
190*03f9172cSAndroid Build Coastguard Worker
191*03f9172cSAndroid Build Coastguard WorkerAny RADIUS server supporting EAP should be usable as an IEEE 802.1X
192*03f9172cSAndroid Build Coastguard WorkerAuthentication Server with hostapd Authenticator. FreeRADIUS
193*03f9172cSAndroid Build Coastguard Worker(http://www.freeradius.org/) has been successfully tested with hostapd
194*03f9172cSAndroid Build Coastguard WorkerAuthenticator.
195*03f9172cSAndroid Build Coastguard Worker
196*03f9172cSAndroid Build Coastguard WorkerAutomatic WEP key configuration
197*03f9172cSAndroid Build Coastguard Worker-------------------------------
198*03f9172cSAndroid Build Coastguard Worker
199*03f9172cSAndroid Build Coastguard WorkerEAP/TLS generates a session key that can be used to send WEP keys from
200*03f9172cSAndroid Build Coastguard Workeran AP to authenticated stations. The Authenticator in hostapd can be
201*03f9172cSAndroid Build Coastguard Workerconfigured to automatically select a random default/broadcast key
202*03f9172cSAndroid Build Coastguard Worker(shared by all authenticated stations) with wep_key_len_broadcast
203*03f9172cSAndroid Build Coastguard Workeroption (5 for 40-bit WEP or 13 for 104-bit WEP). In addition,
204*03f9172cSAndroid Build Coastguard Workerwep_key_len_unicast option can be used to configure individual unicast
205*03f9172cSAndroid Build Coastguard Workerkeys for stations. This requires support for individual keys in the
206*03f9172cSAndroid Build Coastguard Workerstation driver.
207*03f9172cSAndroid Build Coastguard Worker
208*03f9172cSAndroid Build Coastguard WorkerWEP keys can be automatically updated by configuring rekeying. This
209*03f9172cSAndroid Build Coastguard Workerwill improve security of the network since same WEP key will only be
210*03f9172cSAndroid Build Coastguard Workerused for a limited period of time. wep_rekey_period option sets the
211*03f9172cSAndroid Build Coastguard Workerinterval for rekeying in seconds.
212*03f9172cSAndroid Build Coastguard Worker
213*03f9172cSAndroid Build Coastguard Worker
214*03f9172cSAndroid Build Coastguard WorkerWPA/WPA2
215*03f9172cSAndroid Build Coastguard Worker========
216*03f9172cSAndroid Build Coastguard Worker
217*03f9172cSAndroid Build Coastguard WorkerFeatures
218*03f9172cSAndroid Build Coastguard Worker--------
219*03f9172cSAndroid Build Coastguard Worker
220*03f9172cSAndroid Build Coastguard WorkerSupported WPA/IEEE 802.11i features:
221*03f9172cSAndroid Build Coastguard Worker- WPA-PSK ("WPA-Personal")
222*03f9172cSAndroid Build Coastguard Worker- WPA with EAP (e.g., with RADIUS authentication server) ("WPA-Enterprise")
223*03f9172cSAndroid Build Coastguard Worker- key management for CCMP, TKIP, WEP104, WEP40
224*03f9172cSAndroid Build Coastguard Worker- RSN/WPA2 (IEEE 802.11i), including PMKSA caching and pre-authentication
225*03f9172cSAndroid Build Coastguard Worker
226*03f9172cSAndroid Build Coastguard WorkerWPA
227*03f9172cSAndroid Build Coastguard Worker---
228*03f9172cSAndroid Build Coastguard Worker
229*03f9172cSAndroid Build Coastguard WorkerThe original security mechanism of IEEE 802.11 standard was not
230*03f9172cSAndroid Build Coastguard Workerdesigned to be strong and has proved to be insufficient for most
231*03f9172cSAndroid Build Coastguard Workernetworks that require some kind of security. Task group I (Security)
232*03f9172cSAndroid Build Coastguard Workerof IEEE 802.11 working group (http://www.ieee802.org/11/) has worked
233*03f9172cSAndroid Build Coastguard Workerto address the flaws of the base standard and has in practice
234*03f9172cSAndroid Build Coastguard Workercompleted its work in May 2004. The IEEE 802.11i amendment to the IEEE
235*03f9172cSAndroid Build Coastguard Worker802.11 standard was approved in June 2004 and this amendment was
236*03f9172cSAndroid Build Coastguard Workerpublished in July 2004.
237*03f9172cSAndroid Build Coastguard Worker
238*03f9172cSAndroid Build Coastguard WorkerWi-Fi Alliance (http://www.wi-fi.org/) used a draft version of the
239*03f9172cSAndroid Build Coastguard WorkerIEEE 802.11i work (draft 3.0) to define a subset of the security
240*03f9172cSAndroid Build Coastguard Workerenhancements that can be implemented with existing wlan hardware. This
241*03f9172cSAndroid Build Coastguard Workeris called Wi-Fi Protected Access<TM> (WPA). This has now become a
242*03f9172cSAndroid Build Coastguard Workermandatory component of interoperability testing and certification done
243*03f9172cSAndroid Build Coastguard Workerby Wi-Fi Alliance.
244*03f9172cSAndroid Build Coastguard Worker
245*03f9172cSAndroid Build Coastguard WorkerIEEE 802.11 standard defined wired equivalent privacy (WEP) algorithm
246*03f9172cSAndroid Build Coastguard Workerfor protecting wireless networks. WEP uses RC4 with 40-bit keys,
247*03f9172cSAndroid Build Coastguard Worker24-bit initialization vector (IV), and CRC32 to protect against packet
248*03f9172cSAndroid Build Coastguard Workerforgery. All these choices have proven to be insufficient: key space is
249*03f9172cSAndroid Build Coastguard Workertoo small against current attacks, RC4 key scheduling is insufficient
250*03f9172cSAndroid Build Coastguard Worker(beginning of the pseudorandom stream should be skipped), IV space is
251*03f9172cSAndroid Build Coastguard Workertoo small and IV reuse makes attacks easier, there is no replay
252*03f9172cSAndroid Build Coastguard Workerprotection, and non-keyed authentication does not protect against bit
253*03f9172cSAndroid Build Coastguard Workerflipping packet data.
254*03f9172cSAndroid Build Coastguard Worker
255*03f9172cSAndroid Build Coastguard WorkerWPA is an intermediate solution for the security issues. It uses
256*03f9172cSAndroid Build Coastguard WorkerTemporal Key Integrity Protocol (TKIP) to replace WEP. TKIP is a
257*03f9172cSAndroid Build Coastguard Workercompromise on strong security and possibility to use existing
258*03f9172cSAndroid Build Coastguard Workerhardware. It still uses RC4 for the encryption like WEP, but with
259*03f9172cSAndroid Build Coastguard Workerper-packet RC4 keys. In addition, it implements replay protection,
260*03f9172cSAndroid Build Coastguard Workerkeyed packet authentication mechanism (Michael MIC).
261*03f9172cSAndroid Build Coastguard Worker
262*03f9172cSAndroid Build Coastguard WorkerKeys can be managed using two different mechanisms. WPA can either use
263*03f9172cSAndroid Build Coastguard Workeran external authentication server (e.g., RADIUS) and EAP just like
264*03f9172cSAndroid Build Coastguard WorkerIEEE 802.1X is using or pre-shared keys without need for additional
265*03f9172cSAndroid Build Coastguard Workerservers. Wi-Fi calls these "WPA-Enterprise" and "WPA-Personal",
266*03f9172cSAndroid Build Coastguard Workerrespectively. Both mechanisms will generate a master session key for
267*03f9172cSAndroid Build Coastguard Workerthe Authenticator (AP) and Supplicant (client station).
268*03f9172cSAndroid Build Coastguard Worker
269*03f9172cSAndroid Build Coastguard WorkerWPA implements a new key handshake (4-Way Handshake and Group Key
270*03f9172cSAndroid Build Coastguard WorkerHandshake) for generating and exchanging data encryption keys between
271*03f9172cSAndroid Build Coastguard Workerthe Authenticator and Supplicant. This handshake is also used to
272*03f9172cSAndroid Build Coastguard Workerverify that both Authenticator and Supplicant know the master session
273*03f9172cSAndroid Build Coastguard Workerkey. These handshakes are identical regardless of the selected key
274*03f9172cSAndroid Build Coastguard Workermanagement mechanism (only the method for generating master session
275*03f9172cSAndroid Build Coastguard Workerkey changes).
276*03f9172cSAndroid Build Coastguard Worker
277*03f9172cSAndroid Build Coastguard Worker
278*03f9172cSAndroid Build Coastguard WorkerIEEE 802.11i / WPA2
279*03f9172cSAndroid Build Coastguard Worker-------------------
280*03f9172cSAndroid Build Coastguard Worker
281*03f9172cSAndroid Build Coastguard WorkerThe design for parts of IEEE 802.11i that were not included in WPA has
282*03f9172cSAndroid Build Coastguard Workerfinished (May 2004) and this amendment to IEEE 802.11 was approved in
283*03f9172cSAndroid Build Coastguard WorkerJune 2004. Wi-Fi Alliance is using the final IEEE 802.11i as a new
284*03f9172cSAndroid Build Coastguard Workerversion of WPA called WPA2. This includes, e.g., support for more
285*03f9172cSAndroid Build Coastguard Workerrobust encryption algorithm (CCMP: AES in Counter mode with CBC-MAC)
286*03f9172cSAndroid Build Coastguard Workerto replace TKIP and optimizations for handoff (reduced number of
287*03f9172cSAndroid Build Coastguard Workermessages in initial key handshake, pre-authentication, and PMKSA caching).
288*03f9172cSAndroid Build Coastguard Worker
289*03f9172cSAndroid Build Coastguard WorkerSome wireless LAN vendors are already providing support for CCMP in
290*03f9172cSAndroid Build Coastguard Workertheir WPA products. There is no "official" interoperability
291*03f9172cSAndroid Build Coastguard Workercertification for CCMP and/or mixed modes using both TKIP and CCMP, so
292*03f9172cSAndroid Build Coastguard Workersome interoperability issues can be expected even though many
293*03f9172cSAndroid Build Coastguard Workercombinations seem to be working with equipment from different vendors.
294*03f9172cSAndroid Build Coastguard WorkerTesting for WPA2 is likely to start during the second half of 2004.
295*03f9172cSAndroid Build Coastguard Worker
296*03f9172cSAndroid Build Coastguard Workerhostapd configuration for WPA/WPA2
297*03f9172cSAndroid Build Coastguard Worker----------------------------------
298*03f9172cSAndroid Build Coastguard Worker
299*03f9172cSAndroid Build Coastguard WorkerTODO
300*03f9172cSAndroid Build Coastguard Worker
301*03f9172cSAndroid Build Coastguard Worker# Enable WPA. Setting this variable configures the AP to require WPA (either
302*03f9172cSAndroid Build Coastguard Worker# WPA-PSK or WPA-RADIUS/EAP based on other configuration). For WPA-PSK, either
303*03f9172cSAndroid Build Coastguard Worker# wpa_psk or wpa_passphrase must be set and wpa_key_mgmt must include WPA-PSK.
304*03f9172cSAndroid Build Coastguard Worker# For WPA-RADIUS/EAP, ieee8021x must be set (but without dynamic WEP keys),
305*03f9172cSAndroid Build Coastguard Worker# RADIUS authentication server must be configured, and WPA-EAP must be included
306*03f9172cSAndroid Build Coastguard Worker# in wpa_key_mgmt.
307*03f9172cSAndroid Build Coastguard Worker# This field is a bit field that can be used to enable WPA (IEEE 802.11i/D3.0)
308*03f9172cSAndroid Build Coastguard Worker# and/or WPA2 (full IEEE 802.11i/RSN):
309*03f9172cSAndroid Build Coastguard Worker# bit0 = WPA
310*03f9172cSAndroid Build Coastguard Worker# bit1 = IEEE 802.11i/RSN (WPA2)
311*03f9172cSAndroid Build Coastguard Worker#wpa=1
312*03f9172cSAndroid Build Coastguard Worker
313*03f9172cSAndroid Build Coastguard Worker# WPA pre-shared keys for WPA-PSK. This can be either entered as a 256-bit
314*03f9172cSAndroid Build Coastguard Worker# secret in hex format (64 hex digits), wpa_psk, or as an ASCII passphrase
315*03f9172cSAndroid Build Coastguard Worker# (8..63 characters) that will be converted to PSK. This conversion uses SSID
316*03f9172cSAndroid Build Coastguard Worker# so the PSK changes when ASCII passphrase is used and the SSID is changed.
317*03f9172cSAndroid Build Coastguard Worker#wpa_psk=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
318*03f9172cSAndroid Build Coastguard Worker#wpa_passphrase=secret passphrase
319*03f9172cSAndroid Build Coastguard Worker
320*03f9172cSAndroid Build Coastguard Worker# Set of accepted key management algorithms (WPA-PSK, WPA-EAP, or both). The
321*03f9172cSAndroid Build Coastguard Worker# entries are separated with a space.
322*03f9172cSAndroid Build Coastguard Worker#wpa_key_mgmt=WPA-PSK WPA-EAP
323*03f9172cSAndroid Build Coastguard Worker
324*03f9172cSAndroid Build Coastguard Worker# Set of accepted cipher suites (encryption algorithms) for pairwise keys
325*03f9172cSAndroid Build Coastguard Worker# (unicast packets). This is a space separated list of algorithms:
326*03f9172cSAndroid Build Coastguard Worker# CCMP = AES in Counter mode with CBC-MAC [RFC 3610, IEEE 802.11i]
327*03f9172cSAndroid Build Coastguard Worker# TKIP = Temporal Key Integrity Protocol [IEEE 802.11i]
328*03f9172cSAndroid Build Coastguard Worker# Group cipher suite (encryption algorithm for broadcast and multicast frames)
329*03f9172cSAndroid Build Coastguard Worker# is automatically selected based on this configuration. If only CCMP is
330*03f9172cSAndroid Build Coastguard Worker# allowed as the pairwise cipher, group cipher will also be CCMP. Otherwise,
331*03f9172cSAndroid Build Coastguard Worker# TKIP will be used as the group cipher.
332*03f9172cSAndroid Build Coastguard Worker#wpa_pairwise=TKIP CCMP
333*03f9172cSAndroid Build Coastguard Worker
334*03f9172cSAndroid Build Coastguard Worker# Time interval for rekeying GTK (broadcast/multicast encryption keys) in
335*03f9172cSAndroid Build Coastguard Worker# seconds.
336*03f9172cSAndroid Build Coastguard Worker#wpa_group_rekey=600
337*03f9172cSAndroid Build Coastguard Worker
338*03f9172cSAndroid Build Coastguard Worker# Time interval for rekeying GMK (master key used internally to generate GTKs
339*03f9172cSAndroid Build Coastguard Worker# (in seconds).
340*03f9172cSAndroid Build Coastguard Worker#wpa_gmk_rekey=86400
341*03f9172cSAndroid Build Coastguard Worker
342*03f9172cSAndroid Build Coastguard Worker# Enable IEEE 802.11i/RSN/WPA2 pre-authentication. This is used to speed up
343*03f9172cSAndroid Build Coastguard Worker# roaming be pre-authenticating IEEE 802.1X/EAP part of the full RSN
344*03f9172cSAndroid Build Coastguard Worker# authentication and key handshake before actually associating with a new AP.
345*03f9172cSAndroid Build Coastguard Worker#rsn_preauth=1
346*03f9172cSAndroid Build Coastguard Worker#
347*03f9172cSAndroid Build Coastguard Worker# Space separated list of interfaces from which pre-authentication frames are
348*03f9172cSAndroid Build Coastguard Worker# accepted (e.g., 'eth0' or 'eth0 wlan0wds0'. This list should include all
349*03f9172cSAndroid Build Coastguard Worker# interface that are used for connections to other APs. This could include
350*03f9172cSAndroid Build Coastguard Worker# wired interfaces and WDS links. The normal wireless data interface towards
351*03f9172cSAndroid Build Coastguard Worker# associated stations (e.g., wlan0) should not be added, since
352*03f9172cSAndroid Build Coastguard Worker# pre-authentication is only used with APs other than the currently associated
353*03f9172cSAndroid Build Coastguard Worker# one.
354*03f9172cSAndroid Build Coastguard Worker#rsn_preauth_interfaces=eth0
355