Two-party time lock puzzle generation method and device, equipment, medium and product

By allowing both communication parties to participate in the generation and sharing of time lock puzzles, the single point of failure and power concentration risks caused by relying on trusted agents in the existing technology is solved, and a more efficient, secure and transparent information encryption process is achieved. .

CN119135338AActive Publication Date: 2024-12-13WUHAN UNIV
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411108527.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-12-13
Estimated Expiration
2044-08-13

AI Technical Summary

Technical Problem

In the prior art, single point of failure and concentrated power risks caused by relying on trusted agents, high computing resources consumption, and high technical implementation complexity.

Method used

By allowing both parties to participate in the generation of time lock puzzles, determine their respective shares, and calculate and generate time lock puzzles based on these shares, use time lock puzzles to encrypt secret values, remove dependence on a single trusted agent, and achieve distribution Formula generation.

Benefits of technology

Ensure the cooperative nature of the decryption process, prevent information from being unilaterally tampered with or leaked, dispersing risks, reducing the risk of power concentration, improving fairness and transparency, optimizing resource utilization, improving overall efficiency and reducing resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119135338A_ABST
    Figure CN119135338A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of information security, in particular to a two-party time lock puzzle generation method and device, equipment, a medium and a product, and the method comprises the steps: obtaining a first generation parameter and a second generation parameter of a time lock puzzle; determining respective shares of the first generation parameter and the second generation parameter by the two communication parties; calculating respective shares of time lock puzzles held by the two communication parties according to respective shares of the first generation parameter and the second generation parameter by the two communication parties; and generating the time lock puzzle according to the respective shares of the time lock puzzle held by the two communication parties, and encrypting the secret value by using the time lock puzzle to obtain encrypted information. Therefore, the problems of single-point failure and power concentration risk, large computing resource consumption, high technical implementation complexity and the like caused by dependence on a trusted agent in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information security technology, and in particular to a two-party time lock puzzle generation method, device, equipment, medium and product. Background Art

[0002] As advanced information security solutions, TRE (Timed-release Encryption) and TLP (Time-lock Puzzles) achieve precise control over the transmission of information into the future. TRE relies on a trusted agent mechanism, allowing users to set the future release time of encrypted information. After the preset time point is reached, the trusted agent will disclose the key elements required for decryption, allowing the recipient to unlock the ciphertext. TLP naturally delays the decryption process by implementing time-consuming sequence operations, achieving time-delayed decryption without the need for third-party intervention. Currently, TRE and TLP technologies have been widely used in many fields such as sealed bid auctions, fair contract signing, and non-extensible commitments.

[0003] When optimizing the design of TRE, in order to curb the possible excessive authority of trusted agents, a two-party puzzle generation mechanism is added, which can effectively prevent secrets from being too concentrated and timeline power from being too great. Summary of the invention

[0004] The present application provides a two-party time lock puzzle generation method, device, equipment, medium and product to solve the problems of single point failure and power concentration risks caused by reliance on trusted agents, large consumption of computing resources, high complexity of technical implementation, etc. in the prior art.

[0005] An embodiment of the first aspect of the present application provides a two-party time lock puzzle generation method, comprising the following steps: obtaining a first generation parameter and a second generation parameter of a time lock puzzle; determining the respective shares of the first generation parameter and the second generation parameter held by two communicating parties; calculating the respective shares of the time lock puzzle held by the two communicating parties based on the respective shares of the first generation parameter and the second generation parameter held by the two communicating parties; generating the time lock puzzle based on the respective shares of the time lock puzzle held by the two communicating parties, and using the time lock puzzle to encrypt a secret value to obtain encrypted information.

[0006] Optionally, calculating the respective shares of the time lock puzzle held by the communicating parties based on the respective shares of the first generation parameter and the second generation parameter held by the communicating parties includes: calculating the sum of the shares of the first generation parameter and the second generation parameter of any communicating party; calculating the share of the time lock puzzle held by any communicating party based on the sum of the shares and the shares of the first generation parameter and the second generation parameter of any communicating party; calculating the share of the time lock puzzle held by another communicating party based on the share of the time lock puzzle held by any communicating party.

[0007] Optionally, the calculation formula for the share of the time lock puzzle held by any communication party is:

[0008] When p2+q2 is not divisible by K,

[0009] When p2+q2 is divisible by K, P2 is calculated

[0010] Wherein, p2 is the share of the first generation parameter, q2 is the share of the second generation parameter, s2 is the share of the time lock puzzle held by P2, and P2 is the second communication party that generates the time lock puzzle;

[0011] Where b = ((p-1)(q-1)) -1 mod e,K=(3 T ) -1 mod(p-1)(q-1), where p is the first generation parameter, q is the second generation parameter, and T is the time hardness parameter.

[0012] Optionally, the calculation formula for the share of the time lock puzzle held by the other communication party is:

[0013] s1=3 T -s2,

[0014] Among them, s1 is the time lock puzzle share held by P1, and P1 is the first communication party that generates the time lock puzzle.

[0015] Optionally, the communicating parties include a first communicating party P1 and a second communicating party P2, the shares of the first communicating party P1 for the first generation parameter p and the second generation parameter q are p1 and q1, the shares of the second communicating party P2 for the first generation parameter p and the second generation parameter q are p2 and q2, and determining the respective shares of the communicating parties for the first generation parameter and the second generation parameter includes:

[0016] The first party P1 selects And define

[0017] The second communication party P2 selects And define

[0018] The first communication party P1 and the second communication party P2 both verify whether (p1+p2) is divisible by β. is a prime number}, B1 is a preset integer, if (p1+p2) can be collected If it is divisible by an element β in , then discard p1 and p2 and start again to determine the shares. Otherwise, perform the same steps to construct q1 and q2.

[0019] The second party P2 selects a random number And set: where α∈{p,q}, i∈[l-1];

[0020] The second communication party P2 performs random OT and inputs C 0,α,i , C 1,α,i , the first communication party P1 inputs α 1,i , the i-th bit of α1, P1 obtains

[0021] The first communication party P1 calculates The second communication party P2 calculates

[0022] The first communication party P1 calculates and transmit it to the second communication party P2;

[0023] The second communication party P2 calculates and transmit it to the first communication party P1;

[0024] The first communication party P1 and the second communication party P2 calculate N=a1+a2mod2 2l , the first communication party P1 calculates w1=N+1-p1-q1mod e and transmits it to the second communication party P2, and the second communication party P2 calculates w2=p2+q2mod e and transmits it to the first communication party P1;

[0025] The first communication party P1 and the second communication party P2 check whether w1 is equal to w2. If so, the parameters p1, q1, p2, q2 are discarded, otherwise the shares are determined again.

[0026] Optionally, (p-1)(q-1) and e are relatively prime, and w=w1-w2(mod e) is defined.

[0027] A second aspect of the present application provides a two-party time lock puzzle generation device, including: an acquisition module, used to acquire a first generation parameter and a second generation parameter of a time lock puzzle; a determination module, used to determine the respective shares of the first generation parameter and the second generation parameter held by two communicating parties; a calculation module, used to calculate the respective shares of the time lock puzzle held by the two communicating parties based on the respective shares of the first generation parameter and the second generation parameter held by the two communicating parties; a generation module, used to generate the time lock puzzle based on the respective shares of the time lock puzzle held by the two communicating parties, and use the time lock puzzle to encrypt a secret value to obtain encrypted information.

[0028] A 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 two-party time lock puzzle generation method as described in the above embodiment.

[0029] A fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement the two-party time lock puzzle generation method as described in the above embodiment.

[0030] A fifth aspect of the present application provides a computer program product, which, when executed, is used to implement the two-party time lock puzzle generation method as described in the above embodiment.

[0031] Therefore, this application includes the following beneficial effects:

[0032] The embodiment of the present application ensures the cooperation of the decryption process by allowing both communicating parties to jointly participate in the generation of puzzles, thereby preventing information from being unilaterally tampered with or leaked. At the same time, by removing the reliance on a single trusted agent, the risk is effectively dispersed and the impact of single point failures on system continuity and availability is avoided. In addition, the distributed generation method also reduces the risk of power concentration and improves fairness and transparency. By optimizing resource utilization, each participant only undertakes computing tasks within its share, which improves overall efficiency and reduces resource waste. As a result, the technical problems of single point failure and power concentration risks caused by reliance on trusted agents, large consumption of computing resources, and high complexity of technical implementation in the prior art are solved.

[0033] 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

[0034] 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:

[0035] Figure 1 It is a flowchart of a two-party time lock puzzle generation method provided according to an embodiment of the present application;

[0036] Figure 2 A flowchart of a two-party time lock puzzle generation method provided according to an embodiment of the present application;

[0037] Figure 3 This is an example diagram of a two-party time lock puzzle generation device provided according to an embodiment of the present application;

[0038] Figure 4 Schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0039] The 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.

[0040] The following describes the two-party time lock puzzle generation method, device, equipment, medium and product of the embodiment of the present application with reference to the accompanying drawings. In response to the problem of excessive power of the trusted agent mentioned in the above background technology, the present application provides a two-party time lock puzzle generation method, in which the cooperation of the decryption process is ensured by allowing the communicating parties to participate in the generation of the puzzle together, thereby preventing the information from being tampered with or leaked unilaterally. At the same time, by removing the dependence on a single trusted agent, the risk is effectively dispersed and the impact of single point failure on system continuity and availability is avoided. In addition, the distributed generation method also reduces the risk of power concentration and improves fairness and transparency. By optimizing resource utilization, each participant only undertakes the computing tasks within its share, which improves overall efficiency and reduces resource waste. As a result, the problems of single point failure and power concentration risks caused by relying on trusted agents, large consumption of computing resources, and high complexity of technical implementation in the prior art are solved.

[0041] Specifically, Figure 1 A schematic diagram of a flow chart of a two-party time lock puzzle generation method provided in an embodiment of the present application.

[0042] like Figure 1 As shown, the two-party time lock puzzle generation method includes the following steps:

[0043] In step S101, a first generation parameter and a second generation parameter of a time lock puzzle are obtained.

[0044] It can be understood that the embodiment of the present application obtains the first generation parameter and the second generation parameter of the time lock puzzle to facilitate the subsequent determination of the respective shares of the generation parameters held by the participants.

[0045] In step S102, respective shares of the first generation parameter and the second generation parameter of the communicating parties are determined.

[0046] The communicating parties may include a first communicating party P1 and a second communicating party P2.

[0047] It can be understood that the embodiment of the present application achieves distributed generation and encryption, enhances security, and optimizes resource utilization and technical implementation by determining the respective shares of the communicating parties for the time lock puzzle generation parameters.

[0048] In the embodiment of the present application, the shares of the first communication party P1 for the first generation parameter p and the second generation parameter q are p1 and q1, and the shares of the second communication party P2 for the first generation parameter p and the second generation parameter q are p2 and q2. Determining the respective shares of the first generation parameter and the second generation parameter of the two communication parties includes:

[0049] The first communication party P1 selects And define

[0050] The second party P2 chooses And define

[0051] The first communication party P1 and the second communication party P2 both verify whether (p1+p2) is divisible by β. is a prime number}, B1 is a preset integer, if (p1+p2) can be collected If it is divisible by an element β in , then discard p1 and p2 and start again to determine the shares. Otherwise, perform the same steps to construct q1 and q2.

[0052] The second party P2 selects a random number And set: where α∈{p,q}, i∈[l-1];

[0053] The second communication party P2 performs random OT and inputs C 0,α,i , C 1,α,i , the first communication party P1 inputs α 1,i , the i-th bit of α1, P1 obtains

[0054] The first communication party P1 calculates The second communication party P2 calculates

[0055] The first communication party P1 calculates and transmit it to the second communication party P2;

[0056] The second communication party P2 calculates and transmit it to the first communication party P1;

[0057] The first communication party P1 and the second communication party P2 calculate N = a1 + a2 mod 2 2l , the first communication party P1 calculates w1=N+1-p1-q1mode and transmits it to the second communication party P2, and the second communication party P2 calculates w2=p2+q2mode and transmits it to the first communication party P1;

[0058] The first communication party P1 and the second communication party P2 check whether w1 is equal to w2. If so, the parameters p1, q1, p2, q2 are discarded, otherwise the shares are determined again.

[0059] In the embodiment of the present application, (p-1)(q-1) and e are relatively prime, and w=w1-w2(mod e) is defined.

[0060] Specifically, if Figure 2 As shown, when generating the time lock puzzle, two parties participate together, namely the first communication party P1 and the second communication party P2; initialize the puzzle generation parameters: generate the p and q shares of the first communication party P1 and the second communication party P2, p1, q1, p2, q2, that is, p = p1 + p2, q = q1 + q2, and the specific steps of generating the time lock puzzle are as follows:

[0061] S1, P1 selection And define

[0062] S2, P2 selection And define

[0063] S3, P1, and P2 jointly perform Div-OT to verify whether (p1+p2) is divisible by β. is a prime number, B1 is a preset integer. If (p1+p2) can be set If it is divisible by an element β in , then discard p1 and p2 and start again from S1. Otherwise, execute the same steps to construct q1, q2 and subsequent steps.

[0064] S4, P2 select random numbers And set C 0,α,i =r α,i , where α∈{p,q}, i∈[l-1];

[0065] S5, P2 execute random OT, input C 0,α,i , C 1,α,i , P1 input α 1,i , that is, the i-th bit of α1, P1 obtains

[0066] S6, P1 calculation P2 calculation

[0067] S7, P1 calculation and sent to P2;

[0068] S8, P2 calculation and sent to P1;

[0069] S9, P1, P2 calculate N = a1 + a2 mod 2 2l ;

[0070] S10, P1 calculates w1=N+1-p1-q1mod e and transmits it to P2, P2 calculates w2=p2+q2mod e and transmits it to P1;

[0071] S11, P1, P2 check whether w1 is equal to w2. If they are equal, discard the parameters p1, q1, p2, q2 and re-execute S1. Otherwise, the puzzle generation parameters are successfully generated, (p-1)(q-1) is coprime with e, and define w=w1-w2(mod e).

[0072] In summary, the embodiment of the present application can only generate a time lock puzzle in a distributed manner with the joint participation of both communicating parties, which can effectively prevent external attackers from stealing p and q and internal participants from decrypting them in advance, thereby improving the security and fairness of the two parties participating in the generation of the time lock puzzle and effectively weakening centralization.

[0073] In step S103, the respective shares of the time lock puzzle held by the communicating parties are calculated based on the respective shares of the first generation parameter and the second generation parameter of the communicating parties.

[0074] It can be understood that the embodiment of the present application ensures that the generation process of the time lock puzzle is distributed by calculating the respective shares of the time lock puzzle held by the communicating parties, avoids the complete control of the puzzle generation by a single node, and enhances the anti-attack capability.

[0075] In an embodiment of the present application, the respective shares of the time lock puzzle held by the communicating parties are calculated based on the respective shares of the first generation parameter and the second generation parameter of the communicating parties, including: calculating the sum of the shares of the first generation parameter and the second generation parameter of any communicating party; calculating the share of the time lock puzzle held by any communicating party based on the sum of the shares and the shares of the first generation parameter and the second generation parameter of any communicating party; calculating the share of the time lock puzzle held by the other communicating party based on the share of the time lock puzzle held by any communicating party.

[0076] It is understandable that the embodiment of the present application calculates the sum of the shares of the first generation parameter and the second generation parameter of any communication party in order to verify whether the communication party correctly holds its due share, which helps to ensure that each participant in the distributed generation process acts in accordance with the predetermined protocol and rules, thereby maintaining the consistency and integrity of the entire generation process. Calculating the share of the time lock puzzle held by any communication party based on the sum of shares and specific shares is not only an accurate quantification of the decryption authority, but also a clear definition of the role that the communication party can play in the decryption process, ensuring the fairness and rationality of the authority allocation.

[0077] In the embodiment of the present application, the calculation formula for the share of the time lock puzzle held by any communication party is:

[0078] When p2+q2 is not divisible by K,

[0079] When p2+q v When it is divisible by K, P2 calculates

[0080] Wherein, p2 is the share of the first generation parameter, q2 is the share of the second generation parameter, s2 is the share of the time lock puzzle held by P2, and P2 is the second communication party that generates the time lock puzzle;

[0081] Where b = ((p-1)(q-1)) -1 mod e,K=(3 T ) -1 mod(p-1)(q-1), where p is the first generation parameter, q is the second generation parameter, and T is the time hardness parameter.

[0082] In the embodiment of the present application, the calculation formula for the share of the time lock puzzle held by the other communication party is:

[0083] s1=3 T -s2,

[0084] Among them, s1 is the time lock puzzle share held by P1, and P1 is the first communication party that generates the time lock puzzle.

[0085] Specifically, after initializing the puzzle generation parameters, P1 and P2 generate a time lock puzzle by executing the following steps in the two-party time lock puzzle generation phase:

[0086] S1, S = s1 + s2 = 3 T mod(p-1)(q-1), and then calculate the shares of S held by P1 and P2, s1 and s2 respectively;

[0087] S2, calculate K = (3 T ) -1 mod(p-1)(q-1), b=((p-1)(q-1)) -1 mod e, and gcd((p-1)(q-1),e)=1;

[0088] S3. When p2+q2 is not divisible by K, P2 is calculated When p2+q2 is divisible by K, P2 is calculated P1 calculates s1=3 T -s2.

[0089] In step S104, a time lock puzzle is generated according to the respective shares of the time lock puzzle held by the communicating parties, and the secret value is encrypted using the time lock puzzle to obtain encrypted information.

[0090] Among them, encrypting the secret value refers to the process of encrypting a private key using a time-lock puzzle.

[0091] It can be understood that the embodiments of the present application generate puzzles by utilizing the time lock puzzle shares held by each communicating party and encrypting the secret value, thereby effectively enhancing the security of information, promoting trust and cooperation between the two parties, and providing flexibility and a wide range of application scenarios.

[0092] According to the two-party time-lock puzzle generation method proposed in the embodiment of the present application, by allowing both communicating parties to jointly participate in the generation of the puzzle, the cooperation of the decryption process is ensured, thereby preventing the information from being unilaterally tampered with or leaked. At the same time, by removing the reliance on a single trusted agent, the risk is effectively dispersed, and the impact of a single point of failure on the continuity and availability of the system is avoided. In addition, the distributed generation method also reduces the risk of power concentration and improves fairness and transparency. By optimizing resource utilization, each participant only undertakes the computing tasks within its share, which improves overall efficiency and reduces resource waste. As a result, the problems of single point failure and power concentration risks caused by relying on trusted agents, large consumption of computing resources, and high complexity of technical implementation in the prior art are solved.

[0093] Next, a two-party time lock puzzle generating device proposed according to an embodiment of the present application is described with reference to the accompanying drawings.

[0094] Figure 3It is a block diagram of a two-party time lock puzzle generating device according to an embodiment of the present application.

[0095] like Figure 3 As shown, the two-party time lock puzzle generating device 10 includes: an acquisition module 100 , a determination module 200 , a calculation module 300 and a generation module 400 .

[0096] Among them, the acquisition module 100 is used to obtain the first generation parameter and the second generation parameter of the time lock puzzle; the determination module 200 is used to determine the respective shares of the first generation parameter and the second generation parameter held by the communicating parties respectively; the calculation module 300 is used to calculate the respective shares of the time lock puzzle held by the communicating parties according to the respective shares of the first generation parameter and the second generation parameter held by the communicating parties respectively; the generation module 400 is used to generate the time lock puzzle according to the respective shares of the time lock puzzle held by the communicating parties, and use the time lock puzzle to encrypt the secret value to obtain encrypted information.

[0097] It should be noted that the aforementioned explanation of the embodiment of the two-party time lock puzzle generation method is also applicable to the two-party time lock puzzle generation device of this embodiment, and will not be repeated here.

[0098] According to the two-party time-lock puzzle generation device proposed in the embodiment of the present application, by allowing both communicating parties to jointly participate in the generation of the puzzle, the cooperation of the decryption process is ensured, thereby preventing the information from being unilaterally tampered with or leaked. At the same time, by removing the reliance on a single trusted agent, the risk is effectively dispersed, and the impact of a single point of failure on the continuity and availability of the system is avoided. In addition, the distributed generation method also reduces the risk of power concentration and improves fairness and transparency. By optimizing resource utilization, each participant only undertakes the computing tasks within its share, which improves overall efficiency and reduces resource waste. As a result, the problems of single point failure and power concentration risks caused by relying on trusted agents, large consumption of computing resources, and high complexity of technical implementation in the prior art are solved.

[0099] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:

[0100] Memory 401 , processor 402 , and a computer program stored in the memory 401 and executable on the processor 402 .

[0101] When the processor 402 executes the program, the two-party time lock puzzle generation method provided in the above embodiment is implemented.

[0102] Furthermore, the electronic device further comprises:

[0103] The communication interface 403 is used for communication between the memory 401 and the processor 402 .

[0104] The memory 401 is used to store computer programs that can be executed on the processor 402 .

[0105] The memory 401 may include a high-speed RAM (Random Access Memory) memory, and may also include a non-volatile memory, such as at least one disk memory.

[0106] If the memory 401, the processor 402 and the communication interface 403 are implemented independently, the communication interface 403, the memory 401 and the processor 402 can be connected to each other through a bus and communicate with each other. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 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.

[0107] Optionally, in a specific implementation, if the memory 401, the processor 402 and the communication interface 403 are integrated on a chip, the memory 401, the processor 402 and the communication interface 403 can communicate with each other through an internal interface.

[0108] The processor 402 may be a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.

[0109] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above two-party time lock puzzle generation method.

[0110] An embodiment of the present application also provides a computer program product, including a computer program or instructions, which implement the above two-party time lock puzzle generation method when executed.

[0111] 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 are not necessarily directed 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.

[0112] 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.

[0113] 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.

[0114] It should be understood that the various parts of the present application can be implemented in hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, the steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in 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 on a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array, a field programmable gate array, etc.

[0115] A person of ordinary skill in the art may understand that all or part of the steps carried by the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the above-mentioned program may be stored in a computer-readable storage medium, which, when executed, includes one of the steps of the method embodiment or a combination thereof.

[0116] 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 limitations on the present application. Ordinary technicians in the field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A two-party time lock puzzle generation method, characterized in that: The following steps are involved: Obtain a first generation parameter and a second generation parameter of a time lock puzzle; Determining respective shares of the first generation parameter and the second generation parameter of the communicating parties; Calculating the respective shares of the time lock puzzle held by the two communicating parties according to the respective shares of the first generation parameter and the second generation parameter held by the two communicating parties; The time lock puzzle is generated according to the respective shares of the time lock puzzle held by the communicating parties, and the secret value is encrypted using the time lock puzzle to obtain encrypted information.

2. The two-party time-lock puzzle generation method according to claim 1, characterized in that: The calculating the respective shares of the time lock puzzle held by the two communicating parties according to the respective shares of the first generation parameter and the second generation parameter respectively by the two communicating parties comprises: Calculating the sum of the shares of the first generation parameter and the second generation parameter of any communication party; Calculate the share of the time lock puzzle held by the arbitrary communication party according to the sum of the shares, the shares of the first generation parameter and the second generation parameter of the arbitrary communication party; The share of the time lock puzzle held by another communication party is calculated according to the share of the time lock puzzle held by the arbitrary communication party.

3. The two-party time-lock puzzle generation method according to claim 2, characterized in that: The calculation formula for the share of the time lock puzzle held by any communication party is: When p2+q2 is not divisible by K, When p2+q2 is divisible by K, P2 is calculated Wherein, p2 is the share of the first generation parameter, q2 is the share of the second generation parameter, s2 is the share of the time lock puzzle held by P2, and P2 is the second communication party that generates the time lock puzzle; Where b = ((p-1)(q-1)) -1 mod e,K=(3 T ) -1 mod(p-1)(q-1), where p is the first generation parameter, q is the second generation parameter, and T is the time hardness parameter.

4. The two-party time-lock puzzle generation method according to claim 2, characterized in that: The calculation formula for the share of the time lock puzzle held by the other communication party is: <h2 style=";text-align:left;direction:ltr">s1=3<h2 style=";text-align:left;direction:ltr"> T <h2 style=";text-align:left;direction:ltr"> -s2, Among them, s1 is the time lock puzzle share held by P1, and P1 is the first communication party that generates the time lock puzzle.

5. The two-party time-lock puzzle generation method according to claim 1, characterized in that: The communicating parties include a first communicating party P1 and a second communicating party P2, the first communicating party P1 has shares of the first generation parameter p and the second generation parameter q of p1 and q1, the second communicating party P2 has shares of the first generation parameter p and the second generation parameter q of p2 and q2, and the determining of the respective shares of the communicating parties for the first generation parameter and the second generation parameter includes: The first communication party P1 selects And define The second party P2 chooses And define The first communication party P1 and the second communication party P2 both verify whether (p1+p2) is divisible by β. B1 is a preset integer. If (p1+p2) can be combined If it is divisible by an element β in , then discard p1 and p2 and start again to determine the shares. Otherwise, perform the same steps to construct q1 and q2. The second party P2 selects a random number And set: where α∈{p,q},i∈[l-1]; The second communication party P2 performs random OT and inputs C 0,α,i , C 1,α,i , the first communication party P1 inputs α 1,i , the i-th bit of α1, P1 obtains The first communication party P1 calculates The second communication party P2 calculates The first communication party P1 calculates and transmit it to the second communication party P2; The second communication party P2 calculates and transmit it to the first communication party P1; The first communication party P1 and the second communication party P2 calculate N = a1 + a2 mod 2 2l , the first communication party P1 calculates w1=N+1-p1-q1mod e and transmits it to the second communication party P2, and the second communication party P2 calculates w2=p2+q2mod e and transmits it to the first communication party P1; The first communication party P1 and the second communication party P2 check whether w1 is equal to w2. If so, the parameters p1, q1, p2, q2 are discarded, otherwise the shares are determined again.

6. The two-party time-lock puzzle generation method according to claim 5, characterized in that: (p-1)(q-1) and e are coprime, and w=w1-w2(mod e) is defined.

7. A two-party time lock puzzle generation device, characterized in that: include: An acquisition module, used to acquire a first generation parameter and a second generation parameter of a time lock puzzle; A determination module, used to determine respective shares of the first generation parameter and the second generation parameter of the communicating parties; A calculation module, configured to calculate the respective shares of the time lock puzzle held by the two communicating parties according to the respective shares of the first generation parameter and the second generation parameter held by the two communicating parties; A generating module is used to generate the time lock puzzle according to the respective shares of the time lock puzzle held by the communicating parties, and to encrypt a secret value using the time lock puzzle to obtain encrypted information.

8. 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 two-party time-lock puzzle generation method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed, the two-party time lock puzzle generation method described in any one of claims 1-6 is implemented.

10. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed, the two-party time lock puzzle generation method described in any one of claims 1-6 is implemented.

Citation Information

Patent Citations

  • Electronic voting method based on block chain and homomorphic time lock puzzle

    CN112884968A

  • Public traceable electronic voting method, system and equipment based on block chain

    CN117118587A

  • Efficient verifiable time signature general construction method

    CN117914493A

  • Computer-implemented system and method for time release encryption over a blockchain network

    WO2018234922A1

  • Systems and methods for mining on a proof-of-work blockchain network

    WO2020229925A1