<blockquote>
  <p>I just watched a video which stated 51% attacks can't steal bitcoins from people's wallets. Is this true?</p>
</blockquote>

<p>Yes, 51% attack cannot steal coins controlled by other people's keys. When you sign a transaction with your private key, you include the entire transaction data as a message in the signature hashing algorithm. Thus changing any data within the transaction (output value, address of the receiver etc.) will render the signature invalid and hence the transaction as invalid. An attacker can only make cosmetic changes like signature malleability (<code>S</code> component of signature can be replaced with <code>-S</code>) which can also be done by any other miner or an intermediate node in between that is relaying your transaction.</p>

<blockquote>
  <p>My understanding is if someone successfully implemented a 51% attack then they would most likely have manipulated one or more of the transactions which had been confirmed in the original true bitcoin chain.</p>
</blockquote>

<p>An attacker cannot manipulate transactions as I have stated above. What the attacker can definitely do is exclude the transaction from their version of the chain thus bringing in a censorship attack.</p>

<p>When you read news articles like "attackers stole coins from 51% attack" it does not mean they changed the transaction data. This is how the attack happens: An attacker sends some coins to an exchange. This gets recognized on the Bitcoin blockchain and after that gets reflected in your exchange account. Now on the exchange portal the attacker exchanges BTC for any other coin like say ETH and withdraw the ETH coins from the exchange account to their personal wallet. Now, they launch a 51% attack and create a different version of the Bitcoin blockchain that has excluded that transaction in which they sent the coins to the exchange. After your chain becomes the longest it will be accepted as the main chain. Thus you end up in BTC and the ETH that you got from the exchange. Although I have given the example of Bitcoin, do note that BTC has never experienced a 51% attack.</p>

<blockquote>
  <p>This would then mean Sarah no longer has the 1 bitcoin in her wallet effectively stealing that 1 bitcoin from her.</p>
</blockquote>

<p>Yes, this is the same example I have mentioned above. However, as confirmations on the transactions increases, the more difficult it is for an attacker to exclude transactions.  If there are tens of confirmations on the transaction, then reorging with just over 50% hash rate will take days if not weeks. Thus most recent transactions are more vulnerable to the attack than previous ones.</p>

<p>I think rest of your questions follow the similar tone. It is a best practice to wait for 6 confirmations, but if the amount sent is really large enough, it will be prudent to wait for tens if not hundreds of confirmations.</p>

CC BY-SA 4.0
2019-11-18T08:28:40.593Z
Thanks for taking the time to answer my questions.

Just to be clear though. If there are 3 wallets, A,B,C.

Wallet A contains 1 bitcoin and wallets B and C contain
0 bitcoin. In block 100 wallet a transfers it's 1 bitcoin
to wallet B. Then 3 blocks later in block 103 wallet
B sends the 1 bitcoin to wallet C.
Stephen
CC BY-SA 4.0
2019-11-18T08:28:56.757Z
If the owner of wallet A now wanted to implement a 51%+ attack
to get their 1 bitcoin back (this just for example as it
would of course be to costly to do this for just 1 bitcoin)
they would need to start their own side chain from block 100
and remove the transaction from that block where their wallet
A tranfers 1 bitcoin to wallet B.
Stephen
CC BY-SA 4.0
2019-11-18T08:29:07.477Z
When they then come to mine block 103 on their side chain i
assume the side chain will now view the transaction for wallet
B to wallet C as invalid, as wallet B now contains 0 bitcoin thus
has no bitcoin to send to wallet C. This means that transaction
will also be removed from the side chain. Is this correct?
Stephen
CC BY-SA 4.0
2019-11-18T09:51:53.857Z
@Stephen yes. you are correct.
Ugam Kamat
CC BY-SA 4.0
2019-11-17T17:28:34.170Z
2019-11-17T17:28:34.170Z
Ugam Kamat
<p>I have a very basic understanding of how the bitcoin blockchain works and am trying to understand how manipulating transactions in a 51% attack works.</p>

<p>I just watched a video which stated 51% attacks can't steal bitcoins from people's wallets. Is this true?</p>

<p>My understanding is if someone successfully implemented a 51% attack i.e. they created a longer chain than the current chain, then they would most likely have manipulated one or more of the transactions which had been confirmed in the original true bitcoin chain.</p>

<p>I assume the reason they can't steal someone's bitcoin directly from their wallet is because they would be unable to create a transaction to send bitcoin from that person's wallet, as they would need their private key to do that.</p>

<p>That said if for example William had sent 1 bitcoin to Sarah who previously had 0 bitcoin in her wallet. Could they not simply remove that transaction from their new/manipulated chain? This would then mean Sarah no longer has the 1 bitcoin in her wallet effectively stealing that 1 bitcoin from her.</p>

<p>William would still have the 1 bitcoin meaning he could now reuse that 1 bitcoin. I assume this is what they mean by double spend i.e. he can now spend that same 1 bitcoin again.</p>

<p>If this is possible then the blockchain would view Sarah's wallet as having 0 bitcoin. If in a later block Sarah had sent that 1 bitcoin to her friend Helen, then wouldn't that transaction be invalid? If so would this mean the person creating the fake blockchain would have to also remove that invalid transaction?</p>

<p>If that is the case it could presumably create a knock on effect where multiple future transactions are now invalid. Helen's wallet (like Sarah's wallet) could have only contained the 1 bitcoin Sarah had sent her, so if Helen had sent that bitcoin to someone else that transaction would now also be invalid.</p>

<majority-attack>
transactions and 51% attack?
Stephen
# transactions and 51% attack?

(Asked by: username_0 on 2019-11-17)

I have a very basic understanding of how the bitcoin blockchain works and am trying to understand how manipulating transactions in a 51% attack works.

I just watched a video which stated 51% attacks can't steal bitcoins from people's wallets. Is this true?

My understanding is if someone successfully implemented a 51% attack i.e. they created a longer chain than the current chain, then they would most likely have manipulated one or more of the transactions which had been confirmed in the original true bitcoin chain.

I assume the reason they can't steal someone's bitcoin directly from their wallet is because they would be unable to create a transaction to send bitcoin from that person's wallet, as they would need their private key to do that.

That said if for example William had sent 1 bitcoin to Sarah who previously had 0 bitcoin in her wallet. Could they not simply remove that transaction from their new/manipulated chain? This would then mean Sarah no longer has the 1 bitcoin in her wallet effectively stealing that 1 bitcoin from her.

William would still have the 1 bitcoin meaning he could now reuse that 1 bitcoin. I assume this is what they mean by double spend i.e. he can now spend that same 1 bitcoin again.

If this is possible then the blockchain would view Sarah's wallet as having 0 bitcoin. If in a later block Sarah had sent that 1 bitcoin to her friend Helen, then wouldn't that transaction be invalid? If so would this mean the person creating the fake blockchain would have to also remove that invalid transaction?

If that is the case it could presumably create a knock on effect where multiple future transactions are now invalid. Helen's wallet (like Sarah's wallet) could have only contained the 1 bitcoin Sarah had sent her, so if Helen had sent that bitcoin to someone else that transaction would now also be invalid.

**Tags:** majority-attack


---

## 1 answers

### Answer by username_1 on 2019-11-17. Score: 3 | Accepted answer

> I just watched a video which stated 51% attacks can't steal bitcoins from people's wallets. Is this true?

Yes, 51% attack cannot steal coins controlled by other people's keys. When you sign a transaction with your private key, you include the entire transaction data as a message in the signature hashing algorithm. Thus changing any data within the transaction (output value, address of the receiver etc.) will render the signature invalid and hence the transaction as invalid. An attacker can only make cosmetic changes like signature malleability (`S` component of signature can be replaced with `-S`) which can also be done by any other miner or an intermediate node in between that is relaying your transaction.

> My understanding is if someone successfully implemented a 51% attack then they would most likely have manipulated one or more of the transactions which had been confirmed in the original true bitcoin chain.

An attacker cannot manipulate transactions as I have stated above. What the attacker can definitely do is exclude the transaction from their version of the chain thus bringing in a censorship attack.

When you read news articles like "attackers stole coins from 51% attack" it does not mean they changed the transaction data. This is how the attack happens: An attacker sends some coins to an exchange. This gets recognized on the Bitcoin blockchain and after that gets reflected in your exchange account. Now on the exchange portal the attacker exchanges BTC for any other coin like say ETH and withdraw the ETH coins from the exchange account to their personal wallet. Now, they launch a 51% attack and create a different version of the Bitcoin blockchain that has excluded that transaction in which they sent the coins to the exchange. After your chain becomes the longest it will be accepted as the main chain. Thus you end up in BTC and the ETH that you got from the exchange. Although I have given the example of Bitcoin, do note that BTC has never experienced a 51% attack.

> This would then mean Sarah no longer has the 1 bitcoin in her wallet effectively stealing that 1 bitcoin from her.

Yes, this is the same example I have mentioned above. However, as confirmations on the transactions increases, the more difficult it is for an attacker to exclude transactions. If there are tens of confirmations on the transaction, then reorging with just over 50% hash rate will take days if not weeks. Thus most recent transactions are more vulnerable to the attack than previous ones.

I think rest of your questions follow the similar tone. It is a best practice to wait for 6 confirmations, but if the amount sent is really large enough, it will be prudent to wait for tens if not hundreds of confirmations.

> **Comments:**
> **username_0**: Thanks for taking the time to answer my questions.  Just to be clear though. If there are 3 wallets, A,B,C.  Wallet A contains 1 bitcoin and wallets B and C contain 0 bitcoin. In block 100 wallet a transfers it's 1 bitcoin to wallet B. Then 3 blocks later in block 103 wallet B sends the 1 bitcoin to wallet C.  
> **username_0**: If the owner of wallet A now wanted to implement a 51%+ attack to get their 1 bitcoin back (this just for example as it would of course be to costly to do this for just 1 bitcoin) they would need to start their own side chain from block 100 and remove the transaction from that block where their wallet A tranfers 1 bitcoin to wallet B.  
> **username_0**: When they then come to mine block 103 on their side chain i assume the side chain will now view the transaction for wallet B to wallet C as invalid, as wallet B now contains 0 bitcoin thus has no bitcoin to send to wallet C. This means that transaction will also be removed from the side chain. Is this correct?  
> **username_1**: @username_0 yes. you are correct.  

---

