biemster / FindMy

Query Apple's Find My network
347 stars 53 forks source link

Invalid public bytes for the given curve #57

Closed simon0302010 closed 1 month ago

simon0302010 commented 3 months ago

I just got this error while running request_reports.py on Fedora 40 and Python 3.12.4 and I just can't fix it:

pyprovision is not installed, querying http://localhost:6969 for an anisette server
200: 1 reports received.
Traceback (most recent call last):
  File "/home/simon/Dokumente/Find My/FindMy/./request_reports.py", line 89, in <module>
    eph_key = ec.EllipticCurvePublicKey.from_encoded_point(ec.SECP224R1(), data[5:62])
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/ec.py", line 185, in from_encoded_point
    return backend.load_elliptic_curve_public_bytes(curve, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 1120, in load_elliptic_curve_public_bytes
    raise ValueError("Invalid public bytes for the given curve")
ValueError: Invalid public bytes for the given curve
biemster commented 1 month ago

duplicate of #52