Skip to content

Commit be2f16b

Browse files
committed
call scale only when point has it
1 parent 072d43c commit be2f16b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ecdsa/keys.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,8 @@ def from_secret_exponent(cls, secexp, curve=NIST192p, hashfunc=sha1):
724724
"Invalid value for secexp, expected integer between 1 and {0}"
725725
.format(n))
726726
pubkey_point = curve.generator * secexp
727-
pubkey_point = pubkey_point.scale()
727+
if hasattr(pubkey_point, "scale"):
728+
pubkey_point = pubkey_point.scale()
728729
self.verifying_key = VerifyingKey.from_public_point(pubkey_point, curve,
729730
hashfunc, False)
730731
pubkey = self.verifying_key.pubkey

0 commit comments

Comments
 (0)