which was the purpose of changing the signature of a TX? or it was just a bug before segwit?

1

Was there any purpose in changing the signature of a transaction?

Or it was a bug before segregated witness?

Does segregated witness disable some wanted feature?

Emi

Posted 2019-01-30T04:43:50.660

Reputation: 21

Answers

3

By using sighash flags you can flag a transaction to intentionally make specific parts of it modifiable after signing it. This kind of intentional malleability is a useful, if not often used, feature and isn't changed by segwit.

Malleability in the SIGHASH_ALL was simply a design flaw and based on all the issues that the original software had with it appears to have been unintentional and unrealized at the time of the protocol's release.

The main origins of malleability in typical transactions arise from effects that aren't especially visible while writing the software-- e.g. that pushes could be serialized in different ways, or that there were multiple distinct valid signatures of the same data.

G. Maxwell

Posted 2019-01-30T04:43:50.660

Reputation: 6 039

thanks, any real life example or use case to understand changing some modifiable part of a tx after signing?Emi 2019-01-30T05:37:54.490

3Sure, the ANYONE CAN PAY sighash flag lets you sign a transaction that doesn't yet have all its input value, allowing someone else to pay the rest. So for example, you can use this to make a matching donation: I write a TX that pays Alice 2 BTC but I only provide a signed 1BTC input. Someone else can take that, add another 1 BTC input and make the tx valid without any further interaction from me.G. Maxwell 2019-01-30T05:41:35.160