Author

Topic: Different signatures for the same transaction. (Read 564 times)

newbie
Activity: 20
Merit: 1
I believe core version 0.10.0+ uses deterministic k-value generation following the guidelines in RFC6979. The code for this is in the newly used libsecp256k1.

It you want to make random k-values, rollback to a version using openssl, or write your own code.

Note that if you generate R-values or S-values that are too high, the network will or may reject them (as detailed in BIP0062).

Thank you! That was interesting!

After reading the RFC I have seen the value of k changes with the message. With that, I could pull a low-effort solution to get different signatures with getrawtransaction by changing the fee by a small amount.
legendary
Activity: 1484
Merit: 1005
I believe core version 0.10.0+ uses deterministic k-value generation following the guidelines in RFC6979. The code for this is in the newly used libsecp256k1.

It you want to make random k-values, rollback to a version using openssl, or write your own code.

Note that if you generate R-values or S-values that are too high, the network will or may reject them (as detailed in BIP0062).
newbie
Activity: 20
Merit: 1
I'm signing raw transaction with signrawtransaction using bitcoin-cli (Bitcoin Core).

Even if you repeat the same transaction, each signature should be created with a different random value k which gives the first part of the signature (r).

 I'm sure this is what happens once a transaction is sent (otherwise there would be massive theft), but in the command line, when I call signrawtransaction more than once for the same transaction I always get the same signature.  I would like to generate different valid signatures for the same transaction. 

So, when/how does the client decide it is time for a new value of k? Should I create some code to sign my transactions from scratch or is there a way to force a new k using signrawtransaction?
Jump to: