<p>Yes, the witness can be mutated before it is in a block. Once in a block it’s committed to with a hash. This is not impactful, any modification that doesn’t change the validity doesn’t matter for the creator or receiver of the transaction. </p>

CC BY-SA 3.0
2017-12-06T12:32:05.903Z
I'm uncomfortable saying it's not impactful. It's like saying malleability doesn't matter. Also before segwit the malleable transaction was committed to with a hash. There could be potential applications depending on non-malleability of the witness.
relG
CC BY-SA 3.0
2017-12-06T13:00:30.063Z
What applications? The only application of the scriptSig is to validate a transaction, nothing can ever access it so there’s no possible reason to be using it.
Claris
CC BY-SA 3.0
2017-12-06T14:46:09.193Z
I confess I don't have a great example, but malleability can have unexpected subtle attacks (otherwise people wouldn't bother to solve it). So, at the very least, I would suggest changing "This is not impactful.." to "This may not be impactful..".
relG
CC BY-SA 3.0
2018-01-09T06:24:22.393Z
It is simply not impactful. So long as it doesn’t change the outcome of a transaction, does it matter that it’s not the way the creator of the transaction intended?
Claris
CC BY-SA 3.0
2017-12-06T11:28:30.890Z
2017-12-06T11:28:30.890Z
Claris
<blockquote>
  <p>but can't the witness part be malleated, just like the scriptSig can in a non-segwit transaction?</p>
</blockquote>

<p>Yes, absolutely.</p>

<p>But the witness does not contribute to the transaction id (txid), which is what subsequent transactions refer to. Because of this, malleating a witness in a given transaction does not invalidate follow-up transactions using this transaction as an input. This is important for any application where multiple parties rely on an unconfirmed transaction to keep a stable txid.</p>

CC BY-SA 3.0
2018-01-05T11:50:14.277Z
2018-01-07T09:17:04.507Z
2018-01-07T09:17:04.507Z
Pieter Wuille
<p>I understand that after segwit the transaction ID can't be malleated, 
but can't the witness part be malleated, just like the scriptSig can in a non-segwit transaction?</p>

<segregated-witness>
Does segwit solve malleability of the witness part?
relG
# Does segwit solve malleability of the witness part?

(Asked by: username_0 on 2017-12-06)

I understand that after segwit the transaction ID can't be malleated,
but can't the witness part be malleated, just like the scriptSig can in a non-segwit transaction?

**Tags:** segregated-witness


---

## 2 answers

### Answer by username_2 on 2018-01-05. Score: 4 | Accepted answer

> but can't the witness part be malleated, just like the scriptSig can in a non-segwit transaction?

Yes, absolutely.

But the witness does not contribute to the transaction id (txid), which is what subsequent transactions refer to. Because of this, malleating a witness in a given transaction does not invalidate follow-up transactions using this transaction as an input. This is important for any application where multiple parties rely on an unconfirmed transaction to keep a stable txid.


---

### Answer by username_1 on 2017-12-06. Score: 1

Yes, the witness can be mutated before it is in a block. Once in a block it’s committed to with a hash. This is not impactful, any modification that doesn’t change the validity doesn’t matter for the creator or receiver of the transaction.

> **Comments:**
> **username_0**: I'm uncomfortable saying it's not impactful. It's like saying malleability doesn't matter. Also before segwit the malleable transaction was committed to with a hash. There could be potential applications depending on non-malleability of the witness.  
> **username_1**: What applications? The only application of the scriptSig is to validate a transaction, nothing can ever access it so there’s no possible reason to be using it.  
> **username_0**: I confess I don't have a great example, but malleability can have unexpected subtle attacks (otherwise people wouldn't bother to solve it). So, at the very least, I would suggest changing "This is not impactful.." to "This may not be impactful..".  
> **username_1**: It is simply not impactful. So long as it doesn’t change the outcome of a transaction, does it matter that it’s not the way the creator of the transaction intended?  

---

