We all know that Bitcoin is a cryptocurrency that uses cryptography to invest. Then, what kind of operation does Bitcoin use to ensure the confidentiality of the transaction? What is the cryptographic principle of Bitcoin? Bitcoin The wallet includes a private key and a public key. Simply put, the private key is like our own

We all know that Bitcoin is a cryptocurrency that uses cryptography to invest. So, what kind of operation does Bitcoin use to ensure confidentiality in the transaction process? What is the cryptographic principle of Bitcoin?

Bitcoin wallet includes a private key and a public key. In simple terms, the private key is like our own bank account password. Only through this password can we open our account to transfer funds, and the public key is our account. We send the account number to someone else before they can transfer to us. The single conversion of the private key and the public key ensures the privacy of the source of the transfer. What is single conversion? It means that only private keys can be converted into public keys, and public keys cannot be converted back into private keys. The private key is a string of randomly selected numbers that are transformed into another string of numbers, which is the public key, through elliptic curve multiplication. Then, through a one-way cryptographic hash function (one-way cryptographic hash function), the bitcoin address is obtained. In these two operations, because they are not corresponding equations, that is to say, the input value (input) will only have one corresponding output value (output), but the output value will have multiple corresponding input values, so no one can By tracing the private key in the opposite direction of the public key, the security of the private key is ensured.

Blockchain

To make it easier for everyone to understand, let me give you an example: in a winter with heavy snow, Xiao Ming walked from Jilin to deliver food to Dalian, but the snow was too big, so he could walk on the snow without a trace. Therefore, when Xiao Ming walked to Dalian, the locals asked him: "Where did your takeaway come from?" Xiao Ming smiled slightly and refused to answer. At this time, Dalian people had nothing to do, because they couldn't tell where Xiao Ming came from from the footsteps, only Xiao Ming knew that he came from Jilin.

Finding a random number is the first and most important step in generating the "key". So, how does the blockchain make this randomly generated number not coincide with another number? It turns out that there are 2^256 (n=1.158*10^77 to be precise) in the Bitcoin system. Number, how big is this number? It's bigger than the sum of all the atoms in the universe. Based on this, there is very little chance that this randomly generated number will overlap with another randomly generated number.

After choosing this random number, we need to generate the public key through elliptic curve operations. Its representative formula is: K=k*G. The big K is the public key, the small k is the private key, and G is a constant, which we call the generating constant.

The above picture is the elliptic curve of Bitcoin. This special curve is called the secp256k1 curve. It contains an equation like this: y^2 = x^3 + 7 in the domain of p of the finite set. And p is a very large prime number close to 2^256. But because this equation is defined in a finite number, in fact, this curve is not smooth, but is composed of many densely packed dots, although we can understand that this curve is smooth and has the property of being in the real number set.

Next, we need to find G in this function equation, and through mathematical calculations, enlarge G by a factor of k to obtain a large K. The mathematical calculation of this step is quite complicated and cannot be reversed.

Bitcoin address can be understood as the payment address in the transaction. After obtaining the public key, we need to obtain the address through a one-way hash password equation. This equation can usually be understood as A=RIPEMD160(SHA256(K)). These are actually two equations. First substitute the public key into the secure hash algorithm, SHA256, and then into the integrity primitive evaluation message digest (RIPEMD160). In order to avoid some confusion of numbers and letters, such as 1 and I, 0 and o, the Bitcoin address uses only 58 characters. This usage is called Base58Check.

In this way, through layers of encryption, our private key finally evolved into a Bitcoin address, and the payer can finally transfer money through this address.

Bitcoin theory is supported by cryptography, and has built a complete, secure, and decentralized digital currency system, which solves the problem of digital asset ownership, double payment, and real-world inflation. It even reserves a mechanism to build in Smart contracts on asset transfer become possible. Bitcoin is of course a great creation, and I look forward to a better future for Bitcoin.

Disclaimer : The above empty space does not represent the position of this platform. If the content of the article is not logical or has irregularities, please submit feedback and we will delete or correct it, thank you!

Top News