为广大币圈朋友提供币圈基础入门专业知识!
当前位置首页 > 区块链知识> 正文

区块链中的密码学,区块链密码学是什么意思

发布时间:2023-12-06-06:08:00 来源:网络 区块链知识 密码学   区块

区块链中的密码学,区块链密码学是什么意思


请查看相关英文文档

Ⅰ Modern cryptography in blockchain

1983 - Blind signature described by David Chaum
1997 - HashCash (Proof of Work system) invented by Adam Back An example)
2001 - Ron Rivest, Adi Shamir and Yael Tauman proposed ring signatures to the crypto community
2004 - Patrick P. Tsang and Victor K. proposed using a ring signature system for voting and electronic cash ;
2008 - Bitcoin White Paper published by Satoshi Nakamoto
2011 - Analysis of Anonymity in the Bitcoin System, Fergal Reid and Martin Harrigan
2012 - Destination Address Bitcoin Anonymity (in CryptoNote one-time address).

Secure multi-party computation originated from Yao Qizhi’s millionaire problem in 1982. Later Oded Goldreich had a more detailed and systematic discussion.

The Yao Millionaire problem was first raised by Professor Yao Qizhi, a Chinese computer scientist and Turing Award winner. The problem is formulated as follows: Two millionaires, Alice and Bob, want to know which of them is richer, but neither of them wants the other to know any information about their wealth. This problem has some practical applications: Suppose Alice wants to buy some goods from Bob, but the maximum amount she is willing to pay is x yuan; the minimum price Bob wants to sell for is y yuan. Both Alice and Bob really want to know which is bigger, x or y. If x>y, they can all start bargaining; if z
This scheme is used to compare two numbers to determine which one is larger. Alice knows an integer i; Bob knows an integer j. Alice and B0b want to know whether i>=j or j>i, but neither wants the other party to know their own numbers. For simplicity, assume that the range of j and i is [1, 100]. Bob has a public key Eb and a private key Db.

The research on Secure Multi-Party Computation is mainly aimed at the problem of how to safely calculate an agreed function without a trusted third party. Secure multi-party computation is used in electronic elections, electronic It plays an important role in scenarios such as voting, electronic auctions, secret sharing, and threshold signatures.

Homomorphic Encryption is an Open Problem proposed by the cryptography community a long time ago. As early as 1978, Ron Rivest, Leonard Adleman, and Michael L. Dertouzos proposed this concept in the context of banking [RAD78]. Yes, you read that right, Ron Rivest and Leonard Adleman are R and A respectively in the famous RSA algorithm.

What is homomorphic encryption? Craig Gentry, who proposed the first construction of Fully Homomorphic Encryption [Gen09], gave the best intuitive definition: A way to delegate processing of your data, without giving away access to it.
< br /> What does this mean? General encryption schemes focus on data storage security. That is, I want to send an encrypted thing to other people, or I want to store something on a computer or other server. I want to encrypt the data before sending or storing it. Without the key, it is impossible for the user to obtain any information about the original data from the encrypted result. Only users with the key can correctly decrypt and obtain the original content. We noticed that during this process, users cannot do any operations on the encryption results, they can only store and transmit them. Any operation on the encryption result will result in incorrect decryption or even decryption failure.

The most interesting thing about the homomorphic encryption scheme is that it focuses on data processing security. Homomorphic encryption provides a function for processing encrypted data. That is, others can process the encrypted data, but the processing will not reveal any of the original content. At the same time, the user who has the key decrypts the processed data and gets exactly the processed result.

A bit abstract? Let’s take a real-life example. A user named Alice bought a large piece of gold, and she wanted workers to make it into a necklace. But workers may steal gold during the building process. After all, even one gram of gold is worth a lot of money... So is there a way for workers to process the gold nuggets (delegate processing of your data), but Not getting any gold (without giving away access to it)? Of course there is a way, Alice can do this: Alice locks the gold in a sealed box, and this box is equipped with a glove. Workers can wear these gloves and inspect the inside of the boxof gold to be processed. But the box was locked, so not only could the workers not get to the gold nuggets, but they also couldn't get to any gold that fell out during handling. After processing is completed. Alice took the box back, opened the lock, and got the gold.

The correspondence here is: Box: Encryption algorithm Lock on the box: User key Put the gold nugget in the box and lock it with a lock: Encrypt the data using a homomorphic encryption scheme : Apply the homomorphic feature to directly process the encryption result under the condition that the data cannot be obtained. Unlock: Decrypt the result and directly obtain the processed result. Where can homomorphic encryption be used? Hasn’t the concept of cloud computing been mentioned in recent years? Homomorphic encryption is almost tailor-made for cloud computing! Let's consider the following scenario: a user wants to process a piece of data, but his computer's computing power is weak. This user can use the concept of cloud computing and let the cloud help him process and get the results. But if the data is handed over directly to the cloud, security cannot be guaranteed! Therefore, he can use homomorphic encryption, and then let the cloud process the encrypted data directly and return the processing results to him. In this way: the user pays the cloud service provider and gets the processing results; the cloud service provider earns the fee and correctly processes the data without knowing the user's data;

Aggregated signature by Boneh et al. proposed to improve the efficiency of signature and verification mainly by aggregating multiple signatures into one signature. To sign data of multiple users, aggregate signatures can greatly reduce the complexity of signature calculations. CL is the aggregate signature.

There are two participants in the zero-knowledge proof process, one is called the prover and the other is called the verifier. The prover holds a secret, and he wants the verifier to believe that he holds the secret, but he does not want to reveal the secret to the verifier.

Both parties follow an agreement and through a series of interactions, the verifier will eventually come to a clear conclusion that the prover does or does not know the secret.

For the example of Bitcoin, whether a transfer transaction is legal or not actually only needs to prove three things:

The money sent belongs to the person who sent the transaction
Send The amount sent by the sender is equal to the amount received by the receiver
The sender's money was indeed destroyed
During the entire proof process, the miners do not actually care about the specific amount of money spent, who the sender is, and the recipient Who exactly is it? Miners only care about whether the system's money is conserved.

zcash uses this idea to implement private transactions.

The three properties of zero-knowledge proof correspond to:

(1) Completeness. If both the prover and the verifier are honest, follow every step of the proof process, and perform correct calculations, then the proof must be successful, and the verifierThe certifier must be able to accept it.
(2) Rationality. No one can impersonate the prover and make this proof successful.
(3) Zero knowledge. After the proof process is completed, the verifier only obtains the information that "the prover possesses this knowledge", but does not obtain any information about the knowledge itself.

There are only ring members, no managers, and no cooperation between ring members is required. The signer can sign independently by using his own private key and the public keys of other members in the set, without the need for other members. With the help of people, other members of the set may not be aware that they are included.
Ring signatures can be used as a way to reveal secrets, for example, a ring signature can be used to provide an anonymous signature from a "senior White House official" without revealing which official signed the message. Ring signatures are suitable for this application because the anonymity of a ring signature cannot be revoked and because the group used for the ring signature can be created on the fly.

1) Key generation. Generate a key pair (public key PKi, private key SKi)
2) signature for each member in the ring. The signer uses his own private key and the public keys of any n ring members to generate a signature a
for message m
3) Signature verification. The signer verifies whether the signature is signed by a member of the ring based on the ring signature and message m. If valid, accept it; if invalid, discard it.

General process of group signature

Blind digital signature (Blind Signature), referred to as blind signature - is a digital signature method. Before the message content is signed, the signature The content of the message is invisible to the user. In 1982, David Chaum first proposed the concept of blind signature. Because of its blindness, blind signature can effectively protect the specific content of the signed message, so it is widely used in fields such as e-commerce and electronic elections.

Analogy example: To sign a document is to put a piece of carbon paper in the envelope. When the signer signs the envelope, his signature is signed on the document through the carbon paper.

The so-called blind signature is to first put the concealed document into an envelope, and the process of removing the blind factor is to open the envelope. When the document is in an envelope, no one can read it. Signing a document is done by placing a piece of carbon paper in the envelope. When the signer signs the envelope, his or her signature is transferred to the document through the carbon paper.

Generally speaking, a good blind signature should have the following properties:

Unforgeable. No one can generate a valid blind signature in his name except the signer himself. This is the most basic property.
Non-repudiation. Once a signer signs a message, he cannot deny his signature on the message.
Blindness. Although the signer signs a message, he cannot obtain the specific content of the message.
Untraceability. Once the signature of a message is made public, the signer cannot be sure when he or she signed the message.
Blind signatures that meet the above properties are considered safe. These four properties are not only the standards we should follow when designing blind signatures, but also the basis for us to judge the performance of blind signatures.

In addition, the operability and implementation efficiency of the solution are also important factors that we must consider when designing blind signatures

. The operability and implementation speed of a blind signature depend on the following aspects:

1. The length of the key;
2. The length of the blind signature;
3. Blind Signature algorithm and verification algorithm.
Specific steps of blind signature
1. The recipient first blindly transforms the data to be signed, and sends the transformed blind data to the signer.
2. After being signed by the signer, it will be sent to the recipient.
3. The receiver performs a blinding transformation on the signature, and the result is the signer's blind signature of the original data.
4. This meets the condition ①. To satisfy condition ②, the signer must not be able to associate the blind signature with the blind data when he sees it afterwards. This is usually achieved by relying on some kind of protocol.

Ⅱ The cryptographic technology of blockchain includes

Cryptographic technology is the core of blockchain technology. The cryptographic technology of blockchain includes digital signature algorithm and hash algorithm.
Digital Signature Algorithm
Digital signature algorithm is a subset of the digital signature standard, representing a specific public key algorithm used only for digital signatures. The key is run on the message hash generated by SHA-1: to verify a signature, the hash of the message is recalculated, the signature is decrypted using the public key and the results are compared. The abbreviation is DSA.

Digital signature is a special form of electronic signature. So far, at least more than 20 countries have passed laws recognizing electronic signatures, including the European Union and the United States. my country's electronic signature law was adopted at the 11th meeting of the Standing Committee of the 10th National People's Congress on August 28, 2004. . A digital signature is defined in the ISO 7498-2 standard as: “Some data appended to a data unit, or a cryptographic transformation made to the data unit, which allows the recipient of the data unit to confirm the source and origin of the data unit. The integrity of the data unit and protects the data from forgery by a person (e.g. the recipient)”. The digital signature mechanism provides an identification method to solve problems such as forgery, repudiation, impersonation and tampering. It uses data encryption technology,Data transformation technology enables both parties to send and receive data to meet two conditions: the receiver can identify the identity claimed by the sender; the sender cannot deny the fact that it has sent the data in the future.
Digital signature is an important branch of cryptography theory. It is proposed to sign electronic documents to replace handwritten signatures on traditional paper documents, so it must have 5 characteristics.
(1) The signature is credible.
(2) The signature cannot be forged.
(3) Signatures are not reusable.
(4) Signed documents are immutable.
(5) The signature is non-repudiation.
Hash algorithm
Hash is to convert an input of any length (also called pre-mapping, pre-image) into a fixed-length output through a hash algorithm, and the output is a hash value. This transformation is a compressed mapping in which the space of hash values ​​is usually much smaller than the space of inputs. Different inputs may hash to the same output, but the input values ​​cannot be deduced in reverse. Simply put, it is a function that compresses a message of any length into a message digest of a fixed length.
Hash algorithm is a one-way cryptographic system, that is, it is an irreversible mapping from plaintext to ciphertext, with only encryption process and no decryption process. At the same time, the hash function can change an input of any length to obtain a fixed-length output. The one-way characteristics of the hash function and the fixed length of the output data allow it to generate messages or data.
Represented by the Bitcoin blockchain, secondary hashing is used many times in the workload proof and key encoding process, such as SHA (SHA256(k)) or RIPEMD160 (SHA256(K)). This The advantage of this method is that it increases the workload or increases the difficulty of cracking if the protocol is not clear.
Represented by the Bitcoin blockchain, the two main hash functions used are:
1.SHA-256, mainly used to complete PoW (proof of work) calculations;
2.RIPEMD160, mainly used to generate Bitcoin addresses. As shown in Figure 1 below, the process of generating an address from a public key for Bitcoin.

Ⅲ What technology does the blockchain apply to achieve this function?

The blockchain applies the following technologies to achieve this
The first is the consensus mechanism, and the commonly used consensus mechanisms are mainly There are PoW, PoS, DPoS, PBFT, PAXOS, etc. Since there is no center in the blockchain system, there needs to be a preset rule to guide the nodes of all parties to reach an agreement on data processing. All data interactions must be carried out in accordance with strict rules and consensus;
The second It is cryptography technology. Cryptography technology is one of the core technologies of blockchain. Many classic algorithms of modern cryptography are used in current blockchain applications, mainly including: hash algorithm, symmetric encryption, asymmetric encryption, digital signature, etc.
The third type is distributed storage. Blockchain is a distributed ledger on a peer-to-peer network. Each participating node will independently and completely store and write block data information. The advantages of distributed storage compared with traditional centralized storage are mainly reflected in two aspects: data information is backed up on each node to avoid data loss due to single point failure; data on each node is stored independently, effectively avoiding Malicious tampering with historical data.
Smart contracts: Smart contracts allow trusted transactions without a third party. As long as one party reaches the pre-set goals of the agreement, the contract will automatically execute the transaction. These transactions are trackable and irreversible. It has the advantages of transparency, credibility, automatic execution, and mandatory performance. Blockchain technology has many unique features that make it a unique invention and give it unlimited horizons to explore.

IV Understand in one article, the cryptography and blockchain theory terms you must master in XFS

People’s deep understanding of things is not like “how to put an elephant in the refrigerator” ?" It's as simple as "open the refrigerator, put the elephant in, and close the refrigerator." Everything requires a cognitive process of peeling off the cocoons and breaking them into parts. Especially an emerging concept or thing requires a more detailed understanding.

The XFS system is a distributed file system, but it is not a single framework structure. It is an organic whole that combines cryptography, blockchain, the Internet and other technical means. Therefore, I would like to To understand it in more detail, we must know the concepts of some professional terms.

1. Encrypted network

An encrypted network is simply a public blockchain. Before the birth of blockchain technology, there was no encryption method for data transmission in the Internet network. Once a hacker intercepted the data, unless the data itself was ciphertext, the data would be directly exposed to the hacker. .

The encrypted network uses blockchain technology and is maintained by each node of the blockchain. Anyone can join without permission. More importantly, the data running in the entire network is encrypted. The XFS system is a typical encrypted network.

2. Hash algorithm

The hash algorithm is a special program in the blockchain to ensure data integrity and security. The hash algorithm uses a mathematical relationship called a "hash function" and the resulting output is called a "cryptographic digest". The characteristic of the encrypted digest is that after inputting data of any length, a unique and fixed-length value is returned.

A hash function has:

Based on these properties, it is also used to be tamper-proof when ensuring cryptographic security, because even small changes to the data input to the hash function will results in completely different output. This has also become the workhorse of modern cryptography and blockchain.

3. Distributed ledger

Blockchain is a distributed ledger, but this ledger can not only record transaction information, but also record any data interaction. Each ledger transaction is an encrypted digest, so entries cannot be changed without detection. This allows blockchain to enable participants to audit each other in a decentralized manner.

4. Private key and public key

Private key and public key are a set of "keys" generated for decryption after the blockchain is encrypted through a hash algorithm. By encrypting the private key, a public key is formed. At this time, the original information can only be viewed through the private key and is saved by the user. The public key is like a house address, which is used for data interaction and can be made public. On the contrary, if the public key is encrypted to form a private key, an immutable digital signature will be formed, because only the owner of the private key can create a signature on this public key.

1. Node

Node is the most basic construction of a blockchain network, and it is also the physical device that connects the blockchain network to reality. A single node has many functions, such as caching data, validating information, or forwarding messages to other nodes.

2. Point-to-point (P2P) network

What the blockchain builds is the data interaction between nodes after decentralization. Traditional Internet data transmission is a client-server-client hub-and-spoke model. A point-to-point network is more consistent with the word "network". In this network, each node runs under a single communication protocol to transmit data between them, avoiding network collapse caused by a single point failure of the server.

3. Consensus verification

The consensus verification of the blockchain solves the problem of inconsistent opinions among a large number of scattered nodes. Based on the philosophical basis of "the minority obeys the majority", in the blockchain In the network, more node recognition means "consensus". Generally speaking, if more than 51% of the nodes in the blockchain network approve it, it will be adopted and recognized.

4. Replication proof and space-time proof

These two proofs can be collectively called storage proofs in the XFS system. One of the core functions of the XFS system is data storage. Therefore, in order to prove the effectiveness of storage, replication proof is used to verify whether the data exists in the node storage space, and space-time proof is used to verify the persistence in time. If the storage provider can continue to submit storage certificates during the storage validity period, then he will receive rewards provided by the XFS system.

5. Redundancy strategy and erasure coding

These are two ways that XFS uses to balance the amount of data storage. The redundancy strategy backs up data through multiple copies to ensure that data can be retrieved if it is damaged or lost.

Erasure coding ensures that data will not be copied and transmitted without excessive backups, saving storage space.time and improve transmission efficiency.

6. File fragmentation protocol

XFS divides the file into N small fragments and stores them in the nodes. As long as there are any M fragments of these fragments, the data can be recovered. In this way, as long as N-M+1 nodes do not fail at the same time, data integrity can be ensured without loss.

7. Smart Contract

The smart contract in XFS is a piece of program code. Since it is generated based on the blockchain, it also inherits the non-tampering, traceability, etc. of the blockchain. Features, it can ensure the certainty of the execution results of both parties, which also makes data interaction in the XFS network more trustworthy.

8.Dapp

It is a decentralized APP, which has a more convenient and faster network access port like an ordinary APP. The only difference is that it abandons the centralization of traditional APPs. characteristics, which makes the data in the Dapp belong to the users themselves, without having to worry about privacy leaks, big data maturity and other issues.

The XFS system is an open platform where users can freely use, design, and create various Dapps.

Conclusion

It is difficult to elaborate on the theoretical terminology in XFS due to space reasons, which involves more Internet and blockchain expertise. But through the above simple explanations, I believe everyone has a more three-dimensional understanding of the XFS system. Then, we look forward to breaking the shortcomings of traditional centralized storage and launching a new generation of XFS distributed file system in a new storage era.

IV A popular explanation of what blockchain is

Blockchain is essentially a decentralized distributed ledger database. The blockchain uses algorithms related to cryptography to generate data blocks, and each data block records information confirmed by multiple Bitcoin network transactions.

To put it simply, the blockchain is like a ledger, and each block that makes up the blockchain is each page of the ledger. The details of the transactions are recorded in a public ledger that can be seen by anyone on the network.

Blockchain uses cryptography to ensure that existing data cannot be tampered with. There are two core points in this part: cryptographic hash values ​​and asymmetric encryption.

VI Introduction to the principles and applications of blockchain technology

1. Blockchain is a series of data blocks generated by using cryptographic methods. Each data block contains The information of all Bitcoin network transactions in the past ten minutes is used to verify the validity of its information (anti-counterfeiting) and generate the next block. It is the underlying technology of Bitcoin, like a database ledger that records all transaction records.

2. Broad definition: using an encrypted chain structure to verify and store data, using a distributed node consensus algorithm to generate and update data,A new decentralized infrastructure and distributed computing paradigm that uses automated script code (smart contracts) to convert and operate data.

3. Narrow definition: A decentralized shared account that combines data blocks into a specific data structure in a chain in chronological order, and is cryptographically guaranteed to be non-tamperable and non-forgeable.

4. Characteristics of blockchain: Decentralization: The processes of verification, accounting, storage, maintenance and transmission of blockchain data are based on distributed system institutions and use pure mathematical methods. It is not a central structure to establish trust relationships between distributed nodes, thereby forming a decentralized and trustworthy distributed system.

5. Time series data: Blockchain uses a chain block structure with timestamps to store data, thereby adding a time dimension to the data and having strong verifiability and traceability.

6. Collective maintenance: The blockchain system uses a specific economic incentive mechanism to ensure that all nodes in the distributed system can participate in the verification process of data blocks, and select specific nodes through a consensus algorithm Add new blocks to the blockchain.

7. Programmable: Blockchain technology provides a flexible script code system to support users in creating advanced smart contracts, currencies or other decentralized applications.

8. Safe and trustworthy: Blockchain technology uses asymmetric cryptography principles to encrypt data, and at the same time uses the powerful computing power formed by consensus algorithms such as workload proof of each node in the distributed system to resist external forces. Attack and ensure that blockchain data cannot be tampered with and cannot be forged, so it has high security.

9. Blockchain application scenarios: Digital currency: represented by Bitcoin, it is essentially a digital currency generated by a distributed network system. Its issuance process does not rely on a specific centralized institution.

Ⅶ How to learn blockchain technology_How to understand blockchain technology

1. Technical language

Python and Go are two languages ​​​​that are recruited by many companies All mentioned technical languages. Need to prioritize learning. Moreover, these two languages ​​​​also have great applications in the direction of sliding technology outside of the blockchain. For example, Go is used in the background construction of large-scale concurrent systems, and Python is used in the construction of artificial intelligence systems. So learning these two languages ​​is a priority.

2. Technical framework

Master one or more of Bitcoin, ETH and Hyperledger. Needless to say, BTC is written in C at the bottom level. A large number of currency projects, such as Litecoin, Dash, Monero, zcash, etc., all use Bitcoin technology for secondary development.

ETH is the representative of blockchain 2.0, and various application Dapps can be built on the ETH network. Nowadays, a large number of application blockchain projects are developed using the ETH platform.

HypErledgerfabric is a blockchain development platform strongly promoted by IBM. It is mainly used for the development of alliance chains. It is currently the most popular alliance chain development platform.

3. Algorithm

POW (Proof of Work Algorithm), POS (Proof of Stake Algorithm), PBFT (Byzantine Fault Tolerance Algorithm), etc. are all important in the cryptography part of the blockchain Composition, a full understanding of these algorithms will help you have a better understanding of the cryptography part when participating in the underlying development of blockchain projects.

(7) Blockchain cryptography combined with extended reading:

Blockchain technology is a distributed accounting technology, and its characteristic is decentralization , open and transparent, allowing everyone to participate in the establishment of the database, and each created data cannot be tampered with. With everyone participating, the problem of trust between strangers is solved.

Blockchain technology has emerged. It is an accounting technology that allows all people to participate. The transaction information and data between AB are made public and cannot be tampered with. Everyone knows this. happens, then there is no need for any authoritative third-party C, or everyone in the system plays the role of C. This is also called decentralization.

博客主人唯心底涂
男,单身,无聊上班族,闲着没事喜欢研究股票,无时无刻分享股票入门基础知识,资深技术宅。
  • 36282 文章总数
  • 3637265访问次数
  • 3078建站天数