Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion kasa/transports/tpaptransport.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,8 @@ def _sec1_to_xy(sec1: bytes, curve: ec.EllipticCurve) -> tuple[int, int]:

@staticmethod
def _xy_to_uncompressed(x: int, y: int, curve: ec.EllipticCurve) -> bytes:
numbers = ec.EllipticCurvePublicNumbers(x, y, curve)
# ecdsa may return gmpy2.mpz; cryptography requires builtin int.
numbers = ec.EllipticCurvePublicNumbers(int(x), int(y), curve)
public_key = numbers.public_key()
return public_key.public_bytes(
encoding=serialization.Encoding.X962,
Expand Down