aboutsummaryrefslogtreecommitdiffstats
path: root/src/crypto/sha256-prf.c
Commit message (Collapse)AuthorAgeFilesLines
* More forceful clearing of stack memory with keysJouni Malinen2019-05-261-1/+1
| | | | | | | | | | | | gcc 8.3.0 was apparently clever enough to optimize away the previously used os_memset() to explicitly clear a stack buffer that contains keys when that clearing happened just before returning from the function. Since memset_s() is not exactly portable (or commonly available yet..), use a less robust mechanism that is still pretty likely to prevent current compilers from optimizing the explicit clearing of the memory away. Signed-off-by: Jouni Malinen <j@w1.fi>
* SAE: Check SHA256-PRF operation resultJouni Malinen2016-03-271-9/+17
| | | | | | | While this is mostly theoretical, check explicitly that SHA256 operations in sha256_prf*() succeed. Signed-off-by: Jouni Malinen <j@w1.fi>
* crypto: Clear temporary stack buffers after useJouni Malinen2015-01-061-0/+2
| | | | | | | This reduces possibility of exposure of private keys should something get access to stack memory. Signed-off-by: Jouni Malinen <j@w1.fi>
* SAE: Add support for ECC group 21 (521-bit random ECP group)Jouni Malinen2013-01-121-2/+36
| | | | | | | | | | | In addition to the trivial change in adding the new group ientifier, this required changes to KDF and random number generation to support cases where the length of the prime in bits is not a multiple of eight. The binary presentation of the value needs to be shifted so that the unused most significant bits are the zero padding rather than the extra bits in the end of the array. Signed-hostap: Jouni Malinen <j@w1.fi>
* Move SHA256-based PRF function into a separate C fileJouni Malinen2012-08-161-0/+64
This makes it easier to conditionally build in SHA256 functions based on which TLS/crypto library is used. Signed-hostap: Jouni Malinen <j@w1.fi>