CN112910633A - Data processing method and device applied to block chain nodes and storage medium - Google Patents

Data processing method and device applied to block chain nodes and storage medium Download PDF

Info

Publication number
CN112910633A
CN112910633A CN201911222141.7A CN201911222141A CN112910633A CN 112910633 A CN112910633 A CN 112910633A CN 201911222141 A CN201911222141 A CN 201911222141A CN 112910633 A CN112910633 A CN 112910633A
Authority
CN
China
Prior art keywords
node
data
blockchain
block
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.)
Granted
Application number
CN201911222141.7A
Other languages
Chinese (zh)
Other versions
CN112910633B (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.)
Micro Tianjin Technology Development Co ltd
Original Assignee
Micro Tianjin Technology Development Co ltd
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 Micro Tianjin Technology Development Co ltd filed Critical Micro Tianjin Technology Development Co ltd
Priority to CN201911222141.7A priority Critical patent/CN112910633B/en
Publication of CN112910633A publication Critical patent/CN112910633A/en
Application granted granted Critical
Publication of CN112910633B publication Critical patent/CN112910633B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0822Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using key encryption key
    • 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/0442Network 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 asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • 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/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Abstract

The application discloses a data processing method and device applied to a block chain node and a storage medium. Wherein, the method comprises the following steps: a first node of the first blockchain receives data from the second blockchain; the first node encrypts data to generate encrypted data; the first node encrypts a key for decrypting the encrypted data by using a public key of a node user of the second blockchain, so as to generate encrypted key information; and the first node generating a block corresponding to the received data using the encrypted data as a block body and using the encrypted key information as a block header.

Description

Data processing method and device applied to block chain nodes and storage medium
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a data processing method and apparatus applied to a blockchain node, and a storage medium.
Background
Due to the characteristics of distributed storage and data non-tamper-ability of the block chain technology, more and more business fields begin to use the block chain technology for data storage and processing. For each user participating in a blockchain, the same user may store data in different blockchains, since different service domains are often involved. Therefore, when the user transacts with another user on one blockchain or processes other tasks, it may be necessary to read the data information recorded by the user on another blockchain.
For example, when a user is a user of a federation chain and needs to perform a transaction or transaction with another user of the federation chain, it is often necessary to retrieve data stored by the user on the federation chain in order to qualify the user.
However, such data exchange between block chains tends to easily cause leakage of user secrets. For example, the information that the user stores in the federation chain is not intended to be known to other users in the federation chain. But after the public link receives the user's data from the federation link and generates a chunk, the chunk is broadcast to the nodes of the public link. Thereby potentially revealing the user's secret to other block nodes of the public chain.
In view of the above technical problem in the prior art that user secrets are easily revealed by data exchange between blockchains, no effective solution has been proposed.
Disclosure of Invention
Embodiments of the present disclosure provide a data processing method and apparatus applied to a blockchain node, and a storage medium, so as to at least solve the technical problem in the prior art that user secrets are easily leaked due to data exchange between blockchains.
According to an aspect of the embodiments of the present disclosure, there is provided a data processing method applied to a blockchain node, including: a first node of the first blockchain receives data from the second blockchain; the first node encrypts data to generate encrypted data; the first node encrypts a key for decrypting the encrypted data by using a public key of a node user of the second blockchain, so as to generate encrypted key information; and the first node generating a block corresponding to the received data using the encrypted data as a block body and using the encrypted key information as a block header.
According to another aspect of the embodiments of the present disclosure, there is also provided a data processing method applied to a blockchain node, including: a second node of the first block chain receives a block broadcast by the first node of the first block chain, wherein the block of the block is generated by the first node encrypting data received from the second block chain; the second node decrypts the encrypted key information contained in the block header of the block by using the private key stored in the second node to obtain a key for decrypting the data; and the second node decrypts the data in the block using the obtained key.
According to another aspect of the embodiments of the present disclosure, there is also provided a storage medium including a stored program, wherein the method of any one of the above is performed by a processor when the program is executed.
According to another aspect of the embodiments of the present disclosure, there is also provided a data processing apparatus applied to a blockchain node, where the data processing apparatus is used for a first node of a first blockchain, and includes: a data receiving module, configured to receive data from the second block chain; the first encryption module is used for encrypting the data so as to generate encrypted data; the second encryption module is used for encrypting a key for decrypting the encrypted data by using the public key of the node user of the second block chain so as to generate encrypted key information; and a block generation module for generating a block corresponding to the received data using the encrypted data as a block body and using the encrypted key information as a block header.
According to another aspect of the embodiments of the present disclosure, there is also provided a data processing apparatus applied to a blockchain node, where the data processing apparatus is used for a second node of a first blockchain, and includes: the block receiving module is used for receiving a block broadcasted by a first node of the first block chain, wherein the block body of the block is generated by encrypting data received from the second block chain by the first node; the first decryption module is used for decrypting the encrypted key information contained in the block head of the block by using a private key stored in the second node to obtain a key for decrypting data; and a second decryption module for decrypting the data in the block using the obtained key.
According to another aspect of the embodiments of the present disclosure, there is also provided a data processing apparatus applied to a blockchain node, where the data processing apparatus is used for a first node of a first blockchain, and includes: a first processor; and a first memory coupled to the first processor for providing instructions to the first processor to process the following processing steps: receiving data from the second blockchain; encrypting the data to generate encrypted data; encrypting a key for decrypting the encrypted data by using a public key of a node user of the second blockchain, thereby generating encrypted key information; and generating a block corresponding to the received data using the encrypted data as a block body and using the encrypted key information as a block header.
According to another aspect of the embodiments of the present disclosure, there is also provided a data processing apparatus applied to a blockchain node, where the data processing apparatus is used for a second node of a first blockchain, and includes: a second processor; and a second memory coupled to the second processor for providing instructions to the second processor to process the following processing steps: receiving a block broadcast by a first node of a first block chain, wherein the block of the block is generated by the first node encrypting data received from a second block chain; decrypting the encrypted key information contained in the block header of the block by using the private key stored in the second node to obtain a key for decrypting data; and decrypting said data in the block using the derived key.
In the disclosed embodiment, the node of the first blockchain, after receiving the data from the second blockchain, encrypts the data and further encrypts a key for decrypting the data using the public key of the node user of the second blockchain. In this way it is thus ensured that data information of the node users of the second blockchain is not leaked by transmission to the first blockchain. Therefore, the technical problem that the data exchange between block chains easily causes the leakage of user secrets in the prior art is solved. .
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the disclosure and together with the description serve to explain the disclosure and not to limit the disclosure. In the drawings:
fig. 1 is a hardware block diagram of a computing device for implementing the method according to embodiment 1 of the present disclosure;
fig. 2 is a schematic diagram of a system for data transmission between block chains according to embodiment 1 of the present disclosure;
fig. 3 is a flowchart illustrating a data processing method applied to a blockchain node according to a first aspect of embodiment 1 of the present disclosure;
fig. 4A is a schematic diagram of a first node generating key information according to a public key of a node user of a second blockchain according to the first aspect of embodiment 1 of the present disclosure;
fig. 4B is a schematic diagram of a block generated by the first node according to the first aspect of embodiment 1 of the present disclosure;
fig. 5 is a flowchart illustrating a data processing method applied to a blockchain node according to a second aspect of embodiment 1 of the present disclosure;
fig. 6 is a schematic diagram of a data processing apparatus applied to a blockchain node according to a first aspect of embodiment 2 of the present disclosure;
fig. 7 is a schematic diagram of a data processing apparatus applied to a blockchain node according to a second aspect of embodiment 2 of the present disclosure;
fig. 8 is a schematic diagram of a data processing apparatus applied to a blockchain node according to a first aspect of embodiment 3 of the present disclosure; and
fig. 9 is a schematic diagram of a data processing apparatus applied to a blockchain node according to a second aspect of embodiment 3 of the present disclosure.
Detailed Description
In order to make those skilled in the art better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure. It is to be understood that the described embodiments are merely exemplary of some, and not all, of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
There is also provided in accordance with the present embodiment a method embodiment of a data processing method applied to a blockchain node, it being noted that the steps illustrated in the flowchart of the figures may be performed in a computer system such as a set of computer executable instructions and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
The method embodiments provided by the present embodiment may be executed in a computer terminal, a server or a similar computing device. Fig. 1 shows a hardware configuration block diagram of a computing device for implementing a data processing method applied to a blockchain node. As shown in fig. 1, the computing device may include one or more processors (which may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory for storing data, and a transmission device for communication functions. Besides, the method can also comprise the following steps: a display, an input/output interface (I/O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of the I/O interface), a network interface, a power source, and/or a camera. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the electronic device. For example, the computing device may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
It should be noted that the one or more processors and/or other data processing circuitry described above may be referred to generally herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part in software, hardware, firmware, or any combination thereof. Further, the data processing circuitry may be a single, stand-alone processing module, or incorporated in whole or in part into any of the other elements in the computing device. As referred to in the disclosed embodiments, the data processing circuit acts as a processor control (e.g., selection of a variable resistance termination path connected to the interface).
The memory may be configured to store software programs and modules of application software, such as program instructions/data storage devices corresponding to the data processing method applied to the blockchain node in the embodiments of the present disclosure, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, implements the data processing method applied to the blockchain node of the application program. The memory may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory located remotely from the processor, which may be connected to the computing device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device is used for receiving or transmitting data via a network. Specific examples of such networks may include wireless networks provided by communication providers of the computing devices. In one example, the transmission device includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
The display may be, for example, a touch screen type Liquid Crystal Display (LCD) that may enable a user to interact with a user interface of the computing device.
It should be noted here that in some alternative embodiments, the computing device shown in fig. 1 described above may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that FIG. 1 is only one example of a particular specific example and is intended to illustrate the types of components that may be present in a computing device as described above.
Fig. 2 is a schematic diagram of a system for data transmission between blockchains according to the present embodiment. Referring to fig. 2, the system includes: a first blockchain 100 and a second blockchain 200, wherein the first blockchain 100 and the second blockchain 200 are connected through the internet, so that data exchange can be performed through the internet. Where the first blockchain 100 may be, for example, a public chain and the second blockchain 200 may be, for example, a federation chain. In addition, the first blockchain 100 includes blockchain nodes 101-104, and the second blockchain 200 includes blockchain nodes 201-202. It should be noted that the above-mentioned hardware structure can be applied to the block link points 101-104 and 201-202 in the system.
Under the above operating environment, according to the first aspect of the present embodiment, a data processing method applied to a blockchain node is provided, which may be implemented by the first node 101 and the second node 102 shown in fig. 2, for example. Fig. 3 shows a flow diagram of the method, which, with reference to fig. 3, comprises:
s302: a first node of the first blockchain receives data from the second blockchain;
s304: the first node encrypts data to generate encrypted data;
s306: the first node encrypts a key for decrypting the encrypted data by using a public key of a node user of the second blockchain, so as to generate encrypted key information; and
s308: the first node generates a block corresponding to the received data using the encrypted data as a block body and using the encrypted key information as a block header.
Specifically, it may be desirable to obtain information about the lender, for example, when a node user (e.g., a bank) of the first blockchain 100 transacts loan transactions. If the lender and the bank happen to be node users of the second blockchain 200, the bank will have data information associated with the lender stored on the blockchain node of the second blockchain. Thus, if the bank can obtain the data information associated with the lender stored on the second blockchain at a node of the first blockchain, a better understanding of the credit of the user can be obtained.
Thus, the first blockchain 100 may receive data from the second blockchain 200, for example (S302). For example, each time the second blockchain 200 receives new data and generates a new block, the new data is sent to a node of the first blockchain 100, such as the first node 101. Of course, the second blockchain 200 may also periodically transmit data to the first blockchain 100. After receiving the data sent by the second blockchain 200, the first blockchain 100 may generate a corresponding block and store the corresponding block in the chain, so that the first blockchain 100 may also store the data of the second blockchain 200 in the chain. So that a node in the first blockchain 100 can also acquire data in the second blockchain 200
However, for a variety of reasons (e.g., the second blockchain 200 is a federation chain), the blocks generated by the second blockchain 200 are clearly required to be kept secret from users other than the node users of the second blockchain 200. Therefore, in order to prevent the data in the second blockchain 200 from being leaked, the first node 101 may encrypt the data after receiving the data, thereby generating encrypted data (S304). Optionally, the first node 101 encrypts the data with a symmetric key, for example. In this way, data in the second blockchain 200 is thus prevented from being leaked in the first blockchain 100. Where the symmetric key may be generated by the first node 101 in response to receiving data from the second blockchain 200, for example. So that whenever the first blockchain 100 receives new data from the second blockchain 200, more nodes receiving the data will generate new symmetric keys.
Then, the first node 101 encrypts the symmetric key with the public key of the node user of the second blockchain 200, thereby generating encrypted key information. Specifically, for example, the second blockchain 200 may send the public key of the node user of the second blockchain 200 to the first blockchain 100. Optionally, each time the node user of the second blockchain 200 changes, the second blockchain 200 sends the updated public key of the node user to the first blockchain 100. Therefore, each node 101-104 of the first blockchain 100 can obtain the public key of the node user of the second blockchain 200. Further, the first node 101 can encrypt the key with the public key of the node user of the second blockchain 200, thereby generating encrypted key information.
Where fig. 4A shows a schematic diagram of the first node 101 generating key information from the public keys of the node users of the second blockchain 200. Referring to fig. 4A, the first node 101 encrypts the symmetric key with the public key of user 1 to generate encrypted key information 1, encrypts the symmetric key with the public key of user 2 to generate encrypted key information 2, and so on. Thus, in this way, the first node 101 generates corresponding key information from the public key of the node user of the second blockchain 200.
Then, the first node 101 generates a block corresponding to the received data using the encrypted data as a block body and using the encrypted key information as a block header. Where fig. 4B shows a schematic diagram of the block generated by the first node 101. Referring to fig. 4B, the block includes a block body generated using encrypted data and a block header generated using encrypted key information.
Therefore, after the first node 101 broadcasts the block in the first blockchain 100, only the common node users of the second blockchain 200 and the first blockchain 100 can decrypt the symmetric key by their own private keys and decrypt the encrypted data by using the symmetric key. While the data of the block is still undecipherable to other node users in the first blockchain 100.
As described in the background, data exchange between blockchains tends to easily cause leakage of user secrets. To solve the technical problem, in this embodiment, after receiving data from the second blockchain, the node of the first blockchain encrypts the data, and further encrypts a key for decrypting the data by using a public key of a node user of the second blockchain. In this way it is thus ensured that data information of the node users of the second blockchain is not leaked by transmission to the first blockchain. Therefore, the technical problem that the data exchange between block chains easily causes the leakage of user secrets in the prior art is solved.
Further optionally, the first node encrypts a key for decrypting the encrypted data with a public key of a node user of the second blockchain, including: the first node acquires a user list sent from the second block chain, wherein the user list comprises user information of node users of the second block chain and a corresponding public key; and the first node reads the public key in the user list and encrypts a key for decrypting the encrypted data by using the read public key.
Specifically, the first node 101 of the first blockchain 100 queries the list of users sent from the second blockchain 200. Wherein the following table 1 exemplarily shows an example of the user list transmitted by the second blockchain 200:
table 1 user list of second blockchain
Second blockchain user Public key
User 1 Public key 1
User 2 Public key 2
…… ……
As described above, the user list of the second blockchain 200 describes the node users of the second blockchain and the corresponding public keys. So that the first node 101 can read the public key of each user from the list and further encrypt the key for decrypting the encrypted data using the public key.
In this way, the first node 101 is thereby facilitated to obtain and use the public key corresponding to the node user of the second blockchain. The data processing efficiency of the first block chain 101 is improved.
Optionally, the method further comprises the first node broadcasting the generated tiles within the first chain of tiles. In this way, each node in the first blockchain is thus able to obtain data in the second blockchain.
Optionally, the method further comprises: a second node of the first block chain receiving blocks from the first node; the second node decrypts the encrypted key information contained in the block header by using the private key stored in the second node to obtain a key for decrypting the encrypted data; and the second node decrypts the encrypted data in the block using the obtained key.
Specifically, the first node 101 broadcasts blocks within the first block chain 100. As a node of a common user of the first blockchain 100 and the second blockchain 200, the second node within the first blockchain 100 receives the block.
Then, the second node 102 decrypts the encrypted key information included in the block header by using the private key, to obtain a key for decrypting the encrypted data. The second node 102 then decrypts the encrypted data in the chunk using the obtained key, thereby finally obtaining the data of the second blockchain 200.
In this way, it is thus ensured that a user of the second blockchain 200, which user is common to the first blockchain 100, can obtain the data information generated in the second blockchain 200 at a node of the first blockchain 100.
Furthermore, fig. 5 shows a flow chart of a data processing method applied to a blockchain node according to the second aspect of the present embodiment, and the method is applied to the second node 102 of the first blockchain 100.
Referring to fig. 5, the method includes:
s502: a second node of the first block chain receives a block broadcast by the first node of the first block chain, wherein the block of the block is generated by the first node encrypting data received from the second block chain;
s504: the second node decrypts the encrypted key information contained in the block header of the block by using the private key stored in the second node to obtain a key for decrypting the data; and
s506: the second node decrypts the data in the chunk using the obtained key.
Specifically, the first node 101 broadcasts blocks within the first block chain 100. As a node of a common user of the first blockchain 100 and the second blockchain 200, the second node within the first blockchain 100 receives the block.
Then, the second node 102 decrypts the encrypted key information included in the block header by using the private key, to obtain a key for decrypting the encrypted data. The second node 102 then decrypts the encrypted data in the chunk using the obtained key, thereby finally obtaining the data of the second blockchain 200.
In this way, it is thus ensured that a user of the second blockchain 200, which user is common to the first blockchain 100, can obtain the data information generated in the second blockchain 200 at a node of the first blockchain 100.
In summary, in this embodiment, after receiving data from the second blockchain, the node of the first blockchain encrypts the data, and further encrypts the key for decrypting the data by using the public key of the node user of the second blockchain. In this way it is thus ensured that data information of the node users of the second blockchain is not leaked by transmission to the first blockchain. Therefore, the technical problem that the data exchange between block chains easily causes the leakage of user secrets in the prior art is solved.
Further, referring to fig. 1, according to a third aspect of the present embodiment, there is provided a storage medium. The storage medium comprises a stored program, wherein the method of any of the above is performed by a processor when the program is run.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
Fig. 6 shows a data processing apparatus 600 according to the first aspect of the present embodiment applied to a blockchain node, applied to a first node of a first blockchain. The apparatus 600 corresponds to the method according to the first aspect of embodiment 1. Referring to fig. 6, the apparatus 600 includes: a data receiving module 610, configured to receive data from the second block chain; a first encryption module 620, configured to encrypt data, thereby generating encrypted data; a second encryption module 630, configured to encrypt a key used for decrypting the encrypted data by using a public key of a node user of the second blockchain, so as to generate encrypted key information; and a chunk generating module 640 for generating a chunk corresponding to the received data using the encrypted data as a chunk body and using the encrypted key information as a chunk header. .
Optionally, the first encryption module comprises: the user list query submodule is used for querying a user list sent from the second block chain, wherein the user list comprises user information of node users of the second block chain and corresponding public keys; and the encryption submodule is used for reading the public key in the user list and encrypting the secret key for decrypting the encrypted data by using the read public key.
Optionally, a broadcasting module is further included, configured to broadcast the generated tile within the first tile chain.
Furthermore, fig. 7 shows a data processing arrangement 700 applied to a blockchain node according to the second aspect of the present embodiment, the arrangement 700 being applied to a second node of a first blockchain, corresponding to the method according to the second aspect of embodiment 1. Referring to fig. 7, the apparatus 700 includes: a block receiving module 710, configured to receive a block broadcast by a first node of a first block chain, where the block of the block is generated by the first node encrypting data received from a second block chain; a first decryption module 720, configured to decrypt, by using a private key stored in the second node, the encrypted key information included in the block header of the block to obtain a key for decrypting the data; and a second decryption module 730 for decrypting the data in the block using the obtained key.
Thus, according to this embodiment, a node of the first blockchain, upon receiving data from the second blockchain, encrypts the data and further encrypts the key to decrypt the data using the public key of the node user of the second blockchain. In this way it is thus ensured that data information of the node users of the second blockchain is not leaked by transmission to the first blockchain. Therefore, the technical problem that the data exchange between block chains easily causes the leakage of user secrets in the prior art is solved.
Example 3
Fig. 8 shows a data processing arrangement 800 according to the first aspect of the present embodiment applied to a blockchain node for a first node of a first blockchain, the arrangement 800 corresponding to the method according to the first aspect of the embodiment 1. Referring to fig. 8, the apparatus 800 includes: a first processor; and a first memory coupled to the first processor for providing instructions to the first processor to process the following processing steps: receiving data from the second blockchain; encrypting the data to generate encrypted data; encrypting a key for decrypting the encrypted data by using a public key of a node user of the second blockchain, thereby generating encrypted key information; and generating a block corresponding to the received data using the encrypted data as a block body and using the encrypted key information as a block header.
Optionally, encrypting a key for decrypting the encrypted data by using a public key of a node user of the second blockchain includes: the first node inquires a user list sent from the second block chain, wherein the user list comprises user information of node users of the second block chain and corresponding public keys; and reading the public key in the user list and encrypting a key for decrypting the encrypted data by using the read public key.
Optionally, the first memory is further configured to provide the following instructions: the generated blocks are broadcast within a first block chain.
Furthermore, fig. 9 shows a data processing arrangement 900 according to the second aspect of the present embodiment applied to a blockchain node for a second node of a first blockchain, the arrangement 900 corresponding to the method according to the second aspect of the embodiment 1. Referring to fig. 9, the apparatus 900 includes: a second processor; and a second memory coupled to the second processor for providing instructions to the second processor to process the following processing steps: receiving a block broadcast by a first node of a first block chain, wherein the block of the block is generated by the first node encrypting data received from a second block chain; decrypting the encrypted key information contained in the block header of the block by using the private key stored in the second node to obtain a key for decrypting data; and decrypting the data in the block using the derived key.
Thus, according to this embodiment, a node of the first blockchain, upon receiving data from the second blockchain, encrypts the data and further encrypts the key to decrypt the data using the public key of the node user of the second blockchain. In this way it is thus ensured that data information of the node users of the second blockchain is not leaked by transmission to the first blockchain. Therefore, the technical problem that the data exchange between block chains easily causes the leakage of user secrets in the prior art is solved.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A data processing method applied to a blockchain node is characterized by comprising the following steps:
a first node of the first blockchain receives data from the second blockchain;
the first node encrypts the data to generate encrypted data;
the first node encrypts a key for decrypting the encrypted data by using a public key of a node user of the second blockchain, thereby generating encrypted key information; and
the first node generates a block corresponding to the received data using the encrypted data as a block body and using the encrypted key information as a block header.
2. The method of claim 1, wherein the first node encrypts a key for decrypting the encrypted data using a public key of a node user of the second blockchain, comprising:
the first node queries a user list sent from the second blockchain, wherein the user list contains user information of node users of the second blockchain and corresponding public keys; and
the first node reads a public key in the user list and encrypts the key for decrypting the encrypted data using the read public key.
3. The method of claim 1, further comprising broadcasting, by the first node, the generated tile within the first chain of tiles.
4. The method of claim 3, further comprising:
a second node of the first block chain receiving the block from the first node;
the second node decrypts the encrypted key information contained in the block header by using a private key stored in the second node to obtain the key for decrypting the encrypted data; and
the second node decrypts the encrypted data in the block using the derived key.
5. A data processing method applied to a blockchain node is characterized by comprising the following steps:
a second node of the first block chain receives a block broadcast by a first node of the first block chain, wherein the block of the block is generated by the first node encrypting data received from the second block chain;
the second node decrypts the encrypted key information contained in the block header of the block by using a private key stored in the second node to obtain a key for decrypting the data; and
the second node decrypts the data in the block using the derived key.
6. A storage medium comprising a stored program, wherein the method of any one of claims 1 to 5 is performed by a processor when the program is run.
7. A data processing apparatus for use with a blockchain node for a first node of a first blockchain, comprising:
a data receiving module, configured to receive data from the second block chain;
a first encryption module for encrypting the data to generate encrypted data;
a second encryption module, configured to encrypt a key used for decrypting the encrypted data by using a public key of a node user of the second blockchain, so as to generate encrypted key information; and
and the block generating module is used for generating a block corresponding to the received data by using the encrypted data as a block body and the encrypted key information as a block header.
8. A data processing apparatus for use with a blockchain node for a second node of a first blockchain, comprising:
a block receiving module, configured to receive a block broadcasted by a first node of the first block chain, where a block size of the block is generated by the first node encrypting data received from a second block chain;
the first decryption module is used for decrypting the encrypted key information contained in the block header of the block by using a private key stored in the second node to obtain a key for decrypting the data; and
a second decryption module for decrypting the data in the chunk using the obtained key.
9. A data processing apparatus for use with a blockchain node for a first node of a first blockchain, comprising:
a first processor; and
a first memory coupled to the first processor for providing instructions to the first processor to process the following process steps:
receiving data from the second blockchain;
encrypting the data, thereby generating encrypted data;
encrypting a key for decrypting the encrypted data by using a public key of a node user of the second blockchain, thereby generating encrypted key information; and
generating a block corresponding to the received data using the encrypted data as a block body and the encrypted key information as a block header.
10. A data processing apparatus for use with a blockchain node for a second node of a first blockchain, comprising:
a second processor; and
a second memory coupled to the second processor for providing instructions to the second processor to process the following process steps:
receiving a block broadcast by a first node of the first blockchain, wherein a blocky body of the block is generated by the first node encrypting data received from a second blockchain;
decrypting the encrypted key information contained in the block header of the block by using the private key stored in the second node to obtain a key for decrypting the data; and
decrypting the data in the block of data using the derived key.
CN201911222141.7A 2019-12-03 2019-12-03 Data processing method and device applied to blockchain node and storage medium Active CN112910633B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911222141.7A CN112910633B (en) 2019-12-03 2019-12-03 Data processing method and device applied to blockchain node and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911222141.7A CN112910633B (en) 2019-12-03 2019-12-03 Data processing method and device applied to blockchain node and storage medium

Publications (2)

Publication Number Publication Date
CN112910633A true CN112910633A (en) 2021-06-04
CN112910633B CN112910633B (en) 2023-05-23

Family

ID=76104060

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911222141.7A Active CN112910633B (en) 2019-12-03 2019-12-03 Data processing method and device applied to blockchain node and storage medium

Country Status (1)

Country Link
CN (1) CN112910633B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107294709A (en) * 2017-06-27 2017-10-24 阿里巴巴集团控股有限公司 A kind of block chain data processing method, apparatus and system
WO2018112940A1 (en) * 2016-12-23 2018-06-28 深圳前海达闼云端智能科技有限公司 Service execution method and device for blockchain node, and node device
CN108737430A (en) * 2018-05-25 2018-11-02 全链通有限公司 The encryption communication method and system of block chain node
CN109194487A (en) * 2018-09-13 2019-01-11 全链通有限公司 Construction method and system are traded or communicated to my real name based on block chain
CN109767325A (en) * 2018-12-13 2019-05-17 重庆金融资产交易所有限责任公司 Method of commerce, device and computer readable storage medium based on block chain
CN110176994A (en) * 2019-05-30 2019-08-27 全链通有限公司 Session cipher key distributing method, equipment and storage medium based on alliance's block chain

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018112940A1 (en) * 2016-12-23 2018-06-28 深圳前海达闼云端智能科技有限公司 Service execution method and device for blockchain node, and node device
CN107294709A (en) * 2017-06-27 2017-10-24 阿里巴巴集团控股有限公司 A kind of block chain data processing method, apparatus and system
CN108737430A (en) * 2018-05-25 2018-11-02 全链通有限公司 The encryption communication method and system of block chain node
CN109194487A (en) * 2018-09-13 2019-01-11 全链通有限公司 Construction method and system are traded or communicated to my real name based on block chain
CN109767325A (en) * 2018-12-13 2019-05-17 重庆金融资产交易所有限责任公司 Method of commerce, device and computer readable storage medium based on block chain
CN110176994A (en) * 2019-05-30 2019-08-27 全链通有限公司 Session cipher key distributing method, equipment and storage medium based on alliance's block chain

Also Published As

Publication number Publication date
CN112910633B (en) 2023-05-23

Similar Documents

Publication Publication Date Title
AU2005283195B2 (en) Method and apparatus for digital rights management
US11190499B2 (en) Communication terminals, server devices, and programs
CN110635912B (en) Data processing method and device
CN112822177B (en) Data transmission method, device, equipment and storage medium
CN108829539A (en) Data backup, data reconstruction method and equipment
US8638938B2 (en) Symmetric key subscription
CN112637300B (en) Block chain-based distributed storage and acquisition method and device for video information
CN112534790B (en) Encryption device, communication system and method for exchanging encrypted data in a communication network
GB2406246A (en) Secure Provision of Image Data
CN112910633B (en) Data processing method and device applied to blockchain node and storage medium
CN110598427A (en) Data processing method, system and storage medium
KR101992402B1 (en) Method for Protecting Personal Data Using Homomorphic Encryption
CN113452513B (en) Key distribution method, device and system
CN111464496B (en) Data transmission method, device, system, storage medium and electronic device
CN111343249A (en) Data sharing method and device based on block chain system and storage medium
CN111506913A (en) Audio encryption method and device, storage medium and electronic device
KR20000072516A (en) end-to-end data encryption/decryption method and device for mobile data communication
CN113452514A (en) Key distribution method, device and system
CN114285563B (en) Key generation method and device
CN114793160B (en) Encryption and decryption method and device for block chain system and storage medium
CN115632831A (en) Encryption and decryption method and device based on block chain system and storage medium
CN114386080A (en) Data encryption method and device based on block chain and storage medium
CN110297687B (en) Data interaction method, device and system based on virtual host
CN113987582A (en) RSA algorithm-based secret query method and system
CN109325354B (en) Data storage, processing and reading method, data storage device and system

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