Security data generation method and device based on DRB protocol, equipment and medium
By using trap gate verified delay function and verified secret sharing policy in the DRB protocol, the output value is generated and verified, and the complexity and unpredictability of the DRB protocol under the delay mechanism is solved, and high scalability and security are achieved. .
Patent Information
- Application Number
- CN202410423471.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-09
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-04-09
AI Technical Summary
The existing DRB protocol under the delay mechanism cannot effectively guarantee the unpredictability of the protocol while utilizing leaders to reduce the complexity of the DRB protocol, resulting in malicious participants that may predict multiple rounds of random output, causing security issues.
The preset trap door verified delay function generates trap doors for each participant in the DRB protocol, and distributes the trap doors to participants, elects leaders, calculates and verifies output values, and executes trap doors using verifiable secret sharing strategies. Refactoring operations to generate secure data to ensure unpredictability.
Under the delay mechanism, the complexity of the DRB protocol is reduced and high scalability is achieved. At the same time, the unpredictability of the DRB protocol is effectively guaranteed and the malicious participants are prevented from predicting random output.
Smart Images

Figure CN119316124A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of decentralized random number generation, and in particular to a method, device, equipment and medium for generating secure data based on the DRB protocol. Background Art
[0002] In the design and application of blockchain, public random numbers play an important role. The election of leaders and committees in consensus protocols, blockchain sharding, and smart contracts all require secure and reliable public random numbers. In addition, public random numbers also play an important role in cryptographic applications such as cryptographic protocol parameter generation, privacy-preserving message services, and electronic voting, as well as in social activities such as public election audits and license plate lotteries. In recent years, many public applications rely on third-party institutions to provide random numbers, resulting in the reliability of random numbers stemming from trust in third parties. However, recent security threat incidents such as backdoor leaks of dual elliptic curve pseudo-random number generators and third-party manipulation of random numbers have greatly reduced public trust, and the reliability of random numbers cannot be guaranteed. In addition, in decentralized applications such as blockchain, the provision of random numbers by trusted third parties also runs counter to the goal of decentralization.
[0003] Decentralized Randomness Beacon (DRB) is a new cryptographic technology that can generate continuous trusted random values in a decentralized network by a group of mutually untrusted participants. However, in order to achieve decentralization, each participant in many DRB protocols needs to perform a large number of complex cryptographic calculations, resulting in high communication and complexity of the protocol, which cannot be applied to real scenarios. In order to ensure the safe generation of random values, the existing technology uses a delay mechanism, that is, a time delay cryptographic primitive to construct DRB. However, in order to reduce the complexity of calculation and communication to achieve high scalability, the existing protocol under the delay mechanism usually needs to elect a leader in each round to dominate the protocol process. In some protocols, the leader has too much influence. Specifically, the random value of each round is determined only by the random value of the previous round and the secret value of the leader of this round. As a result, after a malicious participant is elected as the leader, he can predict the random output of multiple rounds thereafter. Unpredictability is an important security attribute of DRB. Destroying unpredictability may lead to a series of security issues, including block producers in blockchain consensus encountering denial of service attacks or node corruption attacks in advance, and the rampant vote-buying caused by the destruction of the receiptlessness in electronic voting.
[0004] In summary, the existing DRB protocol under the delay mechanism cannot effectively ensure the unpredictability of the protocol while using the leader to reduce the complexity of the DRB protocol, which needs to be solved urgently. Summary of the invention
[0005] The present application provides a method, device, equipment and medium for generating secure data based on the DRB protocol to solve the problem that the existing DRB protocol under the delay mechanism cannot effectively ensure the unpredictability of the protocol while using a leader to reduce the complexity of the DRB protocol.
[0006] The first aspect of the present application provides a method for generating secure data based on the DRB protocol, comprising the following steps: generating a trapdoor corresponding to each participant in the DRB protocol according to a preset trapdoor verifiable delay function, and distributing each trapdoor to each participant using a preset verifiable secret sharing strategy; electing a current leader of the DRB protocol, and calculating the output value of the trapdoor verifiable delay function according to each trapdoor, and performing corresponding verification operations on the output value by each participant and the leader to generate a final valid output set; calculating a valid output sum according to the final valid output set, and verifying the final valid output set and the valid output sum to obtain a verification result, and using the verification result to perform a trapdoor reconstruction operation of the verifiable secret sharing strategy to generate secure data of the DRB protocol through the result of the trapdoor reconstruction operation.
[0007] Optionally, in one embodiment of the present application, the trapdoor corresponding to each participant in the DRB protocol is generated according to a preset trapdoor verifiable delay function, and each trapdoor is distributed to each participant using a preset verifiable secret sharing strategy, including: initializing the trapdoor verifiable delay function by each participant to generate a trapdoor and a first public parameter corresponding to the trapdoor verifiable delay function; broadcasting the first public parameter to receive at least one second public parameter, and constructing a valid public parameter set based on the at least one second public parameter and the first public parameter; initializing the verifiable secret sharing function by each participant to generate a third public parameter, and based on the valid public parameter set and the third public parameter, distributing the trapdoor to each participant of the DRB protocol through the verifiable secret sharing strategy.
[0008] Optionally, in one embodiment of the present application, the current leader of the DRB protocol is elected, and the output value of the trapdoor-verifiable delay function is calculated according to each trapdoor, and corresponding verification operations are performed on the output value by each participant and the leader to generate a final valid output set, including: based on a preset random value of the DRB protocol, each participant elects the current leader of the DRB protocol; according to the preset random value and each trapdoor, the output value of the trapdoor-verifiable delay function of each participant is calculated and broadcast to receive output values sent by other participants; a first validity verification is performed on the output values sent by the other participants to construct an initial valid output set based on the output values that pass the first validity verification, and the initial valid output set is sent to the leader; a second validity verification is performed on each initial valid output value in the initial valid output set by the leader to construct the final valid output set based on the initial valid output value that passes the second validity verification.
[0009] Optionally, in one embodiment of the present application, the effective output sum is calculated according to the final effective output set, and the final effective output set and the effective output sum are verified to obtain a verification result, and the verification result is used to perform the trapdoor reconstruction operation of the verifiable secret sharing strategy to generate the security data of the DRB protocol through the result of the trapdoor reconstruction operation, including: calculating the effective output sum according to the final effective output set, and broadcasting the final effective output set and the effective output sum through the leader; performing a third validity verification on the final effective output set and the effective output sum by each participant, and allowing the participants who pass the third validity verification to broadcast preset voting information; reconstructing the reconstructed trapdoor corresponding to the trapdoor verifiable delay function of the participant who failed the third validity verification by using the trapdoor reconstruction operation by each participant, and calculating the correct output value of the trapdoor verifiable delay function of the participant who failed the third validity verification according to the reconstructed trapdoor; generating the security data of the DRB protocol based on the correct output value of the participant who failed the third validity verification and the effective output sum of the participant who passed the third validity verification.
[0010] The second aspect of the present application provides a security data generation device based on the DRB protocol, including: an establishment module, used to generate a trapdoor corresponding to each participant in the DRB protocol according to a preset trapdoor verifiable delay function, and distribute each trapdoor to each participant using a preset verifiable secret sharing strategy; a contribution module, used to elect the current leader of the DRB protocol, and calculate the output value of the trapdoor verifiable delay function according to each trapdoor, and perform corresponding verification operations on the output value through each participant and the leader to generate a final valid output set; a generation module, used to calculate the valid output sum according to the final valid output set, and verify the final valid output set and the valid output sum to obtain a verification result, and use the verification result to perform the trapdoor reconstruction operation of the verifiable secret sharing strategy to generate the security data of the DRB protocol through the result of the trapdoor reconstruction operation.
[0011] Optionally, in one embodiment of the present application, the establishment module includes: an initialization unit, used to initialize the trapdoor verifiable delay function through each participant, generate a trapdoor and a first public parameter corresponding to the trapdoor verifiable delay function; a first broadcast unit, used to broadcast the first public parameter to receive at least one second public parameter, and construct a valid public parameter set based on the at least one second public parameter and the first public parameter; a distribution unit, used to initialize the verifiable secret sharing function through each participant, generate a third public parameter, and distribute the trapdoor to each participant of the DRB protocol through the verifiable secret sharing strategy based on the valid public parameter set and the third public parameter.
[0012] Optionally, in one embodiment of the present application, the contribution module includes: an election unit, used to enable each participant to elect the current leader of the DRB protocol based on a preset random value of the DRB protocol; a receiving unit, used to calculate and broadcast the output value of the trapdoor verifiable delay function of each participant according to the preset random value and each trapdoor, so as to receive the output values sent by other participants; a first verification unit, used to perform a first validity verification on the output values sent by the other participants, so as to construct an initial valid output set based on the output values that pass the first validity verification, and send the initial valid output set to the leader; a second verification unit, used to perform a second validity verification on each initial valid output value in the initial valid output set through the leader, so as to construct the final valid output set based on the initial valid output values that pass the second validity verification.
[0013] Optionally, in one embodiment of the present application, the generation module includes: a second broadcast unit, used to calculate the valid output sum based on the final valid output set, and broadcast the final valid output set and the valid output sum through the leader; a third verification unit, used to perform a third validity verification on the final valid output set and the valid output sum through each participant, and enable the participants who pass the third validity verification to broadcast preset voting information; a reconstruction unit, used to reconstruct the reconstructed trapdoor corresponding to the trapdoor verifiable delay function of the participant who fails to pass the third validity verification by using a trapdoor reconstruction operation through each participant, and calculate the correct output value of the trapdoor verifiable delay function of the participant who fails to pass the third validity verification based on the reconstructed trapdoor; an acquisition unit, used to generate the security data of the DRB protocol based on the correct output value of the participant who fails to pass the third validity verification and the valid output sum of the participant who passes the third validity verification.
[0014] The third aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the DRB protocol-based security data generation method as described in the above embodiment.
[0015] The fourth aspect embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and when the program is executed by a processor, it implements the above-mentioned DRB protocol-based security data generation method.
[0016] Therefore, the embodiments of the present application have the following beneficial effects:
[0017] The embodiment of the present application can generate a trapdoor corresponding to each participant in the DRB protocol according to a preset trapdoor verifiable delay function, and distribute each trapdoor to each participant using a preset verifiable secret sharing strategy; elect the current leader of the DRB protocol, and calculate the output value of the trapdoor verifiable delay function according to each trapdoor, and perform corresponding verification operations on the output value through each participant and the leader to generate a final valid output set; calculate the effective output sum according to the final valid output set, and verify the final valid output set and the effective output sum to obtain a verification result, and use the verification result to perform a trapdoor reconstruction operation of the verifiable secret sharing strategy to generate the security data of the DRB protocol through the result of the trapdoor reconstruction operation, so that under the delay mechanism, the leader is used to reduce the complexity of the DRB protocol and achieve high scalability, while effectively ensuring the unpredictability of the DRB protocol. Therefore, the existing DRB protocol under the delay mechanism is solved, and the problem that the leader cannot be used to reduce the complexity of the DRB protocol while effectively ensuring the unpredictability of the protocol is solved.
[0018] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0020] Figure 1 A schematic diagram of the execution logic of a security data generation method based on the DRB protocol provided in this application;
[0021] Figure 2 A flowchart of a method for generating security data based on the DRB protocol according to an embodiment of the present application;
[0022] Figure 3 A schematic diagram of an execution flow of the establishment phase provided for an embodiment of the present application;
[0023] Figure 4 A schematic diagram of an execution flow of a leader election phase provided for an embodiment of the present application;
[0024] Figure 5 A schematic diagram of a contribution phase execution flow provided for an embodiment of the present application;
[0025] Figure 6 A schematic diagram of a negotiation phase execution flow provided for an embodiment of the present application;
[0026] Figure 7 A schematic diagram of an output phase execution flow provided for an embodiment of the present application;
[0027] Figure 8 This is an example diagram of a security data generating device based on the DRB protocol according to an embodiment of the present application;
[0028] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0029] Among them, 10-a secure data generating device based on the DRB protocol, 100-an establishment module, 200-a contribution module, 300-a generation module, 901-a memory, 902-a processor, and 903-a communication interface. DETAILED DESCRIPTION
[0030] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0031] The following describes the security data generation method, device, equipment and medium based on the DRB protocol of the embodiment of the present application with reference to the accompanying drawings. In view of the problem that malicious participants may predict the random output of multiple rounds in the delay mechanism mentioned in the above background technology, and it is difficult to ensure the unpredictability of the DRB protocol, the present application provides a security data generation method based on the DRB protocol, in which a trapdoor corresponding to each participant in the DRB protocol is generated according to a preset trapdoor verifiable delay function, and each trapdoor is distributed to each participant using a preset verifiable secret sharing strategy; the current leader of the DRB protocol is elected, and the output value of the trapdoor verifiable delay function is calculated according to each trapdoor, and the output value is performed by each participant and the leader to perform corresponding verification operations to generate a final valid output set; the valid output sum is calculated according to the final valid output set, and the final valid output set and the valid output sum are verified to obtain the verification result, and the verification result is used to perform the trapdoor reconstruction operation of the verifiable secret sharing strategy, so as to generate the security data of the DRB protocol through the result of the trapdoor reconstruction operation, so that under the delay mechanism, the leader is used to reduce the complexity of the DRB protocol, achieve high scalability, and effectively ensure the unpredictability of the DRB protocol. This solves the problem that the existing DRB protocol under the delay mechanism cannot effectively ensure the unpredictability of the protocol while using the leader to reduce the complexity of the DRB protocol.
[0032] In order to facilitate those skilled in the art to understand the execution logic of the DRB protocol-based security data generation method of the present application, some parameters and execution processes in the DRB protocol involved in the present application are briefly described below:
[0033] 1. Description of some parameters:
[0034] The DRB protocol of this application includes n participants, namely P 1 ,P 2 ,…,P n ; The time parameter of the trapdoor verifiable delay function (VDF) is denoted as T; the VDF security parameter is denoted as λ; the initial random value is denoted as R 0 , the random output of the rth round is recorded as R r .
[0035] 2. Execution process:
[0036] The DRB protocol of this application is executed in rounds, and a random value is generated in each round, such as Figure 1 As shown, the DRB protocol only executes the establishment phase at the beginning, and then executes the leader election phase, contribution phase, negotiation phase and output phase in each round.
[0037] The establishment phase includes the VDF initialization process, the Verifiable Secret Sharing (VSS) initialization process, and the secret sharing process.
[0038] The leader election phase allows each participant to uniformly and randomly elect the leader of this round based on the random value of the previous round;
[0039] The contribution phase includes the VDF calculation process, output verification process, and leader verification process;
[0040] The negotiation phase includes the leader broadcast process, the participant voting process, and the trapdoor reconstruction process;
[0041] The output phase is when the leader and each participant calculate the valid VDF output and the corresponding calculation strategy to generate secure data based on the DRB protocol.
[0042] Specifically, Figure 2 A flowchart of a method for generating security data based on the DRB protocol provided in an embodiment of the present application.
[0043] like Figure 2 As shown, the security data generation method based on the DRB protocol includes the following steps:
[0044] In step S201, a trapdoor corresponding to each participant in the DRB protocol is generated according to a preset trapdoor verifiable delay function, and each trapdoor is distributed to each participant using a preset verifiable secret sharing strategy.
[0045] The embodiment of the present application can first be performed by each participant P i Initialize VDF and generate its own public parameter pp i and trapdoor sk i , broadcast VDF public parameters pp i , and exchange and verify the received public parameters to obtain the same valid public parameter set P = {pp 1 ,pp 2 ,…,pp n}; Secondly, the embodiments of the present application can perform VSS initialization operations, so that each participant runs VSS initialization, generates and discloses VSS public parameters; thereafter, in the embodiments of the present application, each participant can distribute the VDF trapdoor to other participants through the VSS share, thereby providing a reliable basis for the subsequent generation of a valid output set.
[0046] Optionally, in one embodiment of the present application, a trapdoor corresponding to each participant in the DRB protocol is generated according to a preset trapdoor verifiable delay function, and each trapdoor is distributed to each participant using a preset verifiable secret sharing strategy, including: initializing the trapdoor verifiable delay function by each participant to generate a trapdoor and a first public parameter corresponding to the trapdoor verifiable delay function; broadcasting the first public parameter to receive at least one second public parameter, and constructing a valid public parameter set based on at least one second public parameter and the first public parameter; initializing the verifiable secret sharing function by each participant to generate a third public parameter, and based on the valid public parameter set and the third public parameter, distributing the trapdoor to each participant of the DRB protocol through the verifiable secret sharing strategy.
[0047] Specifically, Figure 3 As shown, the specific steps of the establishment phase of the embodiment of the present application are as follows:
[0048] 1. VDF initialization: Each participant P i Run the Setup(λ) algorithm of VDF to obtain the public parameters (i.e. the first public parameter and Figure 3 VDF public parameters in)pp i and trapdoor sk i , and exchange pp i ;
[0049] 2. VSS initialization: Run VDF's VerifySetup(λ, pp i ) algorithm to verify all received public parameters (i.e. the second public parameter and Figure 3 VSS common parameters in );
[0050] 3. Secret sharing: All participants obtain the same valid public parameter set P = {pp 1 , pp 2 , ..., pp n}, each participant P i Perform VSS initialization, share distribution, and share verification operations to distribute its trapdoor sk i The secret share of , and its threshold is f+1.
[0051] Therefore, the embodiments of the present application use VDF and VSS technology to achieve the initialization of the protocol, ensure that each participant obtains a secret sharing share of the public parameter set and the trapdoor, and ensure the secure generation of subsequent random numbers.
[0052] In step S202, the current leader of the DRB protocol is elected, and the output value of the trapdoor verifiable delay function is calculated according to each trapdoor, and the corresponding verification operation is performed on the output value by each participant and the leader to generate a final valid output set.
[0053] Furthermore, the embodiments of the present application also require that each participant uniformly and randomly elect a leader for this round based on the random value generated in the previous round; secondly, each participant inputs the random value and trapdoor of the previous round, and quickly calculates and broadcasts the output value of the VDF through the TrapdoorEval algorithm of the VDF; thereafter, each participant can verify the validity of the received VDF output value, and send the valid output set to the leader, and the leader verifies all received valid output sets to obtain the final valid output set.
[0054] Optionally, in one embodiment of the present application, the current leader of the DRB protocol is elected, each participant calculates the output value of the trapdoor-verifiable delay function according to each trapdoor, and each participant and the leader perform corresponding verification operations on the output value to generate a final valid output set, including: based on a preset random value of the DRB protocol, each participant elects the current leader of the DRB protocol; each participant calculates and broadcasts the output value of each participant's trapdoor-verifiable delay function according to the preset random value and each trapdoor to receive output values sent by other participants; performs a first validity verification on the output values sent by other participants to construct an initial valid output set based on the output values that pass the first validity verification, and sends the initial valid output set to the leader; and the leader performs a second validity verification on each initial valid output value in the initial valid output set to construct a final valid output set based on the initial valid output values that pass the second validity verification.
[0055] It should be noted that if Figure 4 As shown, in the leader election process of the present application embodiment, each participant P i The random value R in the previous round r-1 Calculate the leader of this round
[0056] Furthermore, if Figure 5 As shown, the specific steps of the contribution stage in the embodiment of the present application are as follows:
[0057] 1. VDF calculation: Each participant P i Both quickly calculate the output value of the trapdoor VDF: (yr,i , π r,i )←TrapdoorEval(pp i , x r,i ,T,sk i ), and broadcast (y r,i , π r,i );
[0058] 2. Output verification: Each participant runs the VDF’s Verify algorithm to verify the received (y r,i , π r,i ) is valid, that is, {0, 1}←Verify(pp i , x r,i ,T,y r,i , π r,i ), obtain the initial valid output set, and send the initial valid output set to the leader;
[0059] 3. Leader verification: The leader verifies all received (y r,i , π r,i ) is valid, that is, {0, 1}←Verify(pp i , x r,i ,T,y r,i , π r,i ), and obtain the final valid output set {(y r,i , π r,i )|i∈I}, where I is the set of participants corresponding to the valid output value.
[0060] Therefore, the embodiments of the present application can effectively ensure that malicious participants cannot predict the random outputs of subsequent rounds by electing a suitable leader and generating a final valid output set.
[0061] In step S203, the valid output sum is calculated based on the final valid output set, and the final valid output set and the valid output sum are verified to obtain a verification result, and the verification result is used to perform a trapdoor reconstruction operation of the verifiable secret sharing strategy to generate security data of the DRB protocol through the result of the trapdoor reconstruction operation.
[0062] After constructing the final valid output set, further, the embodiments of the present application may also perform operations such as leader broadcasting, participant voting and trapdoor reconstruction in the negotiation stage, that is, the leader broadcasts the final valid output set and the VDF output sum (that is, the valid output); each participant can verify that the valid output sets it sends are all in the final valid output set, and if they are all in the final valid output set, a voting message is broadcast for voting; each participant can reconstruct the trapdoor corresponding to the invalid output value through VSS secret recovery, and calculate the correct valid output value.
[0063] In addition, in the output phase, the embodiment of the present application can recalculate and broadcast the VDF output value through the leader inputting the sum of VDF outputs (i.e., valid output value) and trapdoor. At the same time, other participants slowly calculate the VDF output value of the leader without trapdoors and keep listening to the broadcast. If the leader's valid VDF output (i.e., valid output value) is received, the calculation is stopped, and then the random output data of this round (i.e., the security data of the DRB protocol) is calculated by all participants.
[0064] Therefore, the embodiments of the present application can reduce the communication complexity to the lowest O(n) among similar protocols while ensuring availability, anti-bias and public verifiability. 2 ), and can tolerate the adversary controlling no more than 1 / 2 of the malicious participants in a synchronous network, and ensure the complete unpredictability of the DRB protocol, that is, the adversary cannot predict the random output of this round and subsequent rounds before the start of this round.
[0065] Optionally, in one embodiment of the present application, the effective output sum is calculated based on the final effective output set, and the final effective output set and the effective output sum are verified to obtain a verification result, and the verification result is used to perform a trapdoor reconstruction operation of the verifiable secret sharing strategy to generate security data of the DRB protocol through the result of the trapdoor reconstruction operation, including: calculating the effective output sum based on the final effective output set, and broadcasting the final effective output set and the effective output sum through the leader; performing a third validity verification on the final effective output set and the effective output sum by each participant, and allowing the participants who pass the third validity verification to broadcast preset voting information; reconstructing the reconstructed trapdoor corresponding to the trapdoor verifiable delay function of the participant who failed the third validity verification by using the trapdoor reconstruction operation by each participant, and calculating the correct output value of the trapdoor verifiable delay function of the participant who failed the third validity verification based on the reconstructed trapdoor; generating security data of the DRB protocol based on the correct output value of the participant who failed the third validity verification and the effective output sum of the participant who passed the third validity verification.
[0066] In the actual implementation process, the execution logic of the embodiment of the present application in the negotiation phase is as follows: Figure 6 As shown, the specific steps are as follows:
[0067] 1. Leader broadcast: The leader calculates the sum of valid VDF outputs (i.e., the sum of valid outputs) root = ∑ i∈I y r,i , and broadcast <Propose,root,{(y r,i , π r,i )|i∈I},l r > Message;
[0068] 2. Participant voting: After receiving the Propose message, the participant verifies whether the valid output set sent by it is in {(y r,i , π r,i )|i∈I}, and other VDF outputs are valid, and root is the correct output (i.e., perform the third validity verification); if the verification passes, broadcast <Vote,root,l r >Message to vote for root;
[0069] 3. Trapdoor reconstruction: For the valid output set {(y r,i , π r,i )|i∈I} in the VDF output {(y r,j , π r,j )|j∈{1,2,...,n}\I}, at least f+1 participants can perform the secret recovery operation of VSS and reconstruct the VDF trapdoor sk of the corresponding participant through the Lagrangian interpolation formula j , and quickly calculate the corresponding output, that is, (y r,j , π r,j )←TrapdoorEval(pp j , x r,j ,T,sk j ), so that all participants can obtain the sum of all valid VDF outputs root.
[0070] In addition, if Figure 7 As shown, the specific workflow of the output stage of the embodiment of the present application is as follows:
[0071] 1. The leader quickly calculates the output of its trapdoor VDF, i.e. And broadcast (y r , π r );
[0072] 2. Other participants calculate slowly: At the same time, monitor the broadcast, if a valid (y r , π r ), then stop the calculation;
[0073] 3. All participants calculate the random output of this round (i.e. output the security data of the DRB protocol): R r ←hash(y r ), all participants get the random output R of this round r After that, let the round number r←r+1, and go to the leader election phase to enter the next round of random number generation.
[0074] Therefore, the embodiments of the present application, by adopting a trapdoor verifiable delay function and verifiable secret sharing technology, can reduce the communication complexity to the lowest among similar protocols while ensuring important security properties of the DRB protocol such as availability, complete unpredictability, anti-bias and public verifiability. It can also tolerate an adversary controlling no more than half of the malicious participants in a synchronous network, achieving the theoretical optimum, effectively solving problems such as the unpredictability of existing protocols under the delay mechanism, and has high execution efficiency and security performance under the synchronous network model.
[0075] According to the security data generation method based on the DRB protocol proposed in the embodiment of the present application, a trapdoor corresponding to each participant in the DRB protocol is generated according to a preset trapdoor verifiable delay function, and each trapdoor is distributed to each participant using a preset verifiable secret sharing strategy; the current leader of the DRB protocol is elected, and the output value of the trapdoor verifiable delay function is calculated according to each trapdoor, and each participant and the leader perform corresponding verification operations on the output value to generate a final valid output set; the valid output sum is calculated according to the final valid output set, and the final valid output set and the valid output sum are verified to obtain a verification result, and the verification result is used to perform a trapdoor reconstruction operation of the verifiable secret sharing strategy to generate security data of the DRB protocol through the result of the trapdoor reconstruction operation, so that under the delay mechanism, the leader is used to reduce the complexity of the DRB protocol and achieve high scalability, while effectively ensuring the unpredictability of the DRB protocol.
[0076] Secondly, the security data generation device based on the DRB protocol proposed in accordance with the embodiment of the present application is described with reference to the accompanying drawings.
[0077] Figure 8 It is a block diagram of a security data generating device based on the DRB protocol according to an embodiment of the present application.
[0078] like Figure 8 As shown, the DRB protocol-based security data generating device 10 includes: an establishing module 100 , a contributing module 200 and a generating module 300 .
[0079] Among them, a module 100 is established to generate a trapdoor corresponding to each participant in the DRB protocol according to a preset trapdoor verifiable delay function, and distribute each trapdoor to each participant using a preset verifiable secret sharing strategy.
[0080] The contribution module 200 is used to elect the current leader of the DRB protocol, and calculate the output value of the trapdoor verifiable delay function according to each trapdoor, and perform corresponding verification operations on the output value through each participant and the leader to generate a final valid output set.
[0081] The generation module 300 is used to calculate the effective output sum based on the final effective output set, and verify the final effective output set and the effective output sum to obtain a verification result, and use the verification result to perform a trapdoor reconstruction operation of the verifiable secret sharing strategy to generate security data of the DRB protocol through the result of the trapdoor reconstruction operation.
[0082] Optionally, in one embodiment of the present application, the establishment module 100 includes: an initialization unit, a first broadcast unit, and a distribution unit.
[0083] The initialization unit is used to initialize the trapdoor verifiable delay function through each participant, and generate a trapdoor and a first public parameter corresponding to the trapdoor verifiable delay function.
[0084] The first broadcast unit is used to broadcast a first public parameter to receive at least one second public parameter and construct a valid public parameter set according to the at least one second public parameter and the first public parameter.
[0085] The distribution unit is used to initialize a verifiable secret sharing function through each participant, generate a third public parameter, and distribute the trapdoor to each participant of the DRB protocol through a verifiable secret sharing strategy based on the valid public parameter set and the third public parameter.
[0086] Optionally, in one embodiment of the present application, the contribution module 200 includes: a selection unit, a receiving unit, a first verification unit and a second verification unit.
[0087] Among them, the election unit is used to enable each participant to elect the current leader of the DRB protocol based on a preset random value of the DRB protocol.
[0088] A receiving unit is used to calculate and broadcast the output value of the trapdoor verifiable delay function of each participant according to a preset random value and each trapdoor, so as to receive the output values sent by other participants.
[0089] The first verification unit is used to perform a first validity verification on the output values sent by other participants, so as to construct an initial valid output set according to the output values that pass the first validity verification, and send the initial valid output set to the leader.
[0090] The second verification unit is used to perform a second validity verification on each initial valid output value in the initial valid output set through the leader, so as to construct a final valid output set based on the initial valid output values that pass the second validity verification.
[0091] Optionally, in one embodiment of the present application, the generation module 300 includes: a second broadcast unit, a third verification unit, a reconstruction unit and an acquisition unit.
[0092] Among them, the second broadcast unit is used to calculate the effective output sum according to the final effective output set, and broadcast the final effective output set and the effective output sum through the leader.
[0093] The third verification unit is used to perform a third validity verification on the final valid output set and the valid output by each participant, and enable the participants who pass the third validity verification to broadcast preset voting information.
[0094] The reconstruction unit is used to reconstruct the reconstructed trapdoor corresponding to the trapdoor verifiable delay function of the participant who fails the third validity verification by using the trapdoor reconstruction operation through each participant, and calculate the correct output value of the trapdoor verifiable delay function of the participant who fails the third validity verification according to the reconstructed trapdoor.
[0095] The acquisition unit is used to generate security data of the DRB protocol based on the correct output value of the participant that fails the third validity verification and the valid output sum of the participant that passes the third validity verification.
[0096] It should be noted that the aforementioned explanation of the embodiment of the security data generation method based on the DRB protocol is also applicable to the security data generation device based on the DRB protocol of this embodiment, and will not be repeated here.
[0097] According to the security data generation device based on the DRB protocol proposed in the embodiment of the present application, it includes an establishment module, which is used to generate a trapdoor corresponding to each participant in the DRB protocol according to a preset trapdoor verifiable delay function, and distribute each trapdoor to each participant using a preset verifiable secret sharing strategy; a contribution module, which is used to elect the current leader of the DRB protocol, and calculate the output value of the trapdoor verifiable delay function according to each trapdoor, and perform corresponding verification operations on the output value through each participant and the leader to generate a final valid output set; a generation module, which is used to calculate the effective output sum according to the final valid output set, and verify the final valid output set and the effective output sum to obtain a verification result, and use the verification result to perform a trapdoor reconstruction operation of the verifiable secret sharing strategy to generate the security data of the DRB protocol through the result of the trapdoor reconstruction operation, so as to effectively ensure the unpredictability of the DRB protocol while reducing the complexity of the DRB protocol and achieving high scalability under the delay mechanism by using the leader.
[0098] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:
[0099] A memory 901 , a processor 902 , and a computer program stored in the memory 901 and executable on the processor 902 .
[0100] When the processor 902 executes the program, the security data generation method based on the DRB protocol provided in the above embodiment is implemented.
[0101] Furthermore, the electronic device further comprises:
[0102] The communication interface 903 is used for communication between the memory 901 and the processor 902 .
[0103] The memory 901 is used to store computer programs that can be executed on the processor 902 .
[0104] The memory 901 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0105] If the memory 901, the processor 902 and the communication interface 903 are implemented independently, the communication interface 903, the memory 901 and the processor 902 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0106] Optionally, in a specific implementation, if the memory 901, the processor 902 and the communication interface 903 are integrated on a chip, the memory 901, the processor 902 and the communication interface 903 can communicate with each other through an internal interface.
[0107] The processor 902 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0108] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the above-mentioned DRB protocol-based security data generation method is implemented.
[0109] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0110] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0111] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0112] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or N wirings (electronic devices), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways as necessary and then storing it in a computer memory.
[0113] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0114] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0115] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0116] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A method for generating security data based on the DRB protocol, characterized in that: The following steps are involved: Generate a trapdoor corresponding to each participant in the DRB protocol according to a preset trapdoor verifiable delay function, and distribute each trapdoor to each participant using a preset verifiable secret sharing strategy; electing the current leader of the DRB protocol, and calculating the output value of the trapdoor verifiable delay function according to each trapdoor, and performing corresponding verification operations on the output value by each participant and the leader to generate a final valid output set; The valid output sum is calculated according to the final valid output set, and the final valid output set and the valid output sum are verified to obtain a verification result, and the verification result is used to perform a trapdoor reconstruction operation of the verifiable secret sharing strategy to generate security data of the DRB protocol through the result of the trapdoor reconstruction operation.
2. The method according to claim 1, characterized in that The generating of a trapdoor corresponding to each participant in the DRB protocol according to a preset trapdoor verifiable delay function, and distributing each trapdoor to each participant using a preset verifiable secret sharing strategy, includes: Initializing the trapdoor verifiable delay function by each participant, generating a trapdoor and a first public parameter corresponding to the trapdoor verifiable delay function; broadcasting the first public parameter to receive at least one second public parameter, and constructing a valid public parameter set according to the at least one second public parameter and the first public parameter; A verifiable secret sharing function is initialized by each participant to generate a third public parameter, and based on the valid public parameter set and the third public parameter, the trapdoor is distributed to each participant of the DRB protocol through the verifiable secret sharing strategy.
3. The method according to claim 1, characterized in that The electing of the current leader of the DRB protocol, and calculating the output value of the trapdoor verifiable delay function according to each trapdoor, and performing corresponding verification operations on the output value by each participant and the leader to generate a final valid output set, includes: Based on a preset random value of the DRB protocol, each participant elects a current leader of the DRB protocol; Calculating and broadcasting the output value of the trapdoor-verifiable delay function of each participant according to the preset random value and each trapdoor, so as to receive output values sent by other participants; Performing a first validity verification on the output values sent by the other participants to construct an initial valid output set according to the output values that pass the first validity verification, and sending the initial valid output set to the leader; The leader performs a second validity verification on each initial valid output value in the initial valid output set, so as to construct the final valid output set based on the initial valid output values that pass the second validity verification.
4. The method according to claim 1, characterized in that: The calculating the effective output sum according to the final effective output set, verifying the final effective output set and the effective output sum, obtaining a verification result, and using the verification result to perform a trapdoor reconstruction operation of the verifiable secret sharing strategy to generate security data of the DRB protocol through the result of the trapdoor reconstruction operation, includes: Calculate the valid output sum according to the final valid output set, and broadcast the final valid output set and the valid output sum through the leader; Performing a third validity verification on the final valid output set and the valid output sum by each participant, and allowing the participants who pass the third validity verification to broadcast preset voting information; Reconstructing a reconstructed trapdoor corresponding to the trapdoor verifiable delay function of the participant that failed the third validity verification by each participant using a trapdoor reconstruction operation, and calculating a correct output value of the trapdoor verifiable delay function of the participant that failed the third validity verification according to the reconstructed trapdoor; The security data of the DRB protocol is generated based on the correct output value of the participant that fails the third validity verification and the valid output sum of the participant that passes the third validity verification.
5. A security data generating device based on the DRB protocol, characterized in that: include: Establish a module for generating a trapdoor corresponding to each participant in the DRB protocol according to a preset trapdoor verifiable delay function, and distributing each trapdoor to each participant using a preset verifiable secret sharing strategy; A contribution module, configured to elect a current leader of the DRB protocol, and calculate an output value of the trapdoor verifiable delay function according to each trapdoor, and perform corresponding verification operations on the output value through each participant and the leader to generate a final valid output set; A generation module is used to calculate the valid output sum based on the final valid output set, and verify the final valid output set and the valid output sum to obtain a verification result, and use the verification result to perform a trapdoor reconstruction operation of the verifiable secret sharing strategy to generate the security data of the DRB protocol through the result of the trapdoor reconstruction operation.
6. The device according to claim 5, characterized in that The establishment module includes: an initialization unit, configured to initialize the trapdoor verifiable delay function through each participant, and generate a trapdoor and a first public parameter corresponding to the trapdoor verifiable delay function; A first broadcasting unit, configured to broadcast the first public parameter to receive at least one second public parameter, and construct a valid public parameter set according to the at least one second public parameter and the first public parameter; A distribution unit is used to initialize a verifiable secret sharing function through each participant, generate a third public parameter, and distribute the trapdoor to each participant of the DRB protocol through the verifiable secret sharing strategy based on the valid public parameter set and the third public parameter.
7. The device according to claim 5, characterized in that The contribution modules include: An election unit, configured to enable each participant to elect a current leader of the DRB protocol based on a preset random value of the DRB protocol; a receiving unit, configured to calculate and broadcast the output value of the trapdoor verifiable delay function of each participant according to the preset random value and each trapdoor, so as to receive output values sent by other participants; A first verification unit, configured to perform a first validity verification on the output values sent by the other participants, so as to construct an initial valid output set according to the output values that pass the first validity verification, and send the initial valid output set to the leader; The second verification unit is used to perform a second validity verification on each initial valid output value in the initial valid output set through the leader, so as to construct the final valid output set based on the initial valid output values that pass the second validity verification.
8. The device according to claim 5, characterized in that The generation module comprises: A second broadcast unit, configured to calculate the valid output sum according to the final valid output set, and broadcast the final valid output set and the valid output sum through the leader; A third verification unit, configured to perform a third validity verification on the final valid output set and the valid output sum through each participant, and enable the participants who pass the third validity verification to broadcast preset voting information; a reconstruction unit, configured to reconstruct a reconstructed trapdoor corresponding to the trapdoor verifiable delay function of the participant that fails to pass the third validity verification by using a trapdoor reconstruction operation through each participant, and calculate a correct output value of the trapdoor verifiable delay function of the participant that fails to pass the third validity verification according to the reconstructed trapdoor; An acquisition unit is used to generate the security data of the DRB protocol based on the correct output value of the participant that fails the third validity verification and the valid output sum of the participant that passes the third validity verification.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the DRB protocol-based security data generation method as described in any one of claims 1 to 4.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the DRB protocol-based security data generation method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Editable blockchain based on verifiable multi-party secret sharing
CN112468302A
Collision calculation method of chameleon hash function and tailorable blockchain account book structure
CN112804272A
Secure distributed random number generation method and device for asynchronous network
CN113612604A
Block chain consensus protocol based on right proof mechanism
CN116366293A
Block chain consensus method and system based on publicly verifiable random number, and terminal
CN117395007A