0

I read about transaction malleability and have some questions regarding that, please help: It states, for transaction malleability a person changes the signature such that the transaction remains valid, so my question is how can any person can see and alter the signature of the sender, although it is a PRIVATE key? How will the receiver be able to alter the signature?

1

2 Answers 2

0

The signature isn't the private key of the sender, but it refers to a message or a transaction that has been signed with the private key of the sender. And since the miners have to verify the signature of a transaction with the public key of the sender, the signatures have to be visible to everyone in the network.

How to actually alter these signatures without changing its validity is another topic, I think this article for Bitcoin explains it quite well: Transaction malleability for Bitcoin

6
  • Thanks for the reply, and how will the next person be able to alter the transaction? Although he does not know anything so how is that possible?
    – uzair kath
    May 8, 2020 at 18:39
  • 1
    As shown in the article above, when you have an ECDSA signature (r,s) you can modify it to (r, -s (mod N)), which is then still a valid signature of the same input. (But if you then would hash the whole transaction, including the altered signature, it would result in a different tx hash, which could lead to several problems, that's why SegWit was invented for Bitcoin).
    – cryptphil
    May 8, 2020 at 18:49
  • If transaction malleability is going to be done then it will affect another transaction because hash of the previous block would be changed causing problem for the current one, but the question is why is it causing a problem since someone tempered it when the transaction was unconfirmed then after tempering it got published at blockchain with altered data resulting in different hash so this is the hash(new one) which is on blockchain so the transaction should also take this hash resulting in no problem, so i don't know what is the issue?
    – uzair kath
    May 8, 2020 at 19:09
  • I'm not that sure if I got you right, but after a transaction is included in a block, there is no way of changing its hash/tx-id afterward. And yes, as you said, it is actually not a big problem, only buggy wallets, which check for that specific tx-id, wouldn't display any status for that tx. Vitalik Buterin also answered this question on reddit.
    – cryptphil
    May 8, 2020 at 19:50
  • 1
    Well, a transaction that spends the output of that altered one, simply uses this modified tx-id, which causes no problems. Like I said, only buggy wallets or exchanges could have their problems. Like it was the case for Mt. Gox, allegedly.
    – cryptphil
    May 8, 2020 at 20:17
0

Transaction malleability is a Bitcoin attack that was seen due to a bug in the Bitcoin implementation. Due to this bug, it became possible for an adversary to change the transaction ID of a transaction before it gets "confirmed", thus resulting in a scenario where it would appear that a certain transaction has not been executed. This can allow scenarios where double deposits or withdrawals can occur. In other words, this bug allows the changing of the unique ID of a Bitcoin transaction before it is confirmed. If the ID is changed before confirmation without making the transaction invalid, it would seem that the transaction did not occur at all, which can then give the false impression that the transaction has not been executed, thus allowing double-deposit or withdrawal attacks.

Imagine A sends money to B and B sends this unconfirmed funds to C.

 A => B => C

Meanwhile C ships its product to B. After receiving its product, B malleates A's payment. so transaction A to B will be confirmed with a different transaction id. As a result transaction B to C will be now invalid since it relies on id of transaction A to B that now no longer exists because it was altered. So C wont get paid but B would gets its product

You can more here

SegWit resolved this problem: you can read here

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.