karask / python-bitcoin-utils

Library to interact with the Bitcoin network. Ideal for low-level learning and experimenting.
MIT License
271 stars 102 forks source link

Schnorr signature not identical with BTC core #56

Closed dingguijin closed 9 months ago

dingguijin commented 9 months ago

Actually, it is not an issue.

As the comments in the code keys.py

    # deterministic signing nonce is random and RFC6979-like
    # it is the hash of the tx_digest and private key
    # TODO not identical to Bitcoin Core's signature, rand_aux
    # needs to change if we want identical signatures!
    rand_aux = hashlib.sha256(tx_digest + byte_key).digest()

So how to make this identical with BTC Core.

dingguijin commented 9 months ago

Not issue.

karask commented 9 months ago

Hi @dingguijin

As you said it is not that important but I would like it to be identical to Core. So this is a TODO for the long term.

Just have to spend some time figuring out exactly what kind of rand_aux Core is using and emulating it in the library's code.