The address, like a bank account number (card), will be automatically generated after the digital wallet is created. Simply put, when creating a wallet, Mr. Wang pairs a private key and a public key, and then the public key generates an address through a set of algorithms. This address is essentially a string, such as1qcxruoxwo5by9nhavbbarbqyhatjru3.
Just as the bank account number (card number) can be used to collect money, the bitcoin address can also be used to receive bitcoin.
This bitcoin address is known not only to the person who transferred the money to you, but also to the entire bitcoin network. It can be said that anyone can know the addresses of all users in the world. Why do you say that? Because bitcoin is essentially a huge public ledger, all transactions are visible to everyone. Transaction records include transaction serial number, sender's address, receiver's address and sender's change address.
The private key, which can be regarded as a bank password, is a long string of random numbers generated by the wallet, such as: 4kezddeu1kloc-0/z3gprtux3pphjwgnnp4rfd7yrcvc1wlbb9zxmcj. The private key is the only thing that can prove that the bitcoin you own belongs to you. Only with the private key can you transfer, trade and use the bitcoin in the digital wallet.
As we all know, the bank password must not be disclosed to others, and so must the private key. Don't tell anyone when you are dead, or your bitcoin will be easily transferred away. The bank's money has been stolen and may be recovered because of state supervision and third-party credit. However, Bitcoin is decentralized. Without a third party, one's own currency can only be kept, lost or transferred by others and will never be returned. So don't tell others your private key, don't keep it on your mobile phone or computer, and don't transmit your private key through the network. What should I do? Remember, write on paper with a pen. Write two or three copies in different places and keep them safe.
The public key, as its name implies, can be made public, and it is also a long string of characters like the address and private key. The public key is generated by the private key through the elliptic curve encryption algorithm. The unique public key can be calculated by the private key, but the private key cannot be deduced from the public key.
So what role do bitcoin addresses, public keys and private keys play in the transaction?
First, the wallet encrypts the private key into a string (also called a signature) through an encryption algorithm, and then writes this string together with the public key into the transaction information and sends it to the miners. After receiving the information, the digger will write the signature and public key into a verification function. If the result is "true", then the transaction will be confirmed as true and valid, and can be verified. And the result is "false", indicating that there is something wrong with the transaction and it cannot be verified.
Through the simple words above, I hope to help you have a preliminary understanding of the address, public key and private key of Bitcoin! Thank you for reading!