Closed nheffelman closed 1 year ago
If desopy is what I think it is - add this:
if bytes.fromhex(hexify(s))[0] >= 0x80: s = n - s
before the line: signature = to_DER(hexify(r), hexify(s))
Some knowledge: https://www.advancingbitcoin.com/blog/evolution-of-the-signature-size-in-bitcoin/ https://www.rfc-editor.org/rfc/rfc6979 https://github.com/karask/python-bitcoin-utils/blob/master/bitcoinutils/keys.py
Thanks, I don't know if this exactly translates, but I will fafo with what I've got
Ok in the desopy library the code is like this
s = inverse_mod(k, n) (r int(seedHex, 16) + int(s256.hex(), 16)) s = s % n # Enforce low-s if s > n // 2: s = n - s signature = to_DER(hexify(r), hexify(s))
@nheffelman - were you able to resolve the issue related to signatures?
yes, it was a problem with signing through desopy involving readerpublickey @itsaditya fixed the issue there after I brought it to his attention.
@nheffelman - thanks! I'm going to go ahead and close out this issue then.
I'm getting this intermittently when submitting a transaction from a python app built with desopy. I'm using the actual seedhex and public Key Can anyone explain why or help out?