<p>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.</p>

<p>The signrawtransaction command returns whether the transaction is fully signed or not: <a href="https://github.com/bitcoin/bitcoin/blob/0.13/src/rpc/rawtransaction.cpp#L616" rel="nofollow">https://github.com/bitcoin/bitcoin/blob/0.13/src/rpc/rawtransaction.cpp#L616</a><br/>
<strong>If it is fully signed, the output is not malleable.</strong></p>

<p>The output is <strong>not unique</strong> as is discussed in the comments below.</p>

CC BY-SA 3.0
2016-09-21T21:19:18.477Z
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.
Pieter Wuille
CC BY-SA 3.0
2016-09-22T07:40:24.913Z
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
CC BY-SA 3.0
2016-09-22T11:24:21.307Z
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).
Pieter Wuille
CC BY-SA 3.0
2016-09-22T12:03:03.523Z
I agree, but his question was whether the raw transaction string is unique.
hrobeers
CC BY-SA 3.0
2016-09-22T12:39:53.143Z
Well, it is not, and assuming that it is may cause problems.
Pieter Wuille
CC BY-SA 3.0
2016-09-23T11:20:16.680Z
Edited the answer for clarity.
hrobeers
CC BY-SA 3.0
2016-09-21T14:54:57.427Z
2016-09-23T11:19:35.137Z
2016-09-23T11:19:35.137Z
hrobeers
<p>When calling RPC <code>signrawtransaction</code> it returns a hex-encoded string that contains the raw tx request with its signatures.</p>

<p>Is this string:</p>

<ul>
<li>malleable?</li>
<li>unique?</li>
</ul>

<json-rpc><raw-transaction><transaction-malleability>
signrawtransaction hex
Doug Peters
# signrawtransaction hex

(Asked by: username_0 on 2014-06-02)

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

Is this string:

* malleable?
* unique?

**Tags:** json-rpc, raw-transaction, transaction-malleability


---

## 1 answers

### Answer by username_1 on 2016-09-21. Score: 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.

> **Comments:**
> **username_2**: 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.  
> **username_1**: 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.  
> **username_2**: 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).  
> **username_1**: I agree, but his question was whether the raw transaction string is unique.  
> **username_2**: Well, it is not, and assuming that it is may cause problems.  
> **username_1**: Edited the answer for clarity.  

---

