When exporting a private key, the compressed flag is required to create the correct DER key.
I noticed that secp256k1_ec_privkey_import()
only takes a pointer for a secret key. I think it should take an int *
to inform whether the key should be serialized to its compressed representation.
I’ll try have a look see if it’s a straightforward change, though my C isn’t the best. Does this seem worthwhile, or was there perhaps a reason it doesn’t do this?