<p>Bitcoin is meant to be a decentralized network not requiring trust to make/receive transactions. Transactions contain <em>signatures</em> to prove that they haven't been tampered with. Signature is not just the private key, it is something that is derived by the private key and some other parameters. This is called ECDSA, Elliptic Curve Digital Signature Algorithm. If the crypto implementation is proper, it's impossible to extract the private key from signatures.</p>

<p>Changing the blockchain is a different topic. Each block contains "Proof Of Work", which means its hash (a value to check a block's authenticity, but no private key) would change if any part of the block is altered. This'd invalidate the block, and miners would have to re-mine that block (change little things until the hash is lower than a value, the <em>target</em>) But if you create a fake chain with lower targets for blocks, then your chain would have have less Proof Of Work accumulated and other nodes would switch to the chain with the largest PoW once they're aware of it. (But in practice there are checkpoint blocks, so the initial target for remining a chain is high)</p>

CC BY-SA 4.0
2020-03-25T20:59:06.480Z
Ah! I understand now that the private key is never sent.

However, I still am confused on how you know a node doesn't just return a false blockchain. Yes, other nodes wouldn't accept that as a valid blockchain (as there is less POW), but wouldn't the requester still get a fake blockchain and not know it? 

How does bitcoin prevent this? Do wallets or apps used to trade bitcoin simply choose a trusted node to connect to?
TransmissionsDev
CC BY-SA 4.0
2020-03-25T21:03:10.120Z
_I think I've answered my previous comment question..._ Wallets don't just connect to nodes, they start their own "lightweight" nodes, and connect to other nodes to find the most valid chain (longest). Then they use that blockchain! **Is that correct?**
TransmissionsDev
CC BY-SA 4.0
2020-03-25T21:03:45.960Z
Nodes and wallets are given checkpoints like "Don't accept the blockchain unless the block 5000 has hash A, 2000 has hash B, 500 has hash C". And yes, if they find a longer chain then they'll erase their chain and switch! But I don't think they find the longest chain before downloading it, because any node can lie at the beginning.
MCCCS
CC BY-SA 4.0
2020-03-25T20:51:17.293Z
2020-03-25T20:51:17.293Z
MCCCS
<p>If you send send a transaction request to a node, what is to to ensure that node doesn't simply log your private key and do nothing? </p>

<p>What is to stop the entry node from taking a transaction intended to transfer 1 bitcoin, and transfer 100 instead? Or to stop the node from changing the receiver of the transaction to someone else? </p>

<p><strong>Lastly, what is to stop a node from sending a completely made up blockchain?</strong> </p>

<p><em>Do you just have to choose a trustworthy node?</em></p>

<security><private-key><nodes>
How can you trust Bitcoin nodes?
TransmissionsDev
# How can you trust Bitcoin nodes?

(Asked by: username_0 on 2020-03-25)

If you send send a transaction request to a node, what is to to ensure that node doesn't simply log your private key and do nothing?

What is to stop the entry node from taking a transaction intended to transfer 1 bitcoin, and transfer 100 instead? Or to stop the node from changing the receiver of the transaction to someone else?

**Lastly, what is to stop a node from sending a completely made up blockchain?**

*Do you just have to choose a trustworthy node?*

**Tags:** security, private-key, nodes


---

## 1 answers

### Answer by username_1 on 2020-03-25. Score: 1 | Accepted answer

Bitcoin is meant to be a decentralized network not requiring trust to make/receive transactions. Transactions contain *signatures* to prove that they haven't been tampered with. Signature is not just the private key, it is something that is derived by the private key and some other parameters. This is called ECDSA, Elliptic Curve Digital Signature Algorithm. If the crypto implementation is proper, it's impossible to extract the private key from signatures.

Changing the blockchain is a different topic. Each block contains "Proof Of Work", which means its hash (a value to check a block's authenticity, but no private key) would change if any part of the block is altered. This'd invalidate the block, and miners would have to re-mine that block (change little things until the hash is lower than a value, the *target*) But if you create a fake chain with lower targets for blocks, then your chain would have have less Proof Of Work accumulated and other nodes would switch to the chain with the largest PoW once they're aware of it. (But in practice there are checkpoint blocks, so the initial target for remining a chain is high)

> **Comments:**
> **username_0**: Ah! I understand now that the private key is never sent.  However, I still am confused on how you know a node doesn't just return a false blockchain. Yes, other nodes wouldn't accept that as a valid blockchain (as there is less POW), but wouldn't the requester still get a fake blockchain and not know it?   How does bitcoin prevent this? Do wallets or apps used to trade bitcoin simply choose a trusted node to connect to?  
> **username_0**: _I think I've answered my previous comment question..._ Wallets don't just connect to nodes, they start their own "lightweight" nodes, and connect to other nodes to find the most valid chain (longest). Then they use that blockchain! **Is that correct?**  
> **username_1**: Nodes and wallets are given checkpoints like "Don't accept the blockchain unless the block 5000 has hash A, 2000 has hash B, 500 has hash C". And yes, if they find a longer chain then they'll erase their chain and switch! But I don't think they find the longest chain before downloading it, because any node can lie at the beginning.  

---

