]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP: Verify that PKEX Qi is not the point-at-infinity
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 9 Oct 2017 21:42:34 +0000 (00:42 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 9 Oct 2017 21:42:34 +0000 (00:42 +0300)
This was added as an explicit requirement in DPP tech spec v0.2.3.

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

index 33db676587a8afa553bdaca3a9d085e080048a6d..633c0b7fb6623d79b9cd3dc026cc14ebd5a5a6d6 100644 (file)
@@ -4851,6 +4851,10 @@ static EC_POINT * dpp_pkex_derive_Qi(const struct dpp_curve_params *curve,
        if (!hash_bn ||
            EC_POINT_mul(group2, Qi, NULL, Pi_point, hash_bn, bnctx) != 1)
                goto fail;
+       if (EC_POINT_is_at_infinity(group, Qi)) {
+               wpa_printf(MSG_INFO, "PDP: Qi is the point-at-infinity");
+               goto fail;
+       }
 out:
        EC_KEY_free(Pi_ec);
        EVP_PKEY_free(Pi);