A privacy protection method and system for blockchain consensus protocol based on proof of stake

By adding a specific distribution of noise values ​​​​in the leader election function of the blockchain consensus protocol, the problem of equity privacy leakage caused by marking attacks under long delays is solved, further protecting user equity information, and reducing the adversary's ability to obtain equity information. success rate.

CN116094732BActive Publication Date: 2024-09-20SHANDONG UNIV
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202310081709.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-30
Publication Date
2024-09-20
Estimated Expiration
2043-01-30

AI Technical Summary

Technical Problem

In the blockchain consensus protocol based on proof of equity, the existing privacy protection scheme cannot resist marking attacks under long delays, resulting in the leakage of user equity information.

Method used

Add a noise value that obeys a specific distribution to the leadership election function to protect the user's frequency information, reduce the adversary's probability of success in obtaining user equity through frequency information, verify the legitimacy of the new block through zero-knowledge proof, and ensure the privacy of user equity.

Benefits of technology

It significantly reduces the success rate of marking attacks, prevents the leakage of private equity information, and ensures further protection of user equity privacy without affecting other security properties of the blockchain system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116094732B
    Figure CN116094732B
Patent Text Reader

Abstract

The present invention discloses a privacy protection method and system for blockchain consensus protocol based on proof of equity, including: receiving user's equity information; receiving random numbers and random number commitment values ​​of users participating in leader election in each round of election process; using leader election function, electing according to random numbers and equity information of users participating in leader election, adding noise values ​​that obey specific distribution in the leader election function; generating new blocks for users elected as leaders, and broadcasting new blocks, random number commitment values ​​of the current election process and zero-knowledge proofs proving the legitimacy of new blocks, so that other users can verify the legitimacy of new blocks by verifying zero-knowledge proofs. User's frequency information is protected by noise distribution, ensuring that the user's long-term benefits match their actual equity, significantly reducing the success probability of adversaries such as tag attacks obtaining user's equity through frequency information, and realizing further protection of user's equity privacy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cyberspace security technology, and in particular to a privacy protection method and system for a blockchain consensus protocol based on proof of stake. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] In order to solve the efficiency and energy consumption problems of the blockchain consensus protocol based on proof of work (PoW), researchers proposed a blockchain consensus protocol based on proof of stake (Proof of Stake, PoS). PoS expands the blockchain by adopting a leader election process based on proof of stake. In each round of leader election, participating users are allowed to run a random leader election process to select a user as a leader based on the equity or equity distribution held by the user in the current blockchain ledger. The success rate of each user being elected as a leader is linearly related to the equity ratio he holds. Among them, the random leader election process is implemented through a verifiable pseudo-random function (VRF) to ensure the fairness and randomness of the election process; however, this method cannot hide the identity, equity and other information of the users participating in the leader election, and cannot guarantee the privacy of users.

[0004] With the rapid development of blockchain technology, the data privacy issue of PoS has attracted much attention. Ganesh, Orlandi, Tschudi and others proposed an anonymous PoS protocol (see Ganesh, C., Orlandi, C., Tschudi, D.: Proof-of-stake protocols for privacy-aware blockchains. In: Advances in Cryptology-EUROCRYPT 2019) to protect sensitive information such as user equity, identity, and transactions. The VRF used in the Ouroboros Praos (see David, B., Gazi, P., Kiayias, A., Russell, A.: Ouroboros praos: Anadaptively-secure, semi-synchronous proof-of-stake blockchain. In: Advances in Cryptology-EUROCRYPT 2018) leader election process is replaced with an anonymous VRF function (AVRF), so that the public equity information can be replaced with the commitment value for the equity. Users can verify the zero-knowledge proof generated by the leader to determine that there is a legitimate user who has passed the AVRF verification and generated a legitimate block. Since users (including adversaries) do not know who is elected as the leader, the privacy of user equity and personal information can be guaranteed.

[0005] However, this modification does not take into account the problem of information leakage at the network layer. The adversary can trace the leader through "marking attack" by observing the information in the network transmission channel, reconstruct the connection between anonymous information and the corresponding user, and thus infer the equity ratio of the observed user, thus undermining the user's privacy requirements.

[0006] The principle of the related attack method is that the frequency of users being elected as leaders and proposing blocks in the protocol design is related to the user's equity ratio. Specifically, if the adversary observes the election process of the attacked user for a sufficient period of time, the frequency value t\n of the user being elected as a leader can be obtained through the total number of blocks n generated by the system during this period and the number of blocks t generated by the attacked user. Thus, the probability of the user being elected as a leader and its corresponding actual equity value stk can be approximately estimated. According to the law of large numbers, the accuracy of the estimation will increase with the increase of the observation time (or n); however, the existing PoS privacy protection scheme cannot resist the tagging attack under long delays, which leads to the leakage of user equity information. Summary of the invention

[0007] In response to the problem of equity privacy leakage caused by marking attacks in the proof-of-stake blockchain consensus protocol, the present invention proposes a privacy protection method and system for the blockchain consensus protocol based on proof-of-stake, which adds a noise value that obeys a specific distribution to the leader election function, so that the user's frequency information in the short term is protected by the noise distribution, while ensuring that the user's long-term benefits match their actual equity, significantly reducing the success probability of adversaries such as marking attacks to obtain user equity through frequency information, thereby achieving further protection of user equity privacy.

[0008] In order to achieve the above object, the present invention adopts the following technical solution:

[0009] In a first aspect, the present invention provides a privacy protection method for a blockchain consensus protocol based on proof of stake, comprising:

[0010] Receive user’s equity information;

[0011] During each round of election, receive the random number and random number commitment value from the user participating in the leader election;

[0012] A leader election function is used to conduct an election based on the random number and equity information of the user participating in the leader election, and a noise value that follows a specific distribution is added to the leader election function;

[0013] Generate a new block for the user elected as the leader, and broadcast the new block, the random number commitment value of the current election process, and the zero-knowledge proof proving the legitimacy of the new block, so that other users can verify the legitimacy of the new block by verifying the zero-knowledge proof.

[0014] As an optional implementation, the noise value is a random value sampled from a uniform distribution, and the uniform distribution satisfies a mathematical expectation value of zero.

[0015] As an optional implementation, the equity information includes the equity value and equity commitment value held by the user, and the equity commitment value and the corresponding user signature public key are published in the blockchain system in the form of a list.

[0016] As an alternative implementation, during the election process, if and only if When , the leader election function LE(q,stk)=1, then the user is elected as the leader; otherwise, the leader election function LE(q,stk)=0; where y is the random number in each round of election, z is the input value of the noise sampling function ω(z), stk is the equity value held by the user, and stake is the total equity value.

[0017] As an optional implementation, the random number of users participating in the leader election is q=y||z, where y is the random number in each round of the election process, and z is the input value of the noise sampling function. In different rounds of the election process in the same epoch, the input value of the noise sampling function is fixed.

[0018] As an optional implementation, a 1-out of-N zero-knowledge proof method is used to construct a zero-knowledge proof to prove the legitimacy of the new block.

[0019] As an optional implementation, a verifiable noise value is generated through a circuit conversion method based on the AVRF function and the noise sampling function, and the noise value is added to the leader election function.

[0020] As an optional implementation method, after verifying the legitimacy of the new block through zero-knowledge proof, the leader adds the new block to the local blockchain, and the non-leader user adds the new block to the local blockchain through the longest chain rule, thereby completing the blockchain expansion.

[0021] In a second aspect, the present invention provides a blockchain consensus protocol privacy protection system based on proof of stake, comprising:

[0022] A first receiving module is configured to receive the equity information of the user;

[0023] The second receiving module is configured to receive the random number and random number commitment value of the user participating in the leader election during each round of election;

[0024] An election module is configured to use a leader election function to conduct an election based on a random number and equity information of a user participating in the leader election, wherein a noise value that follows a specific distribution is added to the leader election function;

[0025] The verification module is configured to generate a new block for the user elected as the leader, and broadcast the new block, the random number commitment value of the current election process, and the zero-knowledge proof proving the legitimacy of the new block, so that other users can verify the legitimacy of the new block by verifying the zero-knowledge proof.

[0026] In a third aspect, the present invention provides an electronic device comprising a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the method described in the first aspect is performed.

[0027] In a fourth aspect, the present invention provides a computer-readable storage medium for storing computer instructions, wherein when the computer instructions are executed by a processor, the method described in the first aspect is performed.

[0028] Compared with the prior art, the present invention has the following beneficial effects:

[0029] The present invention proposes a privacy protection method and system for a blockchain consensus protocol based on proof of stake, which is suitable for scenarios with anonymity requirements. Users participate in a leadership election process with added noise distribution. If elected as a leader, the generated new block and the zero-knowledge proof of the new block are made public in an anonymous manner. Others can only verify whether the generation of the new block is legal, and cannot obtain the identity information and equity information of the leader of the new block. Compared with the existing PoS privacy protection scheme, a means of preventing tag attacks is added, which effectively reduces the success rate of the adversary in accurately obtaining user information through statistical means when the adversary implements a delay time of the same length, and does not affect the requirements of other properties in the blockchain system.

[0030] The present invention proposes a privacy protection method and system for a blockchain consensus protocol based on proof of equity. A noise value that obeys a specific distribution is added to the leader election function, so that the frequency information of users in the short term is protected by the noise distribution, while ensuring that the long-term benefits of users match their actual equity. The success probability of adversaries such as tag attacks obtaining user equity through frequency information is significantly reduced, and adversaries are prevented from obtaining equity privacy information through tag attacks, thereby achieving further protection of user equity privacy.

[0031] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0033] Figure 1 A flow chart of a privacy protection method for a blockchain consensus protocol based on proof of stake provided in Example 1 of the present invention;

[0034] Figure 2 A framework diagram of the AVRF and the verifiable noise sampling function provided in Example 1 of the present invention. DETAILED DESCRIPTION

[0035] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0036] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0037] It should be noted that the terms used herein are only for describing specific embodiments, and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that the terms "include" and "have" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0038] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0039] Example 1

[0040] The purpose of this embodiment is to add noise values ​​that obey a specific distribution to the leader election process to resist labeling attacks based on the Private OuroborosPraos blockchain protocol proposed by Ganesh, Orlandi and Tschudi, combined with the idea of ​​differential privacy technology. During the leader election process, the user's equity information is protected by the noise value. Therefore, when the observed data frequency deviates from the equity value, it is difficult for the adversary to obtain the user's block frequency within a certain period of time, which helps the adversary correctly analyze the equity value held by the user, thereby avoiding the leakage of equity privacy.

[0041] Below is the process of generating election equity distribution in the original protocol; specifically, in the Private OuroborosPraos blockchain protocol, the election process satisfies the following constraints:

[0042] (1) The operating timeline is divided into several epoch periods (called epoch periods). The equity ratio of all users will not change in each epoch period. The equity distribution in the current epoch has been uniquely determined before the epoch begins. At the same time, the equity changes caused by transactions generated by the system in the current time will not affect the equity distribution of the leader election process in the epoch. The impact of equity changes will only be reflected in the equity distribution of future epochs.

[0043] (2) There is a Genesis-block at the beginning of each Epoch. During the initialization phase of each Epoch, the Genesis-block will record a commitment list L of all users holding shares in the current Epoch and their corresponding shareholding ratios, as well as a random seed (used to call the election function in the current Epoch).

[0044] (3) Only users recorded in the Genesis-block commitment list L in the current Epoch can participate in the block generation in the slot in the current Epoch. In each Epoch, time is further divided into several slots. All users in each slot will perform a leader election process and may generate a new block at the same time. The protocol stipulates that only one legal block can be generated in a slot. If no user wins in the slot, or the block is not broadcast to other users within the specified time due to network transmission problems, it is considered that no leader is generated in this slot.

[0045] like Figure 1 As shown, a privacy protection method for a blockchain consensus protocol based on proof of stake proposed in this embodiment includes:

[0046] Receive user’s equity information;

[0047] During each round of election, receive the random number and random number commitment value from the user participating in the leader election;

[0048] A leader election function is used to conduct an election based on the random number and equity information of the user participating in the leader election, and a noise value that follows a specific distribution is added to the leader election function;

[0049] Generate a new block for the user elected as the leader, and broadcast the new block, the random number commitment value of the current election process, and the zero-knowledge proof proving the legitimacy of the new block, so that other users can verify the legitimacy of the new block by verifying the zero-knowledge proof.

[0050] The above method can be divided into the initialization phase, the leader election phase and the chain extension phase. The following is a detailed description of these three phases.

[0051] Initialization phase: After dividing the election rounds according to time distribution, perform the following steps:

[0052] (1) The user holds the digital signature algorithm SIG = (Sig.KeyGen, Sign, Sig.Vrfy), selects a random number sk as the user's signature private key, and generates a signature public key vk of the signature private key sk by calling the Sig.KeyGen algorithm.

[0053] (2) The Pedersen commitment model is used to calculate the commitment values ​​Com(sk), Com(vk) of the signature private key sk and the signature public key vk, and the parameters of the digital signature algorithm are initialized.

[0054] (3) The Pedersen commitment model is used to calculate the equity commitment value Com(stk, r) of the user’s equity value stki ) and sent to the blockchain system; where Com is the commitment scheme, r i A random number required to run the commitment scheme Com.

[0055] (4) The blockchain system no longer directly publishes each user and the equity value held by the user, but instead lists the equity commitment value Com(stk,r i ) and the corresponding signature public key vk are published. List L contains the equity commitment values ​​of all users. Each user can query the equity commitment values ​​of all other users on list L, but cannot know the equity values ​​of other users.

[0056] Leader election phase: In order to ensure that the probability p of a user being elected as a leader maintains a linear relationship with the equity value stk held, the original leader election function is f(α)=1-(1-f) α , when f is small enough, f(α)≈αf; in each election slot of Epoch, leader election is performed according to the following process, including:

[0057] (1) First, it is necessary to verify whether the user participating in the leader election is a user holding equity. If the user is a legitimate user, the results generated by the user will be calculated and verified in subsequent steps.

[0058] (2) After verifying the user's legal identity in the leader election, the election begins. The AVRF function is called to generate the random number q and the random number commitment value Com(q,r) for participating in the leader election. The output length of AVRF is 2l, and r is the random number required to run the commitment scheme Com.

[0059] If the current election process is the first round of Epoch, the random number generated by AVRF is q=y||z; for other rounds of slots, the random number is q=y i ||z,y i is a random number generated in different slots, z is the input value of the noise sampling function generated by the first slot in the current Epoch, which is essentially a random number; at the same time, through zero-knowledge proof π q Verify the legitimacy of the random number q.

[0060] It can be understood that the input value of the noise sampling function in the current Epoch is generated in the first slot of each Epoch, which also means that the noise value of the user in each Epoch is fixed.

[0061] (3) After calling the AVRF function, (q, r, Com(q, r)) is generated, and the random number q and the equity value stk held are used as the input of the leader election function LE(.), and the output value of the leader election function LE(q, stk) is calculated. According to the output value of LE(q, stk), it is determined whether the user is elected as the leader;

[0062] Specifically, the calculation of LE(q,stk) satisfies the following relationship: , LE(q,stk)=1, otherwise LE(q,stk)=0;

[0063] If LE(q,stk)=1, the user is elected as the leader in the slot in the current election round;

[0064] If LE(q,stk)=0, stop this step and wait for the end of the current slot to enter the next round of election process.

[0065] Wherein, stake is the total equity value in the PoS system, ω(z) is the noise sampling function, which takes z as input and samples a random value from probability distribution B as the noise value, and probability distribution B satisfies the mathematical expectation value E(B) of 0; for example, the noise value is a random number on the uniform distribution U(-0.3,0.3).

[0066] In this embodiment, even if the adversary can establish a binding relationship between equity information and users through means such as "marking attacks", on the one hand, the probability of a user being elected as a leader is protected by probability distribution B, making it difficult for the frequency of a user being elected as a leader to approach the probability value corresponding to the equity value he holds in a short period of time; on the other hand, because the mathematical expectation value of probability distribution B is 0, the frequency of a user being elected as a leader is very close to the probability corresponding to the equity value he holds under the long-term execution time of the protocol; therefore, while protecting the privacy of the user's (leader's) equity information, it ensures that the user's total income matches his equity.

[0067] (4) For the user elected as the leader, the new legal transactions collected during this round that are not on the chain are packaged into a new block m, and the new block m is digitally signed to obtain the corresponding signature value σ;

[0068] At the same time, a zero-knowledge proof π is generated based on the zero-knowledge proof public reference string crs selected by initialization, and the new block m is proved to be legal through the zero-knowledge proof π;

[0069] The core idea of ​​constructing zero-knowledge proof π is 1-out of–N zero-knowledge proof and range zero-knowledge proof. The function of zero-knowledge proof π is to prove the correctness of the following assertions:

[0070] (a) Signature σ is legally generated for the new block m.

[0071] (b) The output value of the election function LE(q,stk) is 1.

[0072] (c) The input value q of the election function LE(q,stk) is legally generated by the current AVRF.

[0073] (d) The input value stk of the election function LE(q,stk) is the legal equity held by the user.

[0074] (e) The new block m is legally generated by a user in the entire system.

[0075] (f) The public key used in the signature σ is legally generated by the user using the private key in the digital signature algorithm.

[0076] In addition, the legal generation of noise values ​​is implied in the various statements of the zero-knowledge proof; through the assertions (b)(c)(d) in the zero-knowledge proof π, it can be ensured that the input value of the noise sampling function is legally generated by the user using AVRF, and that the sampling output of the noise sampling function is legally embedded in the calculation process of the election function.

[0077] Finally, the leader in the slot anonymously broadcasts the ternary message group (m, Com(q, r), π) consisting of the new block m, the random number commitment value Com(q, r) of the current election process, and the zero-knowledge proof π that proves the legitimacy of the new block to the blockchain system, so that other users can verify the legitimacy of the new block m by verifying the zero-knowledge proof π and complete the expansion of the blockchain; if the verification passes, the new block m is added to the blockchain stored locally by the user.

[0078] In this embodiment, in order to ensure the anonymity of the leader information, during the blockchain expansion process, the legitimacy of the new block is verified by verifying the zero-knowledge proof π; when the verification is passed, a user p i Knowing that there is a user in the blockchain system who is legally elected as the leader in the current slot, and the leader generates a legal block, but user p i It is not known who is the user elected as the leader, nor is it possible to obtain the user information bound to the new block.

[0079] The core of the noise adding process in the privacy protection method of the blockchain consensus protocol based on proof of stake in this embodiment is to construct an AVRF function to complete the generation of election random numbers and design a verifiable noise sampling function, such as Figure 2 As shown, the process of adding noise using the AVRF function and the verifiable noise sampling function is described in detail below.

[0080] The AVRF function is constructed using the 2-hash VRF function based on the DDH problem. 2l ) to complete the design of the AVRF function. The AVRF function specifically includes a function group (AVRF.Gen, Update, AVRF.pro, VRF.ver), and its functions are:

[0081] (1) AVRF.Gen function: input a security parameter 2l, select a generator g on the group G, and randomly select an element k∈Z k And as the private key, output the public key pk = (g,g μ ).

[0082] (2) Update function: Input a public key pk = (g, g μ ), randomly select element r i ∈Z κ , output the updated public key The Update function is used to update the public key in the public-private key pair to prevent the adversary from breaking the anonymity through public key tracking.

[0083] (3) AVRF.pro function: Input public key pk = (g, g μ ) and information x, calculate μ = H (x), q = u k , H(x) is a hash function; generate a zero-knowledge proof π AVR Prove that q satisfies the assertion log u (q) = k, output (pk, q, π AVR ), where the zero-knowledge proof π AVR The implementation is done using algebraic structures.

[0084] (4)AVRF.ver function: Input is (x, q, π AVR ), according to the input (x,q,π AVR ) Verify zero-knowledge proof π AVR Is it correct? If it is correct, it will output a 1 to represent the verification is legal, otherwise it will output 0.

[0085] The user uses the private key k to call the AVRF function to generate a random number q=y||z, and at the same time commits k, q, y, z to obtain Com(k), Com(q), Com(y), Com(z) and makes them public. Note that these commitments uniquely mark a user identity; use z as the random number input of the noise sampling function ω(.), ω(z) generates a random number that conforms to the distribution sampling.

[0086] In the actual design, the noise sampling function ω(.) and the AVRF function calculation process are jointly verified by zero-knowledge proof. This design can use the MPC-in-the-head design idea to complete the zero-knowledge proof, and regard AVRF and ω(.) as a circuit C, where the description and commitment of circuit C are public and are composed of XOR gates and AND gates.

[0087] The user generates a zero-knowledge proof asserting that: there exists (k, q, z) that satisfies C(k, z) = ω(z) and Com(k), Com(q), Com(y), Com(z) are legal and q = y||z; the main implementation idea of ​​the proof is as follows: first, the user calculates the secret (k, q, z) to be proved locally, and regards the AVRF.pro function and the ω(.) function as a circuit C as a whole, and completes the verification of q and the call of ω(.) in circuit C; split the input of circuit C into n parts, and simulate the multi-party secure computation of n participants, and the user commits to the views of n parties; in the verification stage, other users can initiate challenges to open some views and verify whether the results are correct; if correct, other users believe that this is a legal calculation process for generating noise, and complete the generation of the entire zero-knowledge proof for the new block by connecting other zero-knowledge in series. At the same time, the Fiat-Shamir transformation can be used here to convert the zero-knowledge proof into a non-interactive one.

[0088] The legitimacy of the new block m is verified by verifying the zero-knowledge proof π. If the verification passes, the chain extension phase begins. Specifically, it includes:

[0089] (1) The user elected as the leader adds the generated new block m to the main chain C stored by it.

[0090] (2) At the end of each slot, all non-leader users in the network observe whether there is any information about the release of a new block in the network; if it is found that there is an unreceived information group (m, Com(q, r), π), the user who received the information group verifies the correctness of the zero-knowledge proof π; if the zero-knowledge proof π passes the verification, the new block m is considered to be a legitimate block generated by a legitimate leader; all users who received the information group will add this new block m to their local blockchain through the longest chain rule, thereby completing the expansion phase of the blockchain in the current slot.

[0091] (3) If no leader is elected in the slot, all users keep the state of the blockchain within their field of view unchanged.

[0092] The privacy protection method of the blockchain consensus protocol based on proof of equity provided in this embodiment is suitable for scenarios where anonymity is required. For example, in the process of anonymously electing a leader, all members in the system participate in the leader election process with added noise distribution. If the user is elected as the leader, the generated new block and the zero-knowledge proof of the new block are made public to the network in an anonymous manner. When other people receive the new block in the blockchain network environment, they can only verify whether the generation of the new block is legal, but cannot obtain the identity information and equity information of the leader of the new block. Compared with the existing PoS privacy protection scheme, the scheme of this embodiment adds a means to prevent marking attacks. Under the same delay time, the success rate of the adversary to accurately obtain user information through statistical means can be effectively reduced, and the requirements of other properties in the blockchain system will not be affected. For example, if the upper limit of the adversary's estimation error through observation is set to 10%, and the noise value distribution is selected as a uniform distribution (B~U(-0.3,0.3)), the success probability of the adversary to implement a marking attack under a long delay to obtain user equity can be reduced from 61% to 34%, while not violating the requirements of other security properties of the entire blockchain consensus protocol.

[0093] Example 2

[0094] This embodiment provides a blockchain consensus protocol privacy protection system based on proof of stake, including:

[0095] A first receiving module is configured to receive the equity information of the user;

[0096] The second receiving module is configured to receive the random number and random number commitment value of the user participating in the leader election during each round of election;

[0097] An election module is configured to use a leader election function to conduct an election based on a random number and equity information of a user participating in the leader election, wherein a noise value that follows a specific distribution is added to the leader election function;

[0098] The verification module is configured to generate a new block for the user elected as the leader, and broadcast the new block, the random number commitment value of the current election process, and the zero-knowledge proof proving the legitimacy of the new block, so that other users can verify the legitimacy of the new block by verifying the zero-knowledge proof.

[0099] It should be noted that the above modules correspond to the steps described in Example 1, and the examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above Example 1. It should be noted that the above modules, as part of the system, can be executed in a computer system such as a set of computer executable instructions.

[0100] In further embodiments, there is also provided:

[0101] An electronic device includes a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the method described in Embodiment 1 is performed. For the sake of brevity, it will not be described in detail here.

[0102] It should be understood that in this embodiment, the processor may be a central processing unit CPU, and the processor may also be other general-purpose processors, digital signal processors DSP, application-specific integrated circuits ASIC, off-the-shelf programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0103] The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.

[0104] A computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, the method described in Example 1 is completed.

[0105] The method in Example 1 can be directly embodied as a hardware processor, or a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it is not described in detail here.

[0106] Those skilled in the art will appreciate that the units, i.e., algorithm steps, of the various examples described in conjunction with this embodiment can be implemented in electronic hardware or in a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0107] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.

Claims

1. A privacy protection method for blockchain consensus protocol based on proof of stake, It is characterized in that include: Receive user’s equity information; In each round of election, the random number of users participating in the leader election is || , is the random number in each round of election process, is the input value of the noise sampling function and the random number commitment value Com(q,r) , r To run the commitment program Com The required random number; The leader election function is used to conduct the election based on the random number and equity information of the user participating in the leader election. The leader election function adds a noise value that obeys a specific distribution. The noise value is a random value sampled from a uniform distribution, and the uniform distribution satisfies the mathematical expectation value of zero. Based on the AVRF function and the noise sampling function, a verifiable noise value is generated through a circuit conversion method, and the noise value is added to the leader election function. The AVRF function is an anonymous VRF function. Generate a new block for the user elected as the leader, and broadcast the new block and the random number commitment value of the current election process Com (q,r) And use the 1-out of-N zero-knowledge proof method to construct a zero-knowledge proof to prove the legitimacy of the new block, so that other users can verify the legitimacy of the new block by verifying the zero-knowledge proof; The leader in this slot will , the random number commitment value of the current election process Com(q,r) and zero-knowledge proofs to prove the legitimacy of new blocks The three-way message group Broadcast anonymously to the blockchain system so that other users can verify the zero-knowledge proof To verify the new block The legitimacy of the blockchain and the expansion of the blockchain; If the verification passes, the new block Added to the user's locally stored blockchain; In order to ensure the anonymity of the leader information, during the blockchain expansion process, by verifying the zero-knowledge proof π Verify the legitimacy of the new block; when the verification is passed, a user Knowing that there is a user in the blockchain system who is legally elected as the leader in the current slot, and the leader generates a legal block, but the user It is not known who is the user elected as the leader, nor is it possible to obtain the user information bound to the new block.

2. A privacy protection method for blockchain consensus protocol based on proof of stake as claimed in claim 1, It is characterized in that The equity information includes the equity value and equity commitment value held by the user, and the equity commitment value and the corresponding user signature public key are published in the blockchain system in the form of a list.

3. A privacy protection method for blockchain consensus protocol based on proof of stake as claimed in claim 1, It is characterized in that In the process of election, if and only if When the leader election function =1, then the user is elected as the leader; otherwise, the leader election function =0; where is the random number in each round of election process, is the noise sampling function The input value of is the equity value held by the user, e is the total equity value, l Half the length of the AVRF function output.

4. A privacy protection method for blockchain consensus protocol based on proof of stake as claimed in claim 1, It is characterized in that The random number of users participating in the leader election is , is the random number in each round of election process, is the input value of the noise sampling function. In different rounds of election processes in the same epoch, the input value of the noise sampling function is fixed.

5. A privacy protection method for blockchain consensus protocol based on proof of stake as claimed in claim 1, It is characterized in that After verifying the legitimacy of the new block through zero-knowledge proof, the leader adds the new block to the local blockchain, and non-leader users add the new block to the local blockchain through the longest chain rule, thus completing the blockchain expansion.

6. A blockchain consensus protocol privacy protection system based on proof of stake, It is characterized in that include: A first receiving module is configured to receive the equity information of the user; The second receiving module is configured to receive the random number of the user participating in the leader election during each round of election. || , is the random number in each round of election process, is the input value of the noise sampling function and the random number commitment value Com(q,r),r To run the commitment program Com The required random number; The election module is configured to adopt a leader election function to conduct an election based on the random number and equity information of the user participating in the leader election, wherein a noise value that obeys a specific distribution is added to the leader election function; the noise value is a random value sampled from a uniform distribution, and the uniform distribution satisfies a mathematical expectation value of zero; a verifiable noise value is generated through a circuit conversion method based on an AVRF function and a noise sampling function, and the noise value is added to the leader election function, and the AVRF function is an anonymous VRF function; The verification module is configured to generate new blocks for the user elected as the leader and broadcast the new blocks and the random number commitment value of the current election process. Com(q,r) And use the 1-out of-N zero-knowledge proof method to construct a zero-knowledge proof to prove the legitimacy of the new block, so that other users can verify the legitimacy of the new block by verifying the zero-knowledge proof; The leader in this slot will , the random number commitment value of the current election process Com(q,r) and zero-knowledge proofs to prove the legitimacy of new blocks The three-way message group Broadcast anonymously to the blockchain system so that other users can verify the zero-knowledge proof To verify the new block The legitimacy of the blockchain and the expansion of the blockchain; If the verification passes, the new block Added to the user's locally stored blockchain; In order to ensure the anonymity of the leader information, during the blockchain expansion process, by verifying the zero-knowledge proof Verify the legitimacy of the new block; when the verification is passed, a user Knowing that there is a user in the blockchain system who is legally elected as the leader in the current slot, and the leader generates a legal block, but the user It is not known who is the user elected as the leader, nor is it possible to obtain the user information bound to the new block.

7. An electronic device, It is characterized in that The method comprises a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the method according to any one of claims 1 to 5 is completed.

8. A computer-readable storage medium, It is characterized in that Used to store computer instructions, which, when executed by a processor, complete the method described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Fog network unloading decision and resource allocation method based on block chain technology

    CN111770073A

  • Security, privacy protection and tradable distributed machine learning framework based on blockchain technology

    CN111915294A

  • Extensible and secure consensus method and system, storage medium and intelligent terminal

    CN113452747A

  • Anti-counterfeiting defense method based on Raft consensus algorithm

    CN115134161A

  • Method for providing blockchain based bicameralism consensus service using quantum random function mechanism

    KR102090723B1