Position: Home page » Bitcoin » Public key verification bitcoin address

Public key verification bitcoin address

Publish: 2021-04-04 11:32:08
1. In order to understand the technical principle of bitcoin, we need to understand two important cryptographic techniques: hash code: it converts a long string into a fixed length string, and its conversion is irreversible, that is, it is impossible to guess the original string from hash code. Sha256 is mainly used in bitcoin protocol
public key system: corresponds to a public key and a private key, keeps the private key in the application and publishes the public key. When Party A transmits information to Party B, it can use Party A's private key to encrypt the information, and Party B can use Party A's public key to decrypt the information, so as to ensure that the third party cannot impersonate Party A to send the information; At the same time, when Party A transmits information to Party B, it is encrypted with Party B's public key and sent to Party B, and then Party B decrypts it with his own private key, so as to ensure that the third party cannot eavesdrop on the communication between the two people. RSA is the most common public key system, but the lliptic curve digital signature algorithm is used in bitcoin protocol. What's the difference between cash and bank account? Bitcoin is an electronic currency in BTC. In this article, it is also used to refer to the whole bitcoin system. Like opening an account in a bank, the corresponding concept in bitcoin is address. Everyone can have one or more bitcoin addresses, which are used to pay and collect money. Each address is a string that starts with 1. For example, I have two bitcoin accounts, and. A bitcoin account is uniquely determined by a pair of public key and private key. To save the account, you only need to save the private key file. Unlike bank accounts, banks keep all transaction records and maintain the book balance of each account, while bitcoin's transaction records are jointly maintained by the whole P2P network through a pre agreed protocol. How much money is in my account address? Although the current account balance can be seen by bitcoin software, unlike banks, there is no place to maintain the book balance of each address. It can only calculate the account balance in real time through all historical transactions. How do I pay? When I pay from address a to address B of the other party, the payment amount is e. at this time, both parties will announce the transaction information to each network node, telling address a to pay to address B, and the payment amount is e. In order to prevent the third party from forging the transaction information, the transaction information will be encrypted with the private key of address A. at this time, the network node receiving the transaction information can use the public key of address a to verify that the transaction information is indeed sent by address a. Of course, trading software will help us do these things, we just need to input the relevant parameters in the software. What will the network node do after receiving the transaction information? This is the most important part of the bitcoin system, which needs to be elaborated. For the sake of simplicity, only bitcoin protocol has been implemented. In the current version, each network node will save all transaction information synchronously. There are two kinds of transaction information in history, one is & quot; Verified & quot; The transaction information, that is, the verified transaction information, is stored in a series of "blocks". Each & quot; block" Is the previous & quot; bock" The ID of each block is the hash code of the hash code of the block and the new transaction information (see an actual block). The other category refers to those who also & quot; Unverified & quot; The transaction information just paid above belongs to this category. When a network node receives new unverified transaction information (possibly more than one), it can calculate the book balance of each address at that time because the node keeps all the transaction information in history, so it can calculate whether the transaction information is valid, that is, whether there is enough balance in the payment account. After eliminating the invalid transaction information, it first takes out the last & quot; block" Then, the unverified transaction information is combined with the ID, and a verification code is added to form a new "block". It needs a lot of calculation to build a new block, because it needs to calculate the verification code, so that the above combination becomes a block, that is, the first several bits of the hash code of the block are 1. At present, the first 13 bits need to be 1 (generally, the specific method is uncertain), which means that if the block is generated by enumeration method, the average number of enumerations is 16 ^ 13. Using CPU resources to generate a block is called "gold mining", because the proction of the block will get a certain reward, and the reward information has been included in the block. When a network node generates a new block, it will broadcast to other network nodes. However, this network block may not be accepted by the network, because it is possible that other network nodes have proced the block earlier. Only the earliest block or the block with the largest number of subsequent blocks is valid, and the remaining blocks are no longer used as the initial blocks of the next block. How does the other party confirm that the payment is successful? When the payment information is distributed to the network node, the network node begins to calculate whether the transaction is valid (that is, whether the account balance is enough to pay), and attempts to generate blocks containing the transaction information. When six blocks (one direct block and five subsequent blocks) contain the transaction information, the transaction information is considered "verified", so that the transaction is formally confirmed, and the other party can confirm the successful payment. A possible problem is that I will pay the balance of address a to address B, and at the same time pay to address C. If I only verify that the single comparison transaction is valid. At this point, my way of cheating is to generate six blocks including B to B and six blocks including C to C before the truth is revealed. Because I need a very long CPU time to generate a block, compared with the whole network, the probability of my cheating success is very small. What is the motivation of network nodes to proce blocks? As can be seen from the above description, in order to make the transaction information effective, the network node needs to generate 1 and 5 subsequent blocks to contain the transaction information, and such block generation is very CPU intensive. How to let other network nodes help to proce blocks as soon as possible? The answer is very simple. The agreement stipulates that BTC will be rewarded for the address where the block is proced, as well as the Commission promised by both parties. At present, the reward for procing a block is 50btc, which will be halved every four years in the future. For example, the reward will be 25btc from 2013 to 2016. Is the transaction anonymous? Yes, and No. All bitcoin transactions are visible. We can check all transaction records of each account, such as mine. But what's different from the banking monetary system is that everyone's account itself is anonymous, and everyone can open many accounts. In general, anonymity is not as good as it claims. But bitcoin has another advantage in doing black market trading: it can't be frozen. Even if the police trace a bitcoin address, there is nothing they can do unless they trace the computer used by the exchange based on the Internet address. How to ensure that bitcoin does not depreciate? Generally speaking, in the case of equivalent trading activities, the value of money is inversely proportional to the amount of money issued. Unlike the traditional money market, the central bank can determine the amount of money issued. Bitcoin does not have a central issuing institution. Only by procing blocks can we get a certain amount of BTC currency. Therefore, bitcoin's new amount of money depends on: 1. The speed of procing blocks: bitcoin's agreement stipulates that the difficulty of procing blocks is fixed at an average of 2016 every two weeks, about 10 minutes. Moore's law of doubling CPU speed every 18 months will not speed up the proction of block. 2. The number of rewards for block proction: at present, 50 BTC is awarded for each block proced, which is halved every four years. In 2013, 25 BTC is awarded, and in 2017, 12.5 BTC is awarded. Considering the above two factors, bitcoin's currency issuing speed is not controlled by any single node in the network. Its protocol makes the currency stock known in advance, and the maximum stock is only 21 million BTC
2. I'll give you my address (address). You can find my zip code (public key). You can write to me with my zip code (public key) + address. The mail will be sent to my mail cabinet. I'll open the mail cabinet (private key) with the key I have. The key of express cabinet is stored in my wallet (wallet)
1. The mail cabinet is stolen (the database is stolen)
2. The key is stolen (the private key is stolen)
3. Knowing my home address (the public key is stolen), the lock of the mail cabinet is opened violently (the private key is cracked violently).
3. Number of what, you can use the length of direct judgment, keywords can be compared with regular. Bitcoin verification should have a formula. You can find the formula, put the string in for calculation, and see if it conforms to the rules
4. Bitcoin uses elliptic curve algorithm to generate public key and private key, and chooses secp256k1 curve. The generated public key is a 33 byte large number, and the private key is a 32 byte large number. The wallet file wallet.dat directly stores the public key and private key. The bitcoin address we use when receiving and sending bitcoin is obtained after the public key is processed by the algorithm. The specific process is that the public key is first processed by SHA-256 algorithm to get 32 byte hash result, then processed by ripemed algorithm to get 20 byte summary result, and then the address we see is obtained through the character conversion process. This character conversion process is the same as that of the private key. The steps are as follows: first, add the version number to the input content (the summary result of 20 bytes for the public key and the large number of 32 bytes for the private key). After two successive SHA-256 algorithms, take the first 4 bytes of the hash result of the last time as the check code and attach it to the back of the input content, and then encode it with base58, Get the string. Qiaoman special zone blockchain professional station chain Qiaoyu online is a blockchain professional training workstation engaged in blockchain related training and certified by the Ministry of ecation.
5.

First of all, you should imagine a concept of "wallet" in your brain. Your bitcoin is in your wallet. A wallet can contain many... Many addresses. The form of the address is the form

with the bitcoin address generated in the bitcoin wallet, you can receive bitcoin from others, and you can also transfer the bitcoin in your account to the bitcoin address of others. Bitcoin address, like bank card number, has the functions of payment, transfer and withdrawal. However, when transferring money, you can only transfer money by knowing someone else's bitcoin address

if we simply compare a bitcoin wallet to a bank card account, then the address of the bitcoin wallet can be regarded as a bank card account number. The difference is that bitcoin addresses can not be stored on the network, but also exist independently of your wallet

< H2 > extended data:

bitcoin address is a string of 26 to 34 letters and numbers. It looks like a lot of messy code. To put it bluntly, it's just like your bank card number. All transfer records of each bitcoin address can be checked through blockchain query, which is open and transparent

address generation of bitcoin Wallet: 256 binary digits are randomly selected to form the private key, and then the address is generated by encryption function. This generation direction is unidirectional. That is, you know that the address cannot be decrypted to calculate the private key. At present, the computing power of human computer can't be cracked, so you can publish the address on the Internet with ease

reference link: bitcoin | network

6. The process of BTC address generation is as follows. You can check bitcoin Chinese wiki completely:
bitcoin address generation process

(Note: some numbers are marked with & quot; 0x" Begin with, meaning that the number is in hexadecimal notation& quot; 0x" It doesn't have any meaning in itself. It's a conventional writing method handed down from C language. For example, 0xa is 10 in decimal system. In addition, 1 byte = 8-bit binary = 2-bit hexadecimal)

in the first step, randomly select a 32 byte number and size from 1 to 0xFFFF ffff ffff ffff ffff ffff ffff fffe baae dce6 af48 a03b BFD2 5e8c d036 4141 as the private key


in the second step, the elliptic curve encryption algorithm (ecdsa-secp256k1) is used to calculate the uncompressed public key corresponding to the private key A total of 65 bytes, 1 byte is 0x04, 32 bytes are x coordinates, and 32 bytes are y coordinates




the third step is to calculate the SHA-256 hash value of the public key


the fourth step is to take the previous step result and calculate the ripemd-160 hash value


the fifth step is to take the previous step result and add the address version number (bitcoin main network version number "0x00")
00

the sixth step is to take the previous step result, Calculate the SHA-256 hash value


Step 7, take the result of the previous step, and then calculate the SHA-256 hash value (HA HA)


Step 8, take the first four bytes (8-bit hexadecimal)
d61967f6

Step 9 of the result of the previous step, and add these four bytes after the result of step 5, As a check (this is the hexadecimal form of the bitcoin address)
00d61967f6

Step 10: change the address with base58 notation (this is the most common form of bitcoin address)< br />
7. Applications that support bitcoin protocol can correctly convert this string into the private key of bitcoin, and then convert the public key to get an address. If there is a corresponding bitcoin on the address, you can use the private key to spend the above bitcoin.
8. I'll give you my address (address). You can find my zip code (public key). You can write to me with my zip code (public key) + address. The mail will be sent to my mail cabinet. I'll open the mail cabinet (private key) with the key I have
1. The mail cabinet is stolen (the database is stolen)
2. The key is stolen (the private key is stolen)
3. Knowing my home address (the public key is stolen), the mail cabinet lock is opened violently (the private key is cracked violently).
9. Truth of bitcoin:
1. Who benefits the most from researching and hyping bitcoin
2. In essence, it's USA's Intel, NVIDIA, amd + ATI
3. Bitcoin requires a huge amount of CPU, GPU, memory, motherboard, power supply, wire and venue
4. Since the speculation of bitcoin, the sales of CPU, GPU, memory, motherboard, power supply and wire are the highest
5. It's the CPU and GPU instry of USA that really make a big profit, while the retail and service of other countries are just middlemen making a difference
6. The plan to hype bitcoin: it boosts the high-end, core and basic chip instry capacity of USA. other countries are compradors
7. Harm: lose the ability to develop domestic high-end, core and basic chips, and become a retailer that can only sell chips for USA.
10.

12 pm to Kunming Changshui airport, there is a bus to the city

there are also two airport bus operations at 12 am. Airport Line 1 and airport line 2. Changshui airport is about 25 kilometers away from the urban area. You don't need to take a taxi. Therefore, you can take the airport express, bus and light rail (the light rail lines are less open, and the places you arrive are a little biased)

if you are taking a flight to Changshui airport, it is recommended to leave three hours in advance, so as not to delay. Kunming Rail Transit Line 6 is an auxiliary line connecting the main city and the new airport. The ticket price is 5 yuan, and the operation time is 9:00-18:00

extended information:

the introction of Kunming Changshui airport to the urban area is as follows:

903 Road: East Station - Changhong intersection - Dabanqiao town - Dabanqiao horticultural farm - drug treatment center - women's prison - South working area of Changshui International Airport - Kunming Changshui International Airport. Bus 903 can't reach the terminal building. After getting off the bus, you need to walk 3.4km to get to the terminal building

friendly tips: bus 903 can't reach the terminal, so you need to walk 3.4km to get to the terminal after getting off the bus. The cost of taking a taxi from Changshui airport to downtown Kunming (Nanping Road Pedestrian Street) is about 70 yuan, but the airport expressway toll needs to be borne by passengers The total amount of toll is 20 yuan

Hot content
Inn digger Publish: 2021-05-29 20:04:36 Views: 341
Purchase of virtual currency in trust contract dispute Publish: 2021-05-29 20:04:33 Views: 942
Blockchain trust machine Publish: 2021-05-29 20:04:26 Views: 720
Brief introduction of ant mine Publish: 2021-05-29 20:04:25 Views: 848
Will digital currency open in November Publish: 2021-05-29 19:56:16 Views: 861
Global digital currency asset exchange Publish: 2021-05-29 19:54:29 Views: 603
Mining chip machine S11 Publish: 2021-05-29 19:54:26 Views: 945
Ethereum algorithm Sha3 Publish: 2021-05-29 19:52:40 Views: 643
Talking about blockchain is not reliable Publish: 2021-05-29 19:52:26 Views: 754
Mining machine node query Publish: 2021-05-29 19:36:37 Views: 750