BlockstreamResearch / rust-secp256k1-zkp

Creative Commons Zero v1.0 Universal
31 stars 34 forks source link

Schnorr signature with specific nonce? #73

Open benthecarman opened 11 months ago

benthecarman commented 11 months ago

I am working on a dlc oracle project and to do so I need to create a signature with a specific nonce / k value. However, the only functions that are exposed are ones that use random data to compute the signature's nonce.

We had this functionality in the past for bitcoin-s, has the been removed or not ported to rust?

apoelstra commented 11 months ago

You can do this by using the FFI functions from secp256k1-sys directly. I don't think we've ever exposed this functionality directly.

If you were willing to PR to rust-secp adding an interface to provide a custom nonce function for schnorr signatures, I'd be happy to accept that.

Schnorr signatures are also part of rust-secp256k1, not rust-secp256k1-zkp. Though possibly many years ago this was different.