<blockquote>
  <p>If I understand correctly, when I create a new transaction from my wallet, I have to sign it and encrypt it. My wallet encrypts the message using the public key of the node it is connected to, so it can decrypt the message when it receives it, and signs the message with my private key, so the node knows it was me who sent the message because my public key is then sent along with the message.</p>
</blockquote>

<p>You understand incorrectly. Nothing is encrypted in Bitcoin, there is no need to do so, and, as you noticed, it would make it impossible to verify the contents of the transaction.</p>

<p>Transactions are only signed. The signature both ensures the integrity of the transaction and proves that the sender is actually allowed to send the Bitcoin.</p>

CC BY-SA 3.0
2018-01-31T20:27:12.997Z
Thank you very much for your reply. Ok, I see I understood wrongly. However I still don't see how do the other nodes would know my public key. Is it that the transaction is a composite of two things, the transaction data itself, signed with the private key of the sender, along with his/her public key so the nodes can verify that the sender is the owner of the public key?
daniel sp
CC BY-SA 3.0
2018-02-01T01:42:25.460Z
The transaction contains the public key itself along with the signature. Both are contained within the transaction, but the signature does not and cannot cover itself (duh).
Ava Chow
CC BY-SA 3.0
2018-01-31T15:35:46.727Z
2018-01-31T15:35:46.727Z
Ava Chow
<p>If I understand correctly, when I create a new transaction from my wallet, I have to sign it and encrypt it. My wallet encrypts the message using the public key of the node it is connected to, so it can decrypt the message when it receives it, and signs the message with my private key, so the node knows it was me who sent the message because my public key is then sent along with the message.</p>

<p>What I don't understand is that when this message is transmitted to the other nodes for verification, how can they decrypt it if it was encrypted using the initial node public key. Furthermore, I read that also the miners should verify the validity of the transactions they have received. How can they decrypt the transactions? </p>

CC BY-SA 3.0
2018-02-01T08:37:42.050Z
There are some basic wrong assumptions in your post, and Andrew has already pointed into the right direction. There is a set of verification steps, which are described here: https://en.bitcoin.it/wiki/Protocol_rules#.22tx.22_messages. Also I highly recommend Andreas’ book “Mastering Bitcoin”, which is online readable in many languages. Keep on the good work, search the forum, and post your new questions!
pebwindkraft
<blockchain><encryption><validation>
How are transactions verified by nodes other than the initial receiver?
daniel sp
# How are transactions verified by nodes other than the initial receiver?

(Asked by: username_0 on 2018-01-31)

If I understand correctly, when I create a new transaction from my wallet, I have to sign it and encrypt it. My wallet encrypts the message using the public key of the node it is connected to, so it can decrypt the message when it receives it, and signs the message with my private key, so the node knows it was me who sent the message because my public key is then sent along with the message.

What I don't understand is that when this message is transmitted to the other nodes for verification, how can they decrypt it if it was encrypted using the initial node public key. Furthermore, I read that also the miners should verify the validity of the transactions they have received. How can they decrypt the transactions?

**Tags:** blockchain, encryption, validation

> **Comments:**
> **username_1**: There are some basic wrong assumptions in your post, and Andrew has already pointed into the right direction. There is a set of verification steps, which are described here: https://en.bitcoin.it/wiki/Protocol_rules#.22tx.22_messages. Also I highly recommend Andreas’ book “Mastering Bitcoin”, which is online readable in many languages. Keep on the good work, search the forum, and post your new questions!  

---

## 1 answers

### Answer by username_2 on 2018-01-31. Score: 1 | Accepted answer

> If I understand correctly, when I create a new transaction from my wallet, I have to sign it and encrypt it. My wallet encrypts the message using the public key of the node it is connected to, so it can decrypt the message when it receives it, and signs the message with my private key, so the node knows it was me who sent the message because my public key is then sent along with the message.

You understand incorrectly. Nothing is encrypted in Bitcoin, there is no need to do so, and, as you noticed, it would make it impossible to verify the contents of the transaction.

Transactions are only signed. The signature both ensures the integrity of the transaction and proves that the sender is actually allowed to send the Bitcoin.

> **Comments:**
> **username_0**: Thank you very much for your reply. Ok, I see I understood wrongly. However I still don't see how do the other nodes would know my public key. Is it that the transaction is a composite of two things, the transaction data itself, signed with the private key of the sender, along with his/her public key so the nodes can verify that the sender is the owner of the public key?  
> **username_2**: The transaction contains the public key itself along with the signature. Both are contained within the transaction, but the signature does not and cannot cover itself (duh).  

---

