You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I spent most of today trying to implement message signing in a portable manner so that bitcoind or Electron-Cash can be used to verify the message, without success.
I've made it as far as constructing the message in the same manner and double-hashing it so the exact same hash is sent to the underlying wallet._pk signing function (and passing hash=None since it's already been hashed manually) and verified this is the same hash generated by bitcoind before it calls secp256k1_ecdsa_sign_recoverable, but that's as far as I get. I am simply unable to produce the same signature or one that bitcoind can verify.
My hunch is that either BitCash does not generate a recoverable signature or the nonce functions are different. This is where things start to go over my head.
If this is not possible, I am wondering if we could at least support a recoverable signing mechanism so that the person verifying does not need the full public key, but simply the cash address (hashed key) like bitcoind and the wallets support. If that were possible then I don't necessarily need it to be verifiable outside of this library.
Anybody have any insight to this? As a last resort I'll keep searching for an alternative library that can do this and I'll have to use that for this purpose, but I would prefer to have it incorporated in here.
The text was updated successfully, but these errors were encountered:
Would be awesome to have but I can't help you on it. A part of me would like to try for the challenge but would be irresponsible wrt other commitments and you're far more qualified than I. Out of my scope.
I'm glad it's not just me having this issue. I've been able to verify generated messages within the library, but not with another (bitcoincashjs). I've spent a night trying to verify signed messages with https://bitcoincashjs.github.io/#Examples and not having any success. Unfortunately, I don't have anything to add other than additional insight would be very helpful.
I spent most of today trying to implement message signing in a portable manner so that bitcoind or Electron-Cash can be used to verify the message, without success.
I've made it as far as constructing the message in the same manner and double-hashing it so the exact same hash is sent to the underlying wallet._pk signing function (and passing
hash=None
since it's already been hashed manually) and verified this is the same hash generated by bitcoind before it callssecp256k1_ecdsa_sign_recoverable
, but that's as far as I get. I am simply unable to produce the same signature or one that bitcoind can verify.My hunch is that either BitCash does not generate a recoverable signature or the nonce functions are different. This is where things start to go over my head.
If this is not possible, I am wondering if we could at least support a recoverable signing mechanism so that the person verifying does not need the full public key, but simply the cash address (hashed key) like bitcoind and the wallets support. If that were possible then I don't necessarily need it to be verifiable outside of this library.
Anybody have any insight to this? As a last resort I'll keep searching for an alternative library that can do this and I'll have to use that for this purpose, but I would prefer to have it incorporated in here.
The text was updated successfully, but these errors were encountered: