Bitcoin Forum

Other => Beginners & Help => Topic started by: udayantha11 on October 07, 2022, 12:42:59 PM



Title: I have a question regarding asymmetric cryptography
Post by: udayantha11 on October 07, 2022, 12:42:59 PM


I have a question that , If i send BTC to someone on the network. First, encrypt a message with the public key of the recipient and the receiver decrypt the message with the reciepents private key. Is this the way when we send btc to another wallet??? please explain


The second question is all the nodes are not miners and all the miners are nodes. is this statement correct? 


Title: Re: I have a question regarding asymmetric cryptography
Post by: mocacinno on October 07, 2022, 12:45:22 PM


I have a question that , If i send BTC to someone on the network. First, encrypt a message with the public key of the recipient and the receiver decrypt the message with the reciepents private key. Is this the way when we send btc to another wallet??? please explain
No... Very simplified, it's about signatures and not about encryption and decryption of messages. It's about being able to prove you are the rightfull owner of an unspent output by being able to provide a valid digital signature when spending said unspent output. There are other possibility's to spend unspent outputs aswell, but that's even more complex to explain (so i won't go into this).

The second question is all the nodes are not miners and all the miners are nodes. is this statement correct?  
That's correct. At least, if you mean that not ALL nodes are miners, but ALL miners do require a node to be able to mine.


Title: Re: I have a question regarding asymmetric cryptography
Post by: Charles-Tim on October 07, 2022, 01:01:29 PM
The second question is all the nodes are not miners and all the miners are nodes. is this statement correct? 
That's correct. At least, if you mean that not ALL nodes are miners, but ALL miners do require a node to be able to mine.

Yes, not all nodes are miners, anyone can run there own node without being a miner. But how about all miners do require a node to be able to mine? Solo miners and mining pool are the ones I thought would run their own node while other miners would join mining without needing a node for it if they join mining pool.


Title: Re: I have a question regarding asymmetric cryptography
Post by: mocacinno on October 07, 2022, 01:07:24 PM
--snip--

Yes, not all nodes are miners, anyone can run there own node without being a miner. But how about all miners do require a node to be able to mine? Solo miners and mining pool are the ones I thought would run their own node while other miners would join mining without needing a node for it if they join mining pool.

In case of pool miners, it's the pool that needs access to a full node, so the pool miners still indirectly need a full node to mine. But you are correct, a pool miner doesn't need a full node him/herself.


Title: Re: I have a question regarding asymmetric cryptography
Post by: hosseinimr93 on October 07, 2022, 01:11:19 PM
I have a question that , If i send BTC to someone on the network. First, encrypt a message with the public key of the recipient
To add to mocacinno's reply:
Take note that when you want to make a transaction, usually you don't have the public key of the recipient at all.
For example, in a P2PKH (Pay To Public Key Hash) transaction, you make a transaction to a public key hash (which is known as address) and require the receiver to provide a valid signature to unlock the output.


Title: Re: I have a question regarding asymmetric cryptography
Post by: Charles-Tim on October 07, 2022, 01:28:35 PM
In case of pool miners, it's the pool that needs access to a full node, so the pool miners still indirectly need a full node to mine. But you are correct, a pool miner doesn't need a full node him/herself.
Just trying to point out something there to make it not confusing, that miners that join mining pool do not need to run their own node before mining. I know you understood this and I perfectly understand what you meant. Definitely, any miner among the miners that join the mining pool would have to depend on the mining pool node.


Title: Re: I have a question regarding asymmetric cryptography
Post by: pooya87 on October 09, 2022, 04:38:49 AM
You should also know that there is a difference between "encryption" and "signing" in asymmetric cryptography.
In encryption the message is not known (publicly) and the encrypted result has an arbitrary length where the person with the private key decrypts to read.
In signing the message must be known alongside the signature and its correctness can be verified by anyone.

We don't use encryption in Bitcoin protocol.


Title: Re: I have a question regarding asymmetric cryptography
Post by: Saint-loup on October 09, 2022, 09:04:25 PM


I have a question that , If i send BTC to someone on the network. First, encrypt a message with the public key of the recipient and the receiver decrypt the message with the reciepents private key. Is this the way when we send btc to another wallet??? please explain


The second question is all the nodes are not miners and all the miners are nodes. is this statement correct?  
This is not the way transactions are created and sent to someone else, transactions are not encrypted, they are signed as explained by some other members above, and they have to be accepted and mined on the blockchain by nodes. You seem to make a confusion with the Encrypt/decrypt message feature from Electrum.
To encrypt a message with it you need to get the public key of one address belonging to the receiver, he will then be able to decrypt your message thanks to the private key of this address, but you can't send BTC through this tool and your message won't be written on the blockchain, you can send it by whatever mean you like anyway.