Skip to content

Commit

Permalink
handle point at infinity
Browse files Browse the repository at this point in the history
  • Loading branch information
obscuren committed Jan 20, 2015
1 parent 29b4554 commit 20a95cb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions secp256k1/src/impl/ecdsa.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ int static secp256k1_ecdsa_sig_recover(const secp256k1_ecdsa_sig_t *sig, secp256
secp256k1_num_mod_mul(&u2, &rn, &sig->s, &c->order);
secp256k1_gej_t qj;
secp256k1_ecmult(&qj, &xj, &u2, &u1);
if (secp256k1_gej_is_infinity(&qj))
return 0;
secp256k1_ge_set_gej(pubkey, &qj);
secp256k1_num_free(&rn);
secp256k1_num_free(&u1);
Expand Down

0 comments on commit 20a95cb

Please sign in to comment.