Multi-time-line timing release encryption method and device, electronic equipment and medium

By constructing a multi-timeline timed-release encryption method and utilizing sequential time lock and homomorphic time lock technology, the problems of insufficient security, poor flexibility and low efficiency in the existing technology are solved, and secure, flexible and efficient information decryption at a specified time point is achieved.

CN119135339BActive Publication Date: 2025-10-10WUHAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing timed-release encryption technology has problems such as insufficient security, poor flexibility and low efficiency, especially when it comes to large-scale data or high-frequency decryption requests, it cannot respond quickly.

Method used

A multi-timeline timed-release encryption method is adopted. By constructing two timelines, different timelines are selected for encryption according to the user's encryption requirements. Sequential time lock and homomorphic time lock technology are used to realize the functions of secret aggregation and non-aggregation, reducing the decryption calculation overhead.

Benefits of technology

It improves the security and flexibility of encryption methods, meets multifunctionality requirements, improves execution efficiency, and ensures accurate decryption and secure release of information at a specified time point.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119135339B_ABST
    Figure CN119135339B_ABST
Patent Text Reader

Abstract

The application relates to a multi-time line timing release encryption method and device, electronic equipment and medium, the method comprising: if the current encryption requirement of a user is secret aggregation timing release encryption, determining the encrypted secret value of the user according to the current encryption requirement, and obtaining the secret aggregation timing release encryption parameter published by a first slave time line for a target time; obtaining the parameter for secret aggregation work according to the encrypted secret value of the user and the secret aggregation timing release encryption parameter, uploading the parameter for secret aggregation work to the node corresponding to the target time of the first slave time line, and enabling the first slave time line to perform secret aggregation work based on the parameter for secret aggregation work. Thus, the problems of insufficient security, poor flexibility and low efficiency of the encryption method in the related art are solved, different time lines are selected for encryption according to the requirements of the user, the multifunctionality is met, and the privacy of the puzzle is ensured.
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 multi-timeline timed release encryption method, device, electronic device, and medium. Background Art

[0002] With the rapid development of information technology, data security and privacy protection have become a focal point in today's society. Among the numerous data protection technologies, encryption plays a crucial role. While traditional encryption methods can ensure data security to a certain extent, they often have limitations. For example, in scenarios where information is released on a timed basis, ensuring that the information is securely and accurately decrypted and released to authorized users at the specified time is an urgent problem that needs to be solved.

[0003] In the related art, existing timed-release encryption technology usually adopts a single timeline method to achieve timed decryption of information.

[0004] However, the single-timeline encryption methods used in related technologies lack security and, in certain application scenarios, lack flexibility, making them incapable of meeting complex and changing decryption requirements. Furthermore, existing technologies are inefficient when processing large amounts of data or high-frequency decryption requests, hindering their ability to quickly respond to decryption requests, a problem that urgently needs to be addressed. Summary of the Invention

[0005] The present application provides a multi-timeline timed-release encryption method, device, electronic device, and medium to address the problems of insufficient security, poor flexibility, and low efficiency of encryption methods in related technologies. By selecting different timelines for encryption according to user needs, it meets versatility while ensuring the privacy of the puzzle.

[0006] The first embodiment of the present application provides a multi-timeline time-release encryption method, comprising the following steps:

[0007] Get the user's current encryption requirements;

[0008] If the current encryption requirement is timed-release encryption for secret aggregation, determining the encrypted secret value of the user according to the current encryption requirement, and obtaining timed-release encryption parameters for secret aggregation published by the first slave timeline for the target time;

[0009] Parameters for secret aggregation are obtained based on the encrypted secret value of the user and the timed-release encryption parameters for secret aggregation, and the parameters for secret aggregation are uploaded to the node corresponding to the target time of the first slave timeline, so that the first slave timeline performs secret aggregation based on the parameters for secret aggregation.

[0010] According to one embodiment of the present application, after obtaining the current encryption requirement of the user, the method further includes:

[0011] If the current encryption requirement is timed-release encryption with secret non-aggregation, obtaining timed-release encryption parameters for secret non-aggregation published by the second slave timeline for the target time;

[0012] The information to be encrypted is encrypted using the timed release encryption parameter for secret non-aggregation to obtain encrypted information.

[0013] According to one embodiment of the present application, before obtaining the current encryption requirement of the user, the method further includes:

[0014] Generate a master timeline using a preset sequential TLP, and generate a time lock puzzle at a target moment based on a preset strong prime number pair and the master timeline;

[0015] The first slave timeline and the second slave timeline are constructed.

[0016] According to one embodiment of the present application, when generating the time lock puzzle at the target moment based on a preset strong prime number pair and the main timeline, the method further includes:

[0017] Determining the required duration of the time-lock puzzle to generate the target moment;

[0018] Based on the preset Euler formula, the generation time of the time lock puzzle for generating the target moment is shortened to the required time.

[0019] According to one embodiment of the present application, when constructing the first slave timeline and the second slave timeline, the method further includes:

[0020] When constructing the first slave timeline, calculating a time-release encryption parameter for secret aggregation published at the target time;

[0021] When constructing the second slave timeline, a first public-private key pair of the target moment is generated, and the private key of the first public-private key pair is encrypted using the public key in the second public-private key pair of the master timeline, and the timed release encryption parameters and decryption time for secret non-aggregation are announced based on the encryption result.

[0022] According to the multi-timeline timed-release encryption method of the embodiment of the present application, when the user's current encryption requirement is timed-release encryption for secret aggregation, the user's encrypted secret value is determined, and the timed-release encryption parameters for secret aggregation published by the first slave timeline are obtained; the parameters for secret aggregation are obtained based on the user's encrypted secret value and the timed-release encryption parameters for secret aggregation, and uploaded to the node corresponding to the target time of the first slave timeline, so that the first slave timeline performs secret aggregation based on the parameters for secret aggregation. This solves the problems of insufficient security, poor flexibility, and low efficiency of encryption methods in related technologies. By selecting different timelines for encryption according to user needs, multifunctionality is met while ensuring the privacy of the puzzle.

[0023] A second embodiment of the present application provides a multi-timeline time-release encryption device, including:

[0024] The acquisition module is used to obtain the user's current encryption requirements;

[0025] an encryption module configured to, if the current encryption requirement is timed-release encryption for secret aggregation, determine the encrypted secret value of the user according to the current encryption requirement, and obtain timed-release encryption parameters for secret aggregation published by the first slave timeline for the target time;

[0026] A parameter generation and upload module is used to obtain parameters for secret aggregation work based on the encrypted secret value of the user and the timed release encryption parameter for secret aggregation, and upload the parameters for secret aggregation work to the node corresponding to the target time of the first slave timeline, so that the first slave timeline performs secret aggregation work based on the parameters for secret aggregation work.

[0027] According to one embodiment of the present application, after obtaining the current encryption requirement of the user, the encryption module is further configured to:

[0028] If the current encryption requirement is timed-release encryption with secret non-aggregation, obtaining timed-release encryption parameters for secret non-aggregation published by the second slave timeline for the target time;

[0029] The information to be encrypted is encrypted using the timed release encryption parameter for secret non-aggregation to obtain encrypted information.

[0030] According to one embodiment of the present application, before obtaining the current encryption requirement of the user, the obtaining module is further configured to:

[0031] Generate a master timeline using a preset sequential TLP, and generate a time lock puzzle at a target moment based on a preset strong prime number pair and the master timeline;

[0032] The first slave timeline and the second slave timeline are constructed.

[0033] According to one embodiment of the present application, when generating the time lock puzzle at the target moment based on a preset strong prime number pair and the main timeline, the acquisition module is further configured to:

[0034] Determining the required duration of the time-lock puzzle to generate the target moment;

[0035] Based on the preset Euler formula, the generation time of the time lock puzzle for generating the target moment is shortened to the required time.

[0036] According to one embodiment of the present application, when constructing the first slave timeline and the second slave timeline, the acquisition module is further configured to:

[0037] When constructing the first slave timeline, calculating the time-release encryption parameter for secret aggregation published at the target time;

[0038] When constructing the second slave timeline, a first public-private key pair of the target moment is generated, and the private key of the first public-private key pair is encrypted using the public key in the second public-private key pair of the master timeline, and the timed release encryption parameters and decryption time for secret non-aggregation are announced based on the encryption result.

[0039] According to the multi-timeline timed-release encryption device of the embodiment of the present application, when the user's current encryption requirement is timed-release encryption for secret aggregation, the user's encrypted secret value is determined, and the timed-release encryption parameters for secret aggregation published by the first slave timeline are obtained; the parameters for secret aggregation are obtained based on the user's encrypted secret value and the timed-release encryption parameters for secret aggregation, and uploaded to the node corresponding to the target time of the first slave timeline, so that the first slave timeline performs secret aggregation based on the parameters for secret aggregation. Thus, the problems of insufficient security, poor flexibility, and low efficiency of encryption methods in related technologies are solved. By selecting different timelines for encryption according to user needs, multifunctionality is met while ensuring the privacy of the puzzle.

[0040] The third aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the multi-timeline timed release encryption method as described in the above embodiment.

[0041] The fourth aspect of the present application provides a computer-readable storage medium on which a computer program is stored. The program is executed by a processor to implement the multi-timeline timed release encryption method as described in the above embodiment.

[0042] 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 practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0044] Figure 1 This is a flowchart of a multi-timeline time-release encryption method provided according to an embodiment of the present application;

[0045] Figure 2 Schematic diagram of a multi-timeline time-release encryption method according to an embodiment of the present application;

[0046] Figure 3 1 is a block diagram of a multi-timeline time-release encryption device according to an embodiment of the present application;

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

[0048] The following describes in detail embodiments of the present application. 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.

[0049] The following describes a multi-timeline timed-release encryption method, apparatus, electronic device, and medium according to embodiments of the present application with reference to the accompanying drawings.

[0050] Before introducing the multi-timeline time-release encryption method of the embodiment of the present application, the time-release encryption (Timed-Release Encryption, TRE) technology and the time-lock puzzle (Time-Lock Puzzles, TLP) technology are first introduced.

[0051] Specifically, time-release encryption and time-lock puzzles enable sending messages "into the future," requiring a predetermined amount of time to elapse before the encrypted information can be accessed. Time-release encryption is a trusted agent-based solution, where users can release messages in the future by directly setting a secret release time point on the trusted agent. After the predetermined time point, the trusted agent releases a secret value used to decrypt the ciphertext, which the recipient then uses to decrypt the ciphertext. Time-lock puzzles, on the other hand, do not require a trusted agent; users can only decrypt the encrypted information by performing an expensive sequential square calculation. The amount of time required to perform this sequential calculation is determined by the TLP time difficulty parameter, T, which can be freely selected. Currently, TRE and TLP are primarily used in sealed-bid auctions, fair contract signing, and non-extendable commitments.

[0052] During the TLP puzzle-solving process, the message recipient inevitably incurs considerable computational overhead, meaning they must devote significant computational resources to solving the puzzle to obtain the message locked by the puzzle. By combining various TLP puzzles with homomorphic time locks, each plaintext message can be obtained by simply solving a single TLP puzzle, effectively reducing the receiver's decryption computational overhead. However, homomorphic time locks differ from conventional time locks in their construction methods, so this application utilizes TRE to construct multiple timelines for different encryption requirements.

[0053] Based on the current situation that the existing time-release encryption has only one timeline, this application proposes a multi-timeline time-release encryption method, which includes two timelines to meet the different encryption needs of users. During the encryption process, different timelines can be selected for encryption according to the usage scenario and user needs, thereby meeting versatility. In addition, after the secret value is locked by the time lock generated by the agency, the secret value can only be decrypted after the preset time target is reached by calculating the sequential square, thereby ensuring the confidentiality of the puzzle, that is, the indistinguishability within time T.

[0054] Specifically, Figure 1 A flowchart of a multi-timeline timed release encryption method provided in an embodiment of the present application.

[0055] like Figure 1 As shown, the multi-timeline time-release encryption method includes the following steps:

[0056] In step S101, the user's current encryption requirement is obtained.

[0057] The user's current encryption requirements include timed-release encryption with secret aggregation and timed-release encryption without secret aggregation.

[0058] Specifically, the embodiment of the present application can determine whether the user's current encryption requirement is secret-aggregated timed-release encryption or secret-non-aggregated timed-release encryption based on the encryption service request sent by the user to the agency.

[0059] Furthermore, in some embodiments, before obtaining the user's current encryption requirements, it also includes: generating a master timeline using a preset sequential TLP, and generating a time lock puzzle at the target moment based on a preset strong prime number pair and the master timeline; constructing a first slave timeline and a second slave timeline.

[0060] Specifically, the agency randomly selects a pair of strong prime numbers (p = 2p′+1, q = 2q′+1), where p′ and q′ are both large prime numbers, and obtains a large integer N based on the selected strong prime number pair, where N = p·q, and then randomly selects an integer from the set of integers consisting of 1, 2, ..., N-1. Randomly select an integer from And perform modulo N operation, set g is an element in the ring, and the ring is

[0061] Furthermore, the agency uses the sequential TLP to initialize and generate the main timeline. i Moment, generate a time lock puzzle by multiple squaring:

[0062]

[0063] Among them, s i For the main timeline, target T i The time lock puzzle generated at the moment, x is the base of the time lock puzzle in RSA form, T i To obtain the target time point for decryption information, N is a large integer, and the set {T i} i∈[n] is ordered, that is, when i∈[n-1], there is T i <T i+1 .

[0064] Furthermore, for each moment T in the main timeline i , use the asymmetric encryption algorithm to generate the second public-private key pair (pk i ,sk i ), where pk i is the public key in the second public-private key pair, sk i is the private key in the second public-private key pair, and the private key sk in the second public-private key pair i Use time lock puzzles i Encrypted, the generated second ciphertext is used Indicates that, among them, csk i is the second ciphertext, For time lock puzzles using the main timeline i Encrypt the private key sk in the second public-private key pair i .

[0065] Furthermore, in some embodiments, when generating a time-lock puzzle for a target moment based on a preset strong prime number pair and a main timeline, the method further includes: determining a required duration for generating the time-lock puzzle for the target moment; and shortening the generation duration for generating the time-lock puzzle for the target moment to the required duration based on a preset Euler formula.

[0066] Specifically, since the agency knows the factors p and q of the large integer N, the embodiment of the present application can use the preset Euler formula to shorten the generation time of the time lock puzzle to the required time, where the required time can be expressed as: poly((logT i ) i∈[n] ,λ), where poly() is the polynomial form and λ is the difficulty parameter.

[0067] Furthermore, in some embodiments, when constructing the first slave timeline and the second slave timeline, it also includes: when constructing the first slave timeline, calculating the timed-release encryption parameters for secret aggregation published at the target time; when constructing the second slave timeline, generating a first public-private key pair at the target time, and using the public key in the second public-private key pair of the master timeline to encrypt the private key of the first public-private key pair, and publishing the timed-release encryption parameters and decryption time for secret non-aggregation based on the encryption result.

[0068] Specifically, after initializing the master timeline, the first slave timeline and the second slave timeline are constructed. When constructing the first slave timeline, for the moment T i ,calculate Among them, h i Used to assist in the generation of homomorphic time lock puzzles, and then publish the timed release encryption parameters for secret aggregation in, For the first time from the time line for time T i Published public parameters, T i is the time it takes to get the decrypted information from the first timeline, N is a large integer, g is an element in the ring, and the ring is h i Used to assist in generating homomorphic time lock puzzles.

[0069] Furthermore, when constructing the second slave timeline, for the moment T in the second slave timeline i , using an asymmetric encryption algorithm to generate the first public-private key pair (pk a,i ,sk a,i ), where pka,i is the public key in the first public-private key pair, sk a,i is the private key in the first public-private key pair (representing the second timeline, T i The private key for decryption at that moment) and the public key pk in the second public-private key pair of the main timeline are used i The private key sk in the first public-private key pair of the second slave timeline a,i Encryption is performed, and the first ciphertext generated is Indicates that, among them, cask i is the first ciphertext, To use pk i Against SK a,i Perform encryption operations and then publish the parameters and decryption time for secret non-aggregation time-release encryption: pp a,i =(T i ,N,x,pk a,i ), where pp a,i For the second time from the time line at time T i Published public parameters, T i To obtain the target time point for decryption information, N is a large integer, x is the base number of the RSA time lock puzzle, pk a,i is the public key in the first public-private key pair.

[0070] Therefore, the agency of this application constructs two slave timelines through sequential time lock puzzles and homomorphic time lock encryption. The former uses sequential time lock to encrypt the private key generated by the asymmetric encryption algorithm, and then uses the public key to encrypt the secret value, so that one time lock can lock multiple secret values; the latter uses homomorphic time lock to aggregate the secrets, and can also decrypt the aggregated secret value through one calculation.

[0071] In step S102, if the current encryption requirement is timed-release encryption for secret aggregation, the encrypted secret value of the user is determined according to the current encryption requirement, and the timed-release encryption parameters for secret aggregation published by the first slave timeline for the target time are obtained.

[0072] In step S103, parameters for secret aggregation are obtained based on the user's encrypted secret value and the timed release encryption parameters for secret aggregation, and the parameters for secret aggregation are uploaded to the node corresponding to the target moment of the first slave timeline, so that the first slave timeline performs secret aggregation based on the parameters for secret aggregation.

[0073] For example, if Figure 2 As shown, from the timeline is the first slave timeline, slave timeline a is the second slave timeline, and if user Client2 wants to use jWhen the secret aggregate of the moment decryption is timed to release encryption, the user Client2 obtains the first from the timeline from the agency The published time-release encryption parameters for secret aggregation, i.e. in, For the first timeline Published time-release encryption parameter for secret aggregation, T j is the secret release moment, N is a large integer, g is an element in the ring, and the ring is h j Used to assist in the generation of homomorphic time lock puzzles.

[0074] Furthermore, user Client2 selects a random value in, is the set of integers [0,N 2 -1], calculate Among them, u is one of the parameters in the puzzle after generating the time lock puzzle, v is one of the parameters in the puzzle after generating the time lock puzzle, g r Perform modular exponentiation of g by random value r, h j Perform modular exponentiation based on random value r, j is the corresponding T j At this moment, s is the secret value that Client2 wants to encrypt; Client2 will encrypt the secret value based on the first timeline. of The generated time lock puzzle Z is uploaded to the slave timeline of agency A. T j In the moment node, it is convenient for the first time line The secret aggregation work is then carried out, in which the parameter u in the time lock puzzle and the parameter v in the time lock puzzle form the time lock puzzle Z, Z = (u, v).

[0075] Furthermore, the agency will use T j At the time node, n puzzles Z are obtained for secret aggregation:

[0076]

[0077] in, is a multiplication of multiple Zs, is the cumulative multiplication of multiple u, u i For one of them u, i is the subscript, n is the number of puzzles, N is a large integer, is the cumulative product of multiple v, v i For one of the v.

[0078] Furthermore, when decrypting, only To decrypt:

[0079]

[0080] in, for according to Perform modular exponentiation, T j For the secret release moment, is the cumulative multiplication of multiple u, N is a large integer, is the cumulative multiplication of multiple secret values ​​s, is the cumulative product of multiple v, v i For one of the v, i is the subscript, n is the number of puzzles, u i For one of u, r i is a random value selected, g is an element in the ring, and the ring is s i For the main timeline, target T i Time-lock puzzles generated moment by moment.

[0081] Furthermore, in some embodiments, after obtaining the user's current encryption requirement, it also includes: if the current encryption requirement is secret non-aggregation timed release encryption, obtaining the timed release encryption parameters for secret non-aggregation published from the second timeline for the target moment; and encrypting the information to be encrypted using the timed release encryption parameters for secret non-aggregation to obtain encrypted information.

[0082] For example, if Figure 2 As shown, when user Client1 wants to use k When the secret is not aggregated and the timed release encryption is performed at the moment of decryption, the user Client1 obtains the timed release encryption parameter for secret non-aggregation published from the second timeline a from the agency, that is, pp a,k =(T k ,N,x,pk a,k ), where pp a,k T is the timed release encryption parameter for secret non-aggregation published by the second slave timeline a. k is the decryption time, N is a large integer, x is the base of the RSA time lock puzzle, pk a,k is the time T for the second slave timeline a k The public key in the generated public-private key pair.

[0083] Furthermore, user Client1 uses the main timeline to execute the asymmetric encryption algorithm to generate the public key pk in the public-private key pair k Encrypted plaintext information m a,1 ,Right now Among them, cm a,1 is the encrypted ciphertext information, m a,1is the plaintext information to be encrypted, The plaintext information m to be encrypted a,1 Encryption is performed; the receiver can wait until T k At this moment, the agency announces the main timeline for t k Time-lock puzzles generated moment by moment k , decrypt the ciphertext csk generated by the main timeline k , get the t in the main timeline k The private key sk in the public-private key pair generated at the moment k , thereby decrypting the second from time line a for T k Ciphertext cask generated at all times k , obtain the private key sk in the public-private key pair generated from timeline a a,k , and finally decrypt the encrypted ciphertext information cm a,1 , get the encrypted plaintext information m a,1 .

[0084] Thus, the function of aggregating secret values ​​is realized through the first slave timeline, and the function of non-aggregating secret values ​​is realized through the second slave timeline. Users can choose different timelines for encryption based on the requirements of secret aggregation or non-aggregation according to the applicable scenarios of encryption. Compared with the existing time lock encryption and time release encryption, this application implements sequential time release encryption and constructs aggregated homomorphic time locks by constructing sequential time lock encryption, which greatly reduces the computational loss required for decrypting TLP. That is, this allows the implementation of a public "sequential square service", in which everyone can time lock the message, but only one entity needs to perform the calculations required to solve the problem, thereby improving execution efficiency while ensuring that the information is securely sent to the future.

[0085] According to the multi-timeline timed-release encryption method of the embodiment of the present application, when the user's current encryption requirement is timed-release encryption for secret aggregation, the user's encrypted secret value is determined, and the timed-release encryption parameters for secret aggregation published by the first slave timeline are obtained; the parameters for secret aggregation are obtained based on the user's encrypted secret value and the timed-release encryption parameters for secret aggregation, and uploaded to the node corresponding to the target time of the first slave timeline, so that the first slave timeline performs secret aggregation based on the parameters for secret aggregation. Thus, the problems of insufficient security, poor flexibility, and low efficiency of encryption methods in related technologies are solved. By selecting different timelines for encryption according to user needs, multifunctionality is met while ensuring the security of the puzzle and high execution efficiency.

[0086] Next, a multi-timeline timed release encryption device according to an embodiment of the present application will be described with reference to the accompanying drawings.

[0087] Figure 3 It is a block diagram of a multi-timeline time-release encryption device according to an embodiment of the present application.

[0088] like Figure 3 As shown, the multi-timeline time-release encryption device 10 includes: an acquisition module 100 , an encryption module 200 and a parameter generation and upload module 300 .

[0089] Among them, the acquisition module 100 is used to obtain the user's current encryption requirement; the encryption module 200 is used to determine the user's encrypted secret value according to the current encryption requirement if the current encryption requirement is timed-release encryption for secret aggregation, and obtain the timed-release encryption parameters for secret aggregation published by the first slave timeline for the target moment; the parameter generation and upload module 300 is used to obtain parameters for secret aggregation work based on the user's encrypted secret value and the timed-release encryption parameters for secret aggregation, and upload the parameters for secret aggregation work to the node corresponding to the target moment of the first slave timeline, so that the first slave timeline performs secret aggregation work based on the parameters for secret aggregation work.

[0090] Furthermore, in some embodiments, after obtaining the user's current encryption requirement, the encryption module 200 is also used to: if the current encryption requirement is secret non-aggregation timed-release encryption, obtain the timed-release encryption parameters for secret non-aggregation published on the second slave timeline for the target moment; and encrypt the information to be encrypted using the timed-release encryption parameters for secret non-aggregation to obtain encrypted information.

[0091] Furthermore, in some embodiments, before obtaining the user's current encryption requirements, the acquisition module 100 is also used to: generate a master timeline using a preset sequence TLP, and generate a time lock puzzle at a target moment based on a preset strong prime number pair and the master timeline; and construct a first slave timeline and a second slave timeline.

[0092] Furthermore, in some embodiments, when generating a time-lock puzzle for a target moment based on a preset strong prime number pair and a main timeline, the acquisition module 100 is further used to: determine a required duration for generating the time-lock puzzle for the target moment, and shorten the generation duration of the time-lock puzzle for the target moment to the required duration based on a preset Euler formula.

[0093] Furthermore, in some embodiments, when constructing the first slave timeline and the second slave timeline, the acquisition module 100 is also used to: when constructing the first slave timeline, calculate the timed-release encryption parameters for secret aggregation published at the target time; when constructing the second slave timeline, generate a first public-private key pair at the target time, and use the public key in the second public-private key pair of the master timeline to encrypt the private key of the first public-private key pair, and publish the timed-release encryption parameters and decryption time for secret non-aggregation based on the encryption result.

[0094] It should be noted that the above explanation of the embodiment of the multi-timeline time-release encryption method is also applicable to the multi-timeline time-release encryption device of this embodiment, and will not be repeated here.

[0095] According to the multi-timeline timed-release encryption device of the embodiment of the present application, when the user's current encryption requirement is timed-release encryption for secret aggregation, the user's encrypted secret value is determined, and the timed-release encryption parameters for secret aggregation published by the first slave timeline are obtained; the parameters for secret aggregation are obtained based on the user's encrypted secret value and the timed-release encryption parameters for secret aggregation, and uploaded to the node corresponding to the target time of the first slave timeline, so that the first slave timeline performs secret aggregation based on the parameters for secret aggregation. Thus, the problems of insufficient security, poor flexibility, and low efficiency of encryption methods in related technologies are solved. By selecting different timelines for encryption according to user needs, multifunctionality is met while ensuring the privacy of the puzzle.

[0096] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:

[0097] Memory 401 , processor 402 , and computer programs stored in the memory 401 and executable on the processor 402 .

[0098] When the processor 402 executes the program, the multi-timeline time-release encryption method provided in the above embodiment is implemented.

[0099] Furthermore, the electronic device further includes:

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

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

[0102] The memory 401 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.

[0103] 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 via a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (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, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

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

[0105] The processor 402 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0106] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned multi-timeline timed release encryption method.

[0107] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" 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 can be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.

[0108] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of such features. Throughout the description of this application, "plurality" means at least two, for example, two, three, etc., unless otherwise specifically defined.

[0109] 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 this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A multi-timeline time-release encryption method, characterized in that: The following steps are involved: Get the user's current encryption requirements; If the current encryption requirement is timed-release encryption for secret aggregation, determining the encrypted secret value of the user according to the current encryption requirement, and obtaining timed-release encryption parameters for secret aggregation published by the first slave timeline for the target time; Obtaining parameters for secret aggregation according to the encrypted secret value of the user and the timed-release encryption parameter for secret aggregation, and uploading the parameters for secret aggregation to the node corresponding to the target time of the first slave timeline, so that the first slave timeline performs secret aggregation based on the parameters for secret aggregation; Before obtaining the current encryption requirement of the user, the method further includes: generating a master timeline using a preset sequence of TLPs, and generating a time lock puzzle at a target time based on a preset strong prime number pair and the master timeline; constructing the first slave timeline and the second slave timeline; When constructing the first slave timeline and the second slave timeline, it also includes: when constructing the first slave timeline, calculating the timed-release encryption parameters for secret aggregation published at the target time; when constructing the second slave timeline, generating a first public-private key pair for the target time, and using the public key in the second public-private key pair of the master timeline to encrypt the private key of the first public-private key pair, and publishing the timed-release encryption parameters and decryption time for secret non-aggregation based on the encryption result.

2. The method according to claim 1, characterized in that After obtaining the current encryption requirement of the user, the method further includes: If the current encryption requirement is timed-release encryption with secret non-aggregation, obtaining timed-release encryption parameters for secret non-aggregation published by the second slave timeline for the target time; The information to be encrypted is encrypted using the timed release encryption parameter for secret non-aggregation to obtain encrypted information.

3. The method according to claim 1, characterized in that When generating the time lock puzzle at the target moment based on the preset strong prime number pair and the main timeline, the method further includes: Determining the required duration of the time-lock puzzle to generate the target moment; Based on the preset Euler formula, the generation time of the time lock puzzle for generating the target moment is shortened to the required time.

4. A multi-timeline time-release encryption device, characterized in that: include: The acquisition module is used to obtain the user's current encryption requirements; an encryption module configured to, if the current encryption requirement is timed-release encryption for secret aggregation, determine the encrypted secret value of the user according to the current encryption requirement, and obtain timed-release encryption parameters for secret aggregation published by the first slave timeline for the target time; a parameter generation and uploading module, configured to obtain parameters for secret aggregation based on the encrypted secret value of the user and the timed release encryption parameter for secret aggregation, and upload the parameters for secret aggregation to the node corresponding to the target time of the first slave timeline, so that the first slave timeline performs secret aggregation based on the parameters for secret aggregation; Before obtaining the current encryption requirement of the user, the acquisition module is further configured to: generate a master timeline using a preset sequence of TLPs, and generate a time lock puzzle at a target time based on a preset strong prime number pair and the master timeline; and construct the first slave timeline and the second slave timeline; When constructing the first slave timeline and the second slave timeline, the acquisition module is also used to: when constructing the first slave timeline, calculate the timed-release encryption parameters for secret aggregation published at the target time; when constructing the second slave timeline, generate a first public-private key pair for the target time, and use the public key in the second public-private key pair of the master timeline to encrypt the private key of the first public-private key pair, and publish the timed-release encryption parameters and decryption time for secret non-aggregation based on the encryption result.

5. The device according to claim 4, characterized in that After obtaining the current encryption requirement of the user, the encryption module is further configured to: If the current encryption requirement is timed-release encryption with secret non-aggregation, obtaining timed-release encryption parameters for secret non-aggregation published by the second slave timeline for the target time; The information to be encrypted is encrypted using the timed release encryption parameter for secret non-aggregation to obtain encrypted information.

6. 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 multi-timeline time-release encryption method according to any one of claims 1 to 3.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the multi-timeline time-release encryption method according to any one of claims 1 to 3.