Skip to content

Commit

Permalink
create VerifyingKey point with order
Browse files Browse the repository at this point in the history
  • Loading branch information
tomato42 committed Nov 9, 2019
1 parent be2f16b commit a8466ca
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ecdsa/keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,11 @@ def from_secret_exponent(cls, secexp, curve=NIST192p, hashfunc=sha1):
pubkey_point = curve.generator * secexp
if hasattr(pubkey_point, "scale"):
pubkey_point = pubkey_point.scale()
pubkey_point = ellipticcurve.Point(pubkey_point.curve(),
pubkey_point.x(),
pubkey_point.y(),
curve.generator.order())
pubkey_point = ellipticcurve.PointJacobi.from_affine(pubkey_point)
self.verifying_key = VerifyingKey.from_public_point(pubkey_point, curve,
hashfunc, False)
pubkey = self.verifying_key.pubkey
Expand Down

0 comments on commit a8466ca

Please sign in to comment.