whyoleg/cryptography-kotlin

Add support for compressing X962 ECDSA encoded public key

huskcasaca opened this issue · 1 comments

Hi, I'm planning to use this lib in my crypto lib. It's really nice to have the ECDSA support but some core functions are missing.

The compressed X962 ec point is used to generate Bitcoin address, but in the latest release I we cannot get the parameter inside a curve, and as you mentioned in #32 there's no plan for curve access.

It will be really useful if we can generate a compressed public key and for my cryptocurrency lib.

Here's an API doc from cryptography in python
https://cryptography.io/en/3.4.2/hazmat/primitives/asymmetric/serialization.html#serialization-formats

Thanks.

Hey!
Thanks for the report, I will check what is possible.
Encoding of public key to compressed format is rather easy, but decoding it could be not so easy in most of the providers. AFAIU only in openssl it's available out of the box, nor JDK, nor WebCrypto support compressed keys.
So it might require a lot of hand-written logic if it's possible at all.