Post
Topic
Board Bitcoin Discussion
Re: Why Bitcoin can be tamper-proof
by
pooya87
on 13/07/2021, 02:53:32 UTC
Is this asymmetric encryption? Or it's an asymmetric encryption with a private key leaked
The algorithm is so much more complicated than that (it is not just simple multiplication).
What you did here is asymmetric encryption where you used a PGP public key to encrypt a message that only the person with the private key could decrypt.

Quote
By the way, I have a relatively small code base. What do I need to do if I want to understand the source code of btc?Thanks
If you have a good understanding of c++ then you can go to bitcoin core's repository on github and go through the code. Start from net_processing.cpp as that is where each message comes in and is processed including new blocks, new transactions, etc.
That requires a better understanding of how bitcoin works though which would be better if you start by learning more. The book called Mastering Bitcoin by Andreas Antonopoulos is a very good start https://github.com/bitcoinbook/bitcoinbook

I've seen some cases of people who lost money, because two blocks were propagated and the block they had their transaction included got removed.
It is highly unlikely to lose money like this. Users don't even realize something like that happened and the other block contains almost the same transactions.