aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_common
Commit message (Collapse)AuthorAgeFilesLines
* EAP-pwd: Replace direct OpenSSL HMAC use with wrapperJouni Malinen2012-07-022-69/+86
| | | | | | | This is a step towards allowing EAP-pwd to be supported with other crypto libraries. Signed-hostap: Jouni Malinen <j@w1.fi>
* EAP-pwd: Avoid double-frees on some error pathsJouni Malinen2012-06-301-2/+4
| | | | | | | | | | At least some error paths (e.g., hitting the limit on hunt-and-peck iterations) could have resulted in double-freeing of some memory allocations. Avoid this by setting the pointers to NULL after they have been freed instead of trying to free the data structure in a location where some external references cannot be cleared. [Bug 453] Signed-hostap: Jouni Malinen <j@w1.fi>
* EAP-pwd: Increase maximum number of hunting-and-pecking iterationsJouni Malinen2012-06-301-1/+1
| | | | | | | | | The previously used limit (10) is too small for practical purposes since it can result in about 1 out of 1000 authentication attempts failing. Increase the limit to 30 to avoid such issues. [Bug 453] Signed-hostap: Jouni Malinen <j@w1.fi> intended-for: hostap-1
* EAP-AKA': Update to RFC 5448Jouni Malinen2012-05-021-1/+1
| | | | | | | | | | | | | | | There was a technical change between the last IETF draft version (draft-arkko-eap-aka-kdf-10) and RFC 5448 in the leading characters used in the username (i.e., use unique characters for EAP-AKA' instead of reusing the EAP-AKA ones). This commit updates EAP-AKA' server and peer implementations to use the leading characters based on the final RFC. Note: This will make EAP-AKA' not interoperate between the earlier draft version and the new version. Signed-hostap: Jouni Malinen <j@w1.fi> intended-for: hostap-1
* Remove the GPL notification from files contributed by Jouni MalinenJouni Malinen2012-02-1127-216/+54
| | | | | | | Remove the GPL notification text from the files that were initially contributed by myself. Signed-hostap: Jouni Malinen <j@w1.fi>
* Remove the GPL notification from EAP-pwd implementationJouni Malinen2012-02-112-16/+4
| | | | | | | | | Remove the GPL notification text from EAP-pwd implementation per approval from Dan Harkins who contributed these files. (email from Dan Harkins <dharkins@lounge.org> dated Wed, 4 Jan 2012 16:25:48 -0800) Signed-hostap: Jouni Malinen <j@w1.fi>
* EAP-pwd: Add support for fragmentationDan Harkins2012-02-111-6/+7
| | | | Signed-hostap: Dan Harkins <dharkins@lounge.org>
* EAP-pwd: Fix the argument name in compute_keys()Dan Harkins2012-02-111-4/+4
| | | | | | The parameters used here are confirm, not commit values. Signed-hostap: Dan Harkins <dharkins@lounge.org>
* Rename tls_prf() to tls_prf_sha1_md5()Jouni Malinen2011-11-271-3/+3
| | | | | | | | Prepare for multiple TLS PRF functions by renaming the SHA1+MD5 based TLS PRF function to more specific name and add tls_prf() within the internal TLS implementation as a wrapper for this for now. Signed-hostap: Jouni Malinen <j@w1.fi>
* EAP-pwd: Remove struct eap_pwd_hdrJouni Malinen2011-11-191-6/+1
| | | | | | | | | | This structure was not really used for anything apart from figuring out length of the EAP-pwd header (and even that in a way that would not work with fragmentation). Since the bitfields in the structure could have been problematic depending on target endianness, remove this unnecessary structure. Signed-hostap: Jouni Malinen <j@w1.fi>
* EAP-pwd: Fix zero-padding of input to H()Dan Harkins2011-11-191-3/+9
| | | | | | | | | | Another niceness of OpenSSL is that if the high-order bit of a 521-bit big num is not set then BN_bn2bin() will just return 65 bytes instead of 66 bytes with the 1st (big endian, after all) being all zero. When this happens the wrong number of octets are mixed into function H(). So there's a whole bunch of "offset" computations and BN_bn2bin() dumps the big number into a buffer + offset. That should be obvious in the patch too.
* EAP-pwd: Fix KDF for group 21Dan Harkins2011-11-191-2/+14
| | | | | | | | | | | | | | | | The previous EAP-pwd KDF implemented has an issue with group 21, that is an elliptic curve group based on a 521 bit prime. 521 is not an even multiple of 8, and therein lies the problem. OpenSSL's BN library interprets a string of bits as in big-endian format so all the calls of BN_bin2bn() will take the binary blob of bits and turn it into a big number in big-endian format. In the EAP-pwd KDF, I am stretching the key to "primebitlen". When that is not an even multiple of 8 I have to mask off the excess. But I was masking off the excess bits in the 1st octet (big endian after all) but that isn't right. The KDF produces a string of endian-less bits. The 521st bit is the first bit in the last octet, not the 7th bit in the first octet. So that has been fixed and you can see in the attached diff what I'm doing.
* PEAP: Verify peap_prfplus() resultJouni Malinen2011-11-132-9/+12
| | | | | | | | | | This function can fail in theory since the SHA-1 functions are allowed to return an error. While this does not really happen in practice (we would not get this far if SHA-1 does not work), it is cleaner to include the error handling here to keep static analyzers happier. [Bug 421] Signed-hostap: Jouni Malinen <j@w1.fi>
* Fix typos found by codespellPavel Roskin2011-09-221-1/+1
| | | | Signed-off-by: Pavel Roskin <proski@gnu.org>
* EAP-pwd: Fix some interoperability issuesDan Harkins2011-01-162-45/+12
| | | | | | | | | | | | The changes are: 1. the word "and" in the hunting-and-pecking string passed to the KDF should be capitalized. 2. the primebitlen used in the KDF should be a short not an int. 3. the computation of MK in hostap is based on an older version of the draft and is not the way it's specified in the RFC. 4. the group being passed into computation of the Commit was not in network order.
* EAP-pwd: Use os_free to free memory allocated with os_mallocJouni Malinen2011-01-161-1/+1
| | | | The direct use of free() caused a crash with CONFIG_WPA_TRACE=y.
* Annotate places depending on strong random numbersJouni Malinen2010-11-242-3/+5
| | | | | | | | | | | | | This commit adds a new wrapper, random_get_bytes(), that is currently defined to use os_get_random() as is. The places using random_get_bytes() depend on the returned value being strong random number, i.e., something that is infeasible for external device to figure out. These values are used either directly as a key or as nonces/challenges that are used as input for key derivation or authentication. The remaining direct uses of os_get_random() do not need as strong random numbers to function correctly.
* EAP-pwd: Fix couple of memory leaksJouni Malinen2010-09-141-1/+2
|
* EAP-pwd: Add support for EAP-pwd server and peer functionalityDan Harkins2010-09-143-0/+424
| | | | | This adds an initial EAP-pwd (RFC 5931) implementation. For now, this requires OpenSSL.
* Remove unnecessary SUBDIRS loops from src/*/MakefileJouni Malinen2010-04-171-1/+0
| | | | | | There are no subdirectories in any of these directories or plans for adding ones. As such, there is no point in running the loop that does not do anything and can cause problems with some shells.
* Remove src/crypto from default include pathJouni Malinen2009-11-299-21/+17
| | | | | | In addition, start ordering header file includes to be in more consistent order: system header files, src/utils, src/*, same directory as the *.c file.
* Pass digest return value to CHAP/MSCHAPv2 callerJouni Malinen2009-08-162-6/+6
|
* Add root .gitignore file to cleanup ignore listsJouni Malinen2009-06-291-1/+0
| | | | | | This removes need for local configuration to ignore *.o and *~ and allows the src/*/.gitignore files to be removed (subdirectories will inherit the rules from the root .gitignore).
* Rename EAP server defines from EAP_* to EAP_SERVER_*Jouni Malinen2009-03-252-9/+9
| | | | | This allows separate set of EAP server and peer methods to be built into a single binary.
* Update draft-cam-winget-eap-fast-provisioning references to RFC 5422Jouni Malinen2009-03-142-11/+6
|
* Update EAP-GPSK references from internet draft to RFC 5433Jouni Malinen2009-02-261-1/+1
|
* Improved 'make install' (use BINDIR/LIBDIR, install shared objects)Daniel Mierswa2009-02-151-0/+3
|
* Include the header file to validate function prototype.Jouni Malinen2009-01-031-0/+1
|
* IANA allocated EAP method type 51 to EAP-GPSKJouni Malinen2008-12-201-3/+2
|
* Merged EAP-AKA' into eap_aka.c and added it to defconfig/ChangeLogJouni Malinen2008-12-071-0/+27
|
* Added protection against EAP-AKA' -> EAP-AKA bidding down attacksJouni Malinen2008-12-052-0/+16
| | | | | AT_BIDDING attribute is included in EAP-AKA/Challenge to allow peer to know whether the server would have preferred EAP-AKA'.
* Fixed a typo in a commentJouni Malinen2008-12-041-1/+1
|
* EAP-AKA': Added CK',IK' derivationJouni Malinen2008-12-042-0/+74
| | | | | | This is based on a change request 3GPP TS 33.402 CR 0033 for version 8.1.1. The hardcoded ANID is now 'WLAN' since that is used in 3GPP TS 24.302.
* EAP-AKA': Added processing of AT_KDF and AT_KDF_INPUT attributesJouni Malinen2008-12-042-0/+55
| | | | | | Network Name is not yet generated and validated based on 3GPP.33.402 (i.e., a hardcoded string is used in server and anything is accepted in peer).
* Fixed EAP-SIM and EAP-AKA AT_IDENTITY parsing (server only)Jouni Malinen2008-12-041-2/+14
| | | | | | | | | | | | The attribute uses 'Actual Identity Length' field to indicate the exact (pre-padding) length of the Identity. This actual length should be used as the length, not the remaining attribute length. This was previously worked around by stripping null termination away from the end of the identity string at EAP-SIM and EAP-AKA server code. However, it is likely that that workaround is not really needed and the real problem was in AT_IDENTITY parsing. Anyway, the workaround is left in just in case it was really needed with some implementations.
* EAP-AKA': Derive keys using the new KDF (PRF')Jouni Malinen2008-12-032-0/+136
|
* EAP-AKA': Use HMAC-SHA-256-128 for AT_MACJouni Malinen2008-12-022-0/+86
|
* EAP-AKA': Use SHA256 for AT_CHECKCODEJouni Malinen2008-12-022-4/+6
|
* Add a starting point for EAP-AKA' (draft-arkko-eap-aka-kdf-10)Jouni Malinen2008-12-021-0/+1
| | | | | | | | | | | | | This is just making an as-is copy of EAP-AKA server and peer implementation into a new file and by using the different EAP method type that is allocated for EAP-AKA' (50). None of the other differences between EAP-AKA and EAP-AKA' are not yet included. It is likely that once EAP-AKA' implementation is done and is found to work correctly, large part of the EAP-AKA and EAP-AKA' code will be shared. However, it is not reasonable to destabilize EAP-AKA implementation at this point before it is clearer what the final differences will be.
* Added preliminary Wi-Fi Protected Setup (WPS) implementationJouni Malinen2008-11-232-0/+72
| | | | | | | | | | | | | This adds WPS support for both hostapd and wpa_supplicant. Both programs can be configured to act as WPS Enrollee and Registrar. Both PBC and PIN methods are supported. Currently, hostapd has more complete configuration option for WPS parameters and wpa_supplicant configuration style will likely change in the future. External Registrars are not yet supported in hostapd or wpa_supplicant. While wpa_supplicant has initial support for acting as an Registrar to configure an AP, this is still using number of hardcoded parameters which will need to be made configurable for proper operation.
* EAP-AKA: Validate RES Length field in AT_RESJouni Malinen2008-11-072-0/+2
| | | | | | This change breaks interoperability with older wpa_supplicant versions (everything up to and including wpa_supplicant 0.5.10 and 0.6.5) which incorrectly used this field as number of bytes, not bits, in RES.
* Silenced compiler warnings on size_t printf format and shadowed variablesJouni Malinen2008-09-271-3/+3
|
* Updated EAP-TTLSv0 references to use RFC 5281Jouni Malinen2008-08-162-2/+2
|
* EAP-PEAP: Moved the common peap_prfplus() function into a shared fileJouni Malinen2008-06-092-0/+109
|
* TNC: Added preliminary code for IF-TNCCS-SOH server side supportJouni Malinen2008-03-301-0/+1
| | | | | | | If TNC is enabled, PEAPv0 server is now sending out SoH request to initiate IF-TNCCS-SOH (Microsoft NAP / Statement of Health) handshake. The results are currently only shown in debug log and they do not affect authentication or authorization result.
* EAP-FAST: Define and use EAP_FAST_CMK_LENJouni Malinen2008-02-271-1/+2
|
* Removed extra '_' from struct eap_tlv_crypto_binding__tlv nameJouni Malinen2008-02-273-3/+3
|
* EAP-FAST: Moved common peer/server functionality into a shared fileJouni Malinen2008-02-272-0/+283
|
* EAP-FAST: Added shared helper functions for building TLVsJouni Malinen2008-02-272-0/+52
|
* Re-initialize hostapd/wpa_supplicant git repository based on 0.6.3 releaseJouni Malinen2008-02-2724-0/+4375