2

When calling RPC signrawtransaction it returns a hex-encoded string that contains the raw tx request with its signatures.

Is this string:

  • malleable?
  • unique?
1

signrawtransaction signs all inputs your wallet can sign. As multiple inputs in a transaction can exist, it might be possible that not all inputs are signed.

The signrawtransaction command returns whether the transaction is fully signed or not: https://github.com/bitcoin/bitcoin/blob/0.13/src/rpc/rawtransaction.cpp#L616
If it is fully signed, the output is not malleable.

The output is not unique as is discussed in the comments below.

6
  • ECDSA signatures are never unique. The owner of a transaction can just sign again with a different nonce, and an equally valid signature would appear. Worse, he can always create a completely different transaction, which doublespends the money. Sep 21 '16 at 21:19
  • Interesting, did not know about the nonce in ECDSA signatures. So still the output can only be recreated using the same keys, without access to the keys, it is impossible to recreate the same output so in that sense it is unique. But like you said you can have multiple versions of the fully signed transaction.
    – hrobeers
    Sep 22 '16 at 7:40
  • That's a very strange definition for unique. In digital signature systems, a unique signature usually refers to the property that even with access to the private key, you cannot construct more than one valid signature for a given message. As said, ECDSA is not unique (not even with RFC6979, and the assumption that it would be has led to breaks in some cryptosystems). Sep 22 '16 at 11:24
  • I agree, but his question was whether the raw transaction string is unique.
    – hrobeers
    Sep 22 '16 at 12:03
  • Well, it is not, and assuming that it is may cause problems. Sep 22 '16 at 12:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.