path: root/src/common/wpa_common.h
Commit message (Collapse)AuthorAgeFilesLines
* FT: Fix FTIE generation for 4-way handshake after FT protocol runJouni Malinen2015-12-091-1/+1
| | | | | | | | | | | | | wpa_insert_pmkid() did not support cases where the original RSN IE included any PMKIDs. That case can happen when PTK rekeying through 4-way handshake is used after FT protocol run. Such a 4-way handshake used to fail with wpa_supplicant being unable to build the EAPOL-Key msg 2/4. Fix this by extending wpa_insert_pmkid() to support removal of the old PMKIDs, if needed. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Fix Suite B 192-bit AKM to use proper PMK lengthJouni Malinen2015-10-141-0/+2
| | | | | | | | | | | | | In addition to the PTK length increasing, the length of the PMK was increased (from 256 to 384 bits) for the 00-0f-ac:12 AKM. This part was missing from the initial implementation and a fixed length (256-bit) PMK was used for all AKMs. Fix this by adding more complete support for variable length PMK and use 384 bits from MSK instead of 256 bits when using this AKM. This is not backwards compatible with the earlier implementations. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* FT: Allow CCMP-256 and GCMP-256 as group ciphersJouni Malinen2015-07-071-0/+1
| | | | | | | | | | The FT-specific check for valid group cipher in wpa_ft_gen_req_ies() was not up-to-date with the current list of supported ciphers. Fix this by using a generic function to determine validity of the cipher. In practice, this adds support for using CCMP-256 and GCMP-256 as the group cipher with FT. Signed-off-by: Jouni Malinen <j@w1.fi>
* Remove WEP40/WEP104 cipher suite support for WPA/WPA2Jouni Malinen2015-06-201-9/+2
| | | | | | | | | As far as IEEE 802.11 standard is concerned, WEP is deprecated, but at least in theory, allowed as a group cipher. This option is unlikely to be deployed anywhere and to clean up the implementation, we might as well remove all support for this combination. Signed-off-by: Jouni Malinen <j@w1.fi>
* FT: Check FT, MD, and Timeout Interval length in the parserJouni Malinen2015-04-221-2/+0
| | | | | | | | All the existing users of these elements were already validating the element length. However, it is clearer to validate this already at the parser for extra layer of protection for any future changes. Signed-off-by: Jouni Malinen <j@w1.fi>
* Replace WPA_MAX_SSID_LEN with SSID_MAX_LENJouni Malinen2015-04-221-2/+0
| | | | | | This makes the source code more consistent. Signed-off-by: Jouni Malinen <j@w1.fi>
* Add Suite B 192-bit AKMJouni Malinen2015-01-261-5/+31
| | | | | | | WPA-EAP-SUITE-B-192 can now be used to select 192-bit level Suite B into use as the key management method. Signed-off-by: Jouni Malinen <j@w1.fi>
* Preparations for variable length KCK and KEKJouni Malinen2015-01-261-24/+26
| | | | | | | | This modifies struct wpa_ptk to allow the length of KCK and KEK to be stored. This is needed to allow longer keys to be used, e.g., with Suite B 192-bit level. Signed-off-by: Jouni Malinen <j@w1.fi>
* Suite B: Select EAPOL-Key integrity and key-wrap algorithms based on AKMJouni Malinen2014-11-161-2/+2
| | | | | | | | | This adds support for AKM 00-0F-AC:11 to specify the integrity and key-wrap algorithms for EAPOL-Key frames using the new design where descriptor version is set to 0 and algorithms are determined based on AKM. Signed-off-by: Jouni Malinen <j@w1.fi>
* Suite B: PMKID derivation for AKM 00-0F-AC:11Jouni Malinen2014-11-161-0/+10
| | | | | | | | | The new AKM uses a different mechanism of deriving the PMKID based on KCK instead of PMK. hostapd was already doing this after the KCK had been derived, but wpa_supplicant functionality needs to be moved from processing of EAPOL-Key frame 1/4 to 3/4 to have the KCK available. Signed-off-by: Jouni Malinen <j@w1.fi>
* Add RSN cipher/AKM suite attributes into RADIUS messagesJouni Malinen2014-07-311-0/+1
| | | | | | | | | This adds hostapd support for the new WLAN-Pairwise-Cipher, WLAN-Group-Cipher, WLAN-AKM-Suite, and WLAN-Group-Mgmt-Pairwise-Cipher attributes defined in RFC 7268. These attributes are added to RADIUS messages when the station negotiates use of WPA/RSN. Signed-off-by: Jouni Malinen <j@w1.fi>
* Allow management group cipher to be configuredJouni Malinen2014-03-141-3/+4
| | | | | | | | | | This allows hostapd to set a different management group cipher than the previously hardcoded default BIP (AES-128-CMAC). The new configuration file parameter group_mgmt_cipher can be set to BIP-GMAC-128, BIP-GMAC-256, or BIP-CMAC-256 to select one of the ciphers defined in IEEE Std 802.11ac-2013. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* HS 2.0R2: Add common OSEN definitionsJouni Malinen2014-02-251-0/+2
| | | | Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Add support for IP address assignment in 4-way handshakeJouni Malinen2014-01-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This new mechanism allows P2P Client to request an IPv4 address from the GO as part of the 4-way handshake to avoid use of DHCP exchange after 4-way handshake. If the new mechanism is used, the assigned IP address is shown in the P2P-GROUP-STARTED event on the client side with following new parameters: ip_addr, ip_mask, go_ip_addr. The assigned IP address is included in the AP-STA-CONNECTED event on the GO side as a new ip_addr parameter. The IP address is valid for the duration of the association. The IP address pool for this new mechanism is configured as global wpa_supplicant configuration file parameters ip_addr_go, ip_addr_mask, ip_addr_star, ip_addr_end. For example: ip_addr_go= ip_addr_mask= ip_addr_start= ip_addr_end= DHCP mechanism is expected to be enabled at the same time to support P2P Devices that do not use the new mechanism. The easiest way of managing the IP addresses is by splitting the IP address range into two parts and assign a separate range for wpa_supplicant and DHCP server. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Get rid of duplicated cipher suite and AKM definitionsJouni Malinen2013-12-311-1/+0
| | | | | | | | | | | | | WPA_CIPHER_* and CIPHER_* are used for the exact same set of cipher suites with the main difference being that the WPA_CIPHER_* version is suitable to be used as a bitfield. Similarly, WPA_KEY_MGMT_* and KEY_MGMT_* have similar design for AKMs. There is no need to maintain two separate copies of the definitions since the bitfield compatible version can be used for both needs. Get rid of the CIPHER_* and KEY_MGMT_* versions to clean up the implementation by getting rid of unnecessary mapping functions. Signed-hostap: Jouni Malinen <j@w1.fi>
* Initial handling of GTK-not-used cipher suiteJouni Malinen2013-12-261-1/+2
| | | | | | | This prepares wpa_supplicant for accepting cases where the AP does not use group addressed frames. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Add definitions for new cipher suites from IEEE Std 802.11ac-2013Jouni Malinen2013-12-241-2/+12
| | | | | | | This adds initial parts for supporting the new GCMP-256, CCMP-256, BIP-GMAC-128, BIP-GMAC-256, and BIP-CMAC-256 cipher suites. Signed-hostap: Jouni Malinen <j@w1.fi>
* Move cipher to enum wpa_cipher conversion into wpa_common.cJouni Malinen2013-01-131-0/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Use a helper function for selection group cipher for AP modeJouni Malinen2013-01-131-0/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Use helper function for writing cipher suite namesJouni Malinen2013-01-131-0/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Define allowed pairwise/group cipher suites in a header fileJouni Malinen2013-01-131-0/+6
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Use a common function for parsing cipher suitesJouni Malinen2013-01-131-0/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Move cipher suite selection into common helper functionsJouni Malinen2013-01-131-1/+3
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Reserve AKM and cipher suite valuesJouni Malinen2012-09-301-0/+2
| | | | | | | | These values are used with WAPI and CCX and reserving the definitions here reduces the number of merge conflicts with repositories that include these functions. Signed-hostap: Jouni Malinen <j@w1.fi>
* Add initial parts for SAEJouni Malinen2012-09-301-0/+2
| | | | | | | | | | | | | This introduces new AKM for SAE and FT-SAE and adds the initial parts for going through the SAE Authentication frame exchange. The actual SAE algorithm and new fields in Authentication frames are not yet included in this commit and will be added separately. This version is able to complete a dummy authentication with the correct authentication algorithm and transaction values to allow cfg80211/mac80211 drivers to be tested (all the missing parts can be handled with hostapd/wpa_supplicant changes). Signed-hostap: Jouni Malinen <j@w1.fi>
* Move WPA cipher information into a shared locationJouni Malinen2012-08-301-0/+8
| | | | | | | | | Try to share most of the cipher information like key and RSC lengths and suite selector conversions, etc. in wpa_common.c to avoid having similar code throughout the WPA implementation for handling cipher specific behavior. Signed-hostap: Jouni Malinen <j@w1.fi>
* Add support for using GCMP cipher from IEEE 802.11adJouni Malinen2012-08-291-0/+4
| | | | | | | | | | | | | | | | This allows both hostapd and wpa_supplicant to be used to derive and configure keys for GCMP. This is quite similar to CCMP key configuration, but a different cipher suite and somewhat different rules are used in cipher selection. It should be noted that GCMP is not included in default parameters at least for now, so explicit pairwise/group configuration is needed to enable it. This may change in the future to allow GCMP to be selected automatically in cases where CCMP could have been used. This commit does not included changes to WPS or P2P to allow GCMP to be used. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Remove the GPL notification from files contributed by Jouni MalinenJouni Malinen2012-02-111-8/+2
| | | | | | | Remove the GPL notification text from the files that were initially contributed by myself. Signed-hostap: Jouni Malinen <j@w1.fi>
* FT: Share IE parser implementation for Authenticator and SupplicantJouni Malinen2011-07-161-0/+23
| | | | | These are almost identical, so there is no point in using separate implementations.
* hostapd: Add testing mode for RSN element extensionsJouni Malinen2011-03-211-0/+6
| | | | | | | | CFLAGS += -DCONFIG_RSN_TESTING in .config and rsn_testing=1 in hostapd.conf can now be used to enable a testing mode that adds extensions to RSN element. This can be used to check whether station implementations are incompatible with future extensions to the RSN element.
* TDLS: Add initial support for TDLS (IEEE Std 802.11z-2010)Ganesh Prasadh2011-03-061-0/+2
* Share WPA IE parser function for RSN authenticator/supplicantJouni Malinen2010-11-121-0/+2
| | | | | | There is no point in maintaining two almost identical versions of this parser. Move WPA IE parser into wpa_common.c similarly to what was already the case with RSN IE parse.
* FT: Fix FT 4-Way Handshake to include PMKR1Name in messages 2 and 3Jouni Malinen2010-04-071-0/+4
| | | | | | | | | | | | | | | | | | | IEEE Std 802.11r-2008, 11A.4.2 describes FT initial mobility domain association in an RSN to include PMKR1Name in the PMKID-List field in RSN IE in messages 2/4 and 3/4. This makes the RSN IE not be bitwise identical with the values used in Beacon, Probe Response, (Re)association Request frames. The previous versions of wpa_supplicant and hostapd did not add the PMKR1Name value in EAPOL-Key frame and did not accept it if added (due to bitwise comparison of RSN IEs). This commit fixes the implementation to be compliant with the standard by adding the PMKR1Name value into EAPOL-Key messages during FT 4-Way Handshake and by verifying that the received value matches with the value derived locally. This breaks interoperability with previous wpa_supplicant/hostapd versions.
* Add AP mode WPA status into ctrl_ifaceJouni Malinen2009-10-161-0/+3
* FT: Add RIC Request processing and RIC Response generationJouni Malinen2009-03-091-0/+6
| | | | | | | | | | hostapd will now go through the RIC Request and process each RDIE. Only WMM TSPEC requests are currently supported; all other request descriptors will be declined. RIC Response is written by hostapd and verified by wpa_supplicant (MIC validation). wpa_supplicant does not yet have code to notify the driver about the resource request results.
* Moved rsn_pmkid() into shared code to avoid duplicationJouni Malinen2009-01-141-0/+3
* Added support for using SHA256-based stronger key derivation for WPA2Jouni Malinen2008-08-311-2/+2
| | | | | | IEEE 802.11w/D6.0 defines new AKMPs to indicate SHA256-based algorithms for key derivation (and AES-CMAC for EAPOL-Key MIC). Add support for using new AKMPs and clean up AKMP processing with helper functions in defs.h.
* Updated MFP defines based on IEEE 802.11w/D6.0 and use new MFPC/MFPRJouni Malinen2008-08-301-1/+9
| | | | | | | This adds most of the new frame format and identifier definitions from IEEE 802.11w/D6.0. In addition, the RSN IE capability field values for MFP is replaced with the new two-bit version with MFPC (capable) and MFPR (required) processing.
* Silence compiler warnings about out of array bounds indexesJouni Malinen2008-06-051-2/+1
| | | | | | | | | | struct wpa_ie_hdr had separate fields for 24-bit OUI and 8-bit oui_type for WPA/RSN selectors. {WPA,RSN}_SELECTOR_{GET,PUT} access these four octets through oui and the "out-of-bounds" access for the fourth octet is actually reading/writing oui_type. This works fine, but some tools complain about the array bounds "failure". Since oui_type is never accessed separately, the simplest fix is to just combine these into a single 4-octet field.
* Silence gcc 4.3.0 warnings about invalid array indexesJouni Malinen2008-03-121-2/+2
* Re-initialize hostapd/wpa_supplicant git repository based on 0.6.3 releaseJouni Malinen2008-02-281-0/+328