非对称加密算法区块链是什么,非对称加密技术在区块链的应用场景
非对称加密算法是一种更高级的加密技术,它的优势在于可以提供更高级的安全性和保密性,可以有效地防止数据被破坏、改变或泄露。区块链是一种分布式数据存储技术,它可以提供更高级的安全性和去中心化,让用户可以自由地控制、共享和访问数据。非对称加密技术在区块链的应用场景中可以有效地拓展三个关键词:匿名性、可信性和去中心化。
匿名性:非对称加密技术可以有效地保护用户的隐私,使得用户的信息和交易不能被第三方追踪。在区块链应用中,非对称加密技术可以有效地保护用户的匿名性,使得用户的信息和交易不能被第三方追踪,从而保护用户的隐私。
可信性:非对称加密技术可以有效地保护数据的完整性,使得数据在传输过程中不会被篡改。在区块链应用中,非对称加密技术可以有效地保护数据的完整性,使得数据在传输过程中不会被篡改,从而保证数据的可信性。
去中心化:非对称加密技术可以有效地实现数据的自治性,使得数据不受任何中心化机构的控制。在区块链应用中,非对称加密技术可以有效地实现数据的自治性,使得数据不受任何中心化机构的控制,从而实现去中心化的目的。
总之,非对称加密技术在区块链的应用场景中可以有效地拓展三个关键词:匿名性、可信性和去中心化,为用户提供更高级的安全性和保密性,让用户可以自由地控制、共享和访问数据。
请查看相关英文文档
A. Encryption technology of blockchain
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 tamperability of the blockchain will no longer exist. Encryption algorithms are divided into symmetric encryption algorithms and asymmetric encryption algorithms. Blockchain primarily uses asymmetric encryption algorithms. Public key cryptography systems in asymmetric encryption algorithms are generally divided into three categories according to the problems they are based on: large integer differentiation problems, discrete logarithm problems and elliptic curve problems. First, introduce blockchain encryption technology. Encryption algorithms are generally divided into symmetric encryption and asymmetric encryption. Asymmetric encryption refers to encryption technology integrated into the blockchain to meet security requirements and ownership verification requirements. Asymmetric encryption usually uses two asymmetric keys, called public and private keys, in the encryption and decryption process. Asymmetric key pairs have two characteristics: First, after one key (public key or private key) encrypts information, it can only decrypt the other corresponding key. Second, the public key can be disclosed to others, while the private key is kept confidential, and others cannot calculate the corresponding private key through the public key. Asymmetric encryption is generally divided into three main types: large integer differentiation problems, discrete logarithm problems and elliptic curve problems. The problem class of large integer differentiation refers to using the product of two large prime numbers as the encrypted number. Since the appearance of prime numbers is irregular, solutions can only be found through constant trial calculations. The discrete logarithm problem class refers to an asymmetric distributed encryption algorithm based on the difficulty of discrete logarithms and strong one-way hash functions. Elliptic curve refers to the use of flat elliptic curves to calculate a set of asymmetric special values. Bitcoin uses this encryption algorithm. The application scenarios of asymmetric encryption technology in blockchain mainly include information encryption, digital signature and login authentication. (1) In the information encryption scenario, the sender (denoted as A) encrypts the information with the public key of the receiver (denoted as B) and sends it to
B, who uses his own private key Decrypt the information. Encryption of Bitcoin transactions falls into this scenario. (2) In a digital signature scenario, sender A uses its own private key to encrypt the information and sends it to B. B uses A's public key to decrypt the information and then ensures that the information was sent by A. (3) In the login authentication scenario, the client uses the private key to encrypt the login information and sends it to the server. The server then uses the client's public key to decrypt the authenticated login information. Please note the differences between the above three encryption schemes: information encryption is public key encryption and private key decryption, ensuring the security of the information; digital signature is private key encryption and public key decryption, ensuring the ownership of the digital signature. Authenticated private key encryption and public key decryption. Taking the Bitcoin system as an example, its asymmetric encryption mechanism is shown in Figure 1: The Bitcoin system generally generates a 256-bit random number as a private key by calling the random number generator at the bottom of the operating system. The total number of Bitcoin's private keys is large, and it is extremely difficult to traverse all private key spaces to obtain Bitcoin's private keys, so cryptography is safe. For ease of identification, the 256-bit binary Bitcoin private key will be hashed using the SHA256 algorithm and Base58 is converted to form a 50-character long private key, which is convenient for users to identify and write. Bitcoin's public key is a 65-byte random number generated by the private key through the Secp256k1 elliptic curve algorithm. Public keys can be used to generate addresses used in Bitcoin transactions. The generation process is that the public key is first hashed through SHA256 and RIPEMD160 to generate a 20-byte summary result (that is, the result of Hash160), and then converted through the SHA256 hash algorithm and Base58 to form a 33-character Bitcoin address. The public key generation process is irreversible, that is, the private key cannot be derived from the public key. Bitcoin’s public and private keys are usually stored in Bitcoin wallet files, with the private key being the most important. Losing the private key means losing all the Bitcoin assets of the corresponding address. In the existing Bitcoin and blockchain systems, multi-private key encryption technology has been derived based on actual application requirements to meet more flexible and complex scenarios such as multi-signatures.
B. What is a blockchain encryption algorithm
Blockchain encryption algorithm (EncryptionAlgorithm)
Asymmetric encryption algorithm is a function that uses an encryption key to The original plaintext file or data is converted into a string of unreadable ciphertext codes. The encryption process is irreversible. Only by holding the corresponding decryption key can the encrypted information be decrypted into readable plain text. Encryption allows private data to be transmitted through public networks with low risk and protects data from being stolen and read by third parties.
The core advantage of blockchain technology is decentralization. It can achieve decentralized credit in a distributed system where nodes do not need to trust each other by using data encryption, timestamps, distributed consensus and economic incentives. Point-to-point transactions, coordination and collaboration, thereby providing solutions to the problems of high cost, low efficiency and insecure data storage common in centralized institutions.
The application fields of blockchain include digital currency, certificates, finance, anti-counterfeiting and traceability, privacy protection, supply chain, entertainment, etc. With the popularity of blockchain and Bitcoin, many related top domain names have been registered. , which has had a relatively large impact on the domain name industry.
C. What are the core technologies of blockchain system development - blockchain transaction system development -
Blockchain technology is an emerging technology today, but it is not It’s not quite appropriate, because this technology was born with the emergence of Bitcoin ten years ago, but it is okay to say that it is a very hot technology now. After 10 years of continuous updates, blockchain technology has finally seen relevant applications in the past two years, and has entered the blockchain 3.0 era. In the next 3-5 years, I believe there will be more fields that require blockchain Chain system to support. Below, the editor of blockchain system development loopodo will take you to take a look at several core technologies for blockchain system development.
1. Hash algorithm
The hash algorithm is the most commonly used algorithm in the development of blockchain systems. The hash function (Hash Function), also known as hash function or hash function. The hash function can convert data of any length into a set of fixed-length codes through the Hash algorithm. The principle is based on a cryptographic one-way hash function. This kind of function is easy to verify, but difficult to crack. Usually, the industry uses y =h (x) to represent it. This hash function implements operations on x to calculate a hash value y.
2. Asymmetric encryption algorithm
Asymmetric encryption algorithm is a secret key method. Asymmetric encryption algorithm requires two keys: public key and private key. . The public key and the private key are a pair. If the public key is used to encrypt data, it can only be decrypted with the corresponding private key. Because encryption and decryption use two different keys, this algorithm is called an asymmetric encryption algorithm
3. Consensus Mechanism
The so-called "consensus mechanism" is through the voting of special nodes. The verification and confirmation of the transaction can be completed in a very short time; for a transaction, if several nodes with unrelated interests can reach a consensus, we can think that the entire network can also reach a consensus on it.
Today’s blockchain consensus mechanisms can be divided into four major categories: Proof of Work (PoW), Proof of Stake (PoS), Delegated Proof of Shares (DPoS) and Pool verification pool.
4. Smart Contract
A smart contract is a digital, networked version of a traditional contract. They are computer programs that run on the blockchain and can execute themselves when conditions written in the source code are met. Once a smart contract is written, it can be trusted by users and the terms of the contract will not be changed. Therefore, the contract is immutable and cannot be modified by anyone.
Developers write code for smart contracts, which are used for transactions and any exchange between two or more parties. The code will contain some conditions that trigger automatic execution of the contract. Once written, the smart contract is automatically uploaded to the network. Once the data is uploaded to all devices, users can come to agreement with the results of executing the program code.
5. Distributed Storage
Distributed storage uses the disk space on each machine in the enterprise through the network, and combines these dispersed storage resources into a virtual storage device, and the data is distributed in Every corner of the enterprise. Massive data is divided according to the degree of structure, and can be roughly divided into structured data, unstructured data, and semi-structured data.
Lupuda Network Technology focuses on blockchain system development, Ethereum development, blockchain transaction system development, virtual currency platform development, currency transaction system development, and digital currency wallet system development
D. How does blockchain ensure the security of data in the network?
How does blockchain ensure the security of data in the network:
In blockchain technology, digital encryption technology is one of the The key point, generallyAn asymmetric encryption algorithm is used, that is, the password used for encryption is different from the password used for unlocking. To put it simply, we have an exclusive private key. As long as we protect our private key and give the public key to the other party, the other party will use the public key to encrypt the file to generate ciphertext, and then pass the ciphertext to you, and we will use the private key. Decrypting the plain text can ensure that the transmission content is not seen by others. In this way, the encrypted data transmission is completed!
At the same time, there is also a digital signature that adds an extra layer of protection for us to prove that the document has not been tampered with during the process of sending it to the other party. It can be seen that the encryption technology of blockchain can effectively solve the security problems in the process of data circulation and sharing, which can be said to have great potential. Luanhe
E. What are the core blockchain technologies of blockchain technology?
What is the hottest topic on the Internet right now? You don’t need to tell me what the editor knows, then It is blockchain technology, but many friends have only heard of this technology and do not have much in-depth understanding of it. So what are the blockchain technologies? Below we will bring you an introduction to the core technology of blockchain for your reference.
What are the core elements of blockchain technology?
Blockchain technology, which can be a public ledger (visible by anyone) or a permissioned network (visible only by those authorized), solves supply chain challenges , because it is an immutable record that is shared among network participants and updated in real time.
Blockchain technology----data layer: designing the data structure of the ledger
Core technology 1. Block + chain:
Technically speaking, block is a data structure that records transactions. Reflects the flow of funds for a transaction. The blocks of transactions that have been reached in the system are connected together to form a main chain, and all nodes participating in the calculation record the main chain or part of the main chain.
Each block consists of a block header and a block body. The block body is only responsible for recording all transaction information in the previous period, mainly including the number of transactions and transaction details; the block header encapsulates the current version number, previous A block address, timestamp (recording the time when the block was generated, accurate to the second), random number (recording the value of decrypting the answer to the math question related to the block), the target hash value of the current block, and the Merkle number Root value and other information. From a structural point of view, most functions of the blockchain are implemented by the block header.
Core technology 2. Hash function:
The hash function can convert data of any length into a set of fixed-length codes through the Hash algorithm. The principle is based on a cryptographic one-way hash function. This kind of function is easy to verify, but difficult to crack. Usually, the industry uses y=hash(x) to represent it. This hash function implements operations on x to calculate a hash value y.
Commonly used hash algorithms include MD5, SHA-1, SHA-256, SHA-384 and SHA-512, etc. Taking the SHA256 algorithm as an example, inputting any string of data into SHA256 will result in a 256-bitHash value (hash value). Its characteristics: the same data input will get the same result. As long as the input data changes slightly (for example, a 1 becomes a 0), a completely different result will be obtained, and the result cannot be predicted in advance. Forward calculation (calculating the corresponding Hash value from the data) is very easy. Reverse calculation (cracking) is extremely difficult and is considered impossible under current technological conditions.
Core technology 3. Merkle tree:
Merkle tree is a hash binary tree, which can be used to quickly verify the integrity of large-scale data. In the blockchain network, the Merkle tree is used to summarize all transaction information in a block, and ultimately generates a unified hash value of all transaction information in the block. Any change in transaction information in the block will cause Merkle tree changes.
Core technology 4. Asymmetric encryption algorithm:
Asymmetric encryption algorithm is a key secret method that requires two keys: public key and private key. The public key and the private key are a pair. If the public key is used to encrypt data, only the corresponding private key can be used to decrypt it, thereby obtaining the corresponding data value; if the private key is used to sign the data, then only the corresponding public key can be used to sign the data. In order to verify the signature, the sender of the verification information is the holder of the private key.
Because encryption and decryption use two different keys, this algorithm is called an asymmetric encryption algorithm, while symmetric encryption uses the same key in the encryption and decryption processes.
Blockchain technology----network layer: realize the decentralization of accounting nodes
Core technology 5. P2P network:
P2P network (peer-to-peer network), also known as point-to-point technology, is no Central server, Internet system that relies on user groups to exchange information. Unlike a centralized network system with a central server, each client in a peer-to-peer network acts as both a node and a server. Domestic Xunlei software uses P2P technology. The P2P network has the characteristics of decentralization and robustness.
Blockchain technology----Consensus layer: allocate the task load of accounting nodes
Core technology 6. Consensus mechanism:
Consensus mechanism is how to reach consensus among all accounting nodes to identify The validity of a record is both a means of identification and a means of preventing tampering. There are currently four main types of consensus mechanisms: PoW, PoS, DPoS and distributed consensus algorithms.
PoW (Proof of Work, proof of work): PoW mechanism, which is like Bitcoin’s mining mechanism, miners package existing transactions that have not been recorded by the network into a block, and then continue to traverse and try to find a random number , so that the hash value of the new block plus the random number meets certain difficulty conditions. Finding a random number that meets the conditions is equivalent to determining the latest block of the blockchain, and is also equivalent to obtaining the current round of accounting rights of the blockchain. Miners broadcast the block that meets the mining difficulty conditions in the Yuanfu network, and other nodes in the entire network verify that the block meets the mining difficulty conditions. At the same time, the blockAfter the transaction data in it meets the protocol specifications, each will link the block to its own version of the blockchain, thereby forming a consensus on the current network status in the entire network.
PoS (ProofofStake, Proof of Stake): PoS mechanism requires nodes to provide proof of a certain number of tokens to obtain a distributed consensus mechanism for competing for blockchain accounting rights. If you rely solely on the token balance to determine the bookkeeper, you will inevitably make the rich win, which will lead to the centralization of bookkeeping rights and reduce the fairness of the consensus. Therefore, different PoS mechanisms use different methods to increase the amount of money based on the proof of equity. The randomness of accounting rights avoids centralization. For example, in the PeerCoin PoS mechanism, the Bitcoin with the longest chain age has a greater chance of obtaining accounting rights. NXT and Blackcoin use a formula to predict the next accounting node. The more tokens you own, the greater the probability of being selected as an accounting node. In the future, Ethereum will also switch from the current PoW mechanism to a PoS mechanism. Judging from the information currently available, Ethereum's PoS mechanism will use nodes to place bets on the next block. The winner of the bet will receive an additional Ethereum currency award. Those who do not win will be deducted Ether coins to reach consensus on the next block.
DPoS (DelegatedProof-Of-Stake, share authorization certificate): DPoS is easy to understand and is similar to the modern corporate board of directors system. The DPoS mechanism adopted by BitShares is that shareholders vote to select a certain number of witnesses. Each witness has two seconds of authority to generate blocks in order. If the witness cannot generate a block within the given time slice, The block generation authority is given to the witness corresponding to the next time slice. Shareholders can replace these witnesses at any time by voting. This design of DPoS makes the generation of blocks faster and more energy-saving.
Distributed Consistency Algorithm: Distributed Consistency Algorithm is based on traditional distributed consistency technology. Among them are Byzantine fault-tolerant algorithms that solve the Byzantine Generals problem, such as PBFT (Byzantine fault-tolerant algorithm). In addition, distributed consensus algorithms (Pasox, Raft) that solve non-Byzantine problems are not explained in this article. This type of algorithm is currently a commonly used consensus mechanism in alliance chain and private chain scenarios.
Taken together, POW is suitable for public chains. If you build a private chain, it is more suitable to use POS because there is no trust problem in verification nodes; and because there are untrustworthy local nodes in the alliance chain, it is more suitable to use DPOS.
Blockchain technology----Incentive layer: Develop a "salary system" for accounting nodes
Core technology 7. Issuance mechanism and incentive mechanism:
Take Bitcoin as an example. Bitcoins are initially rewarded by the system to miners who create new blocks, and this reward is halved approximately every four years. At the beginning, miners were rewarded with 50 Bitcoins for each new block recorded, and this reward is halved approximately every four years. By analogy, by around AD 2140, newly created blocks will no longer receive rewards from the system. By then, the total amount of Bitcoin will be approximately 21 million, this is the total amount of Bitcoin, so it will not increase indefinitely.
Another source of incentives is transaction fees. When there are no system rewards for newly created blocks, the miners' income will change from system rewards to transaction fees. For example, when you transfer, you can specify 1% of it as a handling fee to be paid to the miner who records the block. If the output value of a transaction is less than the input value, the difference is the transaction fee, which will be added to the incentive for that block. As long as a given amount of electronic currency has entered circulation, the incentive mechanism can gradually be converted to rely entirely on transaction fees, so there is no need to issue new currency.
Blockchain technology----contract layer: giving the ledger programmable features
Core technology 8. Smart contract:
Smart contract is a set of programmed rules and logic that respond to scenarios. Implemented by decentralized, trusted shared script code deployed on the blockchain. Normally, after the smart contract is signed by all parties, it is attached to the blockchain data in the form of program code, and is recorded in a specific block of the blockchain after being propagated through the P2P network and verified by nodes. Smart contracts encapsulate a number of predefined states and transition rules, scenarios that trigger contract execution, response actions under specific scenarios, etc. The blockchain can monitor the status of smart contracts in real time, and activate and execute the contract by checking external data sources and confirming that specific trigger conditions are met.
The above is what blockchain technologies the editor has brought to you? All content introduced to the core technology of blockchain.
F. What is symmetric encryption in the blockchain and what is asymmetric encryption?
Symmetric encryption algorithm means that the same secret key is used for encryption and decryption. Unlike symmetric encryption algorithms, asymmetric encryption algorithms require a public key and a private key. The public key and the private key are a pair. If the public key is used to encrypt data, it can only be decrypted with the corresponding private key. Asymmetric encryption offers better security than symmetric encryption. In symmetric encryption, both parties to the communication use the same secret key. If one party's secret key is leaked, the entire communication will be cracked. Asymmetric encryption uses a pair of secret keys, one for encryption and one for decryption. The public key is public and the secret key is kept by itself. There is no need to synchronize the secret key before communication, which avoids the need to synchronize the private key. The risk of information being stolen by hackers during the process.
G. What does asymmetric encryption algorithm mean?
The so-called asymmetric encryption algorithm means that the key used for encryption and the key used for decryption are different, and the key used for encryption is different from the key used for encryption. The decryption key cannot be derived from the key. (The encryption speed is slow and suitable for the encryption of small data)
The characteristics of the asymmetric cryptosystem: the algorithm strength is complex and the security depends on the algorithm and the key. However, due to its algorithm It is complex, so the encryption and decryption speed is not as fast as that of symmetric encryption and decryption. There is only one key in the symmetric encryption system, and it is non-public. If you want to decrypt, you must let the other party know the key. Therefore, ensuring its security is to ensure the key The security of asymmetric key system has two keys, one of which is public.In this way, there is no need to transmit the other party's key like a symmetric password. This way the security is much greater.
To encrypt files or folders on your computer, you can use Super Encryption 3000.
Super Encryption 3000 adopts internationally mature encryption algorithms and safe and fast encryption methods, which can effectively ensure data security!
H. What is asymmetric encryption
MD5< br />\PGP and the like belong to asymmetric encryption. That is, encryption is simple but decryption (cracking) is difficult.
I. Six core algorithms of blockchain technology
area Six Core Algorithms of Blockchain Technology
Blockchain Core Algorithm 1: Byzantine Agreement
The story of Byzantium probably goes like this: The Byzantine Empire has huge wealth, and its 10 neighboring countries have been around for a long time. But Byzantium's high walls were so impregnable that no single neighbor could successfully invade. Any invasion by a single neighbor will fail, and it is also possible that it will be invaded by 9 other neighbors. The Byzantine Empire's defensive capabilities were so strong that at least half of its ten neighbors had to attack at the same time to be able to break through. However, if one or several of the neighbors agree to attack together, but betrayal occurs during the actual process, then the invaders may all be annihilated. So each party acted cautiously and did not dare to trust its neighbors easily. This is the Byzantine Generals Problem.
In this distributed network: each general has a message ledger that is synchronized with other generals in real time. The signature of each general in the ledger can be used to verify the identity. If any messages are inconsistent, you can know which generals the messages are inconsistent with. Even if there is inconsistent information, as long as more than half agree to attack, the minority obeys the majority, and a consensus is reached.
Thus, in a distributed system, although there are bad guys, bad guys can do anything (not restricted by the protocol), such as not responding, sending error messages, sending different decisions to different nodes, and combining different wrong nodes. Get up and do bad things, etc. However, as long as most people are good people, it is entirely possible to achieve consensus in a decentralized manner
Blockchain Core Algorithm 2: Asymmetric Encryption Technology
In the above Byzantine Agreement, if one of the 10 generals Several messages initiated at the same time will inevitably cause chaos in the system, causing each to have its own attack time plan, making it difficult to act in a consistent manner. Anyone can initiate offensive information, but who will send it? In fact, this only requires adding a cost, that is: only one node can spread the information within a period of time. When a node sends a unified attack message, each node must sign and stamp the message from the initiator to confirm their identity.
It seems today that asymmetric encryption technology can completely solve this signature problem. The asymmetric encryption algorithm uses two different keys for encryption and decryption. These two keys are the "public key" and "private key" that we often hear. Public keys and private keys generally appear in pairs. If the message usesIf the message is encrypted with a public key, the private key corresponding to the public key is required to decrypt it; similarly, if the message is encrypted with a private key, the public key corresponding to the private key is required to decrypt it.
Blockchain Core Algorithm Three: Fault Tolerance Issue
We assume that in this network, messages may be lost, damaged, delayed, sent repeatedly, and the order received is inconsistent with the order sent. In addition, the behavior of nodes can be arbitrary: they can join and exit the network at any time, they can discard messages, forge messages, stop working, etc. Various human or non-human failures may also occur. Our algorithm provides excellent fault tolerance for a consensus system composed of consensus nodes. This fault tolerance includes both security and availability, and is applicable to any network environment.
Blockchain core algorithm 4: Paxos algorithm (consensus algorithm)
The problem solved by the Paxos algorithm is how a distributed system can reach agreement on a certain value (resolution). A typical scenario is that in a distributed database system, if the initial state of each node is consistent and each node performs the same sequence of operations, then they can finally obtain a consistent state. In order to ensure that each node executes the same command sequence, a "consistency algorithm" needs to be executed on each instruction to ensure that the instructions seen by each node are consistent. A general consensus algorithm can be applied in many scenarios and is an important issue in distributed computing. There are two models for node communication: shared memory and message passing. The Paxos algorithm is a consensus algorithm based on the message passing model.
Blockchain Core Algorithm Five: Consensus Mechanism
The blockchain consensus algorithm is mainly proof of work and proof of equity. Taking Bitcoin as an example, in fact, from a technical point of view, PoW can be regarded as reused Hashcash. Generating proof of work is a random process in terms of probability. To mine a new confidential currency, when generating a block, all participants must agree, and the miner must obtain PoW proof of work for all data in the block. At the same time, miners must constantly observe and adjust the difficulty of this work, because the network requirement is to generate a block every 10 minutes on average.
Blockchain Core Algorithm 6: Distributed Storage
Distributed storage is a data storage technology that uses the disk space on each machine through the network and combines these dispersed storage resources into a virtual Storage devices, data are dispersedly stored in every corner of the network. Therefore, distributed storage technology does not store complete data on each computer, but splits the data and stores it in different computers. It's like storing 100 eggs, not in the same basket, but in different places. The total sum is 100.