EC_KEY_check_key

Thulasi Goriparthi <[email protected]> Fri, 2 Nov 2018 13:20:22 +0530
Newsgroups gmane.comp.encryption.openssl.user,gmane.comp.encryption.openssl.devel
Message-ID <CAB7O4Gw6ACj3jkUM+V3FSfEx0BVUC5d39crG7hqNEGCYd+cahA@mail.gmail.com>
Hi,

I am going through the checks done by EC_KEY_check_key method. I see
the following checks in order.

1. Is point at infinity? - reject.
2. Is point not on curve? reject.
3. Is point not in the primary subgroup? reject.
4. If priv key(scalar) available, then check if scalar * G != point.
If so, reject.

If priv key is available and we do step 4, isn't step 3 redundant? Can
we change this to something like this?

if (priv key)
    step 4
else
   step 3

Thanks,
Thulasi.
-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users