Multi-timeline timed release encryption method and device, electronic equipment and medium
By adopting a multi-timeline method in timed release encryption, combining sequential time lock puzzles and homomorphic time lock puzzles, flexible choices of users' needs are achieved, the problem of insufficient single timeline is solved, and information security is improved and decryption efficiency.
Patent Information
- Application Number
- CN202411108528.0
- 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
The existing single timeline timing release encryption methods are insufficient in terms of security, flexibility and efficiency, and cannot meet complex decryption needs, especially in large-scale data or high-frequency decryption scenarios.
Using a time-release encryption method with multiple timelines, different timelines are selected according to user needs for encryption, and two timelines are constructed through sequential time lock puzzles and homomorphic time lock puzzles to realize the functions of secret aggregation and secret non-aggregation. , improves encryption security and efficiency.
Through the multi-timeline design, the multifunctional needs are met, the privacy of information is ensured, and the computing efficiency of decryption is significantly improved, solving the problems of insufficient security and poor flexibility.
Smart Images

Figure CN119135339A_ABST
Abstract
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 the focus of today's society. Among the many data protection technologies, encryption technology plays a vital role. Although traditional encryption methods can protect data security to a certain extent, they usually have some limitations. For example, in the scenario of timed release of information, how to ensure that the information is securely and accurately decrypted and released to authorized users at the specified time is an urgent problem to be solved.
[0003] In the related art, the existing timed release encryption technology usually adopts a single timeline method to achieve timed decryption of information.
[0004] However, the single timeline encryption method of the related art is not secure enough, and in some application scenarios, the flexibility of the single timeline is poor and cannot meet the complex and changing decryption requirements. In addition, the existing technology is inefficient when processing large-scale data or high-frequency decryption requests, and cannot quickly respond to decryption needs, which urgently needs to be solved. Summary of the invention
[0005] The present application provides a multi-timeline timed release encryption method, device, electronic device and medium to solve 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 aspect 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 of secret aggregation, determining the encrypted secret value of the user according to the current encryption requirement, and obtaining the timed release encryption parameter for secret aggregation published by the first slave timeline for the target time;
[0009] Parameters for secret aggregation are obtained according to 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 without secret aggregation, obtaining a timed release encryption parameter 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 main timeline using a preset sequential TLP, and generate a time lock puzzle at a target time based on a preset strong prime number pair and the main timeline;
[0015] The first slave timeline and the second slave timeline are constructed.
[0016] According to one embodiment of the present application, when the time lock puzzle of the target moment is generated based on the preset strong prime number pair and the main timeline, it also includes:
[0017] Determine the time required to generate the time lock puzzle at the target time;
[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 an 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 the timed 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 time 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 timed release encryption method of multiple timelines of the embodiment of the present application, when the user's current encryption requirement is timed release encryption of 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 according to 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 encryption method of the related art solves the problems of insufficient security, poor flexibility and low efficiency, and by selecting different timelines for encryption according to the needs of the user, the multifunctionality is met while ensuring the privacy of the puzzle.
[0023] The second aspect 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 determine the encrypted secret value of the user according to the current encryption requirement if the current encryption requirement is timed release encryption of secret aggregation, and obtain the timed release encryption parameter 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 according to the encrypted secret value of the user and the timed release encryption parameters 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 used to:
[0028] If the current encryption requirement is timed release encryption without secret aggregation, obtaining a timed release encryption parameter 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 an embodiment of the present application, before obtaining the current encryption requirement of the user, the obtaining module is further used to:
[0031] Generate a main timeline using a preset sequential TLP, and generate a time lock puzzle at a target time based on a preset strong prime number pair and the main timeline;
[0032] The first slave timeline and the second slave timeline are constructed.
[0033] According to an embodiment of the present application, when generating the time lock puzzle of the target moment based on the preset strong prime number pair and the main timeline, the acquisition module is further used to:
[0034] Determine the time required to generate the time lock puzzle at the target time;
[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 an embodiment of the present application, when constructing the first slave timeline and the second slave timeline, the acquisition module is further used to:
[0037] When constructing the first slave timeline, calculating the timed 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 time 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 timed release encryption device of multiple timelines of the embodiment of the present application, when the user's current encryption requirement is timed release encryption of 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 according to 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 the encryption method of the related art are solved, and different timelines are selected for encryption according to the needs of the user, while meeting the multifunctionality, the privacy of the puzzle is guaranteed.
[0040] The third aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the 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 the 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 A flowchart of a multi-timeline timed release encryption method provided according to an embodiment of the present application;
[0045] Figure 2 A schematic diagram of a multi-timeline time-release encryption method according to an embodiment of the present application;
[0046] Figure 3 It 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 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.
[0049] The following describes a multi-timeline timed release encryption method, device, electronic device, and medium according to an embodiment 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 puzzles (Time-Lock Puzzles, TLP) technology are first introduced.
[0051] Specifically, time-release encryption and time-lock puzzle technology make it possible to send messages to the "future", where a predetermined amount of time must pass before the encrypted information can be accessed. Time-release encryption technology is a solution based on a trusted agent, where users can release messages in the future by setting a secret release time point directly at the trusted agent. After reaching the preset time point, the trusted agent will release some secret values for decrypting the ciphertext, and the recipient obtains the secret value to decrypt the ciphertext. Time-lock puzzle technology does not require a trusted agent, and users can only decrypt encrypted information by performing expensive sequential square calculations. The amount of time required to perform this sequential calculation is determined by the time difficulty parameter T of TLP, which can be freely selected. At present, TRE and TLP are mainly used in sealed bid auctions, fair contract signing, and non-extensible commitments.
[0052] In the process of solving the TLP puzzle, the message receiver must bear a considerable computational overhead, that is, the receiver has to invest a lot of computing resources to solve the puzzle to obtain the message locked by the puzzle. Using homomorphic time locks in conjunction with various TLP puzzles, it is only necessary to solve one TLP puzzle to obtain each plaintext message, effectively reducing the receiver's decryption computational overhead. However, homomorphic time locks and general time locks are constructed differently, so this application uses TRE to construct multiple timelines for different encryption needs.
[0053] Based on the current situation that the existing timed-release encryption has only one timeline, the present application proposes a multi-timeline timed-release encryption method, which includes two timelines to meet different encryption needs of users. During the encryption process, different timelines can be selected for encryption according to the usage scenarios and user needs, thereby meeting versatility. In addition, after the present application locks the secret value through the time lock generated by the agency, the secret value can only be decrypted after the preset time target is reached by calculating the square of the order, 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 current encryption requirements of the user 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 main timeline using a preset sequential TLP, and generating a time lock puzzle at a target moment based on a preset strong prime number pair and the main 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 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 agent uses the sequential TLP to initialize and generate the main timeline. i Moment, generate a time lock puzzle by squaring multiple times:
[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 time T in the main timeline i , use an asymmetric encryption algorithm to generate a 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, it also includes: determining the required time for generating the time lock puzzle for the target moment; and shortening the generation time for generating the time lock puzzle for the target moment to the required time 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 main 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 of the first slave timeline 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 at time T i Published public parameters, T i is the time required from the first timeline from the encryption information to the decryption information, N is a large integer, g is an element in the ring, and the ring is h i Used to assist in the generation of 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 About sk a,i Perform encryption operation 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 from the time line at time T i Published public parameters, T i To obtain the target time point for decrypting information, N is a large integer, x is the base 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 the present application constructs two slave timelines through sequential time lock puzzles and homomorphic time lock encryption. The former uses sequential time lock encryption to generate a private key generated by an asymmetric encryption algorithm, and then uses the public key to encrypt the secret value, thereby achieving the purpose of one time lock being able to lock multiple secret values; the latter uses homomorphic time locks to aggregate secrets, and can also decrypt the aggregated secret value through a single calculation.
[0071] In step S102, if the current encryption requirement is timed release encryption of 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 according to 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 time of the first slave timeline, so that the first slave timeline performs secret aggregation based on the parameters for secret aggregation.
[0073] For example, Figure 2 As shown, from the timeline is the first slave timeline, slave timeline a is the second slave timeline, and suppose that user Client2 wants to use jWhen the secret aggregate of the moment decryption is encrypted with a time release, 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 time, 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 with random value r, h j Perform modular exponentiation based on random value r, j is the corresponding T j time, s is the secret value that Client2 wants to encrypt; Client2 will of The generated time lock puzzle Z is uploaded to the slave timeline of agency A T j In the time 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] Further, the agency will use T j At the time node, n puzzles Z are obtained for secret aggregation:
[0076]
[0077] in, is the multiplication of multiple Z, is the cumulative multiplication of multiple u, u i is one of the u, i is the subscript, n is the number of puzzles, N is a large integer, is the 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 product of multiple v, v i is 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 time; and encrypting the information to be encrypted using the timed release encryption parameters for secret non-aggregation to obtain encrypted information.
[0082] For example, Figure 2 As shown, when user Client1 wants to use k When the secret is decrypted at the moment of the time release encryption, the user Client1 obtains the time release encryption parameter for the secret non-aggregation published by the second timeline a from the agency, that is, pp a,k =(T k ,N,x,pk a,k ), where pp a,k is the timed release encryption parameter for secret non-aggregation published by the second slave timeline a, T 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 in timeline a k The public key of 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 publishes 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 value of 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 secret non-aggregation according to the applicable scenarios of encryption. Compared with the existing time lock encryption and timed release encryption, this application implements sequential timed 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 realization of a public "sequential square service", in which everyone can time lock messages, but only one entity needs to perform the calculations required to solve the problem, thereby improving execution efficiency while ensuring that information is securely sent to the future.
[0085] According to the timed release encryption method of multiple timelines of the embodiment of the present application, when the user's current encryption requirement is timed release encryption of 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 according to 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 the encryption method of the related art are solved. By selecting different timelines for encryption according to the needs of the user, the multifunctionality is met while ensuring the security of the puzzle and the high execution efficiency.
[0086] Next, the multi-timeline timed release encryption device proposed in the embodiment of the present application is described with reference to the accompanying drawings.
[0087] Figure 3 It is a block diagram of a multi-timeline timed 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 according to 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] Further, 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 second timed release encryption parameter for secret non-aggregation published from the timeline for the target time; and encrypt the information to be encrypted using the timed release encryption parameter 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 main 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 main timeline; and construct a first slave timeline and a second slave timeline.
[0092] Furthermore, in some embodiments, when a time lock puzzle for a target moment is generated based on a preset strong prime number pair and a main timeline, the acquisition module 100 is further used to: determine the required duration for generating the time lock puzzle for the target moment, and based on a preset Euler formula, shorten the generation duration for generating the time lock puzzle for the target moment to the required duration.
[0093] Further, 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 main 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 timed release encryption device of multiple timelines of the embodiment of the present application, when the user's current encryption requirement is timed release encryption of 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 according to 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 the encryption method of the related art are solved, and different timelines are selected for encryption according to the needs of the user, while meeting the multifunctionality, the privacy of the puzzle is guaranteed.
[0096] 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:
[0097] Memory 401 , processor 402 , and a computer program 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 comprises:
[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 executed 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 through 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 only 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), or 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 also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the above-mentioned multi-timeline timed release encryption method is implemented.
[0107] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0108] 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 the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and 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, It is characterized in that The following steps are involved: Get the user's current encryption requirements; If the current encryption requirement is timed release encryption of secret aggregation, determining the encrypted secret value of the user according to the current encryption requirement, and obtaining the timed release encryption parameter for secret aggregation published by the first slave timeline for the target time; Parameters for secret aggregation are obtained according to 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.
2. The method according to claim 1, It is 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 without secret aggregation, obtaining a timed release encryption parameter 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, It is characterized in that Before obtaining the current encryption requirement of the user, the method further includes: Generate a main timeline using a preset sequential TLP, and generate a time lock puzzle at a target time based on a preset strong prime number pair and the main timeline; The first slave timeline and the second slave timeline are constructed.
4. The method according to claim 3, It is 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, it also includes: Determine the time required to generate the time lock puzzle at the target time; 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.
5. The method according to claim 3, It is characterized in that When constructing the first slave timeline and the second slave timeline, the method further includes: When constructing the first slave timeline, calculating the timed release encryption parameter for secret aggregation published at the target time; When constructing the second slave timeline, a first public-private key pair of the target time 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.
6. A time-release encryption device with multiple timelines, It is characterized in that include: The acquisition module is used to obtain the user's current encryption requirements; an encryption module, configured to determine the encrypted secret value of the user according to the current encryption requirement if the current encryption requirement is timed release encryption of secret aggregation, and obtain the timed release encryption parameter for secret aggregation published by the first slave timeline for the target time; A parameter generation and upload module is used to obtain parameters for secret aggregation work according to the encrypted secret value of the user and the timed release encryption parameters 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.
7. The device according to claim 6, It is characterized in that After obtaining the current encryption requirement of the user, the encryption module is further used to: If the current encryption requirement is timed release encryption without secret aggregation, obtaining a timed release encryption parameter 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.
8. The device according to claim 6, It is characterized in that Before obtaining the current encryption requirement of the user, the obtaining module is further used to: Generate a main timeline using a preset sequential TLP, and generate a time lock puzzle at a target time based on a preset strong prime number pair and the main timeline; The first slave timeline and the second slave timeline are constructed.
9. An electronic device, It is 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 5.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that The program is executed by a processor to implement the multi-timeline time-release encryption method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Key use method and device, equipment and storage medium
CN116743345A
Public traceable electronic voting method, system and equipment based on block chain
CN117118587A
System and method for validating an entity
US20200127821A1
Computer-implemented system and method for time release encryption over a blockchain network
US20200136815A1
Computer-implemented system and method for time release encryption over a blockchain network
WO2018234922A1
