Open prolic opened 2 days ago
@wraithm @ProofOfKeags
What do you mean by "gives wrong results" how did you observe this behavior?
I took a look at the code you provided but as far as I can tell all it does is copy the underlying buffer.
Also it's worth noting that using ecdsaSignatureSerializeCompact
is unlikely to work with Schnorr sigs.
That's my point, I can't export the schnorr signatures to bytestring (or hex). If you want, I can submit a pull request by tomorrow.
On Mon, Sep 30, 2024, 13:30 ProofOfKeags @.***> wrote:
Also it's worth noting that using ecdsaSignatureSerializeCompact is unlikely to work with Schnorr sigs.
— Reply to this email directly, view it on GitHub https://github.com/haskell-bitcoin/libsecp256k1-haskell/issues/8#issuecomment-2383777377, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADAJPBHU5VJ624MIY6437TZZGDD7AVCNFSM6AAAAABPBFVUMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBTG43TOMZXG4 . You are receiving this because you authored the thread.Message ID: @.***>
If you want to submit a PR feel free. Otherwise I'll take care of it this week. It looks like we need to mark signatures internally by what kind they are and then export them accordingly. From there we also need to modify the import function to accept a hint about what kind of signature it is, since there isn't a structural difference between ecdsa sigs and schnorr sigs when parsing them.
I made it work with this:
using ecdsaSignatureSerializeCompact gives wrong results.