Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of the present specification. Rather, they are merely examples of apparatus and methods consistent with aspects of one or more embodiments of the present description as detailed in the accompanying claims.
It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than described in this specification. Furthermore, individual steps described in this specification, in other embodiments, may be described as being split into multiple steps; while various steps described in this specification may be combined into a single step in other embodiments.
The block chain relay communication network is a backbone relay communication network created by adopting a relay technology. The backbone relay communication network can improve the stability and real-time performance of data transmission between the block chain nodes in the block chain network, and realize high-speed and safe interconnection between the block chain nodes in the block chain network.
In practical application, the blockchain relay communication network can be particularly suitable for various types of blockchain networks, including public chains, private chains, alliance chains and the like.
For example, blockchain relay communication networks applied to public chains mainly include Falcon, fast Bitcoin Relay Network (FBRN), FAST INTERNET Bitcoin RELAY ENGINE (FIBRE), etc., while blockchain relay communication networks applied to alliance chains mainly include BloXRoute, blockchain Transmission Network (BTN), etc.
The block chain nodes in the block chain network can be respectively connected with the relay nodes in the block chain relay communication network to realize interconnection, and the block chain data is transmitted through a special data transmission channel provided by the relay nodes in the block chain relay communication network.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating interaction between a blockchain node and a blockchain relay communication network according to an exemplary embodiment.
As shown in fig. 1, the blockchain relay communication network may include several relay nodes such as relay node 11, relay node 12, relay node 13, and relay node 14. The blockchain node in the blockchain network can establish a connection with a relay node in the blockchain relay communication network through a communication protocol supported by the blockchain network, and perform data communication with the relay node based on the connection.
It should be noted that, the relay node in the blockchain relay communication network may be a physical device or a logic device. For example, in one example, the blockchain relay communication network may be specifically a backbone communication network built based on a cloud processing platform, and in this case, the relay node may be specifically a virtual device that is created by virtualizing cloud processing resources on the cloud processing platform.
In practical application, the block link point may be specifically connected to a relay node in the block chain relay communication network through a gateway, and communicate with the relay node through the gateway.
Taking the example of the relay node 11 shown in fig. 1, the relay node 11 may be connected to a blockchain node 21 in a blockchain network through a gateway 101. Similarly, other relay nodes shown in fig. 1 may also be connected to other blockchain link points in the blockchain network.
The gateway 101 is specifically configured to assist the node blockchain 21 in accessing the blockchain relay communication network, where the gateway 101 is logically equivalent to a blockchain node in the blockchain network, but the gateway 101 itself does not participate in blockchain consensus, and does not affect the processes such as consensus in the blockchain network.
In practical applications, the gateway 101 may be essentially an adaptation program for accessing the blockchain relay communication network by the blockchain node 21, where the adaptation program may be deployed on the blockchain node 21, on the relay node 11, or in another device independent of the relay node 11 and the blockchain node 21, which is not limited in this specification.
In a blockchain network, a plurality of blockchain nodes can be specifically included, and communication operations such as consensus, transaction transmission, block synchronization and the like need to be realized among the blockchain nodes. In the related art, each blockchain node directly adopts a P2P (Peer to Peer) technology to communicate so as to transmit transaction data, block data, consensus data and the like, but the communication delay is high and the stability is poor due to various network factors, so that the application requirements cannot be met.
Thus, similar to the blockchain nodes 21 described above, each blockchain node may have access to a relay node in the blockchain relay communication network, respectively, such that the blockchain nodes may utilize dedicated data transmission channels provided by the blockchain relay communication network to transmit data such as transaction data, blockdata, consensus data, etc.
Because the block chain relay communication network is a backbone relay communication network for providing real-time transmission for each block chain link point in the block chain network, a special data transmission channel with high QoS guarantee and high-quality bandwidth can be provided among each relay node, and the block chain relay communication network takes over an intermediate link for communication among the block chain nodes, the communication time delay can be reduced, the stability can be improved, and the communication quality among the block chain nodes can be obviously improved.
In some scenarios, a one-to-many communication mode, multicast (multicast), may be required between node devices in a blockchain network. In this communication mode, at least some node devices in the blockchain network may form a multicast group (multicast group) in advance, and the node devices in the multicast group serving as multicast data sources may send multicast data to be sent to each node device in the multicast group in a multicast manner.
In order to ensure the data privacy security of the multicast data, the blockchain node serving as the multicast data source generally needs to encrypt the multicast data, and then send the encrypted multicast data to each node device in the multicast group in a multicast mode.
Referring to fig. 2, fig. 2 is a schematic diagram illustrating interaction between a blockchain node and a blockchain relay communication network according to another exemplary embodiment.
As shown in fig. 2, the blockchain relay communication network may include several relay nodes such as relay node 11, relay node 12, relay node 13, and so on. The blockchain node 21 may be connected to the relay node 11 in the blockchain relay communication network through a gateway (not shown in fig. 2). Accordingly, the blockchain node 22 may also be connected to the relay node 12 in the blockchain relay communication network through a gateway. And, the blockchain node 23 may also be connected to the relay node 13 in the blockchain relay communication network through a gateway.
Data may be transmitted between the blockchain node 21, the blockchain node 22, and the blockchain node 23 via dedicated data transmission channels provided by the blockchain relay communication network. The data transmission channel between the relay nodes in the blockchain relay communication network is usually an internal transmission channel provided by the blockchain relay communication network. The internal transmission channel provided by the blockchain relay communication network is usually a special data transmission channel with high QoS guarantee and high quality bandwidth.
In practical applications, blockchain node 21, blockchain node 22, and blockchain node 23 may all join a multicast group as multicast members. When the blockchain node 21 needs to send multicast data to the blockchain node 22 and the blockchain node 23 as a multicast data source, the multicast data can be encrypted based on a multicast key, and the encrypted multicast data is sent to a relay node 11 connected with the multicast data, and the relay node 11 performs multicast replication processing on the multicast data in a blockchain relay communication network to obtain a first data copy corresponding to the blockchain node 22 and a second data copy corresponding to the blockchain node 22; the first data copy is then sent to the relay node 12, and the relay node 12 continues to send the second data copy to the relay node 13, and the relay node 13 continues to send the second data copy to the blockchain node 23.
In practical applications, the multicast key used when the blockchain node as the multicast data source encrypts the multicast data is generally taken charge of generating and distributing by a centralized key management center.
Referring to fig. 3, fig. 3 is a schematic diagram illustrating encryption processing of multicast data according to the present disclosure.
As shown in fig. 3, for a blockchain node in a blockchain network that needs to join a multicast group, a digital certificate may first be applied to a CA authority. After the identity authentication of the block chain node is passed, the CA mechanism can issue a digital certificate for the block chain link point. In the digital certificate, public and private key pairs generated by the CA authority for the block link point may be included. And the blockchain node may store and maintain the digital certificate locally.
After the digital certificate is applied to the CA organization, the blockchain node which needs to be added into the multicast group can establish a secure connection with the key management center, and the digital certificate submitted by the CA organization and issued by the key management center is also submitted to the key management center. The blockchain node may submit the digital certificate to the key management center during the process of establishing the secure connection with the key management center, or may submit the digital certificate to the key management center based on the established secure connection after the secure connection is established, which is not particularly limited in the present specification.
For example, in one example, the secure connection may be an SSL connection. The blockchain node can carry local digital certificates in a handshake message and upload the digital certificates to the key management center in the process of carrying out SSL handshake with the key management center and establishing SSL connection.
After receiving the digital certificate submitted by the blockchain node, the key management center can also perform validity authentication on the digital certificate so as to determine whether the digital certificate is a legal digital certificate issued by a CA organization. For example, the digital certificate itself may carry a digital signature for the digital certificate submitted by the CA institution based on its private key, and the key management center may then authenticate the digital signature of the digital certificate based on the CA institution's public key; if the digital signature passes the authentication, it may indicate that the digital certificate is a legal digital certificate signed by the CA authority to the blockchain node.
In practical applications, each blockchain node in the multicast group may be used as a multicast data source to send multicast data to other blockchain nodes in the multicast group. For example, nodes 1-4 in the multicast group shown in fig. 2 may all serve as multicast data sources.
The blockchain node serving as the multicast data source may request the multicast key for encrypting the multicast data from the key management center through the secure connection. Wherein the multicast key is typically a symmetric encryption key. And the key management center can generate a multicast key for the block chain node after receiving the request of the block chain node through the secure connection, encrypt the multicast key based on the public key in the digital certificate of the block chain node, and send the encrypted multicast key to the block chain node through the secure connection. After receiving the encrypted multicast key, the blockchain node can decrypt the multicast key based on the private key in the digital certificate to obtain the plaintext content of the multicast key.
Accordingly, the key management center may distribute the multicast key to other blockchain nodes in the multicast group in the same manner except for the need of distributing the multicast key to the blockchain nodes, and the specific process is not repeated.
When the block chain node serving as a multicast data source sends multicast data to other block chain node devices in a multicast group, the multicast data can be encrypted by using the multicast key, and then the encrypted multicast data is sent to other block chain nodes in a multicast mode. After receiving the encrypted multicast data, other blockchain nodes can decrypt the multicast data based on the multicast key distributed by the key management center so as to obtain the plaintext content of the multicast data.
In the above technical solution, a centralized key management center is used to take charge of generating and distributing the key, and a centralized key management mode is still used in practice. The centralized key management method is not flexible for generating and distributing the multicast key, and the generated multicast key is also exposed to the risk of leakage.
In view of this, the present specification discloses a technical solution of autonomously generating a multicast key by a blockchain node in a multicast group as a multicast data source, and transmitting multicast data encrypted based on the autonomously generated multicast key in a multicast manner by using an accessed blockchain relay communication network.
When implemented, each blockchain node in the multicast group may pre-negotiate a key generation algorithm for generating the multicast key. When a first blockchain node serving as a multicast data source in a multicast group needs to send multicast data to other blockchain nodes in the multicast group, a multicast key can be locally and autonomously generated based on the negotiated key generation algorithm, and multicast data to be sent to each blockchain node in the multicast group is encrypted based on the multicast key; and then, sending the encrypted multicast data to other blockchain nodes in the multicast group in a multicast mode through an accessed blockchain relay communication network, so that the other blockchain nodes can decrypt the multicast data based on a decryption key corresponding to the multicast key acquired from the first blockchain node.
In the above technical solution, since the blockchain node in the multicast group as the multicast data source sends the encrypted multicast data to other blockchain links in the multicast group in a multicast manner through the accessed blockchain relay communication network, the multicast key used for encrypting the multicast data is a locally autonomous generated key of the multicast data source based on the key generation algorithm negotiated with other blockchain links in the multicast group, so the risk of key leakage faced by maintaining and distributing the multicast key through the key management center of the third party can be avoided, and the use security of the multicast key can be further improved.
Moreover, each blockchain node in the multicast group can play the role of a multicast data source; therefore, the block chain node serving as a multicast data source in the multicast group automatically generates the multicast key locally, so that personalized customization and decentralization management of the multicast key can be realized.
Fig. 4 is a flowchart of a blockchain-based multicast method provided by an exemplary embodiment. Wherein at least some of the blockchain nodes in the blockchain network join the multicast group; the method is applied to a first blockchain node (corresponding to blockchain node 21 shown in fig. 2) in the multicast group as a multicast data source. The method comprises the following steps:
Step 402, generating a multicast key locally based on a key generation algorithm negotiated by each block link point in the multicast group;
The multicast group may refer to at least a part of blockchain nodes in a blockchain network, and the multicast group is created based on a supported multicast protocol and is composed of a plurality of multicast members. Among them, the multicast protocol supported by each blockchain node is not particularly limited in the present specification. For example, in practical applications, the multicast protocol may specifically be an application layer multicast protocol, and the multicast group may also be an application layer multicast protocol.
The key generation algorithm for generating the multicast key may be negotiated between the various block link points joining the multicast group by communicating negotiation requests or messages to each other through the accessed blockchain relay communication network based on a supported negotiation mechanism (e.g., may be a negotiation protocol or a negotiation algorithm supported by the various block link points).
The negotiation mechanism supported by each blockchain node and the specific negotiation process corresponding to the negotiation mechanism are not particularly limited in the present specification.
In practical applications, interconnection between each block link point is typically implemented through a block chain relay communication network, and between each block chain node and a relay node in the block chain relay communication network, a data connection for transmitting data is typically required to be established based on a supported communication protocol. Most communication protocols have some negotiation mechanism. Thus, in some examples, each blockchain node may negotiate a key generation algorithm with other blockchain nodes using a negotiation mechanism that itself has with the self-supporting communication protocol.
For example, the communication protocol supported by each blockchain node and a relay node in the blockchain relay communication network may be the SSL protocol, which is itself a protocol for securely exchanging information between two parties establishing a connection with a negotiation mechanism. During the handshake phase of the SSL protocol, the parties establishing the connection may securely negotiate encryption algorithms, exchange encryption keys, and so on. Thus, the key generation algorithm can be negotiated between the block link points by using the negotiation mechanism of the SSL protocol, which is supported by the block link points, in the handshake stage of the SSL protocol.
Of course, the negotiation mechanism supported by each block link point in the multicast group may be a negotiation mechanism of the communication protocol supported by the multicast group, and in practical application, the negotiation mechanism may be a negotiation protocol or a negotiation algorithm independent of the communication protocol, which is not particularly limited in the present specification.
In the illustrated embodiment, to ensure that the negotiated key generation algorithm can be updated periodically, each blockchain node in the multicast group may specifically periodically negotiate the key generation algorithm based on a preset negotiation period. In this way, for each blockchain node in the multicast group, the key generation algorithm can be periodically renegotiated with other blockchain nodes in the multicast group based on the negotiation period to update the key generation algorithm that has been negotiated in the previous negotiation period.
In the illustrated embodiment, in order to implement versioning management for the negotiated key generation algorithm, each blockchain node in the multicast group may further set an independent version number for each negotiation period, so that multicast keys generated by the key generation algorithm negotiated based on different negotiation periods may correspond to different version numbers.
The specific manner of setting the version number for different negotiation periods is not particularly limited in this specification. For example, in one example, the version number generated for each negotiation period may specifically correspond to the timestamp range in which each negotiation period is located. For example, the time stamp of each negotiation period is directly used as a parameter to generate a unique version number for each negotiation period.
In this specification, when the first blockchain node serving as a multicast data source in the multicast group needs to send multicast data to other blockchain nodes in the multicast group, a multicast key can be generated locally and autonomously based on the negotiated key generation algorithm, and a decryption key corresponding to the generated multicast key can be distributed to the other blockchain nodes in the multicast group.
The key generation algorithm may be a symmetric key generation algorithm or an asymmetric key generation algorithm. Correspondingly, the multicast key can be a symmetric key generated based on a symmetric key generation algorithm, or can be a private key in a public-private key pair generated based on an asymmetric key generation algorithm. It will be appreciated that when the multicast key is a symmetric key generated based on a symmetric key generation algorithm, the decryption key is also the symmetric key; conversely, when the multicast key is a private key in a public-private key pair generated based on an asymmetric key generation algorithm, the decryption key may specifically be a public key in the public-private key pair.
In the illustrated embodiment, if the multicast key is a symmetric key, the key generation algorithm negotiated by each block link point in the multicast group may specifically include a symmetric key generation algorithm and an asymmetric key generation algorithm. The symmetric key generation algorithm is specifically used for generating a symmetric key as a multicast key. The asymmetric key generation algorithm is specifically configured to generate a public-private key pair for encrypting and decrypting the symmetric key as a multicast key. Each blockchain node in the multicast group can generate a symmetric key serving as a multicast key locally based on the negotiated symmetric key generation algorithm, and generate a public-private key pair for encrypting and decrypting the symmetric key serving as the multicast key locally based on the negotiated asymmetric key generation algorithm.
In this case, after the first blockchain node in the multicast group as the multicast data source generates the symmetric key as the multicast key locally and autonomously, other blockchain nodes in the multicast group may also acquire the public key in the public-private key pair generated locally based on the asymmetric key generation algorithm. For example, in one example, the first blockchain node may send public key acquisition requests to other blockchain nodes in the multicast group through an accessed blockchain relay communication network, respectively, and the other blockchain nodes may send public keys in the public-private key pairs generated locally to the first blockchain node through the accessed blockchain relay communication network after receiving the public key acquisition requests.
After the first blockchain node obtains the locally generated public keys of other blockchain nodes in the multicast group, the locally generated symmetric keys serving as the multicast keys can be respectively encrypted based on the obtained public keys, and then the encrypted symmetric keys serving as the multicast keys are respectively sent to the other blockchain nodes through the accessed blockchain relay communication network so as to complete autonomous distribution of the multicast keys. After each other blockchain node receives the encrypted symmetric key sent by the first blockchain node and used as the multicast key, the symmetric key used as the multicast key can be decrypted based on the private key in the public-private key pair which is independently generated locally to obtain the plaintext content of the symmetric key, and then the multicast data sent by the first blockchain node and encrypted based on the symmetric key can be decrypted based on the symmetric key.
In the illustrated embodiment, to ensure that the negotiated key generation algorithm can be updated periodically, each blockchain node in the multicast group may specifically periodically negotiate the key generation algorithm based on a preset negotiation period. In this way, for each blockchain node in the multicast group, the key generation algorithm can be periodically renegotiated with other blockchain nodes in the multicast group based on the negotiation period to update the key generation algorithm that has been negotiated in the previous negotiation period.
Step 404, encrypting the multicast data to be sent to each blockchain node in the multicast group based on the multicast key;
After distributing the locally generated multicast key to other blockchain nodes in the multicast group, the first blockchain node may encrypt the multicast data to be sent based on the locally autonomously generated multicast key. For example, when the multicast key is a symmetric key that is autonomously generated by the first block link point, the multicast data may be encrypted directly based on the symmetric key.
The multicast data may include any form of data that needs to be transmitted in a multicast form, and is not particularly limited in the present specification.
In one embodiment shown, the multicast data may specifically include one of two data shown below, or a combination of the two data:
First, the first block link point sends the block chain data of each block chain node in the multicast group.
It should be noted that, because the blockchain relay communication network may be only used for transmitting some blockchain data with high real-time performance and transmission quality requirements, the blockchain data with low real-time performance and transmission quality requirements is not usually transmitted through the blockchain relay communication network; therefore, the first blockchain link point sends blockchain data of each blockchain node in the multicast group, and the blockchain data specifically can include blockchain data with higher requirements on real-time performance and transmission quality.
For example, in one example, the blockchain data may specifically include three types of blockwork (block) data, transaction (transaction) data, and consensus data. Transaction data generally refers to transactions initiated by a blockchain client that require transmission between node devices in a blockchain network, and commonly processed by blockchain nodes in the blockchain network. The consensus data generally refers to data related to consensus interacted among all the blockchain nodes in the process of carrying out consensus processing on transactions by the blockchain nodes in the blockchain network; for example, the consensus data may include results of a consensus verification of the transaction in a consensus process, consensus results of the transaction by each blockchain node, consensus messages related to the consensus that are interacted between each blockchain node, and so on. The above-described blockdata is typically persisted in a blockchain ledger maintained commonly by blockchain nodes for data synchronization between blockchain nodes. For example, when a blockchain network newly joins a blockchain node, the newly joined blockchain node needs to synchronize the latest blockdata from the blockchain nodes that have joined the blockchain network.
Second, the application installed on the first blockchain node sends an application layer message to the application installed on each blockchain node in the multicast group.
The specific message type of the application layer message is not particularly limited in this specification, and depends on the specific service function provided by the application installed on the first blockchain node for the user in practical application.
And step 406, sending the encrypted multicast data to other blockchain nodes in the multicast group in a multicast mode through an accessed blockchain relay communication network, so that the other blockchain nodes decrypt the multicast data based on a decryption key corresponding to the multicast key acquired from the first blockchain node.
When the first block link point encrypts the multicast data based on the locally autonomous multicast key, the encrypted multicast data can be sent to other block chain nodes in the multicast group in a multicast mode through an accessed block chain relay communication network.
In one embodiment, after the first blockchain node distributes the locally generated multicast key to other blockchain nodes in the multicast group, respectively, as described above, the other blockchain nodes may also return a reception confirmation result for the multicast key to the first blockchain node through the accessed blockchain relay communication network.
In this case, after the first blockchain node completes encrypting the multicast data based on the locally autonomously generated multicast key, it may determine whether the reception acknowledgement result returned by other blockchain nodes is received; and if the receiving confirmation result returned by other block chain nodes is confirmed to be received, sending the encrypted multicast data to other block chain nodes in the multicast group in a multicast mode through an accessed block chain relay communication network.
In this way, after the first blockchain node determines that the other blockchain nodes in the multicast group have received the distributed decryption key, the encrypted multicast data are respectively sent to the other blockchain nodes, so that the situation that the other blockchain nodes cannot decrypt the received multicast data due to the lack of the decryption key can be avoided.
Of course, if the first blockchain node determines that only the receiving confirmation result returned by a part of blockchain nodes in other blockchain nodes is received, the locally generated decryption key corresponding to the multicast key may be redistributed to the part of blockchain nodes, and the specific distribution process is not repeated.
In the illustrated embodiment, when the first blockchain node sends the encrypted multicast data to other blockchain nodes in the multicast group through the accessed blockchain relay communication network, the first blockchain node may also send the encrypted multicast data to the other blockchain nodes in the multicast group in a multicast manner together with the version number corresponding to the multicast key used for encryption.
In this case, when the other blockchain nodes receive the encrypted multicast data, the other blockchain nodes may find a decryption key of the corresponding version based on the version number, and then decrypt the multicast data based on the decryption key corresponding to the version number.
In this way, each blockchain node can accurately manage the multicast key based on the version number.
In one embodiment, the relay node in the blockchain relay communication network may maintain a multicast member list corresponding to the multicast group locally. When the first blockchain node sends the encrypted multicast data to each blockchain node in the multicast group in a multicast mode through the accessed blockchain relay communication network, the encrypted multicast data can be sent to the first relay node connected with the first blockchain link point in the blockchain relay communication network.
And after receiving the encrypted multicast data, the first relay node may perform multicast replication processing on the encrypted multicast data according to the multicast member list maintained locally based on a supported multicast protocol, to obtain a data copy of the encrypted multicast data corresponding to each blockchain node (which may or may not include the first blockchain node) in the multicast member list. And then, each obtained data copy can be distributed to a second relay node connected with each block chain link point in the multicast member list in the relay communication network, and the second relay nodes continue to send the data copy of the encrypted multicast data to each block chain node connected with the second relay node in the multicast member list.
The specific type of the multicast protocol supported by the relay node in the blockchain relay communication network is not particularly limited in the present specification.
In one embodiment shown, the multicast protocol supported by the relay node in the blockchain relay communication network may be an application layer multicast protocol. The multicast replication process of the multicast data can be completed at the application level based on the application layer multicast protocol, and the conventional multicast replication process is usually completed on the route forwarding device. Therefore, the relay node can perform multicast replication processing on the multicast data at the application layer to obtain the data copy, so that the processing efficiency of the multicast replication processing can be improved.
In addition, because multicast replication of multicast data on the routing forwarding device is not needed based on the application layer multicast protocol, the routing forwarding device can be not deployed in the blockchain relay communication network, and therefore hardware deployment cost of the blockchain relay communication network can be remarkably reduced.
For example, in one example, the blockchain relay communication network may be a backbone communication network built based on a cloud processing platform, and the relay node may be a virtual device that is created by virtualizing cloud processing resources on the cloud processing platform. In this case, if the above-mentioned relay node supports the application layer multicast protocol, the routing forwarding device may not be deployed in the blockchain relay communication network, and then the blockchain relay communication network may be a pure virtual network which does not need any additional physical device as a support, except for the cloud processing platform, so that the hardware deployment cost may be significantly reduced.
Fig. 5 is a flowchart of a blockchain-based multicast method provided by an exemplary embodiment. Wherein at least some of the blockchain nodes in the blockchain network join the multicast group; the method is applied to a second blockchain node (corresponding to blockchain node 22 or 23 shown in fig. 2) in the multicast group as a multicast data recipient. The method comprises the following steps:
Step 502, obtaining multicast data encrypted based on a multicast key, which is sent in a multicast manner through an accessed blockchain relay communication network by a first blockchain node serving as a multicast data source in the multicast group; the multicast key is locally generated by the first block link point based on a key generation algorithm negotiated by each block link point in the multicast group;
Step 504 decrypts the multicast data based on a decryption key corresponding to the multicast key obtained from the first blockchain node.
The specific implementation details corresponding to the steps 502 and 504 are similar to those shown in the embodiment related to fig. 3, and will not be described in detail in this embodiment, and those skilled in the art may refer to the embodiment related to fig. 4 when the technical solution shown in fig. 4 is reduced.
Corresponding to the method embodiment described above, the present specification also provides an embodiment of a message transmission apparatus.
Fig. 6 is a schematic structural diagram of an electronic device according to an exemplary embodiment. Referring to fig. 6, at a hardware level, the electronic device includes a processor 602, an internal bus 604, a network interface 606, a memory 608, and a nonvolatile memory 610, and may include hardware required by other services. Processor 602 reads the corresponding computer program from nonvolatile memory 610 into memory 608 and then runs to form a blockchain-based multicast device at a logical level. Of course, in addition to software implementation, one or more embodiments of the present disclosure do not exclude other implementation manners, such as a logic device or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but may also be hardware or a logic device.
Referring to fig. 7, in a software implementation, the blockchain-based multicasting apparatus may be applied to a first blockchain node in a blockchain network as a multicast data source; the method may include:
the generation module 71 generates a multicast key locally based on a key generation algorithm negotiated by each block link point in the multicast group;
an encryption module 72 that encrypts multicast data to be transmitted to each blockchain node in the multicast group based on the multicast key;
the sending module 73 sends the encrypted multicast data to other blockchain nodes in the multicast group in a multicast manner through the accessed blockchain relay communication network, so that the other blockchain nodes decrypt the multicast data based on a decryption key corresponding to the multicast key acquired from the first blockchain node.
Optionally, the multicast key comprises a symmetric key.
Optionally, the key generation algorithm includes a symmetric key generation algorithm and an asymmetric key generation algorithm; each blockchain node in the multicast group generates a symmetric key serving as the multicast key locally based on the negotiated symmetric key generation algorithm, and generates a public-private key pair for encrypting and decrypting the symmetric key locally based on the asymmetric key generation algorithm;
The sending module 73:
Before sending the encrypted multicast data to other blockchain nodes in the multicast group in a multicast mode through an accessed blockchain relay communication network, acquiring the other blockchain nodes in the multicast group, and locally generating public keys in the public-private key pair based on the asymmetric key generation algorithm;
And encrypting the symmetric key which is locally generated based on the symmetric key generation algorithm based on the public key, and sending the encrypted symmetric key to other blockchain nodes in the multicast group through an accessed blockchain relay communication network so that the other blockchain nodes decrypt the symmetric key based on the private key in the locally generated public-private key pair to obtain the plaintext content of the symmetric key.
Optionally, the sending module 73:
Receiving a receiving confirmation result for the symmetric key, which is returned by other blockchain nodes in the multicast group through the accessed blockchain relay communication network;
Determining whether a reception confirmation result of other blockchain nodes in the multicast group for the symmetric encryption key is received; and if so, further transmitting the encrypted multicast data to other blockchain nodes in the multicast group in a multicast mode through an accessed blockchain relay communication network.
Optionally, the sending module 73:
And sending the encrypted multicast data and version numbers corresponding to the multicast keys to other blockchain nodes in the multicast group in a multicast mode through an accessed blockchain relay communication network, so that the other blockchain nodes decrypt the multicast data based on decryption keys corresponding to the version numbers acquired from the first blockchain node.
Optionally, the key generation algorithm is a key generation algorithm periodically negotiated based on a preset negotiation period by each blockchain node in the multicast group.
Optionally, the multicast keys generated by the key generation algorithm negotiated based on different negotiation periods correspond to different version numbers respectively.
Optionally, the version number corresponds to a timestamp range where the negotiation period is located.
Optionally, the relay node in the blockchain relay communication network maintains the multicast member corresponding to the multicast group locally;
The sending module 73:
And sending the encrypted multicast data to a first relay node connected with the first block link point in the block chain relay communication network, performing multicast copying processing on the encrypted multicast data by the first relay node based on a supported multicast protocol to obtain data copies of the encrypted multicast data corresponding to each block link point in the multicast member list, respectively distributing the obtained data copies of the encrypted multicast data to a second relay node connected with each block link point in the multicast member list in the block chain relay communication network, and continuously sending the received data copies of the encrypted multicast data to each block chain node in the multicast member list by the second relay node.
Optionally, the multicast protocol supported by the relay node in the blockchain relay communication network is an application layer multicast protocol; the multicast replication process includes a multicast replication process at an application layer.
Optionally, the multicast data includes:
The first blockchain link point sends blockchain data of each blockchain node in the multicast group; and/or the number of the groups of groups,
And the application installed on the first blockchain node sends an application layer message to the application installed on each blockchain node in the multicast group.
Referring to fig. 8, in another software implementation, the blockchain-based multicasting apparatus may be used for a second blockchain node in a blockchain network as a multicast data recipient; may include:
The obtaining module 81 obtains multicast data encrypted based on a multicast key, which is sent in a multicast manner through an accessed blockchain relay communication network by a first blockchain node serving as a multicast data source in the multicast group; the multicast key is locally generated by the first block link point based on a key generation algorithm negotiated by each block link point in the multicast group;
the decryption module 82 decrypts the multicast data based on a decryption key corresponding to the multicast key obtained from the first blockchain node.
Optionally, the multicast key comprises a symmetric encryption key.
Optionally, the key generation algorithm includes a symmetric key generation algorithm and an asymmetric key generation algorithm; each blockchain node in the multicast group generates a symmetric encryption key serving as the multicast key locally based on the negotiated symmetric key generation algorithm, and generates a public and private key pair for encrypting and decrypting the symmetric encryption key locally based on the asymmetric key generation algorithm;
the acquisition module 81:
Before the first blockchain node serving as a multicast data source in the multicast group is obtained, the public and private key pair is locally generated based on the asymmetric key generation algorithm before multicast data which is sent in a multicast mode and is encrypted based on a multicast key is transmitted through an accessed blockchain relay communication network; transmitting the generated public key of the public-private key pair to the first blockchain node serving as a multicast data source, so that the first blockchain node encrypts the symmetric encryption key serving as the multicast key locally generated by the symmetric key generation algorithm based on the public key; and receiving the symmetric encryption key which is transmitted by the first blockchain node and is encrypted based on the public key and serves as a multicast key through an accessed blockchain relay communication network, decrypting the symmetric encryption key based on a private key in the public-private key pair, and obtaining plaintext content of the symmetric encryption key.
Optionally, the key generation algorithm is a key generation algorithm periodically negotiated based on a preset negotiation period by each blockchain node in the multicast group.
Optionally, the multicast data includes:
The target block link point sends block chain data of each block chain node in the multicast group; and/or the number of the groups of groups,
And the application installed on the target blockchain node sends an application layer message to the application installed on each blockchain node in the multicast group.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or a combination of any of these devices.
In a typical configuration, a computer includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, read only compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by the computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The terminology used in the one or more embodiments of the specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the specification. As used in this specification, one or more embodiments and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in one or more embodiments of the present description to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "in response to a determination" depending on the context.
The foregoing description of the preferred embodiment(s) is (are) merely intended to illustrate the embodiment(s) of the present invention, and it is not intended to limit the embodiment(s) of the present invention to the particular embodiment(s) described.