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

By having both communicating parties jointly generate a time-lock puzzle, the risks of single point of failure and centralized power caused by relying on trusted proxies in existing technologies are resolved. This achieves distributed encryption and decryption for information security, improving the system's security and efficiency.

CN119135338BActive Publication Date: 2025-12-09WUHAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In existing technologies, TRE and TLP technologies suffer from single point of failure and power concentration risks due to reliance on trusted agents, high computational resource consumption, and high technical implementation complexity.

Method used

By having both communicating parties participate in generating the time-lock puzzle, determining their respective shares, and calculating the time-lock puzzle based on their shares, the secret value is encrypted using the time-lock puzzle, thus achieving distributed generation and encryption.

Benefits of technology

This ensures a cooperative decryption process, prevents information from being unilaterally altered or leaked, disperses risks, reduces the concentration of power, improves fairness and transparency, optimizes resource utilization, and reduces resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119135338B_ABST
    Figure CN119135338B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of information security, in particular to a two-party time lock puzzle generation method, device, equipment, medium and product, wherein the method comprises the following steps: acquiring 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 communication parties; calculating respective shares of the time lock puzzle held by the communication parties according to the respective shares of the first generation parameter and the second generation parameter of the communication parties; and generating the time lock puzzle according to the respective shares of the time lock puzzle held by the communication parties, and obtaining encrypted information by encrypting a secret value by using the time lock puzzle. Thus, the problems of single point failure and power concentration risk caused by the trusted agent in the prior art, large consumption of computing resources, high technical implementation complexity and the like are solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

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

[0002] TRE (Timed-release Encryption) and TLP (Time-lock Puzzles) are advanced information security solutions that enable precise control of information transmission into the future. TRE relies on a trusted proxy mechanism, allowing users to set a future release time point for encrypted information. After reaching the pre-set time point, the trusted proxy 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 sequential operations, achieving time-delay decryption without third-party intervention. Currently, TRE and TLP technologies have been widely applied in sealed bidding auctions, fair contract signing, and non-extendable commitments in many fields.

[0003] In optimizing the design of TRE, to curb the possible excessive authority of the trusted proxy, a two-party puzzle generation mechanism is added, which can effectively prevent excessive concentration of secrets and excessive power of the timeline. SUMMARY

[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 risk caused by relying on trusted agents in the prior art, large consumption of computing resources, and high technical implementation complexity.

[0005] The first aspect embodiment 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 respective shares of the first generation parameter and the second generation parameter of the communication parties; calculating respective shares of the time-lock puzzle held by the communication parties according to the respective shares of the first generation parameter and the second generation parameter of the communication parties; generating the time-lock puzzle according to the respective shares of the time-lock puzzle held by the communication parties, and encrypting a secret value using the time-lock puzzle to obtain encrypted information.

[0006] Optionally, the calculating the respective share of the time-lock puzzle held by the two communication parties according to the respective shares of the first generation parameter and the second generation parameter of the two communication parties comprises: calculating the sum of the shares of the first generation parameter and the second generation parameter of any communication party; calculating the share of the time-lock puzzle held by the any communication party according to the sum of the shares, the share of the first generation parameter and the share of the second generation parameter of the any communication party; and calculating the share of the time-lock puzzle held by the other communication party according to the share of the time-lock puzzle held by the any communication party.

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

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

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

[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 generating the time-lock puzzle;

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

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

[0013] s1 = 3 T -s2,

[0014] wherein s1 is the share of the time-lock puzzle held by P1, and P1 is the first communication party generating the time-lock puzzle.

[0015] Optionally, the two communication parties comprise a first communication party P1 and a second communication party P2, the first communication party P1 has shares p1 and q1 of the first generation parameter p and the second generation parameter q, and the second communication party P2 has shares p2 and q2 of the first generation parameter p and the second generation parameter q, and the determining the respective shares of the first generation parameter and the second generation parameter of the two communication parties comprises:

[0016] the first communication party P1 selects and defines

[0017] Second communication party P2 selects and define

[0018] Both the first communicating party P1 and the second communicating party P2 verify whether (p1+p2) is divisible by β. Let B1 be a prime number, and B1 be a pre-defined integer. If (p1+p2) can be enclosed in the set... If a certain element β in the list is divisible by p1 and p2, then p1 and p2 are discarded and the share determination is restarted; otherwise, the same steps are performed to construct q1 and q2.

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

[0020] The second communicator, P2, performs a random OT (Operation Time), inputting C. 0,α,i C 1,α,i The first communication party P1 inputs α 1,i The i-th bit of α1, P1 obtains

[0021] First communicator P1 calculates The second communicator, P2, calculates...

[0022] First communicator P1 calculates And transmit it to the second communication party P2;

[0023] The second communicator, P2, calculates... And transmit it to the first communicating party P1;

[0024] The first communicating party P1 and the second communicating party P2 calculate N = a1 + a2 mod 2. 2l The first communicating party P1 calculates w1 = N+1 - p1 - q1 mod e and transmits it to the second communicating party P2. The second communicating party P2 calculates w2 = p2 + q2 mod e and transmits it to the first communicating party P1.

[0025] The first communicating party P1 and the second communicating party P2 check whether w1 is equal to w2. If they are equal, the parameters p1, q1, p2, and q2 are discarded; otherwise, the share determination is restarted.

[0026] Optionally, (p-1)(q-1) is coprime to e, and w is defined as w1-w2 (mod e).

[0027] The second aspect embodiment of the present application provides a two-party time-lock puzzle generation device, comprising: an acquisition module configured to acquire a first generation parameter and a second generation parameter of a time-lock puzzle; a determination module configured to determine respective shares of the first generation parameter and the second generation parameter of communication parties; a calculation module configured to calculate respective shares of the time-lock puzzle held by the communication parties according to the respective shares of the first generation parameter and the second generation parameter of the communication parties; and a generation module configured to generate the time-lock puzzle according to the respective shares of the time-lock puzzle held by the communication parties, and to obtain encrypted information by encrypting a secret value using the time-lock puzzle.

[0028] The third aspect embodiment 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 embodiments.

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

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

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

[0032] The embodiments of the present application ensure the cooperation of the encryption process by allowing the communication parties to jointly participate in the generation of the puzzle, thereby preventing the information from being tampered with or leaked by one party. At the same time, by removing the dependence on a single trusted agent, the risk is effectively dispersed, avoiding the impact of single-point failure on system continuity and availability. In addition, the distributed generation method also reduces the risk of power concentration, improving fairness and transparency. By optimizing resource utilization, each participant only undertakes the calculation task within its share, improving overall efficiency and reducing resource waste. Thus, the single-point failure and power concentration risks caused by the dependence on a trusted agent in the prior art are solved, and the technical problems of large computational resource consumption and high technical implementation complexity are solved.

[0033] Additional aspects and advantages of the present application will be in part apparent and in part pointed out hereinafter. BRIEF DESCRIPTION OF DRAWINGS

[0034] The above and / or additional aspects and advantages of the present application will become apparent and be readily appreciated from the following description, including the appended drawings.

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

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

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

[0038] Figure 4 A structural schematic diagram of an electronic device according to an embodiment of the present application is provided. DETAILED DESCRIPTION

[0039] Embodiments of the present application are described in detail below with reference to the accompanying drawings, in which the same or similar numerals indicate the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to explain the present application, and cannot be understood as limiting the present application.

[0040] A two-party time-lock puzzle generation method, device, equipment, medium and product of an embodiment of the present application are described below with reference to the accompanying drawings. In view of the problem of excessive power of a trusted agent mentioned in the above background art, the present application provides a two-party time-lock puzzle generation method, in which the generation of a puzzle is jointly participated by both parties of communication, ensuring the cooperativeness of the encryption process, thereby preventing unilateral tampering or leakage of information. At the same time, by removing the dependence on a single trusted agent, the risk is effectively dispersed, avoiding the influence of single-point failure on the continuity and availability of the system. In addition, the distributed generation method also reduces the risk of power concentration, improves fairness and transparency. By optimizing resource utilization, each participant only undertakes the calculation task within its share, improving overall efficiency and reducing resource waste. Thus, the problems of single-point failure and power concentration risk caused by the dependence on a trusted agent in the prior art, large consumption of computing resources, and high complexity of technical implementation are solved.

[0041] Specifically, Figure 1 A flowchart of a two-party time-lock puzzle generation method according to an embodiment of the present application is provided.

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

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

[0044] It can be understood that the embodiments of the present application obtain the first generation parameter and the second generation parameter of the time-lock puzzle, so as to facilitate subsequent determination of 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 held by the communication parties are determined.

[0046] The communication parties can include the first communication party P1 and the second communication party P2.

[0047] It can be understood that the embodiments of the present application realize distributed generation and encryption by determining respective shares of the time-lock puzzle generation parameters held by the communication parties, thereby enhancing security and optimizing resource utilization and technical implementation.

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

[0049] The first communication party P1 selects and defines

[0050] The second communication party P2 selects and defines

[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) is divisible by an element β in the set , p1 and p2 are discarded, and the determination of the shares is restarted, otherwise, the same steps are performed to construct q1 and q2;

[0052] The second communication party P2 selects a random number and sets: wherein α∈{p,q}, i∈[l-1];

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

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

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

[0056] The second communication party P2 calculates and transmits 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 - q1 mod e and transmits to the second communication party P2, and the second communication party P2 calculates w2 = p2 + q2 mod e and transmits 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 yes, discard the parameters p1, q1, p2, q2, otherwise, start over to determine the shares.

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

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

[0061] S1, P1 selects and defines

[0062] S2, P2 selects and defines

[0063] S3, P1 and P2 jointly execute Div-OT to verify whether (p1 + p2) is divisible by β, is a prime number, and B1 is a preset integer. If (p1 + p2) is divisible by a certain element β in the set , discard p1 and p2, and start over from S1, otherwise, execute the same steps to construct q1 and q2 and the subsequent steps;

[0064] S4, P2 selects a random number and sets C 0,α,i = r α,i , wherein α ∈ {p, q}, and i ∈ [l-1];

[0065] S5, P2 performs random OT, input C 0,α,i , 1,α,i , P1 inputs a 1,i , i.e. the i-th bit of a1, P1 obtains

[0066] S6, P1 calculates P2 calculates

[0067] S7, P1 calculates and transmits to P2;

[0068] S8, P2 calculates and transmits to P1;

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

[0070] S10, P1 calculates w1 = N + 1 - p1 - q1 mod e and transmits to P2, P2 calculates w2 = p2 + q2 mod e and transmits to P1;

[0071] S11, P1, P2 checks whether w1 is equal to w2, if equal, discards the parameters p1, q1, p2, q2, re-executes S1, otherwise the puzzle generation parameters are successfully generated, (p-1)(q-1) and e are prime to each other, and define w = w1-w2 (mod e).

[0072] In summary, the embodiment of the application can generate a time-lock puzzle in a distributed manner only when both parties of communication participate together, can effectively prevent external attackers from stealing p and q and internal participants from decrypting in advance, improves the security and fairness of the time-lock puzzle generation of both parties, and effectively weakens the centralization.

[0073] In step S103, according to the respective shares of the first generation parameter and the second generation parameter of the two parties of communication respectively, the respective shares of the time-lock puzzle held by the two parties of communication are calculated.

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

[0075] In the embodiments of the present application, the respective shares of the time-lock puzzle held by the two parties of communication are calculated according to the respective shares of the first generated parameter and the second generated parameter of the two parties of communication, including: calculating the sum of the shares of the first generated parameter and the second generated parameter of any communication party; calculating the share of the time-lock puzzle held by any communication party according to the sum of the shares, the share of the first generated parameter and the second generated parameter of any communication party; and calculating the share of the time-lock puzzle held by the other communication party according to the share of the time-lock puzzle held by any communication party.

[0076] It can be understood that the embodiments of the present application calculate the sum of the shares of the first generated parameter and the second generated parameter of any communication party, in order to verify whether the communication party correctly holds the share it should have, which helps to ensure that each participant in the distributed generation process acts in accordance with the predetermined agreement and rules, thereby maintaining the consistency and integrity of the entire generation process. According to the sum of the shares and the specific share, the share of the time-lock puzzle held by any communication party is calculated, which not only quantifies the decryption authority accurately, but also clearly defines the role that the communication party can play in the decryption process, ensuring the fairness and rationality of the authority allocation.

[0077] In the embodiments of the present application, the calculation formula of 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 is divisible by K, P2 is calculated as

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

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

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

[0083] s1 = 3 T -s2,

[0084] Wherein, s1 is the share of the time-lock puzzle held by P1, and P1 is the first communication party generating the time-lock puzzle.

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

[0086] S1, S = s1 + s2 = 3 T mod (p-1) (q-1), and then calculate the shares s1 and s2 of S held by P1 and P2 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 calculates When p2 + q2 is divisible by K, P2 calculates P1 calculates s1 = 3 T -s2.

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

[0090] The encrypted secret value refers to the process of encrypting a certain private key using the time-lock puzzle.

[0091] It can be understood that the embodiments of the present application generate a puzzle by using the respective shares of the time-lock puzzle held by the two parties in communication, and encrypt the secret value, which effectively enhances the security of the information, promotes trust and cooperation between the two parties, and at the same time provides flexibility and a wide range of application scenarios.

[0092] According to the two-party time-lock puzzle generation method proposed in the embodiments of the present application, by letting the two parties in communication jointly participate in the generation of the puzzle, the cooperation of the decryption process is ensured, thereby preventing the information from being tampered with or leaked by one party. At the same time, by removing the dependence on a single trusted agent, the risk is effectively dispersed, avoiding the impact of single-point failure on the continuity and availability of the system. In addition, the distributed generation method also reduces the risk of power concentration, improves fairness and transparency. By optimizing resource utilization, each participant only undertakes the calculation task within its share, improving overall efficiency and reducing resource waste. Thus, the problems of single-point failure and power concentration risk caused by the dependence on a trusted agent in the prior art, large consumption of computing resources, and high complexity of technical implementation are solved.

[0093] Next, the two-party time-lock puzzle generation device according to the embodiments of the present application is described with reference to the accompanying drawings.

[0094] Figure 3is a block schematic diagram of a two-party time-lock puzzle generation device of an embodiment of the present application.

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

[0096] The acquisition module 100 is configured to acquire first generation parameters and second generation parameters of a time-lock puzzle; the determination module 200 is configured to determine respective shares of the first generation parameters and the second generation parameters of the two parties; the calculation module 300 is configured to calculate respective shares of the two parties holding the time-lock puzzle according to the respective shares of the first generation parameters and the second generation parameters of the two parties; and the generation module 400 is configured to generate the time-lock puzzle according to the respective shares of the two parties holding the time-lock puzzle, and to obtain encrypted information by encrypting a secret value with the time-lock puzzle.

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

[0098] The two-party time-lock puzzle generation device according to the embodiment of the present application ensures the cooperation of the decryption process by allowing the two parties to jointly participate in the generation of the puzzle, thereby preventing the information from being tampered with or leaked by one party. At the same time, by removing the dependence on a single trusted agent, the risk is effectively dispersed, avoiding the impact of single-point failure on the continuity and availability of the system. In addition, the distributed generation method also reduces the risk of power concentration, improving fairness and transparency. By optimizing resource utilization, each participant only undertakes the calculation task within its share, improving overall efficiency and reducing resource waste. Thus, the problems of single-point failure and power concentration risk caused by the dependence on a trusted agent in the prior art, large consumption of computing resources, and high complexity of technical implementation are solved.

[0099] Figure 4 The structure of the electronic device provided in the embodiment of the present application is shown in the figure. The electronic device can comprise:

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

[0101] The processor 402 executes the program to implement the two-party time-lock puzzle generation method provided in the above embodiments.

[0102] Further, the electronic device further comprises:

[0103] The communication interface 403 is configured to communicate between the memory 401 and the processor 402.

[0104] ​The memory 401 is configured to store a computer program capable of being executed on the processor 402.

[0105] The memory 401 can include a high-speed RAM (Random Access Memory) memory, and can further include a nonvolatile memory such as at least one disk memory.

[0106] If the memory 401, the processor 402 and the communication interface 403 are independently implemented, the communication interface 403, the memory 401 and the processor 402 can be connected with each other through a bus and complete communication between each other. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component) 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 the convenience of representation, Figure 4 In the figure, only one thick line is used to represent 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 complete communication between each other through an internal interface.

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

[0109] The embodiments of the present application further provide a computer readable storage medium, which has stored a computer program, and the program is executed by a processor to implement the two-party time lock puzzle generation method.

[0110] The embodiments of the present application further provide a computer program product, which includes a computer program or instructions, and the computer program or instructions are executed to implement the two-party time lock puzzle generation method.

[0111] In the description of the application, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the application. In the description of the application, the illustrative description of the above terms is not necessarily directed to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or N embodiments or examples. In addition, the person skilled in the art can combine and combine the different embodiments or examples described in the description and the features of the different embodiments or examples, without contradiction.

[0112] In addition, the terms "first", "second" are only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description of the application, the meaning of "N" is at least two, for example, two, three, etc., unless otherwise explicitly specified.

[0113] Any process or method descriptions in flow charts or otherwise described herein can be understood as representing code modules, segments, or portions of code that include one or more executable instructions for implementing specific logic functions (or steps) in the process, and that the various embodiments of the application can include additional or fewer steps or processes in alternative implementations, as will be appreciated by those skilled in the art. The various embodiments of the application can be implemented in hardware, software, firmware, or a combination thereof, as desired.

[0114] It should be understood that parts of the application can be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. As in another embodiment implemented in hardware, any one or a combination of the following technologies known in the art can be used: discrete logic circuit with logic gate circuit for implementing logic functions on data signals, application specific integrated circuit with suitable combination logic gate circuit, programmable gate array, field programmable gate array, etc.

[0115] Those skilled in the art of the art can understand that the method of implementing the above-mentioned embodiments carries out all or part of the steps. The above-mentioned program can be stored in a computer readable storage medium, which includes one or a combination of the steps of the method embodiment when executed.

[0116] Although the embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary, and are not to be interpreted as limiting the present application, and those skilled in the art can make changes, modifications, replacements and variations to the above embodiments within the scope of the present application.

Claims

1. A two-party time-lock puzzle generation method, characterized by, The method comprises the following steps: obtaining a first generation parameter and a second generation parameter of a time-lock puzzle; determining respective shares of the first and second generation parameters by the communicating parties, the communicating parties including a first communicating party and a second communicating party , the first communicating party having shares of the first and second generation parameters of and , the second communicating party having shares of the first and second generation parameters of and , the determining respective shares of the first and second generation parameters by the communicating parties including: first communication party selecting and defining ; Second communication party Selecting And defining ; the first communication party and the second communication party both verify whether they are divisible by , is a preset integer, if can be divided by an element in the set , then discard and , and start determining the share again, otherwise execute the same step to construct and ; Second communication party Selecting a random number And set: Wherein , ; Second communication party Performing random OT, input , first communication party Input , The first bit of Obtain ; first communication party computing , second communication party computing ; first communication party computing and transmitting to the second communication party ; second communication party computing and transmitting to the first communication party ; first communication party and second communication party computes , first communication party computes and transmits to second communication party , second communication party computes and transmits to first communication party ; first communication partner and a second communication partner checking whether or not is equal, if equal, discarding the parameter , otherwise, restarting the determination of the share; calculating respective shares of the time-lock puzzle held by the two parties according to respective shares of the first generation parameter and the second generation parameter held by the two parties; generating the time-lock puzzle according to the respective shares of the time-lock puzzle held by the two parties, and encrypting a secret value by using the time-lock puzzle to obtain encrypted information.

2. The two-party temporal lock puzzle generation method of claim 1, wherein, The calculating of the respective shares of the time-lock puzzle held by the two parties according to respective shares of the first generation parameter and the second generation parameter held by the two parties comprises: calculating a sum of the shares of the first generation parameter and the second generation parameter of an arbitrary party; calculating a share of the time-lock puzzle held by the arbitrary party according to the sum of the shares, the share of the first generation parameter and the share of the second generation parameter of the arbitrary party; calculating a share of the time-lock puzzle held by another party according to the share of the time-lock puzzle held by the arbitrary party.

3. The two-party temporal lock puzzle generation method of claim 2, wherein, The calculation formula of the share of the time-lock puzzle held by the arbitrary party is: When is not divisible by , then ; When may be divisible by, calculate ; wherein a share of the first generation parameter, a share of the second generation parameter, a time-locked puzzle share held, a second communication party for generating the time-locked puzzle;​ wherein , wherein is a first generation parameter, is a second generation parameter, is a temporal hardness parameter.

4. The two-party temporal lock puzzle generation method of claim 2, wherein, The calculation formula of the share of the time-lock puzzle held by the another party is: , wherein, is holds a time-locked puzzle share, wherein, is a first communication party for generating the time-locked puzzle.

5. The two-party temporal lock puzzle generation method of claim 1, wherein, with coprime, and define ).

6. A two-party time-lock puzzle generation apparatus, characterized by comprising: The method comprises the following steps: obtaining a first generation parameter and a second generation parameter of a time-lock puzzle; The determining module is used to determine the respective shares of the first generated parameter and the second generated parameter by the two communicating parties, wherein the two communicating parties include the first communicating party. and the second corresponding party , the first communication party For the first generated parameters and the second generation parameter The share is and , the second communication party For the first generated parameters and the second generation parameter The share is and The determination of the respective shares of the first generated parameter and the second generated parameter by the communicating parties includes: first communication party selecting and defining ; Second communication party Selecting And defining ; the first communication partner and the second communication partner both verify whether they will be divisible by , is a preset integer, if can be divided by some element in the set , then discard and , and start determining the share again, otherwise perform the same step to construct and ; Second communication party Selecting a random number And set: Wherein , ; second communication party performing random OT, input , first communication party input , first bit of obtain ; first communication party computing , second communication party computing ; first communication party computing and transmitting to the second communication party ; second communication party computing and transmitting to the first communication party ; first communication party and second communication party computing , first communication party computing and transmitting to second communication party , second communication party computing and transmitting to first communication party ; first communication party and a second communication party checking whether is equal, if equal, discarding the parameter , , otherwise starting over determining the share; calculating respective shares of the time-lock puzzle held by the two parties according to respective shares of the first generation parameter and the second generation parameter held by the two parties; generating the time-lock puzzle according to the respective shares of the time-lock puzzle held by the two parties, and encrypting a secret value by using the time-lock puzzle to obtain encrypted information.

7. An electronic device, comprising: The method comprises the following steps: 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-5.

8. A computer readable storage medium having stored thereon a computer program or instructions, characterized in that, The computer program or instructions are executed to implement the two-party time-lock puzzle generation method according to any one of claims 1-5.

9. A computer program product comprising computer programs or instructions, characterized in that, The computer program or instructions are executed to implement the two-party time-lock puzzle generation method according to any one of claims 1-5.