Digital Wallet Basics (1)
Private key, public key, address and wallet
Let's first take a look at some familiar basic knowledge, I think you must understand, and then we will slowly expand on these basic knowledge and try to exchange some more interesting thoughts.
First, we generate a private key, the private key calculates the public key, and the public key calculates the wallet address through some hash operations.
In cryptography, this chain is one-way, that is, the reverse cannot be established. That is, if you know the wallet address, you cannot know the public key, and if you know the public key, you cannot know the private key.
So what exactly does this private key, public key and address mean?
Let's talk about the media industry first. In the past, the media was relatively centralized. That is to say, it was a big voice platform. We can only provide information, and these media will release the information. Later, Tencent launched a self-media, and each of us can become a small media, and have a medium for our own voice.
Let's go back.
The essence of blockchain is decentralization, and the essence of financial centralization is that any small individual has the function of financial services, and can deposit, lend and provide financial services.
Then this private key, which is the ownership of this small individual, is similar to the bank's ownership certificate - including business manufacturing, safe keys, and so on. With the private key, I control the bank, of course, all the bank's operating documents, the bank's customers, and all the money.
What is the public key?
The public key corresponds to the account of one of the users. For example, Zhang San went to the Industrial and Commercial Bank of China with his ID card to open an account. After the account was successfully opened, Zhang San's account was in the bank's system.
So what is the address?
Zhang San has an account, which is equivalent to the bank knowing that there is such a person, but Zhang San went to the bank to handle business not just to have an account, but to make transactions. Therefore, after Zhang San has an account, he still needs to apply for a bank card at the bank before he can trade. Hence the address.
The address is equivalent to the user name and account number of the bank card, which is similar to your bank card information. With a bank card, you can't trade yet. The transaction requires a password, so the bank gives you a password, but this password will not be written on the bank card, but set by yourself. This password is the password of the wallet.
With this logic, I think you can understand.
Why can you know the public key and the address when you have the private key, but not the other way around?
As if I am the owner and operator of the bank, of course I can know your account, and I can also know how many bank cards are in this account, what the username and password are, and how much money is in it.
But I only have a bank card, and it is impossible for me to grasp the bank's data.
Therefore, we can let others know the address (equivalent to our bank card, which can be shown to others and let others know our user name and account number), but the private key must not be known to others, just like you must not take ownership of the bank The information is the same as the safe password given to others.
After understanding this basic concept, we continue to chat.
The private key is any number greater than 0 and less than 2 to the power of 256. Remember to generate this number randomly, otherwise the risk is very, very high. The private key generates the corresponding public key through the elliptic function curve, and the address is formed after hash encryption. This concept, just understand, do not need to go into depth.
Let's talk about wallets.
For example, after creating a aunt B, a string starting with 0x will be generated. This string is the wallet address. As we said just now, this wallet address is actually equivalent to opening a bank card under the account.
The password of this bank card is the password when you create the wallet. The password should preferably be no less than 8 digits, and try to set it as complex as possible.
Passwords serve two purposes:
The first is that you need to enter a password when transferring money, which is the same as when you need to enter a password when transferring money with a bank card.
The second is that this password must be entered when Keystore imports the wallet.
The second we will continue to explain, let's add some piecemeal knowledge first:
The password of this wallet can be changed, just like we change the password of a bank card, enter the original password and you can change it. But what if the password is forgotten, it doesn't matter, it's the same as if we forgot the password of our bank card. If we find the bank, we can change it for us. As we said before, having the private key is equivalent to owning the bank. You are the boss of the bank, so we can use the private key to change the password.
Unlike bank cards, a bank card corresponds to a password. But wallets can use different secondary cards in different mobile phones, which are independent of each other. You can also understand that, in fact, you have opened a lot of supplementary cards, and the account number of each supplementary card is the same, but the password can be different.
Therefore, the authority of the private key is enormous, and having the private key is equivalent to having an account + password. Be careful with confidentiality.
After creating the wallet, enter the password to export the private key.
The private key is a string of 64 characters. Some wallets use different encodings and may have fewer characters.
A wallet address has only one private key and cannot be modified. This is similar to the fact that I have an ICBC bank card, so this card must only be handled at ICBC.
Let's talk about the mnemonic. The permissions of the mnemonic and the private key are the same. The private key is the same as the certificate of ownership of our bank and the password of the safe. Since there are too many things and it is inconvenient to carry, there must be a password that is easy to remember. For example, Alibaba, when I say Alibaba, I will It is equivalent to proving that I have the private key, and I have everything.
Therefore, like a private key, a wallet has only one mnemonic and cannot be modified.
The mnemonic and the private key have the same function. As long as you enter a mnemonic and set a password, you can enter the wallet, and have the control of the wallet, you can transfer the coins in the wallet.
The mnemonic can only be backed up once, and it will not be displayed in the wallet after the backup. So be sure to copy it down when you back it up.
The Keystore plus password is equal to the private key. There is a function of backing up the Keystore in the wallet. Choose to back up the Keystore, enter the password, and a large piece of code will appear. This is the Keystore. When entering the wallet, you only need to enter the Keystore and password to enter the wallet. This is different from importing a wallet with a private key or a mnemonic. The latter two do not need to know the original password but directly reset the password.
Keystore can be understood as the encrypted private key, which is related to the password of the wallet. After the password of the wallet is modified, the Keystore also changes accordingly. It should be noted that when using Keystore to import the wallet, you need to enter this password. This password is the password when backing up the Keystore wallet and has nothing to do with whether the password is changed later.
How to understand Keystore?
As I said just now, the mnemonic is equal to the private key. Before you can control the wallet, you can control everything in the bank.
As an example just now, if Alibaba is the mnemonic, then the owner thinks it is too simple and too easy to leak. So I thought of a safe way to add a password. For example, my password is set to (Keystore) "Alimama", it is useless to have this password, I will add another password. With Alimama and the password, I have the mnemonic or private key.
Let’s talk about the advantages and disadvantages of wallets:
In the real world, if your bank card is lost and the password is forgotten, you can go to the bank to retrieve it for you. Your money is still your money, you can't lose it. This is the advantage of centralization.
But in the blockchain world, if the wallet information is lost, no one can help you retrieve it. It's akin to losing and forgetting your bank's ownership information and safe passwords, etc. The bank is always there, but the money in it will never be yours.
However, as long as you protect the wallet information, the assets in the wallet only belong to you, and no one can take it away. This is the advantage of decentralization.
What is a cryptocurrency wallet?
Simply put, a cryptocurrency wallet is a tool you use to interact with the Blockchain. Existing cryptocurrency wallets can be divided into three types: software wallets, hardware wallets, and paper wallets. According to the working mechanism, they can be divided into hot wallets or cold wallets.
Most crypto wallets on the market are software-based software wallets, which makes them easier to use than hardware wallets. However, hardware wallets are more secure than other types. On the other hand, paper wallets, which have "wallets" printed on a piece of paper, are now outdated and unreliable.
How do cryptocurrency wallets work?
Contrary to popular belief, cryptocurrency wallets do not actually store cryptocurrencies. Instead, they provide the tools needed to interact with the blockchain. In other words, these wallets can generate the necessary information to complete the transaction of sending and receiving cryptocurrency (via the blockchain). In addition, such information includes one or more pairs of public and private keys.
At the same time, the cryptocurrency wallet also includes a public address generated based on the public and private keys, which is a set of alphanumeric identifiers. This address essentially represents a specific "location" on the Blockchain that can then be used to receive cryptocurrency. This means that you can share this public address with others to receive funds, but don't let anyone reveal your private key.
The private key will provide access to the cryptocurrency within your wallet. Therefore, even if there is a security threat to your computer or smartphone, you can still access your funds through the corresponding private key (or the corresponding mnemonic). Also keep in mind that coins never actually leave the Blockchain, they just move from one address to another.
Hot wallet vs cold wallet
As mentioned earlier, cryptocurrency wallets can also be classified as "hot wallets" or "cold wallets" by the way they operate.
A hot wallet refers to a wallet that is connected to the network in any way. For example, when you create an account on Binance and send funds to your wallet, you are using Binance's hot wallet. These wallets are easy to create and funds can be accessed quickly, which is convenient for traders and other regulars.
Cold wallets, on the other hand, have no connection to the Internet. Instead, they use a physical medium for offline storage of keys, which also makes them resistant to online hacking. Therefore, cold wallets are more secure in terms of holding coins. This way of working is also known as cold storage and is more suitable for long-term investors or HODLers.
Binance also only stores a fraction of its currency in its hot wallet. Most of the rest is stored in cold wallets with no internet connection. Notably, Binance DEX offers an alternative for users who are reluctant to deposit their funds on a centralized exchange. It is a decentralized trading platform and gives users absolute control of private keys, while also allowing users to directly trade funds in their cold wallet devices (hardware wallets).
Software wallet
There are many types of software wallets, and each type has its own unique characteristics. Most of them are connected to the internet in some way (hot wallets). Described below are some of the most common and important types of wallets: web wallets, desktop wallets, and mobile wallets.
Web wallet
With a web wallet, you can access the blockchain through a browser interface without downloading or installing any software. Includes access to exchange wallets and other browser-based wallet providers.
In most cases, you can create a new wallet and set a password to access it. However, some service providers may hold and keep private keys on behalf of customers. Although this approach may be more convenient for inexperienced users, there are certain risks involved. If you cannot hold your private key, it means that you are entrusting your funds to someone else. To solve this problem, many web wallets now allow users to fully manage their own keys, and can also share control through multi-signature. Therefore, before choosing the wallet that is best for you, you should examine the technical way your wallet operates.
At the same time when using a cryptocurrency exchange, you should also use the available protection tools. Binance Exchange offers a variety of security measures, such as device management, multi-factor authentication, anti-phishing codes, and withdrawal address management.
Desktop wallet
As the name suggests, a desktop wallet is software that you download and run on your computer. Unlike some web wallets, desktop wallets give you full control over your keys and funds. When you create a new desktop wallet, a file called "wallet.dat" is stored on your local computer. This file contains private key information for accessing the cryptocurrency, so you can encrypt it with your personal password.
If you encrypt your desktop wallet, the software needs to provide the password every time it runs, and only then can the wallet.dat file be read. If you lose this file or forget your password, you will most likely lose access to your funds.
Therefore, it is crucial to backup the wallet.dat file and save it in a safe place. Alternatively, you can export the relevant private key or mnemonic. This way, you can access your funds on other devices, in case your computer doesn't work or is inaccessible for some reason.
In general, desktop wallets may be more secure than web wallets, but the premise is that before creating and using a desktop wallet, you should make sure that your computer is free of viruses and malware.
Mobile wallet
Mobile wallets function more like their desktop counterparts, apps designed for mobile phones only. These wallets are very convenient, they allow you to send and receive funds by using QR codes.
As a result, mobile wallets are more versatile for everyday transactions and payments, and make real-life consumption of Bitcoin, BNB, and other cryptocurrencies more feasible. Trust Wallet is a very typical example of a mobile crypto wallet.
However, like computers, mobile devices are also vulnerable to malicious applications and malware. Therefore, it is recommended that you encrypt your mobile wallet with a password and backup your private key (or mnemonic) in case your smartphone is lost or damaged.
Hardware wallet
A hardware wallet is a physical electronic device that uses a random generator to generate public and private keys. The key is then stored on the device itself, which is not connected to the Internet. Therefore, hardware storage constitutes a kind of cold wallet and is considered to be the safest option.
While the wallet provides a higher level of security against online attacks, it can also be risky if the firmware is not properly installed. Also, the user satisfaction of hardware wallets is not high, and access to funds becomes less convenient compared to hot wallets.
And to address the lack of accessibility, you can use Binance DEX to connect your device directly to the trading platform. This is a safe way to access funds because the private key never leaves the device. At the same time, some web wallet service providers are starting to offer similar services, allowing hardware wallets to be linked to their browser interfaces.
Hardware wallets should be considered when you plan to hold cryptocurrencies for a long period of time or plan to hold large amounts of cryptocurrencies. Currently, most hardware wallets allow you to set a PIN code to protect your device, as well as a mnemonic phrase to use in the event of a lost wallet.
Paper wallet
In essence, a paper wallet is to physically print the public address and its private key on a piece of paper in the form of a QR code. Cryptocurrency transactions can then be made by scanning these QR codes. Some paper wallet sites allow you to download their code to generate new addresses and keys offline. Therefore, these wallets are highly resistant to online hacking and are considered as an alternative to cold wallets.
However, due to the many flaws therein, the use of paper wallets is considered dangerous and should be stopped. If you still want to use this wallet, it is necessary to first understand the risks involved. A major drawback of paper wallets is that they are not suitable for sending partial funds, only the entire balance at once.
Let's say you create a paper wallet and deposit 10BTC into it through multiple transactions. If you decide to spend 2 BTC of it, you should first send that 10 BTC to another type of wallet (such as a desktop wallet), and then use that wallet to spend part of it (ie, 2 BTC). You can then return the remaining 8 BTC to a new paper wallet, and for this process it is clear that a hardware or software wallet would be the better choice.
Technically, if you import your paper wallet's private key into your desktop wallet and spend some of the funds, the rest of the funds will then be sent to an "update address" that is automatically generated by the Bitcoin protocol. If you do not manually set up this new update address, the remaining funds are likely to be lost.
Most software wallets today will handle this for you, and they will send the remaining funds to an address belonging to your wallet. Also keep in mind that after your paper wallet has made a send transaction (regardless of the amount), its account balance will go to zero. So don't expect to use that paper wallet again.
The importance of backup
Loss of access to cryptocurrency wallets can be "highly valuable." So regular backups become critical. In many cases, this can be achieved by making a backup of the wallet.dat file or mnemonic phrase. In general, mnemonics have a very similar function to private keys, but they are easier to manage. If you used a password for encryption, remember to make a backup of your password too。
In conclusion
Crypto wallets are an integral part of using Bitcoin and other cryptocurrencies. are the most fundamental parts of cryptographic infrastructure, as they make it possible to send and receive funds over the blockchain. Each wallet type also has its own unique advantages and disadvantages, so it is crucial to understand how it works before transferring funds.
Introduction and comparison of common digital wallets
Glossary:
The full node wallet, the representative of the full node is the bitcoin-core core wallet, which needs to synchronize all blockchain data and takes up a lot of memory, but can be completely decentralized.
Light wallets, relying on other nodes on the Bitcoin network, only synchronize data related to themselves, and can basically achieve decentralization.
The centralized wallet does not rely on the Bitcoin network. All data is obtained from its own centralized server, but the transaction efficiency is very high and can be received in real time.
Multi-signature technology refers to the simultaneous signing of a digital asset by multiple users. Multi-private key verification to improve the security of digital assets.
Last updated