How to broadcast blockchain to the whole network
One of the characteristics of blockchain projects (especially public chains) is open source. Through open source code, to improve the credibility of the project, so that more people can participate. But the open source code also makes it easier for attackers to attack blockchain system. In the past two years, there have been a number of hacker attacks. Recently, the anonymous currency verge (xvg) was attacked again. The attacker locked a vulnerability in the xvg code, which allowed malicious miners to add false timestamps on the block, and then quickly dig out new blocks. In a few hours, the attacker obtained nearly $1.75 million worth of digital currency. Although the subsequent attack was successfully stopped, no one can guarantee whether the attacker will attack again in the future
of course, blockchain developers can also take some measures
one is to use professional code audit services,
the other is to understand the security coding specifications and take preventive measures
the security of cryptographic algorithm
with the development of quantum computer, it will bring a major security threat to the current cryptosystem. Blockchain mainly relies on elliptic curve public key encryption algorithm to generate digital signature for secure transactions. Currently, the most commonly used ECDSA, RSA, DSA, etc. can not withstand quantum attacks in theory, and there will be greater risks. More and more researchers begin to pay attention to cryptographic algorithms that can resist quantum attacks
of course, in addition to changing the algorithm, there is another way to improve the security:
refer to bitcoin's treatment of public key address to rece the potential risk of public key disclosure. As users, especially bitcoin users, the balance after each transaction is stored in a new address to ensure that the public key of the address where bitcoin funds are stored is not leaked
security of consensus mechanism
the current consensus mechanisms include proof of work (POW), proof of stake (POS), delegated proof of stake (dpos), practical Byzantine fault tolerance (pbft), etc
POW faces 51% attack. Because POW depends on computing power, when the attacker has the advantage of computing power, the probability of finding a new block will be greater than that of other nodes. At this time, the attacker has the ability to cancel the existing transaction. It should be noted that even in this case, the attacker can only modify his own transaction, but not the transaction of other users (the attacker does not have the private key of other users)
in POS, attackers can attack successfully only when they hold more than 51% token, which is more difficult than 51% computing power in pow
in pbft, when the malicious nodes are less than 1 / 3 of the total nodes, the system is secure. Generally speaking, any consensus mechanism has its own conditions. As an attacker, we also need to consider that once the attack is successful, the value of the system will return to zero. At this time, the attacker does not get any other valuable return except destruction
for the designers of blockchain projects, they should understand the advantages and disadvantages of each consensus mechanism, so as to select an appropriate consensus mechanism or design a new consensus mechanism according to the needs of the scene
security of smart contract
smart contract has the advantages of low operation cost and low risk of human intervention, but if there are problems in the design of smart contract, it may bring greater losses. In June 2016, the Dao, the most popular funding project of Ethereum, was attacked. The hacker obtained more than 3.5 million Ethereum coins, which later led to the bifurcation of Ethereum into Eth and etc
there are two aspects of the proposed measures:
one is to audit the security of smart contract, and the other is to follow the principle of smart contract security development
the security development principles of smart contract are: to be prepared for possible errors, to ensure that the code can correctly handle the bugs and vulnerabilities; Release smart contracts carefully, do well in function test and security test, and fully consider the boundary; Keep smart contracts simple; Pay attention to the threat intelligence of blockchain and check and update in time; Be clear about the characteristics of blockchain, such as calling external contracts carefully
security of digital wallet
there are three main security risks in digital wallet: first, design defects. At the end of 2014, a user lost hundreds of digital assets e to a serious random number problem (repeated r value). Second, the digital wallet contains malicious code. Third, the loss of assets caused by the loss or damage of computers and mobile phones
there are four main countermeasures:
one is to ensure the randomness of the private key
The second is to check the hash value before installing the software to ensure that the digital wallet software has not been tampered with The third is to use cold wallet The fourth is to back up the private key1. Regularly clean the st in the computer, turn off the computer, open the chassis, use a hair dryer and blow with cold air< At ordinary times, 360 guard, Jinshan guard and other tools should be used to clean up the system garbage and temporary files generated by the Internet, and check and kill malicious
Italian software
3. The computer configuration is poor, so try to set the virtual memory as large as possible, and install anti-virus software with less resources, such as NOD32, or only one
auxiliary anti-virus software
4. Try to set the IP to static IP, which can rece the startup time of the computer
5. Don't put too many files and icons on the computer desktop, which will slow down the reaction of the computer. Try not to install the software on disk C
6. Regularly defragment the disk. Open the drive of my computer to defragment - properties - tools
select the disk to be defragmented. Open the "disk defragmenter" window - Analysis - defragmentation - the system will start to defragment
.
Two statements for reference are found from Babbitt:
-
bitcoin adopts a mathematical contest to determine the time when a transaction arrives at a node, and at the same time to protect this order. In bitcoin system, transactions are sorted by group allocation, Such groups are called blocks (transactions occurring at the same time will be divided into the same block), and then these blocks are linked together, which is called blockchain. Blockchain is used to sort transactions, while the transaction chain tracks and records the change of bitcoin ownership. These blocks are arranged according to time, which is a link. Transactions not in the block are called unconfirmed or unsorted transactions, and any node is about to put a group of unconfirmed transactions into the block, Then broadcast their suggestions about what the next block should be to other nodes in the network
If multiple people generate blocks at the same time (the probability is very small), there will be multiple choices for the next block of the current block. In order to ensure the sequence of block links, the bitcoin system requires each effective block to include the answer to a special mathematical problem, and the computer calculates the text of the whole block, In addition, random guessing based on encrypted hash can be done until an output lower than a certain value is obtained. Hash function can create a short summary from any length of text. This fixed output value is very complex. The only way to find it is random guessing, which is called mining -
when King released PPC last year, it introced checkpoint mechanism to protect against attacks in its early development. This mechanism enables it to resist 51% attacks. " Developers can control a parent node and broadcast "checkpoints" to the whole network, which allows other nodes to agree on certain blocks“ This is actually a [blockchain] continuity warning message, "he said< br />
through the blockchain, communication services can organize the operation of communication services without the mode of central enterprise. In the future, blockchain should have a real impact on real life, not just by concept and hype, but by real landing procts. What is really landing procts is procts that can meet the needs of users. If the existing centralized procts can well meet the needs of users, then the decentralized procts will not have enough substitution effect, and can not be truly implemented
the protocol layer of blockchain mainly includes four aspects: network programming, distributed algorithm, encrypted signature and data storage technology
the ability of network programming is the main factor for us to choose a programming language, because distributed algorithm is basically the implementation of business logic and can be achieved in any language. The encryption signature technology is directly and simply used, and the database technology is mainly used. Only the implementation of point-to-point network and concurrent processing is the difficulty of development. Therefore, for those languages with strong network programming ability and simple concurrency processing, people especially prefer them
users get the initial number of tokens for free. Some of its practical use scenarios:
1. Encrypted video chat: multinational users want to have video chat, only when both sides hold a certain number of SKM can they achieve encrypted video chat
2. Large capacity file encrypted transmission: the file transmitted by one user to another user exceeds the size limit, and the sender must hold a certain token to realize encrypted transmission
3. Conversation information saving: conversation records can be saved as long as both parties agree, and both parties need to hold a certain amount of tokens
4. Retransmission reminder: if a user sends a file to another user, but he doesn't want the other user to share it, the user can use a certain token to be notified when the file is retransmitted
5. Secret key unlock file: one user transfers the secret key file to another, and only the other party is allowed to view it. The sending user can use the token to let the other party receive the fragmented file. Only by getting the secret key from the sender can the file be unlocked<
the Xueshuo innovation blockchain Technology Workstation of Lianqiao ecation online is the only approved "blockchain Technology Specialty" pilot workstation of "smart learning workshop 2020 Xueshuo innovation workstation" launched by the school planning, construction and development center of the Ministry of ecation of China. Based on providing diversified growth paths for students, the professional station promotes the reform of the training mode of the combination of professional degree research, proction, learning and research, and constructs the applied and compound talent training system.