Commit 202f7c56 authored by Bernd Edlinger's avatar Bernd Edlinger
Browse files

Clear the point S before freeing in ec_scalar_mul_ladder



The secret point R can be recovered from S using the equation R = S - P.
The X and Z coordinates should be sufficient for that.

Reviewed-by: default avatarPaul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/8504)

(cherry picked from commit 8a74bb5c)
parent 18c1f999
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -378,7 +378,7 @@ int ec_scalar_mul_ladder(const EC_GROUP *group, EC_POINT *r,

 err:
    EC_POINT_free(p);
    EC_POINT_free(s);
    EC_POINT_clear_free(s);
    BN_CTX_end(ctx);

    return ret;