1 From 92e1b96c26a84e503847bdd22ebadf697c4031ad Mon Sep 17 00:00:00 2001
2 From: Jouni Malinen <j@w1.fi>
3 Date: Sat, 13 Apr 2019 17:20:57 +0300
4 Subject: EAP-pwd: Disallow ECC groups with a prime under 256 bits
6 Based on the SAE implementation guidance update to not allow ECC groups
7 with a prime that is under 256 bits, reject groups 25, 26, and 27 in
10 Signed-off-by: Jouni Malinen <j@w1.fi>
12 src/eap_common/eap_pwd_common.c | 13 +++++++++++++
13 1 file changed, 13 insertions(+)
15 --- a/src/eap_common/eap_pwd_common.c
16 +++ b/src/eap_common/eap_pwd_common.c
17 @@ -85,10 +85,23 @@ static int eap_pwd_kdf(const u8 *key, si
21 +static int eap_pwd_suitable_group(u16 num)
23 + /* Do not allow ECC groups with prime under 256 bits based on guidance
24 + * for the similar design in SAE. */
25 + return num == 19 || num == 20 || num == 21 ||
26 + num == 28 || num == 29 || num == 30;
30 EAP_PWD_group * get_eap_pwd_group(u16 num)
34 + if (!eap_pwd_suitable_group(num)) {
35 + wpa_printf(MSG_INFO, "EAP-pwd: unsuitable group %u", num);
38 grp = os_zalloc(sizeof(EAP_PWD_group));