You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/Users/Chris/Developer/PassKeysTest/API/cert.py", line 153, in <module>
key = extractKey(
File "/Users/Chris/Developer/PassKeysTest/API/cert.py", line 136, in extractKey
encoded = msg.encode()
File "/opt/homebrew/lib/python3.9/site-packages/cose/messages/sign1message.py", line 67, in encode
message = [self.phdr_encoded, self.uhdr_encoded, self.payload, self.compute_signature()]
File "/opt/homebrew/lib/python3.9/site-packages/cose/messages/signcommon.py", line 65, in compute_signature
return alg.sign(key=self.key, data=self._sig_structure)
File "/opt/homebrew/lib/python3.9/site-packages/cose/algorithms.py", line 185, in sign
sk = SigningKey.from_secret_exponent(int(hexlify(key.d), 16), curve=cls.get_curve())
ValueError: invalid literal for int() with base 16: b''
d is the private key part and without it you can't sign the message. The error message could be better.
letmaik
changed the title
Encode with a EC2Key has no .d component
Improve error message when private key is missing in key object when signing
Nov 5, 2022
Hello, I have a EC2 Key:
and when I try to encode:
I get:
The method it's calling is:
....but
key.d
doesn't exist in this key.....The text was updated successfully, but these errors were encountered: