Start with bitcoin
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
When bitcoin first appeared in 2009, its price was less than 1 cent. One dollar could be converted into 1300 bitcoins, that is to say, seven yuan could be converted into 1300 bitcoins
on May 5, 2017, bitfinex, an overseas digital currency trading platform, quoted a price. Bitcoin once hit US $1700, about RMB 11737
extended information:
in China, some Taobao stores have also begun to accept the use of bitcoin, and businesses will graally increase
in October 2013, the first bitcoin quarterly, one bit, was released
on October 15, 2013, the network accelerator service of the network announced its support for bitcoin
on October 26, 2013, btcmini reported that GBL was hacked
on October 31, 2013, Lei Teng, a famous Internet lawyer, proposed the event of "filing a case to investigate the closure of GBL bitcoin trading platform as soon as possible", analyzed the "value function" and "use function" of bitcoin, and bitcoin should be governed by relevant laws
on December 5, 2013, notice of the Ministry of instry and information technology of the people's Bank of China, China Banking Regulatory Commission, China Securities Regulatory Commission and China Insurance Regulatory Commission on preventing bitcoin risk: bitcoin is a specific virtual commodity; Bitcoin trading is a kind of commodity trading on the Internet. Ordinary people have the freedom to participate in it at their own risk
on September 4, 2017, the announcement of the people's Bank of China Central Network Information Office, Ministry of instry and information technology, State Administration for Instry and commerce, China Banking Regulatory Commission, China Securities Regulatory Commission and China Insurance Regulatory Commission on preventing the risk of token issuance financing: it is prohibited to engage in token issuance financing activities (ICO)
the trading platform shall not engage in the exchange business between legal tender and token, or virtual currency, or buy or sell token or virtual currency as a central counter party, or provide pricing, information intermediary and other services for token or virtual currency
on November 2, 2018, the people's Bank of China released the 12th topic of China financial stability report 2018, which talked about "encrypted assets"
You can't dig in a day. It takes 2000 years
the global unified computing difficulty of bitcoin is 2621404453 (expected to change in two days). It takes more than 2000 years for a 2.5GHz CPU to work out a bitcoin
in order to make the graphics card fully loaded for a long time, the power consumption will be quite high, and the electricity bill will be higher and higher. Many professional mines at home and abroad are operated in areas with extremely low electricity charges, such as hydropower stations, while more users can only mine at home or in ordinary mines, so the electricity charges are not cheap. Even in a certain residential area in Yunnan, there was a case of crazy mining, which led to a large area trip of the residential area, and the transformer was burned
extended data:
bitcoin network generates new bitcoin through "mining". In essence, the so-called "mining" is to use computers to solve a complex mathematical problem to ensure the consistency of bitcoin network distributed accounting system
bitcoin network will automatically adjust the difficulty of mathematical problems, so that the whole network can get a qualified answer about every 10 minutes. Then bitcoin network will generate a certain amount of bitcoin as block reward to reward the person who gets the answer
when bitcoin was born in 2009, block rewards were 50 bitcoins. Ten minutes after its birth, the first 50 bitcoins were generated, and the total amount of money at this time is 50. Then bitcoin grew at a rate of about 50 every 10 minutes. When the total amount reaches 10.5 million (50% of 21 million), the block reward will be halved to 25
when the total amount reaches 15.75 million (5.25 million new output, i.e. 50% of 1050), the block reward will be further halved to 12.5. The monetary system used to have no more than 10.5 million in four years, after which the total number will be permanently limited to about 21 million
a block is a record in the block chain, which contains and confirms the transactions to be processed. On average, a new block containing transactions is added to the block chain by mining every 10 minutes
more can be found on bitcoin home.
secondly, however, there is a smaller threshold for the total number of "smart": the largest possible integer that can be represented in floating-point format. Integers are not the only numbers that computers can store; To deal with decimals, computers & gt; Use a format for floating point representation. Floating point notation is essentially a binary version of scientific notation. For example, here is a value you will encounter when you study physics:
mass of the earth: 5.972 1024 kg
mass of the sun: 1.989 1030 kg
speed of light: 2.998 108 M / s
light year: 9.460 1015 m
mass of proton: 1.672 10-27 kg
Planck length: 1.616 10-35 m
we can notice that, How does scientific notation allow you to represent all of these values with reasonable accuracy, even though they vary greatly in size. Floating point notation is essentially a binary scientific notation; When you store numbers & gt; When the word is 9.625, what your computer stores is "1.001101
* 1011" (in other words, it stores 0100000000100011
& gt; This is the same thing with high-precision sequence form). In this high-precision form, the coefficient (that is, the part that is not the exponent) has 52 bits. This means high precision (more refined & gt; Double precision floating point number is enough to store up to 253 numbers, but it can't be any higher. If it exceeds 253, you have to start cutting off the numbers at the end. Bitcoin's 250.9, the total number of "smart" in the form of index, is just & gt; OK, below this maximum
if we have integers, why should we care about floating-point values? Because more high-level programming languages (such as JavaScript) do not open low-level "floating point" and "integer representation", but only provide "number" representation for programmers; Concepts
– of course, in floating-point form. If Nakamoto chose 210 million instead of 21 million at that time, bitcoin programming in many languages would be much more troublesome than it is now
note that Stefan Thomas unfortunately didn't notice this in time when he wrote bitcoinjs, so that the library used a special "big number big
number" object instead of an ordinary number to store the tutorial output value; My own bifurcated bitcoin JS (along with other improvements) uses ordinary numbers.
bitcoin mining is a distributed consensus system that includes the transaction data to be confirmed into the block chain to complete the confirmation of these transactions. By mining, the data in the block chain can be stored in chronological order, the neutrality of bitcoin network can be maintained, and different computers on the bitcoin network are allowed to agree on the system state. To be confirmed, a transaction must be packaged into a block that complies with very strict cryptographic rules and verified through bitcoin network. These rules can prevent the modification of existing blocks, because once there is a change, all blocks will be invalid. Mining is as difficult as winning the lottery. No one can easily and continuously add new blocks to the block chain. Therefore, no one can control what content is included in the block chain or replace part of the content in the block chain to rece their cost. At present, bitcoin mining needs a professional Avalon miner.
with the rise of blockchain technology, the encryption of blockchain technology can provide solutions for the protection of personal information. Blockchain technology can store personal information in a distributed way to avoid the security risks faced by a single server
as one of the most ice breakers in the research of blockchain technology, Renren chain has concted in-depth research and application of blockchain technology. The big data service based on blockchain of Renren chain can eliminate illegal data reselling and reestablish data circulation rules from four aspects of data storage, data analysis, data tracking and data security. thank you
