CN111524012A - Data delay publishing method, device and storage medium - Google Patents
Data delay publishing method, device and storage medium Download PDFInfo
- Publication number
- CN111524012A CN111524012A CN202010373855.4A CN202010373855A CN111524012A CN 111524012 A CN111524012 A CN 111524012A CN 202010373855 A CN202010373855 A CN 202010373855A CN 111524012 A CN111524012 A CN 111524012A
- Authority
- CN
- China
- Prior art keywords
- transaction
- public key
- executed
- publishing
- key
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/382—Payment protocols; Details thereof insuring higher security of transaction
- G06Q20/3829—Payment protocols; Details thereof insuring higher security of transaction involving key management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
- H04L9/0863—Generation of secret information including derivation or calculation of cryptographic keys or passwords involving passwords or one-time passwords
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
- H04L9/0869—Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/30—Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Computer Security & Cryptography (AREA)
- Theoretical Computer Science (AREA)
- Finance (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Strategic Management (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Development Economics (AREA)
- Technology Law (AREA)
- Marketing (AREA)
- Economics (AREA)
- Computing Systems (AREA)
- Storage Device Security (AREA)
Abstract
The invention provides a data delay publishing method, a device and a storage medium, wherein the method comprises the following steps: receiving a first delayed publishing original transaction, and storing the original transaction in a transaction pool; when the original transaction can be packed into a block, public keys of a plurality of nodes are selected to generate a secret key, and a Merkel root is generated according to a bilinear mapping rule and each public key; encrypting the original text by using the secret key to generate a first ciphertext, and generating a delayed publishing encryption transaction according to the first ciphertext; replacing the encrypted transaction with the original transaction; replacing the encrypted transaction with the original transaction; respectively generating data sets of the selected nodes; respectively sending each data set to each corresponding node; and when the verification transactions are executed, verifying whether the public keys are matched and whether the Merkel roots are the same, and if the verification is successful and the public key in each verification transaction which is executed successfully is enough to restore the key of the corresponding encrypted transaction, restoring the key of the corresponding encrypted transaction. The application realizes automatic delay of publishing information.
Description
Technical Field
The present application relates to the field of block chaining technologies, and in particular, to a data delay publishing method, device, and storage medium.
Background
The delayed public of some information in society has certain requirements, such as decryption of detailed contents of some thesis, and some commercial information can firstly publish some abstracts to attract the requirements of consumers, such as obtaining the detailed information, paying or waiting for a certain time and then decrypting freely as a public purpose; the existing delayed publishing method is to encrypt the information to be delayed published to generate encrypted information, break up the encrypted information, record the broken encrypted information to a block chain step by step after a period of time, and collect the broken encrypted information and decrypt and restore the information by a user. In the mechanism, the information is restored seriously by manual decryption, and automatic decryption cannot be realized; when the broken encrypted information is published, if the incorrect broken encrypted information is recorded on the block chain, the user cannot restore the information according to the collected broken encrypted information.
Disclosure of Invention
In view of the above-mentioned drawbacks and deficiencies of the prior art, it is desirable to provide a data delay publishing method, apparatus, and storage medium that automatically delays publishing information.
In a first aspect, the present invention provides a data delay publishing method suitable for a blockchain node, where the method includes:
receiving a first delayed publishing original transaction, and storing the first delayed publishing original transaction in a transaction pool; the first delayed publishing original transaction comprises a first original text and first delayed information;
when the mining right of the first block with the first block height is obtained and the first delay publication original transaction can be packaged into the first block, sequentially executing the following steps:
randomly selecting public keys of a first number of block chain nodes, and generating a first secret key according to each public key and a preset secret key generation rule;
randomly generating a first public and private key pair according to a bilinear mapping rule, generating corresponding random public keys according to the selected public keys and a first private key in the first public and private key pair, and generating a first Merkel root according to the random public keys;
symmetrically encrypting the first original text by using a first secret key to generate a first ciphertext, and generating a first delayed publishing encryption transaction according to the first ciphertext, first delay information, a first public key in a first public and private key pair and a first Merkel root;
replacing the first delayed publishing original transaction with the first delayed publishing encrypted transaction, packaging the first delayed publishing encrypted transaction into a first block, and recording a first ciphertext, first delay information, a first public key and a first Meckel root on a block chain when the first delayed publishing encrypted transaction is executed;
respectively generating a first data set of each selected block chain node; the first data set comprises a random public key of a corresponding block chain node, a Merkel root path of the random public key of the corresponding block chain node when generating a first Merkel root, a first transaction hash of a first delayed publishing encryption transaction and first delay information;
respectively sending each first data set to each corresponding block chain node so as to determine a second block height according to the first block height and the first delay information, and generating a first verification transaction according to the second data set and broadcasting the first verification transaction to other block chain nodes when the block height reaches the second block height; wherein the second data set comprises the held public key, the random public key in the received first data set, the Merkel root path in the received first data set, and the first transaction hash;
when the verification transaction is executed, according to the corresponding delay publishing of the verification transaction executed, the public key recorded in the encrypted transaction is used for verifying whether the public key in the executed verification transaction is matched with the random public key in the executed verification transaction:
if so, calculating to obtain a second Merkel root according to the random public key and the Merkel root path in the executed verification transaction, and judging whether the second Merkel root is the same as the Merkel root recorded by the delayed publishing encryption transaction corresponding to the executed verification transaction:
if yes, judging whether the public key in each verification transaction which is successfully executed is enough to restore the corresponding secret key of the delayed publishing encryption transaction:
if yes, restoring a corresponding secret key for delayed publishing encrypted transaction according to the public key in each successfully executed verification transaction, and recording the restored secret key to the block chain;
the restored secret key is used for the user side of each user to decrypt the corresponding delayed publishing encryption transaction so as to obtain the corresponding original text.
In a second aspect, the present invention also provides an apparatus comprising one or more processors and a memory, wherein the memory contains instructions executable by the one or more processors to cause the one or more processors to perform a delayed data publication method provided according to embodiments of the present invention.
In a third aspect, the present invention further provides a storage medium storing a computer program, where the computer program makes a computer execute the data delay publishing method provided in accordance with the embodiments of the present invention.
According to the data delay publishing method, the data delay publishing equipment and the data delay publishing storage medium provided by the embodiments of the invention, the original transaction is published by receiving the first delay, and the original transaction is stored in the transaction pool; when the original transaction can be packed into a block, public keys of a plurality of nodes are selected to generate a secret key, and a Merkel root is generated according to a bilinear mapping rule and each public key; encrypting the original text by using the secret key to generate a first ciphertext, and generating a delayed publishing encryption transaction according to the first ciphertext; replacing the encrypted transaction with the original transaction; replacing the encrypted transaction with the original transaction; respectively generating data sets of the selected nodes; respectively sending each data set to each corresponding node; and when the verification transactions are executed, whether the public keys are matched and whether the Merkel roots are the same are verified, and when the verification is successful and the public key in each verification transaction which is executed successfully is enough to restore the secret key of the corresponding encryption transaction, the method for restoring the secret key of the corresponding encryption transaction is realized, and the automatic delayed information publishing is realized.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1 is a flowchart of a data delay publishing method according to an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 is a flowchart of a data delay publishing method according to an embodiment of the present invention. As shown in fig. 1, in this embodiment, the present invention provides a data delay publishing method applicable to a blockchain node, where the method includes:
s21: receiving a first delayed publishing original transaction, and storing the first delayed publishing original transaction in a transaction pool; the first delayed publishing original transaction comprises a first original text and first delayed information;
when the mining right of the first block with the first block height is obtained and the first delay publication original transaction can be packaged into the first block, sequentially executing the following steps:
s221: randomly selecting public keys of a first number of block chain nodes, and generating a first secret key according to each public key and a preset secret key generation rule;
s222: randomly generating a first public and private key pair according to a bilinear mapping rule, generating corresponding random public keys according to the selected public keys and a first private key in the first public and private key pair, and generating a first Merkel root according to the random public keys;
s223: symmetrically encrypting the first original text by using a first secret key to generate a first ciphertext, and generating a first delayed publishing encryption transaction according to the first ciphertext, first delay information, a first public key in a first public and private key pair and a first Merkel root;
s224: replacing the first delayed publishing original transaction with the first delayed publishing encrypted transaction, packaging the first delayed publishing encrypted transaction into a first block, and recording a first ciphertext, first delay information, a first public key and a first Meckel root on a block chain when the first delayed publishing encrypted transaction is executed;
s225: respectively generating a first data set of each selected block chain node; the first data set comprises a random public key of a corresponding block chain node, a Merkel root path of the random public key of the corresponding block chain node when generating a first Merkel root, a first transaction hash of a first delayed publishing encryption transaction and first delay information;
s226: respectively sending each first data set to each corresponding block chain node so as to determine a second block height according to the first block height and the first delay information, and generating a first verification transaction according to the second data set and broadcasting the first verification transaction to other block chain nodes when the block height reaches the second block height; wherein the second data set comprises the held public key, the random public key in the received first data set, the Merkel root path in the received first data set, and the first transaction hash;
s231: when the verification transaction is executed, according to the corresponding delay publishing of the verification transaction executed, the public key recorded in the encrypted transaction is used for verifying whether the public key in the executed verification transaction is matched with the random public key in the executed verification transaction:
if yes, go to step S232: calculating to obtain a second Merkel root according to the random public key and the Merkel root path in the executed verification transaction, and judging whether the second Merkel root is the same as the Merkel root recorded by the delayed publishing encryption transaction corresponding to the executed verification transaction:
if yes, go to step S2321: judging whether the public key in each verification transaction which is successfully executed is enough to restore the corresponding secret key of the delayed publishing encryption transaction:
if yes, go to step S23211: restoring a corresponding secret key for delayed publishing encrypted transaction according to the public key in each successfully executed verification transaction, and recording the restored secret key to the block chain;
the restored secret key is used for the user side of each user to decrypt the corresponding delayed publishing encryption transaction so as to obtain the corresponding original text.
Specifically, determining whether the public key in each successfully executed verification transaction is sufficient to restore the corresponding key of the delayed publishing encryption transaction includes determining whether a third number of successfully executed verification transactions is equal to a fifth number, where the fifth number is a number of public keys used to generate a michael root recorded by the corresponding delayed publishing encryption transaction; the delay information is offset height; the pre-configured secret key generation rule is that all the selected public keys are connected in series to generate a secret key as an example;
assuming that A obtains the mining right of block (100), the first quantity is 3, and the public key of the 3 block chain nodes selected by A is the public key pub _ B, pub _ C, pub _ D of B, C, D; the offset height is 1000;
taking the current node as a:
step S21 is executed, the original transaction tx1_ ori is received and published in a delayed mode, and tx1_ ori is stored in a transaction pool; tx1_ ori includes plaintext and 1000;
when a obtains the cut right of block (100) and tx1_ ori can be packed into block (100), a performs in sequence:
a, executing step S221, selecting B, C, D a public key pub _ B, pub _ C, pub _ D, and generating a first key (pwd ═ pub _ B + pub _ C + pub _ D) according to pub _ B, pub _ C, pub _ D and a preconfigured key generation rule;
step S222 is executed, a first public and private key pair (m, Pm) is randomly generated according to bilinear mapping rules, wherein m is a private key of the first public and private key pair, and Pm is a public key of the first public and private key pair; a generates corresponding random public keys PB, PC and PD according to m and pub _ B, pub _ C, pub _ D; a, generating Merkel merkleothash according to PB, PC and PD;
step S223 is executed, the original text is symmetrically encrypted by pwd to generate a ciphertext, and a first delayed publishing encryption transaction tx1_ enc is generated according to the ciphertext, 1000 Pm and merkleothash;
step S224 is executed, tx1_ enc is used for replacing tx1_ ori, tx1_ enc is packaged into block (100), and ciphertext, 1000 Pm and merkleroothash are recorded on a block chain when tx1_ enc is executed;
a executes step S225, generating data set dataset _ D of data set dataset _ C, D of data set dataset _ B, C of B;
dataset _ B comprises PB, path _ B (path _ B is the Merkel root path of PB when generating merkleothash), transaction hash of tx1_ enc (tx1_ enc), 1000;
dataset _ C comprises PC, path _ C (path _ C is the Merkel root path of pub _ C when generating merkleothash), hash (tx1_ enc), 1000;
dataset _ D comprises PD, path _ D (path _ D is the Merkel root path of pub _ D when merkleothash is generated), hash (tx1_ enc), 1000;
step S226 is executed by A, and dataset _ B, dataset _ C and dataset _ D are transmitted to B, C and D respectively;
b, determining a second block height 1100 according to 100 and 1000, and generating a verification transaction tx _ ver _ B according to Pub _ B, PB, path _ B and hash (tx1_ enc) when the block height reaches 1100;
c determines a second block height 1100 according to 100 and 1000, and generates a verification transaction tx _ ver _ C according to Pub _ C, PC, path _ C and hash (tx1_ enc) when the block height reaches 1100;
d, determining a second block height 1100 according to 100 and 1000, and generating a verification transaction tx _ ver _ D according to Pub _ D, PD, path _ D and hash (tx1_ enc) when the block height reaches 1100;
assume that a receives each verification transaction in the order tx _ ver _ B, tx _ ver _ C, tx _ ver _ D and tx _ ver _ B, tx _ ver _ C, tx _ ver _ D can both perform successfully (meaning that the public key of tx _ ver _ B, tx _ ver _ C, tx _ ver _ D matches the random public key in the performed verification transaction and the meiker root is the same as the meiker root recorded for the delayed publish encrypted transaction corresponding to the performed verification transaction);
a performs step S331, verifying whether Pub _ B and PB match according to Pm when tx _ ver _ B is executed (calculating whether Pub _ B and PB match by calculating E (PB, G) ═ E (Pub _ B, Pm), where G is a bilinear mapping elliptic curve start coordinate point):
if yes, go to step S332: calculating to obtain Merkel root merkleothorash 'according to PB and path _ B, and judging whether the merkleothorash' is the same as the merkleothorash:
if yes, go to step S3321: judging whether the public key in each verification transaction which is successfully executed is enough to restore the corresponding secret key of the delayed publishing encryption transaction:
since only 1 (tx _ ver _ B), less than 3, successfully performed authentication transaction is not enough to restore pwd of tx1_ enc;
a executes step S331, verifying whether Pub _ C matches PC according to Pm when tx _ ver _ C is executed (calculating whether Pub _ C matches PC by calculating E (PC, G) ═ E (Pub _ C, Pm)):
if yes, go to step S332: calculating to obtain Merkel root merkleothorash according to PC and path _ C, and judging whether the merkleothorash is the same as the merkleothorash:
if yes, go to step S3321: judging whether the public key in each verification transaction which is successfully executed is enough to restore the corresponding secret key of the delayed publishing encryption transaction:
since there are only 2 (tx _ ver _ B, tx _ ver _ C), less than 3, verification transactions that were successfully performed, it is not enough to restore pwd for tx1_ enc;
a performs step S331, verifying whether Pub _ D and PD match according to Pm when tx _ ver _ D is performed (calculating whether Pub _ D and PD match by calculating E (PD, G) ═ E (Pub _ D, Pm)):
if yes, go to step S332: calculating to obtain a Merkel root merkleothash '″ according to the PD and the path _ D, and judging whether the merkleothash' ″ is the same as the merkleothash or not:
if yes, go to step S3321: judging whether the public key in each verification transaction which is successfully executed is enough to restore the corresponding secret key of the delayed publishing encryption transaction:
since there are 3 (tx _ ver _ B, tx _ ver _ C, tx _ ver _ D) authentication transactions successfully performed, which are the same as the number (3) of public keys used to generate the mekerr root recorded by tx1_ enc, step S33211 is performed: restoring pwd of tx1_ enc according to pub _ B, pub _ C, pub _ D, and recording the restored pwd of tx1_ enc on a block chain;
the pwd of the restored tx1_ enc is used for the user side of each user to decrypt the tx1_ enc to obtain the corresponding original text.
In more embodiments, the delay information may be configured to a certain fixed block height according to actual requirements, so that the same technical effect can be achieved.
In further embodiments, the preconfigured key generation rule may also be configured according to actual requirements, for example, configured to concatenate the selected public keys, and perform a hash operation on the concatenated strings to generate the key, so as to achieve the same technical effect.
In more embodiments, since the verification transaction needs to be sent after being signed by the node, and the necessary step of transaction execution is to perform signature verification, the public key held by the node sending the verification transaction can be acquired in the process of signature verification, so that the parameter of the held public key can not be included in the verification transaction, and the same technical effect can be achieved.
In further embodiments, the first number may also be configured according to actual requirements, for example, configured as 4, and the same technical effect may be achieved.
In further embodiments, an operation when the second mekerr root is different from the mekerr root recorded in the delayed publishing encryption exchange corresponding to the executed verification exchange may be further configured according to actual requirements, for example, configured to: updating the number of abnormal transmissions of the block link points that generated the executed validation transaction; or, configured to: updating the abnormal sending times of the blockchain node generating the executed verification transaction, and shielding other transactions generated by the blockchain node generating the executed verification transaction when the abnormal sending times reach a pre-configured numerical value; the same technical effect can be achieved.
Assuming that the original public key is used as a merkle path, in the case of a short path, after the public network has been operated for a period of time, a large amount of public key information of nodes is accumulated, and there may be a case that the disclosed public keys are repeatedly used to recombine and calculate the merkle root, so that the malicious nodes are relatively easy to crack out the public keys constituting the merkle root by a brute force cracking method. In the embodiment, the random public and private keys are replaced each time, and the obtained random public keys are different for the same public key each time; and m is not recorded on the block chain, but Pm is recorded, so that the rogue node cannot decrypt the random public key by using Pm, and each block chain link point can only prove the matching of the public key held by a certain block chain node and the corresponding random public key according to a bilinear mapping rule. And the rogue node cannot decrypt pwd in advance, even if the rogue node cannot acquire tx _ ver _ B, tx _ ver _ C according to Pub _ B, Pub _ B, the rogue node only knows Pub _ B, Pub _ C, and cannot acquire another random public key through Pub _ B, Pub _ C and merkleroothash in a traversal mode to restore pwd of tx1_ enc.
The embodiment enables the information to be automatically delayed to be published, and reduces the probability of being cracked in advance.
Preferably, determining the second block height according to the first block height and the first delay information comprises:
verifying whether the random public key in the received first data set and the held public key are matched according to the first public key:
if yes, determining a second block height according to the first block height and the first delay information.
Preferably, generating the first meikerr root from each random public key comprises:
generating a second number of error correcting codes according to the Reed Solomon coding rule and each random public key, and generating a first Meckel root according to each random public key and each error correcting code;
generating a first delayed publishing encryption transaction according to the first ciphertext, the first delay information, a first public key in the first public and private key pair and the first Merkel root comprises the following steps:
generating a first delayed publishing encryption transaction according to the first ciphertext, the first delay information, the first public key, the first Merkel root and each error correction code;
recording the first ciphertext, the first latency information, the first public key, and the first meikerr root onto the blockchain when performing the first delayed publishing encryption transaction comprises:
recording a first ciphertext, first delay information, a first public key, a first Meckel root and each error correction code on a block chain when executing a first delay publishing encryption transaction;
the step of restoring the corresponding key of the delayed publishing encryption transaction according to the public key in each successfully executed verification transaction comprises the following steps:
determining whether the third number of successfully executed validation transactions equals the fourth number: if yes, restoring the corresponding secret key of the delayed publishing encryption transaction according to the public key in each successfully executed verification transaction and each error correcting code recorded in the corresponding delayed publishing encryption transaction; the fourth quantity is the difference between the quantity of the public keys of the Merkel root recorded for generating the corresponding delayed publishing encryption exchange and the quantity of the error correcting codes recorded for the corresponding delayed publishing encryption exchange.
In the method shown in fig. 1, if the blockchain node does not receive any of tx _ ver _ B, tx _ ver _ C, tx _ ver _ D to verify the transaction, or the blockchain node receives tx _ ver _ B, tx _ ver _ C, tx _ ver _ D, but any of the following conditions exist: any one of PB and pub _ B mismatch, PC and pub _ C mismatch, PD and pub _ D mismatch, merklerooth ', merklerooth "and merklerooth'" is different from merklerooth, so that the block link point cannot restore pwd of tx1_ enc;
the problems that may arise with the mechanism of FIG. 1 are solved according to the steps shown in the preferred embodiment described above;
take the second number as 2 for example;
in step S222, a generates 2 error correction codes code _1 and code _2 according to the Reed Solomon encoding rule and PB, PC, PD, and generates merkleroothash according to pub _ B, pub _ C, pub _ D and code _1 and code _ 2;
in step S223, a symmetrically encrypts the plaintext with pwd to generate a ciphertext, and generates a first delayed publishing encrypted transaction tx1_ enc according to the ciphertext, 1000, Pm, merklerooth, code1 and code 2;
in the execution step S224, a replaces tx1_ ori with tx1_ enc, packs tx1_ enc into block (100), and records ciphertext, 1000, Pm, merkleroothash and code1, code2 on the block chain when tx1_ enc is executed;
in the B, C, D, executing step "recovering the corresponding key of the deferred publishing encryption transaction according to the public key in each successfully executed verification transaction", where the number of successfully executed verification transactions is not less than 1, B, C, D may recover the key of tx1_ enc according to the public key in each successfully executed verification transaction, code1, and code 2;
in further embodiments, the second number may also be configured according to actual requirements, for example, configured as 1, and the same technical effect may be achieved.
In more embodiments, the Reed Solomon encoding rule can be replaced by other encoding rules according to actual requirements, for example, the Reed Solomon encoding rule is configured as a BCH encoding rule, and the same technical effect can be achieved.
The above embodiment increases the probability of successfully reducing pwd of tx1_ enc.
Preferably, the determining whether the public key in each successfully executed verification transaction is sufficient to recover the key of the corresponding deferred publishing encryption transaction includes:
determining whether the third number of successfully executed validation transactions is equal to the fifth number; the fifth quantity is the quantity of public keys used for generating the Merkel root recorded by the corresponding delayed publishing encryption exchange.
The data delay publishing principle of the above embodiment can refer to the method shown in fig. 1, and is not described herein again.
Preferably, the calculating the second meikern root according to the public key and the meikern root path in the executed verification transaction when executing the verification transaction includes:
determining the height of a third block according to the height of the block corresponding to the packaging of the delayed publishing encrypted transaction and the delay information in the corresponding delayed publishing encrypted transaction;
judging whether the block height when receiving the verification transaction is not less than the third block height:
if yes, a second Merkel root is calculated according to the public key and the Merkel root path in the executed verification transaction when the verification transaction is executed.
In further embodiments, the operation when the block height when receiving the verification transaction is smaller than the third block height may be configured according to actual requirements, for example, configured to: updating the number of abnormal transmissions of the block link points that generated the executed validation transaction; or, configured to: updating the abnormal sending times of the blockchain node generating the executed verification transaction, and shielding other transactions generated by the blockchain node generating the executed verification transaction when the abnormal sending times reach a pre-configured numerical value; the same technical effect can be achieved.
Preferably, randomly selecting the public keys of the first number of block link points comprises:
sending PING messages to a plurality of block chain nodes;
and randomly selecting public keys of the first number of block chain link points in each block chain node returning the PONG message.
The above embodiment increases the probability of successfully reducing pwd of tx1_ enc.
Fig. 2 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
As shown in fig. 2, as another aspect, the present application also provides an apparatus 200 including one or more Central Processing Units (CPUs) 201 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)202 or a program loaded from a storage section 208 into a Random Access Memory (RAM) 203. In the RAM203, various programs and data necessary for the operation of the apparatus 200 are also stored. The CPU201, ROM202, and RAM203 are connected to each other via a bus 204. An input/output (I/O) interface 205 is also connected to bus 204.
The following components are connected to the I/O interface 205: an input portion 206 including a keyboard, a mouse, and the like; an output section 207 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 208 including a hard disk and the like; and a communication section 209 including a network interface card such as a LAN card, a modem, or the like. The communication section 209 performs communication processing via a network such as the internet. A drive 210 is also connected to the I/O interface 205 as needed. A removable medium 211 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 210 as necessary, so that a computer program read out therefrom is mounted into the storage section 208 as necessary.
In particular, according to an embodiment of the present disclosure, the method described in any of the above embodiments may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing any of the methods described above. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 209 and/or installed from the removable medium 211.
As yet another aspect, the present application also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus of the above-described embodiment; or it may be a separate computer readable storage medium not incorporated into the device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present application.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor, for example, each of the described units may be a software program provided in a computer or a mobile intelligent device, or may be a separately configured hardware device. Wherein the designation of a unit or module does not in some way constitute a limitation of the unit or module itself.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the present application. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.
Claims (8)
1. A data delay publishing method is applied to a blockchain node, and comprises the following steps:
receiving a first delayed publishing original transaction, and storing the first delayed publishing original transaction in a transaction pool; the first delayed publishing original transaction comprises a first original text and first delayed information;
when the mining right of the first block with the first block height is obtained and the first delay publishes that the original transaction can be packaged into the first block, sequentially executing the following steps:
randomly selecting public keys of a first number of block chain nodes, and generating a first secret key according to each public key and a preset secret key generation rule;
randomly generating a first public and private key pair according to a bilinear mapping rule, generating corresponding random public keys according to the selected public keys and a first private key in the first public and private key pair, and generating a first Merkel root according to the random public keys;
symmetrically encrypting a first original text by using a first secret key to generate a first ciphertext, and generating a first delayed publishing encryption transaction according to the first ciphertext, the first delay information, a first public key in a first public and private key pair and a first Merkel root;
replacing the first delayed publishing original transaction with the first delayed publishing encrypted transaction, packaging the first delayed publishing encrypted transaction into the first block, and recording the first ciphertext, the first delayed information, the first public key and the first Merkel root on a block chain when the first delayed publishing encrypted transaction is executed;
respectively generating a first data set of each selected block chain node; the first data set comprises a random public key of a corresponding block chain node, a Merkel root path of the random public key of the corresponding block chain node when generating a first Merkel root, a first transaction hash of the first delayed publishing encryption transaction and the first delay information;
respectively sending each first data set to each corresponding block chain node so as to determine a second block height according to the first block height and the first delay information, and generating a first verification transaction according to the second data set and broadcasting the first verification transaction to other block chain nodes when the block height reaches the second block height; wherein the second data set comprises the held public key, the random public key in the received first data set, the Merkel root path in the received first data set, and the first transaction hash;
when the verification transaction is executed, according to the corresponding delay publishing of the verification transaction executed, the public key recorded in the encrypted transaction is used for verifying whether the public key in the executed verification transaction is matched with the random public key in the executed verification transaction:
if so, calculating to obtain a second Merkel root according to the random public key and the Merkel root path in the executed verification transaction, and judging whether the second Merkel root is the same as the Merkel root recorded by the delayed publishing encryption transaction corresponding to the executed verification transaction:
if yes, judging whether the public key in each verification transaction which is successfully executed is enough to restore the corresponding secret key of the delayed publishing encryption transaction:
if yes, restoring a corresponding secret key for delayed publishing encrypted transaction according to the public key in each successfully executed verification transaction, and recording the restored secret key to the block chain;
the restored secret key is used for the user side of each user to decrypt the corresponding delayed publishing encryption transaction so as to obtain the corresponding original text.
2. The method of claim 1, wherein determining a second block height based on the first block height and the first delay information comprises:
verifying whether the random public key in the received first data set is matched with the held public key according to the first public key:
if yes, determining a second block height according to the first block height and the first delay information.
3. The method of claim 1, wherein generating a first Meckel root from each of the random public keys comprises:
generating a second number of error correcting codes according to a Reed Solomon coding rule and each random public key, and generating a first Meckel root according to each random public key and each error correcting code;
generating a first delayed publishing encryption transaction according to the first ciphertext, the first delay information, a first public key in a first public and private key pair and a first Merkel root comprises:
generating a first delayed publishing encryption transaction according to the first ciphertext, the first delay information, the first public key, the first Meckel root and each error correcting code;
the recording the first ciphertext, the first latency information, the first public key, and the first Merkel root onto a blockchain when performing the first delayed publishing encryption transaction comprises:
recording the first ciphertext, the first latency information, the first public key, the first Meckel root, and each error correction code onto a blockchain when the first delayed publishing encryption transaction is executed;
the recovering of the corresponding key of the delayed publishing encryption transaction according to the public key in each successfully executed verification transaction comprises:
determining whether the third number of successfully executed validation transactions equals the fourth number: if yes, restoring the corresponding secret key of the delayed publishing encryption transaction according to the public key in each successfully executed verification transaction and each error correcting code recorded in the corresponding delayed publishing encryption transaction; and the fourth quantity is the difference between the quantity of the public keys of the Merkel root recorded for generating the corresponding delayed publishing encryption exchange and the quantity of the error correcting codes recorded for the corresponding delayed publishing encryption exchange.
4. The method of claim 1, wherein determining whether the public key in each successfully performed authentication transaction is sufficient to recover the key of the corresponding deferred publication encrypted transaction comprises:
determining whether the third number of successfully executed validation transactions is equal to the fifth number; and the fifth quantity is the quantity of the public keys of the Merkel root recorded for generating the corresponding delayed publishing encryption exchange.
5. The method of claim 1, wherein the verifying whether the public key in the executed verification transaction and the random public key in the executed verification transaction match according to the recorded public key of the executed verification transaction and the delayed publishing of the public key of the encrypted transaction when the verification transaction is executed comprises:
determining the height of a third block according to the height of the block corresponding to the packaging of the delayed publishing encrypted transaction and the delay information in the corresponding delayed publishing encrypted transaction;
judging whether the block height when receiving the verification transaction is not less than the third block height:
if yes, whether the public key in the executed verification transaction and the random public key in the executed verification transaction are matched or not is published according to the corresponding delay of the executed verification transaction.
6. The method of claim 1, wherein said randomly choosing the public key for the first number of block link points comprises:
sending PING messages to a plurality of block chain nodes;
and randomly selecting public keys of the first number of block chain link points in each block chain node returning the PONG message.
7. An apparatus, characterized in that the apparatus comprises:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method recited in any of claims 1-6.
8. A storage medium storing a computer program, characterized in that the program, when executed by a processor, implements the method according to any one of claims 1-6.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010373855.4A CN111524012A (en) | 2020-05-06 | 2020-05-06 | Data delay publishing method, device and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010373855.4A CN111524012A (en) | 2020-05-06 | 2020-05-06 | Data delay publishing method, device and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN111524012A true CN111524012A (en) | 2020-08-11 |
Family
ID=71908051
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010373855.4A Pending CN111524012A (en) | 2020-05-06 | 2020-05-06 | Data delay publishing method, device and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111524012A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112600664A (en) * | 2020-12-09 | 2021-04-02 | 杭州复杂美科技有限公司 | Delayed transaction generation method, delayed transaction execution device and storage medium |
Citations (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2014098953A1 (en) * | 2012-12-20 | 2014-06-26 | Trading Technologies International, Inc. | Systems and methods for routing trade orders based on exchange latency |
| CN107480990A (en) * | 2017-08-01 | 2017-12-15 | 中国联合网络通信集团有限公司 | Block chain bookkeeping methods and device |
| CN108199842A (en) * | 2018-02-13 | 2018-06-22 | 克洛斯比尔有限公司 | The method and system of information is announced in delay |
| CN109598506A (en) * | 2018-11-02 | 2019-04-09 | 克洛斯比尔有限公司 | Block chain accurately postpones the method for encryption, system, calculates equipment and computer readable storage medium |
| CN110009334A (en) * | 2018-11-07 | 2019-07-12 | 阿里巴巴集团控股有限公司 | A method and device for constructing Merkle tree and simple payment verification |
| WO2019223469A1 (en) * | 2018-05-21 | 2019-11-28 | 腾讯科技(深圳)有限公司 | Block chain network management method, device, medium and electronic device |
| US20190379646A1 (en) * | 2018-06-11 | 2019-12-12 | Fujitsu Limited | Delayed-access encryption for blockchain field |
| US20200013025A1 (en) * | 2018-07-06 | 2020-01-09 | International Business Machines Corporation | Conditional deferred transactions for blockchain |
| EP3595240A1 (en) * | 2018-07-13 | 2020-01-15 | Kevin Kei Tuncer | Distributed blockchain with delayed transaction |
| WO2020022599A1 (en) * | 2018-07-27 | 2020-01-30 | 박기업 | Node group managing device and computing device for configuring group key-based dual signature transaction structure in blockchain network |
| CN110930157A (en) * | 2019-11-14 | 2020-03-27 | 杭州复杂美科技有限公司 | Delayed transaction processing method, device and storage medium |
| CN111080294A (en) * | 2019-12-04 | 2020-04-28 | 杭州复杂美科技有限公司 | Parallel chain transaction encryption method, device and storage medium |
-
2020
- 2020-05-06 CN CN202010373855.4A patent/CN111524012A/en active Pending
Patent Citations (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2014098953A1 (en) * | 2012-12-20 | 2014-06-26 | Trading Technologies International, Inc. | Systems and methods for routing trade orders based on exchange latency |
| CN107480990A (en) * | 2017-08-01 | 2017-12-15 | 中国联合网络通信集团有限公司 | Block chain bookkeeping methods and device |
| CN108199842A (en) * | 2018-02-13 | 2018-06-22 | 克洛斯比尔有限公司 | The method and system of information is announced in delay |
| WO2019223469A1 (en) * | 2018-05-21 | 2019-11-28 | 腾讯科技(深圳)有限公司 | Block chain network management method, device, medium and electronic device |
| US20190379646A1 (en) * | 2018-06-11 | 2019-12-12 | Fujitsu Limited | Delayed-access encryption for blockchain field |
| US20200013025A1 (en) * | 2018-07-06 | 2020-01-09 | International Business Machines Corporation | Conditional deferred transactions for blockchain |
| EP3595240A1 (en) * | 2018-07-13 | 2020-01-15 | Kevin Kei Tuncer | Distributed blockchain with delayed transaction |
| WO2020022599A1 (en) * | 2018-07-27 | 2020-01-30 | 박기업 | Node group managing device and computing device for configuring group key-based dual signature transaction structure in blockchain network |
| CN109598506A (en) * | 2018-11-02 | 2019-04-09 | 克洛斯比尔有限公司 | Block chain accurately postpones the method for encryption, system, calculates equipment and computer readable storage medium |
| CN110009334A (en) * | 2018-11-07 | 2019-07-12 | 阿里巴巴集团控股有限公司 | A method and device for constructing Merkle tree and simple payment verification |
| CN110930157A (en) * | 2019-11-14 | 2020-03-27 | 杭州复杂美科技有限公司 | Delayed transaction processing method, device and storage medium |
| CN111080294A (en) * | 2019-12-04 | 2020-04-28 | 杭州复杂美科技有限公司 | Parallel chain transaction encryption method, device and storage medium |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112600664A (en) * | 2020-12-09 | 2021-04-02 | 杭州复杂美科技有限公司 | Delayed transaction generation method, delayed transaction execution device and storage medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Alagic et al. | Status report on the third round of the NIST post-quantum cryptography standardization process | |
| Zhang et al. | Deco: Liberating web data using decentralized oracles for tls | |
| US9672514B2 (en) | Systems and methods for conducting transactions and communications using a trusted third party | |
| US11477135B2 (en) | Verification of data processes in a network of computing resources | |
| CN111242617B (en) | Method and apparatus for performing transaction correctness verification | |
| JP7610586B2 (en) | Decentralized techniques for validation of data in transport layer security and other contexts | |
| US10284462B2 (en) | Verification of data processes in a network of computing resources | |
| CN110795752A (en) | Logistics information storage method, device, medium and electronic equipment based on block chain | |
| CN111767582B (en) | Electronic bidding method, device, equipment and storage medium based on block chain | |
| US8799334B1 (en) | Remote verification of file protections for cloud data storage | |
| CN114422134A (en) | Data secure transmission method and equipment | |
| US20250293863A1 (en) | Methods for implementing distributed key generation in blockchain, systems, and nodes | |
| CN111523894A (en) | Data delay publishing method, device and storage medium | |
| CN108846671B (en) | Online secure transaction method and system based on block chain | |
| WO2024222321A1 (en) | Data processing method and apparatus, device and medium | |
| CN111524012A (en) | Data delay publishing method, device and storage medium | |
| CN115964728A (en) | File encryption method and device based on consensus algorithm | |
| CN111784338A (en) | Information processing method, device, system and storage medium | |
| US10116439B2 (en) | Encrypted data computation system, device, and program | |
| CN111552950A (en) | Software authorization method and device and computer readable storage medium | |
| CN117201113A (en) | A blockchain digital signature method and system based on asymmetric encryption | |
| CN113890759A (en) | File transfer method, device, electronic device and storage medium | |
| CN114793220B (en) | Instant message communication method, device, program, medium, and apparatus | |
| CN111523895A (en) | Data delay publishing method, device and storage medium | |
| Ancillotti | Determining SPHINCS+ Readiness for Standardization of SLH-DSA Signature |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20200811 |
|
| WD01 | Invention patent application deemed withdrawn after publication |