Commit 502b871a authored by Bernd Edlinger's avatar Bernd Edlinger
Browse files

Clear the point S before freeing in ec_mul_consttime



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/8505)
parent c5bc42d7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -325,7 +325,7 @@ static int ec_mul_consttime(const EC_GROUP *group, EC_POINT *r,
    ret = 1;

 err:
    EC_POINT_free(s);
    EC_POINT_clear_free(s);
    BN_CTX_end(ctx);
    BN_CTX_free(new_ctx);