Blockchain symmetric encryption technology
bitcoin, Ruitai coin, Laite coin, Ethereum and other digital cryptocurrencies all use blockchain technology
blockchain is an important concept of bitcoin, which is essentially a decentralized database and the underlying technology of bitcoin. Blockchain is a series of data blocks generated by cryptography. Each data block contains the information of a bitcoin network transaction, which is used to verify the validity of the information (anti-counterfeiting) and generate the next block.
From the perspective of technology and architecture, I will tell you my understanding of blockchain in common language
what is blockchain? In a word, blockchain is a storage system. To be more specific, blockchain is a distributed storage system without an administrator and each node has all the data
What are the common storage systems like
first, how to ensure high availability
the common storage system usually uses "rendancy" to solve the problem of high availability. As shown in the figure above, if the data can be copied into several copies and rendant to multiple places, high availability can be guaranteed. The data in one place is hung, and there is data in other places. For example, the master-slave cluster of MySQL is the same principle, and the raid of disk is also the same principle
two points need to be emphasized in this place are: data rendancy often leads to consistency problems
1. For example, in the master-slave cluster of MySQL, there is actually a delay in reading and writing, which means there is a inconsistency in reading and writing in a short period of time. This is a side effect of data rendancy
The second point is that data rendancy often reces the efficiency of writing, because data synchronization also consumes resources. If you add two slave libraries, the write efficiency will be affected. The common storage system is to use rendancy to ensure the high availability of dataso the second question, ordinary storage system, can write more
the answer is yes, for example, take this graph as an example:
in fact, MySQL can do a master-slave synchronization of al masters, master-slave synchronization of al masters, two nodes can be written at the same time. If you want to do a multi room multi live data center, in fact, multi room multi live data synchronization. What we should emphasize here is that multi-point writing often leads to the consistency problem of writing conflicts. Take MySQL as an example, suppose that the attribute of a table is self incrementing ID, then the data in the database is 1234 now. If one of the nodes writes and inserts a piece of data, it may become 5, and then these 5 pieces of data are synchronized to another master node, Before synchronization, if another write node inserts a piece of data, a piece of data with self incrementing ID of 5 will be generated. Then, after the generation, synchronize to another node, and the synchronized data will conflict with the two local 5's after it arrives, which will lead to synchronization failure and write consistency conflict. This problem will occur in the case of multi-point writing
how to ensure consistency in multi-point writing
the reform "Swan class" gives you more technical work
1-contains a distributed database
2-distributed database is the physical carrier of blockchain, blockchain is the logical carrier of transaction, all core nodes should contain full copies of the blockchain data
3-blockchain serializes blocks according to time, And blockchain is the only body of the whole network transaction data
4-blockchain is only effective for addition, but not for other operations
5-public and private key verification based on asymmetric encryption
6-accounting node requires that Byzantine general problem can be solved / avoided
7-consensus progress is evolutionarily stable, That is, in the face of a certain amount of contradictions between different nodes, the data will not collapse
8-consensus process can solve the problem of double spending
in symmetric encryption (or single key encryption), only one key is used to encrypt and decrypt information. Although single key encryption is a simple process, both sides must trust each other completely and hold the backup of this key. But reaching this level of trust is not as easy as you think. When both sides try to build a trust relationship, a security breach may have happened. First of all, the key transmission is an important problem. If it is intercepted, then there is no security for the key and related important information
however, if a user wants to transfer information on a public medium (such as the Internet), he needs a way to transfer the key. Of course, the physical sending and receiving of the key is the most secure, but sometimes it is impossible. One solution is to send by e-mail, but such information can be easily intercepted, thus breaking the purpose of encryption. Users cannot encrypt messages containing a key because they must share another key used to encrypt messages containing a key. This dilemma raises the question: if symmetric keys are encrypted by themselves, why not use the same method directly in the first step? One solution is to use asymmetric encryption, which we'll talk about later in this lesson
one of the themes of all types of encryption is cracking. One counter measure to rece the threat caused by using symmetric encryption is to change the regularity of the key. However, it is often difficult to change the key on a regular basis, especially if you have many users in your company. In addition, hackers can use dictionary programs, password sniffing, to compromise the security of symmetric keys, or search through desks, wallets, and briefcases. Symmetric encryption is also easily defeated by violent attacks<
asymmetric encryption
asymmetric encryption uses a pair of keys in the encryption process, unlike symmetric encryption, which only uses a single key. One pair of keys is used for encryption and the other for decryption. If a is used for encryption, B is used for decryption; If B is used for encryption, a is used for decryption
the important concept is that one key is used as a public key and the other as a private key; The public key is used to publish, and the private key is the other half that needs to be protected. One disadvantage of asymmetric encryption is that it is very slow, because it requires a strong mathematical program. If a user needs to use asymmetric encryption, even a small amount of information can take several hours
another name of asymmetric encryption is public key encryption. Although both the private key and the public key are mathematically related, it is very difficult and time-consuming to determine the value of the private key from the public key. In the Internet communication, asymmetric encryption key management is easy, because the public key can be easily spread, and the private key must be carefully protected in the hands of users<
hash encryption transforms some information of different lengths into a random 128 bit code, which is called hash value. Hash encryption is used when you don't want to decrypt or read information. It is theoretically impossible to decrypt by using this method. It is by comparing whether the values of two entities are the same without telling other information. Another use of hash encryption is to sign files. It can also be used when you want others to check but cannot information.
1. Lianzhuang data block structure based on blocks
2. Network wide shared ledger
3. Asymmetric encryption
4. Source code open source
blockchain 2.0 era technical basis:
1. Smart contract; It is an application in the blockchain system. It is a business logic that can run automatically by coding. It usually has its own token and special development language
2. DAPP: it includes the user's applications, including but not limited to various cryptocurrencies, such as Ethereum wallet
3. Virtual machine: used to execute the compiled code of smart contract. Virtual machine is Turing complete
with the application and deepening of blockchain technology, the era of blockchain 3.0 has come. The mode of blockchain cooperation can be seen from behind the operation of all walks of life. Therefore, blockchain will change the way of human life widely and profoundly, so the whole life service will enter the era of blockchain. In the process of Internet development, blockchain + physical instry, blockchain e-commerce and blockchain community operation can be applied to blockchain technology
of course, 3.0 came into being with the development of modern cryptography. Today's applied cryptography is the result of cryptography 20 years ago. Therefore, in order to apply blockchain technology to more participation scenarios, especially in Internet economy and other aspects, more verification is needed to verify whether the existing encryption technology can meet the demand, and more in-depth integration of cryptographic frontier technology and continuous innovation are needed.
asymmetric encryption algorithm is a function that converts the original plaintext file or data into a series of unreadable ciphertext codes by using an encryption key. The encryption process is irreversible. Only holding the corresponding decryption key can the encrypted information be decrypted into readable plaintext. Encryption enables private data to be transmitted through the public network under the condition of low risk, and protects the data from being stolen and read by the third party
the core advantage of blockchain technology is decentralization, which can realize point-to-point transaction, coordination and cooperation based on decentralized credit in a distributed system without mutual trust by means of data encryption, time stamp, distributed consensus and economic incentive, so as to solve the high cost and low cost of centralized institutions Low efficiency and data storage insecurity provide solutions
the application fields of blockchain include digital currency, token, finance, anti-counterfeiting traceability, privacy protection, supply chain, entertainment, etc. with the popularity of blockchain and bitcoin, many related top domain names have been registered, which has a great impact on the domain name instry.