]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP: Explicitly check that PKEX Qr is not the point-at-infinity
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 3 Nov 2017 17:01:24 +0000 (19:01 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 3 Nov 2017 17:59:47 +0000 (19:59 +0200)
This was already done for Qi, but the same needs to be done for Qr as
well.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/common/dpp.c

index 566898b63583c68923bcb8d812741369c5ce9e35..021c487980529493545ae063c272696fb4a32d20 100644 (file)
@@ -5434,6 +5434,10 @@ static EC_POINT * dpp_pkex_derive_Qr(const struct dpp_curve_params *curve,
        if (!hash_bn ||
            EC_POINT_mul(group2, Qr, NULL, Pr_point, hash_bn, bnctx) != 1)
                goto fail;
+       if (EC_POINT_is_at_infinity(group, Qr)) {
+               wpa_printf(MSG_INFO, "DPP: Qr is the point-at-infinity");
+               goto fail;
+       }
 out:
        EC_KEY_free(Pr_ec);
        EVP_PKEY_free(Pr);