CN109510818A - Data transmission system, method, apparatus, equipment and the storage medium of block chain - Google Patents

Data transmission system, method, apparatus, equipment and the storage medium of block chain Download PDF

Info

Publication number
CN109510818A
CN109510818A CN201811271570.9A CN201811271570A CN109510818A CN 109510818 A CN109510818 A CN 109510818A CN 201811271570 A CN201811271570 A CN 201811271570A CN 109510818 A CN109510818 A CN 109510818A
Authority
CN
China
Prior art keywords
node
key
hash
data
label
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.)
Granted
Application number
CN201811271570.9A
Other languages
Chinese (zh)
Other versions
CN109510818B (en
Inventor
梁伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN201811271570.9A priority Critical patent/CN109510818B/en
Publication of CN109510818A publication Critical patent/CN109510818A/en
Application granted granted Critical
Publication of CN109510818B publication Critical patent/CN109510818B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0435Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply symmetric encryption, i.e. same key used for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Storage Device Security (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses data transmission system, method, apparatus, equipment and the storage mediums of a kind of block chain, it is related to block chain technical field, asymmetric-key encryption can be not necessarily based on, alleviates the calculation amount in data transmission, the speed of encryption is improved, the efficiency of data transmission is higher.The system comprises: first node is used to be based on the first fixed key, handles transaction data, generates the first Hash label;Based on shared key, the first Hash label is handled, generates the second Hash label and data vector;Transaction data, the first Hash label, the second Hash label and data vector are transmitted to second node;Second node is used to receive transaction data, the first Hash label, the second Hash label and the data vector of first node transmission;Based on shared key, the first Hash label is handled, generates third Hash label;If the second Hash label is consistent with third Hash label, to transaction data authentication success.

Description

Data transmission system, method, apparatus, equipment and the storage medium of block chain
Technical field
The present invention relates to block chain technical fields, data transmission system, method, dress more particularly to a kind of block chain It sets, equipment and storage medium.
Background technique
With the continuous development of information technology, the block chain technology completely new as one obtains development energetically.Block chain Technology is derived from the bit coin technology occurred in 2008, is the Floor layer Technology of bit coin.Block chain, which refers to a string, uses cryptography Method is associated the block generated, and the block data in block chain in each block is deposited with the block data in a upper block It is being associated with, therefore, it is impossible to be practised fraud by distorting block data, it can be ensured that the block data on any block is public It opens transparent, improves the safety that data in block chain are transmitted.
In the related technology, referring to Fig. 1, sending node is when transmitting data to receiving node based on block chain, sending node The first cryptographic Hash that data to be transmitted is calculated by hash algorithm, adds the first cryptographic Hash using the private key of sending node It is close, encrypted first cryptographic Hash and data to be transmitted are transferred to receiving node together;Receiving node is receiving transmission After encrypted first cryptographic Hash and data to be transmitted of node-node transmission, using the public key of sending node to encrypted first Cryptographic Hash is decrypted, and restores the first cryptographic Hash of sending node generation, and carry out Hash operation to data to be transmitted, generates It is whether consistent with the second cryptographic Hash to compare the first cryptographic Hash for second cryptographic Hash, if the first cryptographic Hash is consistent with the second cryptographic Hash, The transmission of data to be transmitted is then completed, receiving node stores the data to be transmitted;If the first cryptographic Hash and the second cryptographic Hash are not Unanimously, then it represents that data to be transmitted is tampered, and sending node is needed to transmit again to data to be transmitted.
In the implementation of the present invention, inventor find the relevant technologies the prior art has at least the following problems:
Since the private key and public key of sending node belong to unsymmetrical key, sending node uses private key to the first cryptographic Hash After being encrypted, receiving node needs again to calculate encrypted first cryptographic Hash using the public key of sending node, from And realize and encrypted first cryptographic Hash is decrypted, the mathematical principle of unsymmetrical key leads to its meter in the data transmission Calculation amount is larger, and the speed of encryption and decryption is slower, and data transmission efficiency is lower.
Summary of the invention
In view of this, the present invention provides a kind of data transmission system of block chain, method, apparatus, equipment and storages to be situated between Matter, main purpose are that the calculation amount solved in current data transmission is larger, and the speed of encryption and decryption is slower, data transmission The lower problem of efficiency.
According to the present invention in a first aspect, providing a kind of data transmission system of block chain, the data of the block chain are passed Defeated system includes first node and second node, and the first node and the second node are respectively described based on block chain Any node in data transmission system;
The first node for obtain the first fixed key, be based on hash algorithm and first fixed key, to Transaction data between the transaction node is handled, and the first Hash label is generated;It obtains shared between second node Key is based on the hash algorithm and the shared key, handles first Hash label, generates the second Hash mark Label and data vector;By the transaction data, first Hash label, second Hash label and the data to Amount is transmitted to the second node;
The second node be used to receive the transaction data of first node transmission, first Hash label, Second Hash label and the data vector;The shared key between the first node is obtained, based on described Hash algorithm and the shared key handle first Hash label, generate third Hash label;If described Two Hash labels are consistent with the third Hash label, then to transaction data authentication success.
Second aspect according to the present invention, provides a kind of data transmission method of block chain, and the method is applied to be based on The data transmission system of block chain, the data transmission system based on block chain include first node and second node, described First node and the second node are respectively any node in the data transmission system based on block chain, the method Include:
The first node obtains the first fixed key, is based on hash algorithm and first fixed key, to it is described Transaction data between transaction node is handled, and the first Hash label is generated, and first fixed key is the first segment The fixed key of point;
The first node obtains the shared key between second node, based on the hash algorithm and it is described share it is close Key handles first Hash label, generates the second Hash label and data vector, the second node are described Any node in data transmission system;
The first node is by the transaction data, first Hash label, second Hash label and described Data vector is transmitted to the second node;
The second node receives the transaction data of first node transmission, first Hash label, described Second Hash label and the data vector;
The second node obtains the shared key between the first node, is based on the hash algorithm and institute Shared key is stated, first Hash label is handled, generates third Hash label;
If second Hash label is consistent with the third Hash label, the second node is to the number of deals According to being proved to be successful.
The third aspect according to the present invention, provides a kind of data transmission method of block chain, and the method is applied to first Node, the first node are any node in data transmission system, which comprises
The first fixed key is obtained, hash algorithm and first fixed key are based on, to the friendship between transaction node Easy data are handled, and the first Hash label is generated, and first fixed key is the fixed key of the first node;
The shared key between second node is obtained, the hash algorithm and the shared key are based on, to described the One Hash label is handled, and the second Hash label and data vector are generated, and the second node is the data transmission system Any node in system, the shared key are the symmetric key that the first node and the second node generate;
The transaction data, first Hash label, second Hash label and the data vector are transmitted To the second node.
Fourth aspect according to the present invention, provides a kind of data transmission method of block chain, and the method is applied to second Node, the second node are any node in data transmission Transmission system, which comprises
Receive transaction data, the first Hash label, the second Hash label and the data vector of first node transmission, described the One node is any node in data transmission system, first Hash label, second Hash label and the data Vector is generated by the first node according to the transaction data;
The shared key between the first node is obtained, hash algorithm and the shared key are based on, to described the One Hash label is handled, and third Hash label is generated, and the shared key is the first node and the second node The symmetric key of generation;
If second Hash label is consistent with the third Hash label, to transaction data authentication success.
5th aspect according to the present invention, provides a kind of data transmission device of block chain, and described device is applied to first Node, the first node are any node in data transmission system, and described device includes:
First generation module, for obtain the first fixed key, be based on hash algorithm and first fixed key, to Transaction data between transaction node is handled, and the first Hash label is generated, and first fixed key is the first segment The fixed key of point;
Second generation module, for the shared key between acquisition and second node, based on the hash algorithm and described Shared key handles first Hash label, generates the second Hash label and data vector, the second node For any node in the data transmission system, the shared key is that the first node and the second node generate Symmetric key;
First transmission module, for by the transaction data, first Hash label, second Hash label and The data vector is transmitted to the second node.
6th aspect according to the present invention, provides a kind of data transmission device of block chain, and described device is applied to second Node, the second node are any node in data transmission Transmission system, and described device includes:
First receiving module, for receiving transaction data, the first Hash label, the second Hash label of first node transmission And data vector, the first node are any node in data transmission system, first Hash label, described second breathe out Uncommon label and the data vector are generated by the first node according to the transaction data;
First generation module, for obtaining the shared key between the first node, based on hash algorithm and described Shared key handles first Hash label, generates third Hash label, and the shared key is the first segment The symmetric key that point is generated with the second node;
Success module, if consistent with the third Hash label for second Hash label, to the transaction Data verification success.
7th aspect according to the present invention, provides a kind of equipment, including memory and processor, the memory is stored with Computer program, the processor realize the above-mentioned third aspect or fourth aspect the method when executing the computer program Step.
Eighth aspect according to the present invention provides a kind of storage medium, is stored thereon with computer program, the computer The step of method described in the above-mentioned third aspect or fourth aspect is realized when program is executed by processor.
By above-mentioned technical proposal, a kind of data transmission method, device, equipment and the storage of block chain provided by the invention Medium, compared at present in such a way that unsymmetrical key carries out data transmission, the present invention generates number of deals by shared key According to Hash label, encryption to transaction data is realized, so that the data transmission base carried out between first node and second node It is realized in shared key, is not necessarily based on the encryption that unsymmetrical key carries out transaction data, alleviate the calculation amount in data transmission, The speed of encryption is improved, the efficiency of data transmission is higher.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows a kind of data transmission method flow diagram of block chain provided in an embodiment of the present invention;
Fig. 2A shows a kind of data transmission system configuration diagram of block chain provided in an embodiment of the present invention;
Fig. 2 B shows a kind of block chain framework signal of the data transmission system of block chain provided in an embodiment of the present invention Figure;
Fig. 3 A shows a kind of data transmission method flow diagram of block chain provided in an embodiment of the present invention;
Fig. 3 B shows a kind of data transmission method flow diagram of block chain provided in an embodiment of the present invention;
Fig. 4 shows a kind of data transmission method flow diagram of block chain provided in an embodiment of the present invention;
Fig. 5 shows a kind of data transmission method flow diagram of block chain provided in an embodiment of the present invention;
Fig. 6 A shows a kind of structural schematic diagram of the data transmission device of block chain provided in an embodiment of the present invention;
Fig. 6 B shows a kind of structural schematic diagram of the data transmission device of block chain provided in an embodiment of the present invention;
Fig. 6 C shows a kind of structural schematic diagram of the data transmission device of block chain provided in an embodiment of the present invention;
Fig. 7 A shows a kind of structural schematic diagram of the data transmission device of block chain provided in an embodiment of the present invention;
Fig. 7 B shows a kind of structural schematic diagram of the data transmission device of block chain provided in an embodiment of the present invention;
Fig. 7 C shows a kind of structural schematic diagram of the data transmission device of block chain provided in an embodiment of the present invention;
Fig. 7 D shows a kind of structural schematic diagram of the data transmission device of block chain provided in an embodiment of the present invention;
Fig. 7 E shows a kind of structural schematic diagram of the data transmission device of block chain provided in an embodiment of the present invention.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
Before carrying out detailed explanation to the embodiment of the present invention, first to data transmission system of the present invention into Row is simple to be introduced.
A referring to fig. 2, data transmission system 200 refers to be transmitted by data, total for carrying out data between node and node The system enjoyed may include N number of node 201 in the data transmission system, which can be finger data transmission system In each client, wherein N is positive integer.Each node 201 can generate data when being worked normally, and based on number Other nodes in data transmission system are sent data to according to Transmission system, realize the shared of data.In order to guarantee that data pass Information mutual communication in defeated system may exist data connection between each node in data transmission system, pass through between node Above-mentioned data connection carries out data transmission.For example, when any node in data transmission system receives data, data transmission Whole nodes in system are just stored using the data as shared data, so that depositing on whole nodes in data transmission system The data of storage are consistent.Wherein, data transmission system concretely transaction system, transaction system refers to is for financial transaction System.It may include N number of node in transaction system, each node generates account book data when being traded, and is based on account book data Safeguard the shared account book in the transaction system.
During practical application, in order to avoid data are tampered during transmission, in data transmission system Each node stores an identical block chain.Block chain is made of multiple blocks, and each block is stored with different numbers According to the shared data of node where the data of whole blocks storage on block chain constitute block chain.In this way, carrying out data When transmission, in order to guarantee the authenticity for the data transmitted, the sending node of data transmission procedure is initiated into data transmission system Each node broadcasts data to be transmitted so that receive the node of the data to be transmitted to the authenticity of data to be transmitted into Row verifying, if the authenticity verification success to data to be transmitted, then it represents that the data to be transmitted is not tampered, at this point, The data to be transmitted can be written in block chain;If the authenticity verification of data to be transmitted fails, then it represents that this is to be passed Transmission of data may be tampered during transmission, and authenticity needs to be investigated, at this point, just refusing to be written the data to be transmitted In block chain, needing sending node to provide correct data just be can be written into.
In embodiments of the present invention, it is illustrated by taking three nodes in data transmission system as an example, these three nodes point It Wei not transaction node, first node and second node.Wherein, transaction node is the section that there is transaction between first node Point, namely the relevant node of transaction data for needing to transmit;First node is the node for initiating data transmission, with transaction node Between exist transaction, and request the transaction data of generation is stored in data transmission system;Second node is data transmission system Other nodes in system in addition to transaction node and first node, due to being deposited in the block chain of nodes whole in data transmission system The data of storage are consistent, and therefore, first node is needed transmission of transaction data when transmitting data to each second node It is stored.
In addition, the present embodiments relate to block chain framework can be found in Fig. 2 B, the block chain framework can for quantum safety Block chain framework, specifically include common recognition mechanism, security mechanism and data Layer.Wherein, common recognition mechanism is for making in block chain Whole nodes reach common understanding, concretely POW (Proof Of Work, proof of work), POS (Proof Of Stake, Equity proves), DPOS (Delegating Proof Of Stake, commission equity prove) and PBFT (Practical Byzantine Fault Tolerance, Byzantine failure tolerance algorithm) etc..In embodiments of the present invention, node carries out common recognition use The private value of oneself is sent to other nodes by PBFT, namely whole nodes, and by being no more than m+1 wheel, (m < n/3 is not really Physical node quantity) Byzantine common recognition, data vector is generated, the common recognition to the block that will be generated is reached, m and n are positive integer. Then, honest node generates new block jointly, and the All Activity information in time interval is recorded in block chain.Safety Mechanism is used to guarantee the safety of data transmission in block chain, concretely rear quantum key exchange/encapsulation, hash algorithm, amount The zero-knowledge proof of sub- safety, intelligent contract Hole Detection etc.;Data Layer is for data involved in memory block chain framework, tool Body may include Merkle (Hash tree), block, chain structure and distributed storage etc..
The embodiment of the invention provides a kind of data transmission method of block chain, the meter reduced in data transmission can achieve Calculation amount, improves the speed of encryption and decryption, and the purpose of improve data transfer efficiency, as shown in Figure 3A, this method are applied to first Node and second node, first node and second node are any node in data transmission system, are specifically included:
301, first node obtain the first fixed key, be based on hash algorithm and the first fixed key, to transaction node Between transaction data handled, generate the first Hash label.
In embodiments of the present invention, the first fixed key is the fixed key of first node itself, and the first fixed key can For the key that first node randomly selects, K is generallyd use(i, n+1)It indicates, can be generated based on random number, for example, generate first Fixed key can be the digital forms such as 27,56, and the embodiment of the present invention is to the mode of the first fixed key of acquisition without specific It limits.Transaction data be data of the first node into the transaction that transaction node is initiated, for example, if first node A to It is specially first node A to transaction node B 3 block chain tokens of payment that transaction node, which initiates transaction a M, M, then M can As transaction data.In this way, first node can be adopted in order to store the transaction data into the block chain of data transmission system With the hash algorithm with key, it is based on the first fixed key, calculation processing is carried out to transaction data, generates the of the transaction data First Hash label is marked to the transaction data in one Hash label.Wherein, hash algorithm can be SHA (Secure Hash Algorithm, Secure Hash Algorithm) algorithm, concretely SHA-3 algorithm, in this way, continuing with number of deals It is illustrated according to for M, MAC can be used according to the first Hash label that transaction data M can be calculated in SHA-3 algorithmKa (M) it indicates.
302, shared key is generated between first node and second node.
It was recognized by the inventor that the node in data transmission system generallys use two ways when carrying out data transmission, one Kind of mode is using symmetric key encryption, namely the both sides carried out data transmission, using the same key, which can both add It is close to decrypt;Another way is to be made of using asymmetric-key encryption namely a pair of secret keys public key and private key, public key It can encrypt and decrypt mutually with private key.Wherein, due to relating only to a key using symmetric key encryption, make Symmetric key compared to unsymmetrical key for, have calculation amount small, enciphering rate is fast, and encryption efficiency is high, can be more right than non- The advantages of claiming the mode of encryption 1000 times fast.But since whole nodes in entire data transmission system are carrying out data transmission Shi Jun uses the symmetric key, so that there is risk during transmission in data, once the symmetric key is revealed, it is most likely that Data are caused to be tampered, therefore, data transmission system needs to carry out safety guarantee, virtually increases data transmission system to this The burden of symmetric key management.
In order to guarantee that calculation amount when being encrypted is small, enciphering rate is fast, while encryption efficiency is high, improves data and passes Defeated safety, in embodiments of the present invention, for any node in data transmission system, for the node and other nodes it Between establish shared key two-by-two so that the shared key only has relevant two nodes to know, and being total between every two node It enjoys key to be different, to realize while encrypted using symmetric key, ensure that the safety of data transmission.Tool Body, shared key is substantially symmetric key.In embodiments of the present invention, second node is that first segment is removed in data transmission system Any node outside point and transaction node.The first Hash label by transaction data and transaction data is needed due to first node The whole nodes being transferred in data transmission system, and in order to guarantee the safety of data in data transmission procedure, first node It needs to establish shared key between each of data transmission system node.For any node in data transmission system Second node for, when shared key between generation and second node, step 3021 shown in Fig. 3 B to step can be passed through Rapid 3025 realize.
3021, first node encrypts the first fixed key using the first public key, generates the first ciphertext, and the first ciphertext is passed Transport to second node.
In embodiments of the present invention, the first public key is the public key of second node.In order to make the shared key Shi Yu generated One node and second node are all relevant, and therefore, the first fixed key is shared with second node by first node, so as to the second section Point can be subsequently generated shared key according to the fixed key, and the fixed key of itself is also transmitted to first node, make Obtaining first node also can be generated identical shared key.
For each of data transmission system node, there is corresponding public private key pair, and each section The private key of point, which only has, itself to be known, and public key is known by whole nodes in data transmission system, therefore, when first node obtains To after the first fixed key, in order to guarantee that the first fixed key is transmitted to the safety of transaction node, avoid the first fixation close Key is leaked during transmission, and first node encrypts first fixed key using the first public key of second node, raw It is transmitted to second node at the first ciphertext, and by the first ciphertext, it, can be with so that second node is subsequent when receiving the first ciphertext First ciphertext is decrypted using the first private key of itself, to extract first fixed key, and then in subsequent foundation Shared key between second node and first node.Specifically, the public private key pair of second node can use (pkn+1, skn+1) table Show, wherein pkn+1For the first public key of second node, skn+1For the first private key of second node.
3022, second node receives the first ciphertext of first node transmission, is based on the first private key, solves to the first ciphertext It is close, obtain the first fixed key.
In embodiments of the present invention, the first private key is the private key of second node.Since the first ciphertext is based on second node The first public key encryption generate, therefore, second node, can be based on the when receiving the first ciphertext of first node transmission The first ciphertext is decrypted in one private key, so that the first fixed key is obtained, to integrate the first fixed key subsequent Generate shared key.
3023, second node encrypts the second fixed key using the second public key, generates the second ciphertext, and the second ciphertext is passed Transport to first node.
In embodiments of the present invention, the second public key is the public key of first node, and the second fixed key is consolidating for second node Determine key.In order to make generate shared key be it is all relevant to first node and second node, therefore, second node is receiving After the first fixed key sent to first node, need second node that the second fixed key of itself is shared with first segment Point, so that first node can also be subsequently generated shared key according to second fixed key, to guarantee that first node is raw It is identical at the shared key that identical shared key is generated with second node.Specifically, the second fixed key can be with Use K(n+1, i)It indicates.Wherein, since the second public key of first node is known by transaction node, in order to make first node exist When receiving the second fixed key of encryption, extraction can be decrypted based on the second private key of itself, therefore, second node exists It, can be close to second fixation using the second public key of first node when the second fixed key of itself is transferred to first node Key is encrypted, and generates the second ciphertext, and the second ciphertext is transmitted to first node.Specific, the public private key pair of first node (pk can be usedi, ski) indicate, wherein pkiFor the second public key of first node, skiFor the second private key of first node.It needs Illustrate, the second fixed key of second node can use k(n+1, i)Indicate, the acquisition modes of the second fixed key with it is upper The acquisition modes for stating the first fixed key shown in step 3021 are consistent no longer to be repeated herein.
3024, second node determines preset algorithm, using preset algorithm, to the first fixed key and the second fixed key into Row calculates, and generates shared key.
It in embodiments of the present invention, can base after second node extracts the first fixed key in the first ciphertext In the second fixed key of the first fixed key and itself, shared key is generated.It wherein, can be true when generating shared key Determine preset algorithm, the first fixed key and the second fixed key are calculated based on preset algorithm, so that the first fixation is close Key and the second fixed key combine, and generate shared key.Specifically, preset algorithm can be Diffie-Hellman, in this way, raw At the first shared key can use Key(i, n+1)It indicates, specifically,The present invention is real Example is applied to the mode of generation shared key without specifically limiting.
3025, first node receives the second ciphertext of second node transmission, is solved using the second private key to the second ciphertext It is close, the second fixed key is obtained, and be based on the first fixed key and the second fixed key, generates shared key.
In embodiments of the present invention, after first node receives the second ciphertext of second node transmission, due to second close Text is the second public key encryption using first node, and therefore, first node can use the second private key of itself, close to second Text is decrypted, and obtains the second fixed key of second node, and be based on the first fixed key and the second fixed key, generates altogether Enjoy key.Wherein, the mode one that the first shared key is generated shown in the mode and above-mentioned steps 3024 of shared key is generated It causes, is no longer repeated herein.
303, first node obtains the shared key between second node, is based on hash algorithm and shared key, to the One Hash label is handled, and the second Hash label and data vector are generated.
In embodiments of the present invention, after first node generates the shared key between second node, in order to make It is subsequent when being transmitted, it can be by determining the authenticity of transaction data to the verifying of Hash label, first node is based on breathing out Uncommon algorithm and shared key, handle the first Hash label, the second Hash label and data vector are generated, so as to subsequent Transaction data, the first Hash label, the second Hash label and data vector are transmitted to second node.
Wherein, when generating the second Hash label, SHA-3 algorithm can be used, based on shared key to the first Hash mark Label are calculated, to generate the second Hash label.Continue by taking the first Hash label of above-mentioned generation is MACKa (M) as an example into Row explanation, if shared key is Kaj, then the second Hash label generated can be indicated with MACkaj (M | | MACKa (M)).
It should be noted that carrying out data by the way of symmetric key due to the substantially symmetric key of shared key Transmission, it is high-efficient, but transaction data can not be digitally signed, so, Message Authentication Code is generated based on shared key, Message Authentication Code is broadcast to whole nodes in data transmission system, thus make whole nodes in data transmission system according to The Message Authentication Code has received the transaction data come the whole nodes determined whether in data transmission system.Specifically, message Identifying code will be broadcast to all nodes in data transmission system, rather than single from a node-node transmission to another section Point, therefore, the Message Authentication Code of attachment cannot be too long, in this way, just needing to generate data vector by inner product, by the data vector For the broadcast communication to other nodes, communication overhead is reduced.Wherein, data vector can be bit vectors, and data vector can be with It is generated according to shared key and the second Hash label.Continue with above-mentioned generation shared key to be Kaj, the second Hash label is It is illustrated for MACkaj (M | | MACKa (M)), then the data vector generated based on shared key and the second Hash label is ForM can be used | | MACKi(M)|| vectoraIndicate data vector.The present invention Embodiment is to the mode of generation data vector without specifically limiting.
304, transaction data, the first Hash label, the second Hash label and data vector are transmitted to by first node Two nodes.
It, can be by transaction data, the first Hash after first node generates the second Hash label and data vector Label, the second Hash label and data vector are transmitted to second node, so that second node is based on first Hash label, the Two Hash labels and data vector verify transaction data, to verify the authenticity of transaction data, and then decision is It is no the transaction data to be written in block chain.
305, second node receives the transaction data of first node transmission, the first Hash label, the second Hash label sum number According to vector, the shared key between first node is obtained, is based on hash algorithm and shared key, the first Hash label is carried out Processing generates third Hash label.
In embodiments of the present invention, when second node receive first node transmission transaction data, the first Hash label, After second Hash label and data vector, transaction data can be verified.Wherein, it is only capable of due to carrying out distorting for data Transaction data is modified, and can not be modified to Hash label, therefore, in order to realize the verifying to transaction data, second node The shared key between first node is obtained, and is based on hash algorithm and shared key, the first Hash label is handled, Third Hash label is generated, and is carried out in the second Hash label of the subsequent third Hash label by generation and first node transmission Comparison, to realize the verifying to transaction data.Wherein, second node generates the process and above-mentioned steps of third Hash label The process that the second Hash label is generated in 303 is consistent, is no longer repeated herein.
306, the second Hash label and third Hash label are compared second node, if the second Hash label and the Three Hash labels are consistent, then execute following step 307;If the second Hash label and third Hash label are inconsistent, execute Following step 309.
In embodiments of the present invention, since the second Hash label and third Hash label are generated according to transaction data , therefore, if transaction data be not tampered with and be it is true, second node after generating third Hash label, Third Hash label and the second Hash label to be compared, by judging whether are the second Hash label and third Hash label It is consistent to determine whether the transaction data is true.If the second Hash label is consistent with third Hash label, then it represents that number of deals According to be not tampered with and be it is true, at this moment, can determine the transaction data to be written in block chain and store, namely execute Following step 307;If the second Hash label and third Hash label are inconsistent, then it represents that transaction data may be tampered or Be it is false, at this moment, the transaction data is written in block chain refusal, and first node is needed to provide true data again Can be with, namely execute following step 309.
If 307, the second Hash label is consistent with third Hash label, second node is to transaction data authentication success.
In embodiments of the present invention, if the second Hash label is consistent with third Hash label, then it represents that transaction data is not It is tampered and is that really, at this moment, can determine will store in transaction data write-in block chain, in this way, the second section Point is successful to the verifying of transaction data.
308, second node obtains private value, is marked to transaction data, updates the private value, store-updated Private value.
In embodiments of the present invention, after second node is to transaction data authentication success, in order to make in data transmission system Other nodes know current second node to the transaction data authentication success, avoid first node again to second node Transaction data is sent, transaction data can be marked in second node, to the private value for characterizing current newest stateful transaction It is updated, and store-updated private value.Wherein, the private value is for indicating that number of deals has been received in second node According to, and transaction data is proved to be successful, it can specifically use VjIndicate private value.
When generating private value, for honesty node identical with second node for each in data transmission system, Since the data volume for including in each block in block chain is larger and it is fixed to be, the data volume of this transaction data may be simultaneously Be not able to satisfy the data volume of block requirement, therefore, when completing verifying to transaction data, determine the transaction data be really with Afterwards, which is usually labeled as 1 by honest node, private value is generated, persistently to other subsequently received transaction data It is marked, and persistently private value is updated.For example, it is assumed that the transaction data for passing through verifying is 50, then second node The private value of generation can be Vi={ 0,1 }50.In order to guarantee that each node is according to the proparea of data addition in data transmission system Block in block chain be all it is completely the same, when second node is detected by prefixed time interval, can obtain one it is pre- If the private value of at least one transaction data and at least one transaction data that time interval is proved to be successful, it is based on the private value Reach the common recognition of whole nodes in data transmission system, and just generate block after common recognition, block is added in block chain.
Wherein, the node in data transmission system is when being known together, and for second node, second node is by secret Value is transmitted to other nodes in data transmission system, and receives other private values of other node-node transmissions, when the private received When close worth number meets preset number, at least one transaction data is added in block chain.Specifically, it is assumed that have in network N number of node, then can provide a common recognition vector V for each node in data transmission system, this common recognition vector V is N Multiplied by one-dimensional vector, each of vector element represents the private value of each node, and common recognition vector passes through m+1 (m < n/3 For dishonest number of nodes) wheel Byzantium common recognition after generate.Common recognition process between node can be using Byzantium's common recognition method It realizes, is exactly each node and all nodes to swap the private value oneself possessed.By with remaining N-1 Node is intercoursed, and in the case where number < 1/3 of dishonest node × N, the common recognition vector of N-dimensional can be filled, when N-dimensional When common recognition vector is filled, it is consistent that all nodes in data transmission system reach the whole network, in this way, block can be generated, and Block is added in block chain.
If 309, the second Hash label and third Hash label are inconsistent, failure command is returned in failed regeneration instruction It is back to first node.
In embodiments of the present invention, if the second Hash label and third Hash label are inconsistent, then it represents that transaction data It may be tampered or false, at this moment, the transaction data is written in block chain refusal, the verifying to the transaction data Failure, needing first node to provide true data again just can be with.In order to allow first node to retransmit transaction data, The instruction of second node failed regeneration, and failure command is back to first node, it is handed over so that first node is transmitted to second node Easy data.
Data transmission method provided in an embodiment of the present invention based on block chain can generate number of deals by shared key According to Hash label, encryption to transaction data is realized, so that the data transmission base carried out between first node and second node It is realized in shared key, is not necessarily based on the encryption that unsymmetrical key carries out transaction data, alleviate the calculation amount in data transmission, The speed of encryption is improved, the efficiency of data transmission is higher.
The embodiment of the invention provides a kind of data transmission methods of block chain, as shown in figure 4, this method comprises:
401, the first fixed key is obtained, hash algorithm and the first fixed key are based on, to the friendship between transaction node Easy data are handled, and the first Hash label is generated, and the first fixed key is the fixed key of first node.
In embodiments of the present invention, wherein the first fixed key is the fixed key of first node, and detailed process is referring to upper State step 301 in embodiment.
402, the shared key between second node is obtained, hash algorithm and shared key are based on, to the first Hash mark Label are handled, and the second Hash label and data vector are generated, and second node is any node in data transmission system, altogether Enjoying key is the symmetric key that first node and second node generate.
In embodiments of the present invention, the second Hash label and data vector are generated in order to which shared key can be based on, The shared key between second node is obtained, hash algorithm and shared key is based on, the first Hash label is handled, it is raw Before the second Hash label and data vector, needs to encrypt the first fixed key using the first public key, it is close to generate first First ciphertext is transmitted to second node by text, receives the second ciphertext of second node transmission, close to second using the second private key Text is decrypted, and obtains the second fixed key, is based on the first fixed key and the second fixed key, generates shared key.Wherein, First public key is the public key of second node;Second ciphertext by second node after receiving the first ciphertext, using the second public key pair The encryption of second fixed key generates, and the second fixed key is the fixed key of second node;Second private key is first node Private key.Detailed process is referring to step 302 in above-described embodiment to step 303.
403, transaction data, the first Hash label, the second Hash label and data vector are transmitted to second node.
It, can be by transaction data, first after generating transaction data, the first Hash label, the second Hash label Hash label, the second Hash label are transmitted to second node.It is passed by transaction data, the first Hash label, the second Hash label It transports to after second node, when detecting by prefixed time interval, obtains what a upper prefixed time interval was proved to be successful Private value is transmitted to its in data transmission system by the private value of at least one transaction data and at least one transaction data His node, and other private values of other node-node transmissions are received, it, will when the private value received, which obtains number, meets preset number At least one transaction data is added in block chain.Detailed process is referring to step 304 in above-described embodiment.
Method provided in an embodiment of the present invention can generate the Hash label of transaction data, realization pair by shared key The encryption of transaction data is not necessarily to so that the data transmission carried out between first node and second node is realized based on shared key The encryption that transaction data is carried out based on unsymmetrical key is alleviated the calculation amount in data transmission, improves the speed of encryption, number It is higher according to the efficiency of transmission.
The embodiment of the invention provides a kind of data transmission methods of block chain, as shown in figure 5, this method comprises:
501, transaction data, the first Hash label, the second Hash label and the data vector of first node transmission are received, the One node is any node in data transmission system, and the first Hash label, the second Hash label and data vector are by first segment Point is generated according to transaction data.
In embodiments of the present invention, when first node is by transaction data, the first Hash label, the second Hash label and data After vector is transmitted to second node, second node can receive transaction data, the first Hash label, the second Hash label sum number According to vector.Detailed process is referring to step 305 in above-described embodiment.
502, the shared key between first node is obtained, hash algorithm and shared key are based on, to the first Hash mark Label are handled, and third Hash label is generated, and shared key is the symmetric key that first node and second node generate.
In embodiments of the present invention, in order to generate third Hash label, shared key between acquisition and first node, Based on hash algorithm and shared key, the first Hash label is handled, before generating third Hash label, needs to receive the First ciphertext of one node-node transmission is based on the first private key, is decrypted to the first ciphertext, obtains the first fixed key, and use Second public key encrypts the second fixed key, generates the second ciphertext, the second ciphertext is transmitted to first node, fixed based on first Key and the second fixed key generate shared key.Specifically, it when generating shared key, can determine preset algorithm, use Preset algorithm calculates the first fixed key and the second fixed key, generates shared key.Wherein, the first ciphertext is by One node is based on the first public key and encrypts generation to the first fixed key, and the first public key is the public key of second node, and the first fixation is close Key is the fixed public of first node;First private key is the private key of second node;Second fixed key is the fixation of second node Key, the second public key are the public key of first node;Preset algorithm is at least Diffie-Hellman.Detailed process is referring to above-mentioned implementation Step 305 in example.
If 503, the second Hash label is consistent with third Hash label, to transaction data authentication success.
In embodiments of the present invention, if the second Hash label is consistent with third Hash label, to transaction data authentication After success, need to obtain private value, private value is generated according to the transaction data being proved to be successful in prefixed time interval;To transaction Data are marked, and update private value, store-updated private value.
In addition, obtaining a upper prefixed time interval when detecting by prefixed time interval and being proved to be successful at least The private value of one transaction data and at least one transaction data;Other sections private value being transmitted in data transmission system Point, and receive other private values of other node-node transmissions;It, will at least when the private value received, which obtains number, meets preset number One transaction data is added in block chain.Detailed process is referring to step 306 in above-described embodiment to 307.
Device provided by the invention can be based on shared key, handle the transaction data received, obtain third Hash label verifies transaction data by the way that the second Hash label and third Hash label are compared, so that the The data transmission carried out between one node and second node is realized based on shared key, is not necessarily based on unsymmetrical key and is traded The encryption of data alleviates the calculation amount in data transmission, improves the speed of encryption, and the efficiency of data transmission is higher.
Further, the specific implementation as Fig. 4 method, the embodiment of the invention provides a kind of transmission of the data of block chain Device, as shown in Figure 6A, device include: the first generation module 601, the second generation module 602 and the first transmission module 603.
First generation module 601, it is right based on hash algorithm and the first fixed key for obtaining the first fixed key Transaction data between transaction node is handled, and the first Hash label is generated, and the first fixed key is consolidating for first node Determine key;
Second generation module 602 based on hash algorithm and is shared for the shared key between acquisition and second node Key handles the first Hash label, generates the second Hash label and data vector, second node are data transmission system Any node in system, shared key are the symmetric key that first node and second node generate;
First transmission module 603, for by transaction data, the first Hash label, the second Hash label and data to Amount is transmitted to second node.
Device provided by the invention can generate the Hash label of transaction data by shared key, realize to number of deals According to encryption so that carried out between first node and second node data transmission based on shared key realize, be not necessarily based on non- Symmetric key carries out the encryption of transaction data, alleviates the calculation amount in data transmission, improves the speed of encryption, data transmission Efficiency it is higher.
In specific application scenarios, as shown in Figure 6B, which further includes encrypting module 604, receiving module 605, solution Close module 606 and third generation module 607.
The encrypting module 604 generates the first ciphertext, by first for encrypting using the first public key to the first fixed key Ciphertext is transmitted to second node, and the first public key is the public key of second node;
The receiving module 605, for receiving the second ciphertext of second node transmission, the second ciphertext is being received by second node To after the first ciphertext, the encryption of the second fixed key is generated using the second public key, the second public key is the public key of first node, the Two fixed keys are the fixed key of second node;
The deciphering module 606, for being decrypted to the second ciphertext, obtaining the second fixed key using the second private key, the Two private keys are the private key of first node;
The third generation module 607 generates shared key for being based on the first fixed key and the second fixed key.
In specific application scenarios, as shown in Figure 6 C, which further includes obtaining module 608, the second transmission module 609 With adding module 610.
The acquisition module 608 is tested for when detecting by prefixed time interval, obtaining a upper prefixed time interval Demonstrate,prove the successfully private value of at least one transaction data and at least one transaction data;
Second transmission module 609 for private value to be transmitted to other nodes in data transmission system, and receives it Other private values of his node-node transmission;
The adding module 610, for when the number of the private value received meets preset number, at least one to be traded Data are added in block chain.
Further, the specific implementation as Fig. 5 method, the embodiment of the invention provides a kind of transmission of the data of block chain Device, as shown in Figure 7 A, device include: the first receiving module 701, the first generation module 702 and success module 703.
First receiving module 701, for receiving transaction data, the first Hash label, the second Kazakhstan of first node transmission Uncommon label and data vector, first node are any node in data transmission system, the first Hash label, the second Hash label It is generated by first node according to transaction data with data vector;
First generation module 702 based on hash algorithm and is shared for the shared key between acquisition and first node Key handles the first Hash label, generates third Hash label, and shared key is that first node and second node generate Symmetric key;
The success module 703, if consistent with third Hash label for the second Hash label, to transaction data authentication Success.
In specific application scenarios, as shown in Figure 7 B, which further includes the second receiving module 704, deciphering module 705, the second generation module 706 and third generation module 707.
Second receiving module 704, for receiving the first ciphertext of first node transmission, the first ciphertext is by first node base The first fixed key is encrypted in the first public key and is generated, the first public key is the public key of second node, and the first fixed key is first The fixed key of node;
The deciphering module 705, for being decrypted to the first ciphertext, obtaining the first fixed key based on the first private key, the One private key is the private key of second node;
Second generation module 706, for being encrypted using the second public key to the second fixed key, the second ciphertext of generation will Second ciphertext is transmitted to first node, and the second fixed key is the fixed key of second node, and the second public key is first node Public key;
The third generation module 707 generates shared key for being based on the first fixed key and the second fixed key.
In specific application scenarios, as seen in figure 7 c, the third generation module 707, including determine 7071 He of submodule Computational submodule 7072.
The determination submodule 7071, for determining that preset algorithm, preset algorithm are at least Diffie-Hellman;
The computational submodule 7072 counts the first fixed key and the second fixed key for using preset algorithm It calculates, generates shared key.
In specific application scenarios, as illustrated in fig. 7d, which includes the first acquisition module 708 and update module 709.
The first acquisition module 708, for obtaining private value, private value is according to the friendship being proved to be successful in prefixed time interval Easy data generate;
The update module 709 updates private value, store-updated private value for transaction data to be marked.
In specific application scenarios, as seen in figure 7e, which further includes the second acquisition module 710, and third receives mould Block 711 and adding module 712.
This second obtains module 710, for when detecting by prefixed time interval, obtains between a upper preset time Every the private value of at least one transaction data and at least one transaction data for being proved to be successful;
The third receiving module 711 for private value to be transmitted to other nodes in data transmission system, and receives it Other private values of his node-node transmission;
The adding module 712, for when the number of the private value received meets preset number, at least one to be traded Data are added in block chain.
It should be noted that each function involved by a kind of data transmission device based on block chain provided in an embodiment of the present invention Other corresponding descriptions of energy unit, can describe, details are not described herein with reference to corresponding in Fig. 4 and Fig. 5.
Based on above-mentioned method as shown in Figure 4 and Figure 5, correspondingly, the embodiment of the invention also provides a kind of storage equipment, On be stored with computer program, the program realized when being executed by processor above-mentioned block chain as shown in Figure 4 and Figure 5 data pass Transmission method.
Based on above-mentioned method as shown in Figure 4 and Figure 5 and such as Fig. 6 A to Fig. 6 C and the virtual bench as shown in Fig. 7 A to Fig. 7 E Embodiment, to achieve the goals above, the embodiment of the invention also provides a kind of entity apparatus of the data of block chain transmission, should Entity apparatus includes storage equipment and processor;The storage equipment, for storing computer program;The processor, is used for The computer program is executed to realize the above-mentioned data transmission method based on block chain as shown in Figure 4 and Figure 5.
By applying the technical scheme of the present invention, the Hash label of transaction data can be generated by shared key, is realized Encryption to transaction data, so that the data transmission carried out between first node and second node is realized based on shared key, nothing The encryption that transaction data need to be carried out based on unsymmetrical key is alleviated the calculation amount in data transmission, improves the speed of encryption, The efficiency of data transmission is higher.
Through the above description of the embodiments, those skilled in the art can be understood that the application can lead to Hardware realization is crossed, the mode of necessary general hardware platform can also be added to realize by software.Based on this understanding, this Shen Technical solution please can be embodied in the form of software products, which can store in a non-volatile memories In medium (can be CD-ROM, USB flash disk, mobile hard disk etc.), including some instructions are used so that a computer equipment (can be Personal computer, server or network equipment etc.) execute method described in each implement scene of the application.
It will be appreciated by those skilled in the art that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, module in attached drawing or Process is not necessarily implemented necessary to the application.
It will be appreciated by those skilled in the art that the module in device in implement scene can be described according to implement scene into Row is distributed in the device of implement scene, can also be carried out corresponding change and is located at the one or more dresses for being different from this implement scene In setting.The module of above-mentioned implement scene can be merged into a module, can also be further split into multiple submodule.
Above-mentioned the application serial number is for illustration only, does not represent the superiority and inferiority of implement scene.
Disclosed above is only several specific implementation scenes of the application, and still, the application is not limited to this, Ren Heben What the technical staff in field can think variation should all fall into the protection scope of the application.

Claims (10)

1. a kind of data transmission system of block chain, which is characterized in that the data transmission system of the block chain includes first segment Point and second node, the first node and the second node are respectively in the data transmission system based on block chain Any node;
The first node for obtain the first fixed key, be based on hash algorithm and first fixed key, to it is described Transaction data between transaction node is handled, and the first Hash label is generated;The shared key between second node is obtained, Based on the hash algorithm and the shared key, first Hash label is handled, generate the second Hash label with And data vector;The transaction data, first Hash label, second Hash label and the data vector are passed Transport to the second node;
The second node is used to receive the transaction data of first node transmission, first Hash label, described Second Hash label and the data vector;The shared key between the first node is obtained, the Hash is based on Algorithm and the shared key handle first Hash label, generate third Hash label;If described second breathes out Uncommon label is consistent with the third Hash label, then to transaction data authentication success.
2. a kind of data transmission method of block chain, which is characterized in that the method is applied to the data transmission based on block chain System, the data transmission system based on block chain include first node and second node, the first node and described Two nodes are respectively any node in the data transmission system based on block chain, which comprises
The first node obtains the first fixed key, is based on hash algorithm and first fixed key, to the transaction Transaction data between node is handled, and the first Hash label is generated, and first fixed key is the first node Fixed key;
The first node obtains the shared key between second node, is based on the hash algorithm and the shared key, First Hash label is handled, the second Hash label and data vector are generated, the second node is the number According to any node in Transmission system;
The first node is by the transaction data, first Hash label, second Hash label and the data Vector is transmitted to the second node;
The second node receives the transaction data of the first node transmission, first Hash label, described second Hash label and the data vector;
The second node obtains the shared key between the first node, based on the hash algorithm and described total Key is enjoyed, first Hash label is handled, generates third Hash label;
If second Hash label is consistent with the third Hash label, the second node tests the transaction data It demonstrate,proves successfully.
3. a kind of data transmission method of block chain, which is characterized in that the method is applied to first node, the first node For any node in data transmission system, which comprises
The first fixed key is obtained, hash algorithm and first fixed key are based on, to the number of deals between transaction node According to being handled, the first Hash label is generated, first fixed key is the fixed key of the first node;
The shared key between second node is obtained, the hash algorithm and the shared key are based on, is breathed out to described first Uncommon label is handled, and the second Hash label and data vector are generated, and the second node is in the data transmission system Any node, the shared key is the symmetric key that the first node and the second node generate;
The transaction data, first Hash label, second Hash label and the data vector are transmitted to institute State second node.
4. according to the method described in claim 3, it is characterized in that, the shared key obtained between second node, base In the hash algorithm and the shared key, first Hash label is handled, generate the second Hash label and Before data vector, the method also includes:
First fixed key is encrypted using the first public key, generates the first ciphertext, first ciphertext is transmitted to described Second node, first public key are the public key of the second node;
The second ciphertext of the second node transmission is received, second ciphertext is receiving described first by the second node After ciphertext, the encryption of the second fixed key is generated using the second public key, second public key is the public key of the first node, Second fixed key is the fixed key of the second node;
Using the second private key, second ciphertext is decrypted, obtains second fixed key, second private key is institute State the private key of first node;
Based on first fixed key and second fixed key, the shared key is generated.
5. according to the method described in claim 3, it is characterized in that, the method also includes:
When detecting by prefixed time interval, at least one number of deals that a upper prefixed time interval is proved to be successful is obtained Accordingly and the private value of at least one transaction data;
The private value is transmitted to other nodes in the data transmission system, and receive other node-node transmissions its His private value;
When the number of the private value received meets preset number, at least one described transaction data is added to block chain In.
6. a kind of data transmission method of block chain, which is characterized in that the method is applied to second node, the second node For any node in data transmission system, which comprises
Receive transaction data, the first Hash label, the second Hash label and the data vector of first node transmission, the first segment Point is any node in data transmission system, first Hash label, second Hash label and the data vector It is generated by the first node according to the transaction data;
The shared key between the first node is obtained, hash algorithm and the shared key are based on, is breathed out to described first Uncommon label is handled, and third Hash label is generated, and the shared key is that the first node and the second node generate Symmetric key;
If second Hash label is consistent with the third Hash label, to transaction data authentication success.
7. according to the method described in claim 6, it is characterized in that, sharing between the acquisition and the first node is close Key, be based on hash algorithm and the shared key, first Hash label is handled, generate third Hash label it Before, the method also includes:
Receive the first ciphertext of first node transmission, first ciphertext is based on the first public key to the by the first node The encryption of one fixed key generates, and first public key is the public key of the second node, and first fixed key is described the The fixed key of one node;
Based on the first private key, first ciphertext is decrypted, obtains first fixed key, first private key is institute State the private key of second node;
The second fixed key is encrypted using the second public key, the second ciphertext is generated, second ciphertext is transmitted to described first Node, second fixed key are the fixed key of the second node, and second public key is the public affairs of the first node Key;
Based on first fixed key and second fixed key, the shared key is generated.
8. the method according to the description of claim 7 is characterized in that described consolidated based on first fixed key with described second Determine key, generate the shared key, comprising:
Determine that preset algorithm, the preset algorithm are at least Diffie-Hellman;
Using the preset algorithm, first fixed key and second fixed key are calculated, generated described total Enjoy key.
9. if according to the method described in claim 6, it is characterized in that, second Hash label and the third are breathed out Uncommon label is consistent, then after succeeding to the transaction data authentication, which comprises
Private value is obtained, the private value is generated according to the transaction data being proved to be successful in prefixed time interval;
The transaction data is marked, the private value, store-updated private value are updated.
10. according to the method described in claim 6, it is characterized in that, the method also includes:
When detecting by prefixed time interval, at least one number of deals that a upper prefixed time interval is proved to be successful is obtained Accordingly and the private value of at least one transaction data;
The private value is transmitted to other nodes in the data transmission system, and receive other node-node transmissions its His private value;
When the number of the private value received meets preset number, at least one described transaction data is added to block chain In.
CN201811271570.9A 2018-10-29 2018-10-29 Data transmission system, method, device, equipment and storage medium of block chain Active CN109510818B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811271570.9A CN109510818B (en) 2018-10-29 2018-10-29 Data transmission system, method, device, equipment and storage medium of block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811271570.9A CN109510818B (en) 2018-10-29 2018-10-29 Data transmission system, method, device, equipment and storage medium of block chain

Publications (2)

Publication Number Publication Date
CN109510818A true CN109510818A (en) 2019-03-22
CN109510818B CN109510818B (en) 2021-08-17

Family

ID=65747087

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811271570.9A Active CN109510818B (en) 2018-10-29 2018-10-29 Data transmission system, method, device, equipment and storage medium of block chain

Country Status (1)

Country Link
CN (1) CN109510818B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110020538A (en) * 2019-04-15 2019-07-16 山东省计算中心(国家超级计算济南中心) Transaction data encryption and decryption method and system based on block chain
CN111123316A (en) * 2019-12-17 2020-05-08 北京华力创通科技股份有限公司 Method and device for determining network RTK data security and electronic equipment
CN111445250A (en) * 2020-04-16 2020-07-24 中国银行股份有限公司 Block chain key testing method and device
CN111726224A (en) * 2020-05-13 2020-09-29 北京信息科技大学 Quantum secret communication-based data integrity rapid authentication method, system, terminal and storage medium
CN111881099A (en) * 2019-05-03 2020-11-03 国际商业机器公司 Database private document sharing
CN111988281A (en) * 2020-07-27 2020-11-24 安徽科技学院 Block chain encryption method based on quantum communication
CN113630247A (en) * 2021-08-14 2021-11-09 永旗(北京)科技有限公司 Communication method between block chain nodes
CN113676314A (en) * 2020-05-14 2021-11-19 科大国盾量子技术股份有限公司 Quantum key management method, comparison method, output method, device and system
CN113761582A (en) * 2021-09-29 2021-12-07 山东省计算中心(国家超级计算济南中心) Group signature based method and system for protecting privacy of block chain transaction under supervision
CN116684091A (en) * 2023-07-24 2023-09-01 安徽省大数据中心 Relay multi-level data blockchain sharing method and system based on quantum key distribution

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220006645A1 (en) * 2021-09-21 2022-01-06 Intel Corporation Post-quantum secure lighteight integrity and replay protection for multi-die connections

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101150399A (en) * 2007-10-12 2008-03-26 四川长虹电器股份有限公司 Generation method for share secret key
US20160330035A1 (en) * 2015-05-05 2016-11-10 ShoCard, Inc. User Identification Management System and Method
CN106682528A (en) * 2016-12-31 2017-05-17 杭州复杂美科技有限公司 Blockchain encryption retrieval scheme
CN107038383A (en) * 2016-02-03 2017-08-11 华为技术有限公司 A kind of method and apparatus of data processing
CN107342858A (en) * 2017-07-05 2017-11-10 武汉凤链科技有限公司 A kind of intelligent contract guard method and system based on trusted context
CN107733656A (en) * 2017-10-23 2018-02-23 北京深思数盾科技股份有限公司 A kind of cipher authentication method and device
CN107888577A (en) * 2017-10-31 2018-04-06 美的智慧家居科技有限公司 Upgrade method, door lock, server, system and the storage medium of door lock firmware
CN108650077A (en) * 2018-05-17 2018-10-12 深圳前海微众银行股份有限公司 Information transferring method, terminal, equipment based on block chain and readable storage medium storing program for executing
CN108683688A (en) * 2018-07-20 2018-10-19 中国建设银行股份有限公司浙江省分行 A method of information transmission security is realized based on Digital Envelope Technology
CN108702287A (en) * 2018-04-16 2018-10-23 深圳前海达闼云端智能科技有限公司 Information publication based on block chain and acquisition methods, device and block chain node
CN109033855A (en) * 2018-07-18 2018-12-18 腾讯科技(深圳)有限公司 A kind of data transmission method based on block chain, device and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101150399A (en) * 2007-10-12 2008-03-26 四川长虹电器股份有限公司 Generation method for share secret key
US20160330035A1 (en) * 2015-05-05 2016-11-10 ShoCard, Inc. User Identification Management System and Method
CN107038383A (en) * 2016-02-03 2017-08-11 华为技术有限公司 A kind of method and apparatus of data processing
CN106682528A (en) * 2016-12-31 2017-05-17 杭州复杂美科技有限公司 Blockchain encryption retrieval scheme
CN107342858A (en) * 2017-07-05 2017-11-10 武汉凤链科技有限公司 A kind of intelligent contract guard method and system based on trusted context
CN107733656A (en) * 2017-10-23 2018-02-23 北京深思数盾科技股份有限公司 A kind of cipher authentication method and device
CN107888577A (en) * 2017-10-31 2018-04-06 美的智慧家居科技有限公司 Upgrade method, door lock, server, system and the storage medium of door lock firmware
CN108702287A (en) * 2018-04-16 2018-10-23 深圳前海达闼云端智能科技有限公司 Information publication based on block chain and acquisition methods, device and block chain node
CN108650077A (en) * 2018-05-17 2018-10-12 深圳前海微众银行股份有限公司 Information transferring method, terminal, equipment based on block chain and readable storage medium storing program for executing
CN109033855A (en) * 2018-07-18 2018-12-18 腾讯科技(深圳)有限公司 A kind of data transmission method based on block chain, device and storage medium
CN108683688A (en) * 2018-07-20 2018-10-19 中国建设银行股份有限公司浙江省分行 A method of information transmission security is realized based on Digital Envelope Technology

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110020538A (en) * 2019-04-15 2019-07-16 山东省计算中心(国家超级计算济南中心) Transaction data encryption and decryption method and system based on block chain
CN111881099A (en) * 2019-05-03 2020-11-03 国际商业机器公司 Database private document sharing
CN111123316A (en) * 2019-12-17 2020-05-08 北京华力创通科技股份有限公司 Method and device for determining network RTK data security and electronic equipment
CN111445250A (en) * 2020-04-16 2020-07-24 中国银行股份有限公司 Block chain key testing method and device
CN111445250B (en) * 2020-04-16 2023-04-11 中国银行股份有限公司 Block chain key testing method and device
CN111726224A (en) * 2020-05-13 2020-09-29 北京信息科技大学 Quantum secret communication-based data integrity rapid authentication method, system, terminal and storage medium
CN113676314B (en) * 2020-05-14 2022-07-26 科大国盾量子技术股份有限公司 Quantum key management method, comparison method, output method, device and system
CN113676314A (en) * 2020-05-14 2021-11-19 科大国盾量子技术股份有限公司 Quantum key management method, comparison method, output method, device and system
CN111988281A (en) * 2020-07-27 2020-11-24 安徽科技学院 Block chain encryption method based on quantum communication
CN113630247A (en) * 2021-08-14 2021-11-09 永旗(北京)科技有限公司 Communication method between block chain nodes
CN113761582A (en) * 2021-09-29 2021-12-07 山东省计算中心(国家超级计算济南中心) Group signature based method and system for protecting privacy of block chain transaction under supervision
CN113761582B (en) * 2021-09-29 2023-06-16 山东省计算中心(国家超级计算济南中心) Group signature-based supervision blockchain transaction privacy protection method and system
CN116684091A (en) * 2023-07-24 2023-09-01 安徽省大数据中心 Relay multi-level data blockchain sharing method and system based on quantum key distribution
CN116684091B (en) * 2023-07-24 2023-10-31 安徽省大数据中心 Relay multi-level data blockchain sharing method and system based on quantum key distribution

Also Published As

Publication number Publication date
CN109510818B (en) 2021-08-17

Similar Documents

Publication Publication Date Title
CN109510818A (en) Data transmission system, method, apparatus, equipment and the storage medium of block chain
TWI721122B (en) Data secure transmission method, client and server method, device and system
US11449819B2 (en) Blockchain-based authentication and authorization
TWI706275B (en) System and method for information protection
ES2687182T3 (en) Determine a common secret for the secure exchange of information and hierarchical and deterministic cryptographic keys
JP6714156B2 (en) System and method for information protection
CN106548345B (en) Method and system for realizing block chain private key protection based on key partitioning
CN109377215B (en) Block chain transaction method and device and electronic equipment
CN111066285B (en) SM2 signature based public key recovery method
CN111475796B (en) Anti-quantum computation identity authentication method and system based on secret sharing and quantum communication service station
JP2022183325A (en) Secure multiparty loss-tolerant storage and transfer of encryption key for block chain-based system in conjunction with wallet management system
CN110289968B (en) Private key recovery method, collaborative address creation method, collaborative address signature device and storage medium
US20190356481A1 (en) System and method for securing digital assets
TW202020711A (en) System and method for information protection
CN111431713B (en) Private key storage method and device and related equipment
CN108780548A (en) Using Elliptic Curve Cryptography for Personal Device Security to Share Secrets
US20200213125A1 (en) Computer-implemented system and method enabling secure storage of a large blockchain over a plurality of storage nodes
CN109861956B (en) Data verification system, method, device and equipment based on state channel
CN108712409B (en) Electronic bill transaction system based on private block chain
CN113285802B (en) Key agreement method and device based on FPGA
CN113886856A (en) Dual verifiable cloud storage method based on block chain
CN111327419A (en) Method and system for resisting quantum computation block chain based on secret sharing
CN111080296A (en) Verification method and device based on block chain system
CN110046511A (en) Leaking data method, apparatus, equipment and storage medium are prevented based on alliance&#39;s chain
CN110716724B (en) Method and device for realizing privacy block chain based on FPGA

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
GR01 Patent grant
GR01 Patent grant