aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/dragonfly.c
Commit message (Collapse)AuthorAgeFilesLines
* dragonfly: Disable use of groups using Brainpool curvesJouni Malinen2019-07-271-2/+4
| | | | | | | | Disable groups that use Brainpool curves for now since they leak more timing information due to the prime not being close to a power of two. This removes use of groups 28, 29, and 30 from SAE and EAP-pwd. Signed-off-by: Jouni Malinen <j@w1.fi>
* dragonfly: SAE/EAP-pwd min PWE derivation iteration count to shared codeJouni Malinen2019-07-231-0/+19
| | | | | | | | | Use a shared function to determine the k parameter, i.e., the minimum number of iterations of the PWE derivation loop, for SAE and EAP-pwd. This makes it easier to fine-tune the parameter based on the negotiated group, if desired. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* dragonfly: Fix a memory leak on error pathJouni Malinen2019-05-081-1/+3
| | | | | | | | This is mostly a theoretical case, but since crypto_bignum_rand() could fail, need to free the allocated struct crypto_bignum *tmp in such a case. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* Share common SAE and EAP-pwd functionality: own scalar generationJouni Malinen2019-04-261-0/+36
| | | | | | Use a shared helper function for deriving rand, mask, and own scalar. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* Share common SAE and EAP-pwd functionality: is_quadratic_residueJouni Malinen2019-04-251-1/+75
| | | | | | | Use a shared helper function for the blinded mechanism of determining the Legendre symbol. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* Share common SAE and EAP-pwd functionality: random 1..p-1 creationJouni Malinen2019-04-251-0/+22
| | | | | | | Use a shared helper function to create a random value in 1..p-1 range for is_quadratic_residue(). Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* Share common SAE and EAP-pwd functionality: random qr/qnr creationJouni Malinen2019-04-251-0/+33
| | | | | | Use a shared helper function to create random qr/qnr values. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* Share common SAE and EAP-pwd functionality: suitable groupsJouni Malinen2019-04-251-0/+27
Start sharing common SAE and EAP-pwd functionality by adding a new source code file that can be included into both. This first step is bringing in a shared function to check whether a group is suitable. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>