A system and method for time release based on public chain without trusted agent

By combining time lock with blockchain, using the public key and computing volume of the blockchain to generate new blocks, the problems of untrustworthiness and inconsistent unlocking time in the existing technology are solved, the function of delaying release of secret messages is realized, and security and independence are improved.

CN114139173BActive Publication Date: 2025-03-28HUBEI UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111289510.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-02
Publication Date
2025-03-28
Estimated Expiration
2041-11-02

AI Technical Summary

Technical Problem

When the prior art realizes delayed release of secret messages, the credibility of the agent cannot be guaranteed, and the computer performance differences of different users lead to inconsistent unlocking time, making it difficult to control the release time.

Method used

Combining time locks with blockchain, by introducing public keys and computing quantities on the blockchain, new blocks are generated, and the SHA256() hash function is used to associate with the public key private key of the previous block to realize the time release of the blockchain.

Benefits of technology

It realizes the function of delaying release of secret messages without the need for a trusted proxy, ensuring that the information can only be decrypted after a specified time, and controlling the average time of block generation, improving privacy protection security and independence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114139173B_ABST
    Figure CN114139173B_ABST
Patent Text Reader

Abstract

The present invention discloses a system and method for time release based on a public chain without a trusted agent, the system includes n+k blocks B in a time release blockchain n+k 、User U A and auctioneer U B ; Assume that the current blockchain block is B n , which contains the public key PK n , the average time to generate a block is t minutes. Auctioneer U B Conduct a sealed auction and reveal the user U after k*t time A The highest bidder wins the auction item. A After registration, the bidding information will be encrypted and sent to the auctioneer U B , you want the encrypted bidding information to be available to auctioneer U after k*t time B Open, User U A and auctioneer U B Two-way communication is carried out between them. The miner mines block B after k*t time. n+k , Auctioneer U B From block B n+k The invention not only realizes the delayed release of the encrypted message, but also realizes that the whole process does not require the participation of a third party, thus ensuring the security of the secret message.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of blockchain and time lock puzzle, and relates to a system and method for combining blockchain with time lock puzzle to form delayed release; in particular, it relates to a system and method for delayed release in which a user hopes to disclose his secret after a certain period of time, and the secret cannot be solved before the time limit is reached. Background Art

[0002] The core purpose of the time lock puzzle is to encrypt a secret message so that it cannot be decrypted by anyone except its private key owner for a certain period of time. After this period of time, the private key will be made public, and the secret will be made public. It can be simply understood as "sending a message to the future."

[0003] There are currently two methods to achieve delayed release of secret messages. One is to use a trusted agent and let the agent disclose the secret information after an agreed period of time. However, an obvious problem with this method is that there is no guarantee that the agent is completely trustworthy. The second is to create a mathematical calculation problem and hide the private key inside it. Only after the computer has been calculating for a period of time can the problem be decrypted and the private key obtained. However, this method will cause users who want to obtain secret information to consume too much computer resources. At the same time, the different computer performance of different users will also result in different unlocking times, making it difficult to control the time of releasing secret information.

[0004] Blockchain technology originated from the core technology of cryptocurrency. In 2008, some scholars proposed a currency that can be traded directly without any central authority, namely cryptocurrency. Its core technology blockchain can be simply understood as a distributed storage database, which stores transaction information in key-value pairs. The list of records that records a series of transaction information can be called a block. Connecting these blocks together forms a blockchain. In the blockchain, each node retains a complete copy of transaction data. When the data of a node is maliciously tampered with, it will be found that it is inconsistent with the data stored in other nodes. The present invention is mainly based on the proof-of-work (POW) consensus mechanism in cryptocurrency.

[0005] The blockchain contains two parts, one is the block header and the other is the block body. The main components of the block body are a large amount of transaction data connected by the Merkle tree. The components of the block header are version number, timestamp, Merkle root, previous block hash, difficulty value, and random number. The timestamp indicates the time point when this block was created; the Merkle root is the root generated by the Merkle tree in the block body. It is precisely because of the nature of the Merkle tree that the node can quickly find the data that has been maliciously tampered with along the root of the tree, realizing the immutability of the blockchain; the previous block hash refers to the hash value of the previous block header. It is because of the existence of the previous block hash that each independent block is connected together. If the value of one of the blocks is changed, it can be directly traced back to this block, realizing the traceability of the blockchain; the difficulty value and random number are both corresponding data in the proof of work (POW) consensus mechanism.

[0006] The core of the Proof of Work (POW) consensus mechanism is the following function:

[0007] SHA256(SHA256(block_header))≤0 l ||1 256-1 (1)

[0008] SHA256() is a 256-bit hash operation; block_header is the block header; l is the set difficulty value. The system continuously calculates and makes the above equation true, then the mining is successful. However, because the blockchain is completely public, if the secret information is placed on the blockchain, there is no way to delay the release of the above secret. Summary of the invention

[0009] In order to solve the above technical problems, the present invention cleverly combines time locks with blockchain and provides a system and method for time release based on a public chain without the need for a trusted agent.

[0010] The technical solution adopted by the system of the present invention is: a time release system based on a public chain without the need for a trusted agent, comprising n+k blocks B in a time release blockchain n+k 、User U A and auctioneer U B ; Assume that the current blockchain block is B n , which contains the public key PK n , the average time to generate a block is t minutes; the auctioneer U B Conduct a sealed auction and reveal the user U after k×t time A The highest bidder wins the auction item; User U A After registration, the bidding information will be encrypted and sent to the auctioneer U BThe encrypted bidding information can only be read by auctioneer U after k×t time. B Open, User U A and auctioneer U B Two-way communication is carried out between them; the system mines block B after k×t time n+k , Auctioneer U B From block B n+k If you get the private key, you can decrypt the secret information.

[0011] The block header of the blockchain in the present invention is different from the original block header. The components of the block header in the present invention are: the components of the block header are version number, timestamp, Merkle root, previous block hash, difficulty value a, random number r, public key length, public key PK, and calculation amount T. The version number occupies 4 bytes; the timestamp occupies 4 bytes, indicating the time when this block was created; the Merkle root occupies 32 bytes, which is the root of the Merkle tree generated from the transactions in the block; the previous block hash occupies 32 bytes, which is the hash value of the previous block; the difficulty value a occupies 4 bytes, which is the difficulty value of this method when forming the block; the random number r occupies 4 bytes, which is a value that changes continuously in this method; the public key length occupies 4 bytes, which is the length value of the public key contained in the block; the public key PK is not fixed in size, and is the public key generated using the public key of the previous block; the calculation amount The size is not fixed. It is a part of the value that needs to be continuously calculated in the generation of this block. Through the automatic adjustment of the difficulty value a, the block time can be maintained at an average value.

[0012] The system uses the equation SHA256(SHA256(block_header))≡key private (q), constantly changing the random number r and the amount of computation in the block header The value of is used to mine new blocks, where SHA256() is a one-way hash function, key private It is the private key corresponding to the public key in the previous block, and q is the size of the cyclic group G.

[0013] The public key field of the new block in the present invention is a new public key, which is generated using the public key in the previous block. The specific process is: first use the public key in the previous block as a seed, then use this seed as the seed value of the ANSI X9.31 pseudo-random number generator, and finally anyone can generate the same random number, that is, anyone can get the public key in the next block without mining a new block. Through the above algorithm, the present invention can calculate the corresponding public keys in k blocks without mining the next k blocks. Assuming that the average time to generate a block is t minutes under the current difficulty value a, by encrypting the information with k public keys in turn, the information can be decrypted after k×t minutes.

[0014] The difficulty value of generating blocks in the present invention is similar to that of cryptocurrency. The average time of generating blocks is controlled at t minutes, and the difficulty is adjusted every 10 blocks. old 、Time actual and Time predict They are the current difficulty value, the time taken to mine 10 blocks, and the expected time to mine 10 blocks. The difficulty value a can control the average time of generating blocks. Then calculate a new difficulty value a new .

[0015] a new =a old ·(Time predict ÷Time actual );

[0016] The technical solution adopted by the method of the present invention is: a method for time release based on a public chain without the need for a trusted agent, comprising the following steps:

[0017] Step 1: Generation of system parameters and verification keys;

[0018] Step 1.1: Generate a q-order cyclic group G through the generator g; determine the secure encryption hash function H: {0,1} * →{0,1} n And signature algorithm Sig();

[0019] Step 1.2: Auctioneer A secret key is randomly selected in, represents a positive integer that does not contain zero and is less than q and is relatively prime to q;

[0020] Step 1.3: The auctioneer uses the secret key ssk to calculate the public key spk←g ssk , where g is the generator;

[0021] Step 1.4: The auctioneer announces the public parameters including {G, q, g, spk};

[0022] Step 2: User U A register;

[0023] Step 3: Auctioneer U B Posting sealed auction information;

[0024] Step 4: User U A Encrypt the bidding information and send it to the auctioneer U B ;

[0025] Step 5: After k×t minutes, auctioneer U BThe auction results are announced.

[0026] Compared with the existing technology, the present invention has the following advantages and beneficial effects:

[0027] The present invention enables both parties to achieve the effect of delayed release of secrets without the need for a third party, and has high privacy protection security and independence. The blockchain of the present invention uses the equation SHA256 (SHA256 (block_header)) ≡ key private In (mod q), the system needs to keep trying different random values ​​r to change the calculated value in the block header, so that the hash value of the block header is consistent with the private key corresponding to the public key in the previous block. private (mod q), cleverly links the blockchain to the key, and through equation a new =a old ·(Time predict ÷Time actual ) can adjust the difficulty value of the current blockchain block, so that the amount of calculation in the block header The value can be changed accordingly, and the average block time can be controlled in the end. Through the ANSI X9.31 pseudo-random number generator, using the same seed, users can get the public key of the block that has not been mined in advance. In this way, users can decide the number of encryptions according to the length of time the secret information is saved. During this period, no third party is needed, and no one knows the private key value until the corresponding block is mined. Therefore, the present invention has high privacy protection security and independence. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 : System architecture diagram of an embodiment of the present invention;

[0029] Figure 2 : A flow chart of a method according to an embodiment of the present invention;

[0030] Figure 3 : A flowchart of a public key generation algorithm in the method of an embodiment of the present invention;

[0031] Figure 4 : Flowchart of the system mining new blocks in the method of an embodiment of the present invention. DETAILED DESCRIPTION

[0032] In order to facilitate ordinary technicians in the field to understand and implement the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the implementation examples described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0033] Please see Figure 1 The present invention provides a time-release system based on a public chain without a trusted agent, including a time-release blockchain, a user U A and auctioneer U B ;

[0034] Assume that the current blockchain block is B n , which contains the public key PK n , the average time to generate a block is t minutes. User U A First in the auctioneer U B You can only participate in sealed auctions after registering as a legal user. B After launching the auction, we want to end the auction after k×t time and announce the highest bidder. A The bidding information is encrypted and no one knows the key, thus ensuring that the auctioneer U B The information in the block cannot be tampered with, which ensures the fairness of the auction. The system mines block B after k×t time. n+k , Auctioneer U B From block B n+k If you get the private key, you can decrypt the bidding information and announce the auction results.

[0035] Please see Figure 2 , Figure 3 and Figure 4 The present invention provides a method for time release based on a public chain without the need for a trusted agent, comprising the following steps:

[0036] The generation of system parameters and authentication keys involves Figure 2 Follow step 1 in .

[0037] Step 1: Generation of system parameters and verification keys;

[0038] Step 1.1: Generate a q-order cyclic group G through the generator g; secure encryption hash function H: {0,1} * →{0,1} n ;Signature algorithm Sig();

[0039] Step 1.2: Auctioneer A secret key is randomly selected in, represents a positive integer that does not contain zero and is less than q and is relatively prime to q;

[0040] Step 1.3: The auctioneer uses the secret key ssk to calculate the public key spk←g ssk , where g is the generator;

[0041] Step 1.4: The auctioneer announces the public parameters including {G, q, g, spk}.

[0042] UserU A Identity registration involves Figure 2 Follow step 2 in the

[0043] Step 2: User U A register;

[0044] Step 2.1: User U A Send a registration request req = {ID, time} to auctioneer U B , where ID is the user's own identity, and time is the time sent by the user, which is used to prevent replay attacks;

[0045] Step 2.2: Auctioneer U B After receiving the request req, randomly select a parameter As a certification mark. Then the auctioneer U B Use your own secret key ssk to sign σ←Sig ssk (H(ID)||c), where Sig() is the signature algorithm and H() is the secure hash function;

[0046] Step 2.3: Auctioneer U B Send {σ, time} to user U A .

[0047] The release of sealed auction information involves Figure 2 Follow step 3 in the

[0048] Step 3: Auctioneer U B Posting sealed auction information;

[0049] Step 3.1: Auctioneer U B Publish a sealed auction message, decide to stop bidding after k×t minutes and announce the auction results;

[0050] Step 3.2: Auctioneer U B pass Figure 3 The public key generation algorithm is used to calculate the following k-1 public keys, and the public key set PK of k public keys is obtained. n , PK n+1 , ..., PK n+k-1};

[0051] Step 3.3: Auctioneer U B Upload {k,PK} to the time-release blockchain; the block header components of the blockchain are version number, timestamp, Merkle root, previous block hash, difficulty value a, random number r, public key length, public key PK, and computational effort T.

[0052] UserU A Secret bidding involves Figure 2 Follow step 4 in the

[0053] Step 4: User U A Encrypt the bidding information and send it to the auctioneer U B ;

[0054] Step 4.1: User U A Use the public key set PK obtained from the time-release blockchain = {PK n , PK n+1 , ..., PK n+k-1};

[0055] Step 4.2: User U A Using public key set PK = {PK n , PK n+1 , ..., PK n+k-1} Encrypt the bidding information m from right to left respectively PK (m). Thus, when B n+1 When a block is mined, the outermost layer consisting of the public key PK can be unlocked. n An encrypted message detailing the process involved in mining a new block Figure 4 ;

[0056] Step 4.3: User U A The encrypted bidding information, identity and signature {E PK (m),ID,σ} are sent to the auctioneer U B .

[0057] Decryption of confidential bidding information involves Figure 2 Follow step 5 in the

[0058] Step 5: After k×t minutes, auctioneer U B Announcement of auction results;

[0059] Step 5.1: The system calculates by continuously changing the value of the random number r When the entire block header satisfies equation (2), SHA256(SHA256(block_header))≡key private (mod p), then the new block B n+1 Mining is successful. Continue to mine the next block. SHA256() is a secure hash function with a hash length of 256 bits, block_header is the block header, key private () is the private key corresponding to the public key in the previous block header, and q represents the order of the cyclic group G;

[0060] In this embodiment, the computation amount is introduced into the block header. The difficulty value a controls the average time of generating blocks; then calculate a new difficulty value a new =a old ·(Time predict ÷Time actual ), where a old 、Time actual and Time predict They are the current difficulty value, the time required to mine the preset N blocks, and the expected time to mine N blocks.

[0061] Step 5.2: After k×t minutes, block B n+k was excavated. Auctioneer U B First, use the public key spk to verify the signature σ to determine whether it is a legitimate user;

[0062] Step 5.3: Auctioneer U B By calculating SHA256 (SHA256 (block_header)) through the headers of k blocks, the private key set SK corresponding to the public key set PK can be calculated. n , S.K. n+1 , ..., SK n+k-1};

[0063] Step 5.4: Auctioneer U B Using private key set SK = {SK n , S.K. n+1 , ..., SK n+k-1} From left to right, the sealed bid information E PK (m) decryption, you can get the bid information m. After comparing all the bid information, the final sealed auction result is announced.

[0064] The present invention realizes a time release scheme based on blockchain based on blockchain and time lock technology. The scheme not only realizes the delayed release of encrypted messages, but also eliminates the need for third-party participation in the entire process, thereby ensuring the security of secret messages.

[0065] It should be understood that parts not elaborated in detail in this specification belong to the prior art.

[0066] It should be understood that the above description of the preferred embodiment is relatively detailed and cannot be regarded as limiting the scope of patent protection of the present invention. Under the enlightenment of the present invention, ordinary technicians in this field can also make substitutions or modifications without departing from the scope of protection of the claims of the present invention, which all fall within the scope of protection of the present invention. The scope of protection requested for the present invention shall be based on the attached claims.

Claims

1. A time release method based on a public chain without the need for a trusted agent, characterized in that: The following steps are involved: Step 1: Generation of system parameters and verification keys; Step 1.1: Generate a q-order cyclic group G through the generator g; determine the secure encryption hash function H: {0,1} * →{0,1} n And signature algorithm Sig(); Step 1.2: Auctioneer A secret key is randomly selected in, represents a positive integer that does not contain zero and is less than q and is relatively prime to q, ssk represents the secret key; Step 1.3: The auctioneer uses the secret key ssk to calculate the public key spk←g ssk , where g is the generator; Step 1.4: The auctioneer announces the public parameters including {G, q, g, spk}; Step 2: User U A register; Step 3: Auctioneer U B Posting sealed auction information; Step 4: User U A Encrypt the bidding information and send it to the auctioneer U B ; Step 5: After k×t minutes, auctioneer U B Announcement of auction results; The specific implementation of step 5 includes the following sub-steps: Step 5.1: The system calculates by continuously changing the value of the random number r When the entire block header satisfies the equation SHA256(SHA256(block_header))≡key private (mod q), then the new block B n+1 The mining is successful, so we can continue to mine the next block; SHA256() is a secure hash function with a hash length of 256 bits, block_header is the block header, key private () is the private key corresponding to the public key in the previous block header, and q represents the order of the cyclic group G; Among them, the amount of calculation introduced in the block header The difficulty value a controls the average time of generating blocks; then calculate a new difficulty value a new =a old ·(Time predict ÷Time actual ), where a old 、Time actual and Time predict They are the current difficulty value, the time required to mine the preset N blocks, and the expected time to mine N blocks; Step 5.2: After k×t minutes, block B n+k Excavated; Auctioneer U B First, use the public key spk to verify the signature σ to determine whether it is a legitimate user; Step 5.3: Auctioneer U B By calculating SHA256 (SHA256 (block_header)) through the headers of k blocks, the private key set SK corresponding to the public key set PK can be calculated. n , S.K. n+1 , ..., SK n+k-1 }; Step 5.4: Auctioneer U B Using private key set SK = {SK n , S.K. n+1 , ..., SK n+k-1 } From left to right, the sealed bid information E PK (m) Decryption can obtain the bidding information m.

2. The method for time release based on a public chain without a trusted agent according to claim 1, characterized in that: The specific implementation of step 2 includes the following sub-steps: Step 2.1: User U A Send a registration request req = {ID, time} to auctioneer U B , where ID is user U A The identity of user U A The time of sending, used to prevent replay attacks; Step 2.2: Auctioneer U B After receiving the request req, randomly select a parameter As a certification mark; then the auctioneer U B Use your own secret key ssk to sign σ←Sig ssk (H(ID)||c), where Sig() is the signature algorithm and H() is the secure cryptographic hash function; Step 2.3: Auctioneer U B Send {σ, time} to user U A .

3. The method for time release based on a public chain without a trusted agent according to claim 2, characterized in that: The specific implementation of step 3 includes the following sub-steps: Step 3.1: Auctioneer U B Publish a sealed auction message, decide to stop bidding after k×t minutes and announce the auction results; Step 3.2: Auctioneer U B By using the public key generation algorithm, the following k-1 public keys are calculated, and the public key set PK of k public keys is obtained. n , PK n+1 , ..., PK n+k-1 }; Step 3.3: Auctioneer U B Upload {k,PK} to the time-release blockchain; the block header components of the blockchain are version number, timestamp, Merkle root, previous block hash, difficulty value a, random number r, public key length, public key PK, and computational effort T.

4. The method for time release based on a public chain without a trusted agent according to claim 3 is characterized in that: The specific implementation of step 4 includes the following sub-steps: Step 4.1: User U A Use the public key set PK obtained from the time-release blockchain = {PK n , PK n+1 , ..., PK n+k-1 }; Step 4.2: User U A Using public key set PK = {PK n , PK n+1 , ..., PK n+k-1 } Encrypt the bidding information from right to left respectively PK (m); Step 4.3: User U A The encrypted bidding information, identity and signature {E PK (m),ID,σ} are sent to the auctioneer U B .

5. A system for time release based on a public chain without the need for a trusted agent, used to implement the method described in any one of claims 1 to 4; characterized in that: Includes n+k blocks B in the time-release blockchain n+k 、User U A and auctioneer U B ; Assume that the current blockchain block is B n , which contains the public key PK n , the average time to generate a block is t minutes; the auctioneer U B Conduct a sealed auction and reveal the user U after k×t time A The highest bidder wins the auction item; User U A After registration, the bidding information will be encrypted and sent to the auctioneer U B The encrypted bidding information can only be read by auctioneer U after k×t time. B Open, User U A and auctioneer U B Two-way communication is carried out between them; the system mines block B after k×t time n+k , Auctioneer U B From block B n+k If you get the private key, you can decrypt the secret information.

Citation Information

Patent Citations

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

    CN110771094A

  • Alliance blockchain consensus method and system based on timed auction mechanism

    CN113259180A