Position: Home page » Blockchain » Blockchain symmetric encryption

Blockchain symmetric encryption

Publish: 2021-03-22 19:33:32
1. Because blockchain technology has natural advantages in realizing smart contracts
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.
2.

If you want to understand the application of blockchain, you can refer to many books and opinions, such as illustrated blockchain, blockchain: reshaping the economy and the world, blueprint and guide of new economy, and articles of coin'an community, including a detailed understanding of the platform of coin'an community, with great strength

As the name suggests, blockchain is composed of block and chain. It is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and so on. It is a kind of chain data structure that combines data blocks in order according to the time sequence, and it is a secure and reliable distributed account book that can not be tampered with and forged by means of cryptography

in 2008, in his paper bitcoin: a peer-to-peer e-cash system published by Nakamoto, he first proposed the idea of blockchain and encrypted digital currency. Starting from bitcoin, blockchain has become the underlying technology of various digital currencies

Second, the working principle of blockchain:

1. The basic concepts include: (1) transaction: one operation will change the account status once, such as adding a record 2) Block: records the transaction and status data within a specified time, which is a consensus and preservation of the current account status 3) Chain: it is composed of a series of blocks in chronological order, which is the log record of the whole state change. If you understand the working concept of blockchain, it is not difficult to understand its working principle. Suppose there is a distributed data logbook, which can only be added, not deleted or changed. Its structure is a linear chain formed by a series of "blocks" (which is also the source of the name of "blockchain"), and new data must be put into a new block to be added, The maintenance node can propose a new block, but it must go through a certain consensus mechanism to reach an agreement on the final selected block

2. Take bitcoin as an example to see the working principle of blockchain

the block of bitcoin is divided into block head and block body

Core advantages and characteristics of blockchain

1. The verification, accounting, storage, maintenance and transmission of decentralized blockchain data are all based on distributed system structure. There is no centralized hardware or management organization, and the rights and obligations of any node are equal, The data blocks in the system are jointly maintained by the nodes with maintenance function in the whole system. 2. The open and transparent system is open. In addition to the private information of all parties to the transaction is encrypted, the data of the blockchain is open to all. Anyone can query the blockchain data and develop related applications through the open interface, so the information of the whole system is highly transparent. 3. Security blockchain uses consensus based specifications and Protocols (such as a set of open and transparent algorithms) to enable all nodes in the whole system to exchange data freely and safely in a de trusted environment, so that the trust in "people" is changed into the trust in machines, and any human intervention does not work. 4. Information cannot be tampered with. Once the information is verified and added to the blockchain, it will be stored permanently. Unless more than 51% (almost impossible) nodes in the system can be controlled at the same time, the modification of the database on a single node is invalid. Therefore, the data stability and reliability of the blockchain are extremely high. 5. Anonymity because the exchange between nodes follows a fixed algorithm, and its data interaction does not need trust (the program rules in the blockchain will judge whether the activity is effective or not). Therefore, the counterparties do not need to let the counterparties generate their own trust by disclosing their identities, which is very helpful for credit accumulation

At present, the most popular classification of blockchain is to divide blockchain into public blockchain, private blockchain and consortium blockchain according to different participants

1. Public chain: anyone can participate in the use and maintenance, and can obtain the effective confirmation of the blockchain. Public chain is the earliest blockchain and the most widely used blockchain at present, such as bitcoin blockchain. The information is completely public

if the licensing mechanism is introced, it includes private chain and alliance chain. 2. Private chain: a company or indivial only uses the blockchain technology, enjoys the exclusive write permission of the blockchain, and does not disclose the information. At present, conservative giants (traditional finance) want to experiment with private blockchain, and the application procts of private blockchain are still groping. 3. Alliance chain: it is a blockchain between the public chain and the existing chain, which is jointly controlled by multiple organizations. The use of the chain is managed with authority, which can be controlled by the manager, and also open to others according to the manager's wishes. In addition, according to the different use scenarios and purposes of blockchain, it can be divided into currency chain for the purpose of digital currency, property chain for the purpose of recording property rights, and crowdfunding chain for the purpose of crowdfunding

On May 28, Ma Huateng, CEO of Tencent, proposed the anti-counterfeiting method based on cloud integrated blockchain technology, which is far more efficient than traditional anti-counterfeiting methods. The future anti-counterfeiting verification scenario may only require users to use their mobile phones for simple scanning, and a large number of complete information based on different dimensions can be obtained

take Maotai liquor as an example:

distillery address, proction workshop, operation staff, inspector, delivery time, transportation vehicle information and driver information,

liquor year, raw material source, raw material supplier, storage warehouse number, raw material transportation vehicle and driver information,

all information can be accurately traced, permanently recorded and tampered with

the above information can be easily verified

2. Food safety issues as early as last November, Wal Mart has cooperated with IBM to track the source of food by using blockchain technology, so as to ensure the safety of food and increase the circulation of food to rece costs. For Wal Mart and other large supermarkets, it took a few days to investigate the source of problem food, After using this technology, only one item of proct information is needed to achieve accurate traceability, and important information such as food origin, inspector, supplier, logistics and transportation can quickly find problems in a few minutes. Currently, procts tracked by blockchain include packaging procts from the United States and pork from China

3. Information security

blockchain technology is promoting an information security technology revolution. (1) identity protection PKI is a common public key encryption technology in e-mail, message application, website and other communication applications. However, since the implementation of most PKI, the centralized trusted third party certification authority (CA) is used to issue, activate and store user certificates. Hackers can attack PKI to fake user identity or crack encrypted information

certcoin is the first PKI implementation of blockchain, which comes from MIT, removes the centralized authentication center, and uses blockchain as a distributed ledger for domain name and public key

pomcor company: blockchain PKI implementation path: keep the authentication center, and use blockchain to store the hash value of issued and activated certificates. Users can verify the authenticity of certificates through decentralized and transparent sources, and can also improve the network access performance through local authentication of secret key and signature based on blockchain

(2) data integrity protection

guardtime developed a secret key free signature architecture (Ksi) based on blockchain technology to replace the secret key based data authentication technology. Ksi stores the hash table of the original data and files on the blockchain, runs the hash algorithm to verify other copies, and compares the results with the data stored in the blockchain. Any data tampering will be found quickly because the original hash table is stored in millions of nodes

(3) key infrastructure protection

the "Achilles heel" of the Internet, DDoS has entered the TB era, DDoS is still the simplest weapon for hackers to bring down the big target with low cost, DNS service is the primary target for hackers to carry out large-scale destruction, but blockchain technology is expected to fundamentally solve the problem

The distributed storage of

blockchain makes hacker attacks lose focus. Nebulis is developing a distributed DNS system, which uses Ethereum blockchain and interstellar Internet file system (IPFs, the distributed substitute of HTTP) to register and resolve domain names. The biggest weakness of DNS is caching, which makes DDoS attacks possible. It is also the bane of the centralized government's censorship of social networks and manipulation of DNS registration. A highly transparent and distributed DNS system can effectively prevent any entity, including the government, from arbitrarily manipulating records

(1) digital currency: improve the convenience of currency issuance and use, such as bitcoin and Ethernet in foreign countries, and guorenbao in China

from the use of physical transactions, to physical currency and credit currency, and then to the rise of bitcoin network, more and more people are aware of the distributed ledger blockchain technology behind it, and graally apply it in many scenarios other than digital currency

(2) cross border payment and settlement: realize point-to-point transaction, rece intermediate fees

transfer and payment. At present, the most mature application of blockchain technology is payment and transfer. Blockchain technology can avoid complicated systems, save the process of inter-bank reconciliation and review, and accelerate the settlement speed; Virtual currency can rece transaction costs without the intervention of clearing house. Different countries have different clearing proceres. It takes two or three days for a single remittance to arrive, which is inefficient and accounts for a large proportion of funds in transit. No longer through the third party, through the blockchain technology to form point-to-point payment. By eliminating the link of the third-party institutions, we can make full day payment, real-time payment, withdraw cash quickly and rece the hidden cost, which helps to avoid the capital risk. It is timely and convenient

(3) bills and supply chain financial business: rece human intervention, rece costs and operational risks

value transfer between point-to-point, control and verify physical bills or central system; Intermediaries will be eliminated and human intervention reced. With the improvement of efficiency, financing channels are more unblocked, risks are lower, and multiple parties benefit

(4) securities issuance and Trading: realize quasi real-time asset transfer, accelerate the speed of transaction clearing

the application of blockchain technology can make the process of securities trading more concise, transparent and fast, rece the plication of IT system, and improve the efficiency of market operation. For stocks, blockchain can eliminate paper and pen or electronic form records, rece human errors in trading, and improve the transparency and traceability of trading platform. Citigroup and Nasdaq cooperate to promote blockchain applications

(5) customer credit investigation and anti fraud: rece the cost of legal compliance, prevent financial crimes

the customer information and transaction records recorded in the blockchain help banks identify abnormal transactions and effectively prevent fraud. The technical characteristics of blockchain can change the existing credit reference system, and store the data of customers with bad records in the blockchain when the bank concts "know your customer" (KYC)

equity crowdfunding:

3.

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 data

so 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

4. Symmetric encryption

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.
5. Blockchain itself solves the problem of large-scale cooperation between strangers, that is, strangers can cooperate with each other without mutual trust. So how to ensure the trust between strangers to achieve mutual consensus mechanism? The centralized system uses trusted third-party endorsements, such as banks. In the eyes of the common people, banks are reliable and trustworthy institutions. The common people can trust banks to solve real disputes. But how does a decentralized blockchain guarantee trust
in fact, blockchain uses the basic principles of modern cryptography to ensure its security mechanism. The knowledge system involved in the field of cryptography and security is very complicated. Here, I only introce the basic knowledge of cryptography related to blockchain, including hash algorithm, encryption algorithm, information digest and digital signature, zero knowledge proof, quantum cryptography, etc. Through this lesson, you can learn how to ensure the confidentiality, integrity, authentication and non repudiation of the blockchain using cryptography technology
basic course lesson 7 basic knowledge of blockchain security
1. Hash algorithm (hash algorithm)
hash function (hash), also known as hash function. Hash function: hash (original information) = summary information. Hash function can map any length of binary plaintext string to a shorter (generally fixed length) binary string (hash value)
a good hash algorithm has the following four characteristics:
1. One to one correspondence: the same plaintext input and hash algorithm can always get the same summary information output
2. Input sensitivity: even if the plaintext input changes slightly, the newly generated summary information will change greatly, which is greatly different from the original output
3. Easy to verify: plaintext input and hash algorithm are public, anyone can calculate by themselves, and whether the output hash value is correct
4. Irreversibility: if there is only the output hash value, the hash algorithm can never dece the plaintext
5. Conflict avoidance: it is difficult to find two plaintexts with different contents, but their hash values are the same (collision)
for example:
hash (Zhang San lent Li Si 100000 yuan for 6 months) = 123456789012
such a record as 123456789012 is recorded in the account book
it can be seen that hash function has four functions:
simplify information
it is easy to understand, and the information after hashing becomes shorter
identification information
you can use 123456789012 to identify the original information, and summary information is also called the ID of the original information
hidden information
the account book is a record like 123456789012, and the original information is hidden
verification information
if Li Si cheated that Zhang San only lent Li Si 50000 when repaying, both parties can verify the original information with the hash value of 123456789012 recorded before
hash (Zhang San lent Li Si 50000 for 6 months) = 987654321098
987654321098 is completely different from 123456789012, which proves that Li Si lied, Then the information can't be tampered
common hash algorithms include MD4, MD5 and Sha series algorithms, and Sha series algorithms are basically used in mainstream fields. Sha (secure hash algorithm) is not an algorithm, but a group of hash algorithms. At first, it was SHA-1 series, and now the mainstream applications are sha-224, SHA-256, sha-384 and sha-512 algorithms (commonly known as SHA-2). Recently, Sha-3 related algorithms have been proposed, such as keccak-256 used by Ethereum
MD5 is a very classic hash algorithm, but unfortunately, both it and SHA-1 algorithm have been cracked. It is considered by the instry that its security is not enough to be used in business scenarios. Generally, sha2-256 or more secure algorithm is recommended
hash algorithm is widely used in blockchain. For example, in blocks, the latter block will contain the hash value of the previous block, and the content of the later block + the hash value of the previous block will jointly calculate the hash value of the later block, which ensures the continuity and non tamperability of the chain< Encryption and decryption algorithm is the core technology of cryptography, which can be divided into two basic types: symmetric encryption algorithm and asymmetric encryption algorithm. According to whether the key used in the encryption and decryption process is the same or not, the two modes are suitable for different needs, just forming a complementary relationship, and sometimes can be combined to form a hybrid encryption mechanism
symmetric cryptography (also known as common key cryptography) has the advantages of high computational efficiency and high encryption strength; Its disadvantage is that it needs to share the key in advance, which is easy to leak and lose the key. The common algorithms are des, 3DES, AES and so on
asymmetric cryptography (also known as public key cryptography) is different from the encryption and decryption key, and its advantage is that it does not need to share the key in advance; Its disadvantage is that it has low computational efficiency and can only encrypt short content. Common algorithms include RSA, SM2, ElGamal and elliptic curve series. Symmetric encryption algorithm is suitable for the encryption and decryption process of a large number of data; It can't be used in signature scenario: and it often needs to distribute the key in advance. Asymmetric encryption algorithm is generally suitable for signature scenario or key agreement, but it is not suitable for large amount of data encryption and decryption< Third, information digest and digital signature
as the name suggests, information digest is to hash the information content to obtain a unique digest value to replace the original and complete information content. Information digest is the most important use of hash algorithm. Using the anti-collision feature of hash function, information digest can solve the problem that the content has not been tampered
digital signature is similar to signing on paper contract to confirm contract content and prove identity. Digital signature is based on asymmetric encryption, which can be used to prove the integrity of a digital content and confirm the source (or non repudiation)
we have two requirements for digital signature to make it consistent with our expectation for handwritten signature. First, only you can make your own signature, but anyone who sees it can verify its validity; Second, we want the signature to be only related to a specific file and not support other files. These can be achieved by our asymmetric encryption algorithm above
in practice, we usually sign the hash value of information instead of the information itself, which is determined by the efficiency of asymmetric encryption algorithm. Corresponding to the blockchain, it is to sign the hash pointer. In this way, the front is the whole structure, not just the hash pointer itself< Zero knowledge proof means that the verifier can make the verifier believe that a certain conclusion is correct without providing any additional information to the verifier
zero knowledge proof generally meets three conditions:
1. Completeness: authentic proof can make the verifier successfully verify
2. Soundness: false proof can not make the verifier pass the verification
3. Zero knowledge: if you get proof, you can't get any information other than the proof information from the proof process< With more and more attention paid to the research of quantum computing and quantum communication, quantum cryptography will have a huge impact on the information security of cryptography in the future
the core principle of quantum computing is that qubits can be in multiple coherent superposition states at the same time. Theoretically, a large amount of information can be expressed by a small number of qubits and processed at the same time, which greatly improves the computing speed
in this way, a large number of current encryption algorithms are theoretically unreliable and can be cracked, so the encryption algorithm has to be upgraded, otherwise it will be broken by quantum computing
as we all know, quantum computing is still in the theoretical stage, which is far from large-scale commercial use. However, the new generation of encryption algorithms should consider the possibility of this situation.
6. "A network-based computer processing technology, corresponding to centralized. As the performance of personal computer has been greatly improved and the popularity of its use, it is possible to distribute the processing power to all computers on the network. Distributed computing is a concept opposite to centralized computing. The data of distributed computing can be distributed in a large area
7.

Digital encryption technology is the key to the application and development of blockchain technology. Once the encryption method is cracked, the data security of the blockchain will be challenged, and the non tamperability of the blockchain will no longer exist

recently, Xunlei, Renren and other Internet enterprises have applied blockchain technology to their own technology or proct system, and Meitu has also recently posted the information of recruiting senior blockchain architects. In the U.S. stock market, Xunlei, Renren, Meitu and other companies ushered in a surge

8. The era of blockchain 1.0 is the era of digital currency, and the technical basis is:
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.
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