Closed thejohnfreeman closed 4 years ago
I'm not sure what you mean by verifying? The compression scheme you indicate just compresses the point down from x/y coordinates to just x coordinate and a byte indicating the value of y mod 2. That scheme is easy enough to implement and can be added to the backlog of work.
Oh sorry, I meant "verifying key", as in "a key for verifying a signature", or "public key". I got mixed up, and forgot this library doesn't use the "verifying key" terminology that some others do. I'll rephrase:
There seems to be a popular compression scheme for ECDSA public keys.
I'm just asking for functions to compress and expand the public key according to this scheme. Happy to see it added to the backlog.
Ah gotcha, shouldn't be too hard to do but hasn't been any requests for it till now. Will add it to the TODO list.
@thejohnfreeman sorry for the delay here, I missed that the SEC1 encoder already does this when I first looked at this request. You can use SEC1Encoder.decode_public_key(bytes, curve)
to do this, the docs for the method have some additional details as well (docs need to be fixed in that leading 0x04
is uncompressed and leading 0x02
/ 0x03
is compressed).
Closing this out, feel free to re-open if the above does not address your needs. 👍
There seems to be a popular compression scheme for ECDSA verifying (public) keys. Does this library support them? Something like this in
ecdsa
?