CN111586008A - A block chain message management method, node device and block chain node system - Google Patents
A block chain message management method, node device and block chain node system Download PDFInfo
- Publication number
- CN111586008A CN111586008A CN202010355269.7A CN202010355269A CN111586008A CN 111586008 A CN111586008 A CN 111586008A CN 202010355269 A CN202010355269 A CN 202010355269A CN 111586008 A CN111586008 A CN 111586008A
- Authority
- CN
- China
- Prior art keywords
- message
- difference
- encrypted
- node
- public
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000007726 management method Methods 0.000 title claims abstract description 23
- 238000000034 method Methods 0.000 claims description 33
- 238000012795 verification Methods 0.000 claims description 7
- 230000015572 biosynthetic process Effects 0.000 abstract description 7
- 238000003786 synthesis reaction Methods 0.000 abstract description 7
- 239000000284 extract Substances 0.000 description 4
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 101150080685 ska1 gene Proteins 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network 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/0442—Network 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3247—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/50—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Storage Device Security (AREA)
Abstract
本发明提供一种区块链消息管理方法,包括:针对每个目标节点的节点标识,将该目标节点的节点标识以水印方式嵌入至待发布消息中,得到带水印待发布消息;提取各带水印待发布消息的公共部分和差异部分,分别记为公共消息和差异消息;利用预设加密密钥对公共消息进行加密,得到加密公共消息;针对每个所述差异消息,利用该差异消息所对应的目标节点的公钥对包括有该差异消息和预设加密密钥的差异综合消息进行加密,得到加密差异消息;向区块链发布所述加密公共消息和全部所述加密差异消息。本发明还提供一种节点设备和区块链节点系统。
The present invention provides a block chain message management method, comprising: for the node identifier of each target node, embedding the node identifier of the target node in a message to be published in a watermark manner to obtain a message to be published with a watermark; The public part and the difference part of the message to be published in the watermark are respectively recorded as the public message and the difference message; the public message is encrypted by using the preset encryption key to obtain the encrypted public message; for each of the difference messages, the difference message is used for each difference message. The public key of the corresponding target node encrypts the differential synthesis message including the differential message and the preset encryption key to obtain an encrypted differential message; and publishes the encrypted public message and all the encrypted differential messages to the blockchain. The present invention also provides a node device and a blockchain node system.
Description
技术领域technical field
本发明涉及通信技术领域,具体涉及一种区块链消息管理方法、节点设备及区块链节点系统。The invention relates to the field of communication technologies, in particular to a block chain message management method, node device and block chain node system.
背景技术Background technique
区块链中的节点在区块链中向目标群组节点发布保密信息时,通常只希望该信息在该目标群组内共享,而不希望非群组人员看到该信息。现有技术中,信息发布节点可以利用目标群组内每个用户在区块链分享的公钥来对待发布的保密信息进行加密,进而将加密后的信息和各公钥对应的用户标识发布在区块链上,从而使区块链中对应的用户利用自己的私钥解密自身对应的加密后的信息而获取到保密信息,而区块链中非目标群组内的用户因个人私钥未与加密后信息的公钥对应,因而无法对加密后信息进行解密,从而无法获取到保密信息,该方法可保证保密信息在区块链中的安全性。然而,具有解密权限的用户单方面可将解密后的信息通过拷贝发送给其他人,这将导致保密信息被泄漏,现有技术中由于难以追查泄密者,而导致泄密成本很低,从而加剧了泄密的风险;另外,当目标群组中的用户数量较多时,区块链中将存储多个加密后的信息,从而导致区块链的有效空间被过量占用。When nodes in the blockchain publish confidential information to target group nodes in the blockchain, they usually only want the information to be shared within the target group, and do not want non-group personnel to see the information. In the prior art, the information publishing node can use the public key shared by each user in the target group in the blockchain to encrypt the confidential information to be published, and then publish the encrypted information and the user ID corresponding to each public key in the block chain. On the blockchain, the corresponding users in the blockchain can use their private keys to decrypt their corresponding encrypted information to obtain confidential information, while users in non-target groups in the blockchain can use their private keys to decrypt their own encrypted information to obtain confidential information. Corresponding to the public key of the encrypted information, the encrypted information cannot be decrypted, so that the confidential information cannot be obtained. This method can ensure the security of the confidential information in the blockchain. However, a user with decryption authority can unilaterally send the decrypted information to others by copying, which will lead to the leakage of confidential information. In the prior art, it is difficult to trace the leaker, resulting in a very low cost of leaking, which exacerbates the The risk of leakage; in addition, when the number of users in the target group is large, multiple encrypted information will be stored in the blockchain, resulting in excessive occupation of the effective space of the blockchain.
发明内容SUMMARY OF THE INVENTION
本发明旨在至少解决现有技术中存在的技术问题之一,提出了一种区块链消息管理方法、节点设备及区块链节点系统,用以解决现有技术中存在的区块链消息泄密风险高及过分占用区块链空间的问题。The present invention aims to solve at least one of the technical problems existing in the prior art, and proposes a block chain message management method, node device and block chain node system to solve the block chain message existing in the prior art The problem of high leakage risk and excessive occupation of blockchain space.
第一方面,本发明提供一种区块链消息管理方法,包括:In a first aspect, the present invention provides a blockchain message management method, including:
针对每个目标节点的节点标识,将该目标节点的节点标识以水印方式嵌入至待发布消息中,得到带水印待发布消息;For the node identification of each target node, the node identification of the target node is embedded in the message to be published in the form of a watermark, so as to obtain a message to be published with a watermark;
提取各带水印待发布消息的公共部分和差异部分,分别记为公共消息和差异消息;Extract the common part and difference part of each watermarked message to be published, and record it as public message and difference message respectively;
利用预设加密密钥对所述公共消息进行加密,得到加密公共消息;Encrypt the public message with a preset encryption key to obtain an encrypted public message;
针对每个所述差异消息,利用该差异消息所对应的目标节点的公钥对包括有该差异消息和所述预设加密密钥的差异综合消息进行加密,得到加密差异消息;For each difference message, encrypt the difference synthesis message including the difference message and the preset encryption key by using the public key of the target node corresponding to the difference message to obtain an encrypted difference message;
向区块链发布所述加密公共消息和全部所述加密差异消息。The encrypted public message and all of the encrypted difference messages are published to the blockchain.
优选的,在所述将所述加密公共消息和各所述加密差异消息发布至区块链中的步骤之前,还包括:Preferably, before the step of publishing the encrypted public message and each of the encrypted difference messages to the blockchain, the method further includes:
利用自身私钥对加密公共消息和各加密差异信息添加签名。Use its own private key to add a signature to the encrypted public message and each encrypted difference information.
优选的,在所述针对每个目标节点的节点标识,将该目标节点的节点标识以水印方式嵌入至待发布消息中的步骤之前,还包括:Preferably, before the step of embedding the node identifier of the target node into the message to be published in the form of a watermark for the node identifier of each target node, the method further includes:
获取各目标节点的节点标识。Get the node ID of each target node.
优选的,所述水印方式包括隐藏水印方式和显性水印方式中的任意一种。Preferably, the watermarking method includes any one of a hidden watermarking method and an explicit watermarking method.
优选的,所述水印方式的水印算法包括:空域算法、变换域算法、小波域算法和超小波域算法。Preferably, the watermarking algorithm in the watermarking manner includes: a spatial domain algorithm, a transform domain algorithm, a wavelet domain algorithm and a superwavelet domain algorithm.
第二方面,本发明还提供一种区块链消息管理方法,包括:In a second aspect, the present invention also provides a block chain message management method, including:
通过区块链接收加密公共消息和全部加密差异消息;Receive encrypted public messages and all encrypted differential messages via the blockchain;
根据自身私钥对其中一个所述加密差异消息进行解密,以获得自身所对应的差异消息和预设加密密钥;Decrypt one of the encrypted difference messages according to its own private key to obtain its own corresponding difference message and a preset encryption key;
利用所述预设加密密钥对所述加密公共消息进行解密,以得到解密后的公共消息;Decrypt the encrypted public message using the preset encryption key to obtain the decrypted public message;
根据所述公共消息和所获得的差异消息得到消息发布节点的待发布消息。The to-be-published message of the message publishing node is obtained according to the common message and the obtained difference message.
优选的,在所述根据自身私钥对其中一个所述加密差异消息进行解密,以获得自身所对应的差异消息和预设加密密钥的步骤之前,还包括:Preferably, before the step of decrypting one of the encrypted difference messages according to the own private key to obtain the difference message corresponding to the self and the preset encryption key, the method further includes:
获取消息发布节点的公钥,并利用所述公钥对所述加密公共消息和全部加密差异消息进行签名验证。The public key of the message publishing node is obtained, and the public key is used to perform signature verification on the encrypted public message and all encrypted differential messages.
第三方面,本发明还提供一种节点设备,包括:In a third aspect, the present invention also provides a node device, including:
一个或多个处理器;one or more processors;
第一存储装置,其上存储有一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现本发明第一方面所提供的区块链消息管理方法。A first storage device on which one or more programs are stored, when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the first aspect of the invention. Provided blockchain message management method.
第四方面,本发明还提供一种节点设备,包括:In a fourth aspect, the present invention also provides a node device, including:
一个或多个处理器;one or more processors;
第二存储装置,其上存储有一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现本发明第一方面所提供的区块链消息管理方法。A second storage device having one or more programs stored thereon that, when executed by the one or more processors, cause the one or more processors to implement the first aspect of the present invention. Provided blockchain message management method.
第五方面,本发明还提供一种区块链节点系统,其包括:本发明第三方面和第四方面所提供的节点设备。In a fifth aspect, the present invention further provides a blockchain node system, which includes: the node devices provided in the third and fourth aspects of the present invention.
本发明的有益技术效果:Beneficial technical effects of the present invention:
本发明提供的区块链消息管理方法、节点设备及区块链节点系统,消息发布节点将目标节点的节点标识以水印方式嵌入至待发布消息中,提取各带水印待发布消息的公共部分和差异部分,利用预设加密密钥对公共消息进行加密,利用目标节点的公钥对差异部分和预设加密密钥进行加密,将加密后的公共部分和加密后的差异部分发送至区块链中,目标节点通过组合公共部分和差异部分而得到完整的待发布消息,且该完整的待发布消息携带有该目标节点的节点标识水印。相较于现有技术,本发明中由于目标节点获取到的待发布消息中携带有自身节点标识的水印,因而当目标节点泄密时,可对目标节点进行便捷追踪,从而大大降低了目标节点泄密的风险;同时,由于区块链中保存的是各待发布消息的公共部分和差异部分,因而降低了对区块链有效空间的占用。In the blockchain message management method, node device and blockchain node system provided by the present invention, the message publishing node embeds the node identification of the target node in the message to be published in the form of a watermark, and extracts the public part and For the difference part, use the preset encryption key to encrypt the public message, use the public key of the target node to encrypt the difference part and the preset encryption key, and send the encrypted public part and the encrypted difference part to the blockchain , the target node obtains a complete message to be published by combining the common part and the difference part, and the complete message to be published carries the node identification watermark of the target node. Compared with the prior art, in the present invention, since the message to be published obtained by the target node carries the watermark of its own node identification, when the target node leaks the secret, the target node can be tracked conveniently, thereby greatly reducing the leakage of the target node. At the same time, because the public part and the difference part of each message to be published are stored in the blockchain, the occupation of the effective space of the blockchain is reduced.
附图说明Description of drawings
图1为本发明实施例一提供的一种区块链消息管理方法的流程图;FIG. 1 is a flowchart of a blockchain message management method provided in Embodiment 1 of the present invention;
图2为本发明实施例二提供的一种区块链消息管理方法的流程图;FIG. 2 is a flowchart of a blockchain message management method provided in Embodiment 2 of the present invention;
图3为本发明实施例三提供的一种区块链消息管理方法的流程图;3 is a flowchart of a method for managing a blockchain message according to Embodiment 3 of the present invention;
图4为本发明实施例四提供的一种区块链消息管理方法的流程图;FIG. 4 is a flowchart of a blockchain message management method provided in Embodiment 4 of the present invention;
图5为本发明实施例五提供的一种区块链消息管理方法的流程图。FIG. 5 is a flowchart of a method for managing blockchain messages according to Embodiment 5 of the present invention.
具体实施方式Detailed ways
为使本领域的技术人员更好地理解本发明的技术方案,下面结合附图来对本发明提供的区块链消息管理方法、节点设备及区块链节点系统进行详细描述。In order for those skilled in the art to better understand the technical solutions of the present invention, the block chain message management method, node device and block chain node system provided by the present invention are described in detail below with reference to the accompanying drawings.
本发明提供的区块链消息管理方法,涉及区块链消息加密部分和区块链消息解密部分,下面将分别对区块链消息加密部分和区块链消息解密部分进行描述。The block chain message management method provided by the present invention involves a block chain message encryption part and a block chain message decryption part, and the block chain message encryption part and the block chain message decryption part will be described below respectively.
实施例一Example 1
图1为本发明实施例一提供的一种区块链消息管理方法的流程图,如图1所示,该方法包括:Fig. 1 is a flowchart of a method for managing blockchain messages according to Embodiment 1 of the present invention. As shown in Fig. 1 , the method includes:
步骤S101、针对每个目标节点的节点标识,将该目标节点的节点标识以水印方式嵌入至待发布消息中,得到带水印待发布消息。Step S101: For the node identifier of each target node, embed the node identifier of the target node into the message to be published in a watermark manner to obtain a message to be published with a watermark.
本发明中,目标节点为区块链群组中将要接收待发布消息的节点,每个目标节点对应一个带水印待发布消息。In the present invention, the target node is a node in the blockchain group that will receive the message to be published, and each target node corresponds to a message to be published with a watermark.
步骤S102、提取各带水印待发布消息的公共部分和差异部分,分别记为公共消息和差异消息。Step S102, extracting the common part and the difference part of each watermarked message to be published, and denoting it as the common message and the difference message respectively.
步骤S103、利用预设加密密钥对公共消息进行加密,得到加密公共消息。Step S103: Encrypt the public message by using a preset encryption key to obtain an encrypted public message.
步骤S104、针对每个差异消息,利用该差异消息所对应的目标节点的公钥对包括有该差异消息和预设加密密钥的差异综合消息进行加密,得到加密差异消息。Step S104: For each difference message, encrypt the difference synthesis message including the difference message and the preset encryption key by using the public key of the target node corresponding to the difference message to obtain an encrypted difference message.
步骤S105、向区块链发布加密公共消息和全部加密差异消息。Step S105: Publish the encrypted public message and all encrypted difference messages to the blockchain.
本发明提供的区块链消息管理方法,将目标节点的节点标识以水印方式嵌入至待发布消息中,提取各带水印待发布消息的公共部分和差异部分,利用预设加密密钥对公共消息进行加密,利用目标节点的公钥对差异部分和预设加密密钥进行加密,将加密后的公共部分和加密后的差异部分发送至区块链中,目标节点通过组合公共部分和差异部分而得到完整的待发布消息,且该完整的待发布消息携带有该目标节点的节点标识水印。相较于现有技术,本发明中由于目标节点获取到的待发布消息中携带有自身节点标识的水印,因而当目标节点泄密时,可对目标节点进行便捷追踪,从而大大降低了目标节点泄密的风险;同时,由于区块链中保存的是各待发布消息的公共部分和差异部分,因而降低了对区块链有效空间的占用。In the blockchain message management method provided by the present invention, the node identification of the target node is embedded in the message to be published in the form of a watermark, the public part and the difference part of each watermarked message to be published are extracted, and the public message is encrypted by using a preset encryption key. Encrypt, use the public key of the target node to encrypt the difference part and the preset encryption key, and send the encrypted public part and the encrypted difference part to the blockchain. A complete message to be published is obtained, and the complete message to be published carries the node identification watermark of the target node. Compared with the prior art, in the present invention, since the message to be published obtained by the target node carries the watermark of its own node identification, when the target node leaks the secret, the target node can be tracked conveniently, thereby greatly reducing the leakage of the target node. At the same time, because the public part and the difference part of each message to be published are stored in the blockchain, the occupation of the effective space of the blockchain is reduced.
实施例二Embodiment 2
图为本发明实施例二提供的一种区块链消息管理方法的流程图,如图2所示,该方法包括:The figure is a flowchart of a blockchain message management method provided in Embodiment 2 of the present invention. As shown in Figure 2, the method includes:
步骤S201、获取各目标节点的节点标识。Step S201 , acquiring node identifiers of each target node.
目标节点为区块链群组中将要接收待发布消息的节点,当消息发布节点需要定向发布消息时,其首先获取目标节点的节点标识。具体地,消息发布节点可通过查询区块链存储区域而获取各目标节点的节点标识。The target node is the node in the blockchain group that will receive the message to be published. When the message publishing node needs to publish the message in a targeted manner, it first obtains the node identifier of the target node. Specifically, the message publishing node can obtain the node identifier of each target node by querying the blockchain storage area.
步骤S202、针对每个目标节点的节点标识,将该目标节点的节点标识以水印方式嵌入至待发布消息中,得到带水印待发布消息。Step S202: For the node identifier of each target node, embed the node identifier of the target node into the message to be published in a watermark manner to obtain a message to be published with a watermark.
在获取到目标节点的标识后,将每个目标节点的节点标识以水印方式嵌入至每个待发布消息中,得到带水印待发布消息,其中,带水印待发布消息的数量与目标节点的数量相同。After the identification of the target node is obtained, the node identification of each target node is embedded in each message to be published in the form of a watermark to obtain a message to be published with a watermark, wherein the number of messages to be published with a watermark and the number of target nodes same.
本发明中,水印方式可包括隐藏水印方式和显性水印方式中的任意一种。具体的,水印方式可采用多种水印算法实现,例如,空域算法、变换域算法、小波域算法及超小波域算法等。本发明不对水印算法做具体限定。In the present invention, the watermarking method may include any one of a hidden watermarking method and an explicit watermarking method. Specifically, the watermarking method can be implemented by using a variety of watermarking algorithms, for example, a spatial domain algorithm, a transform domain algorithm, a wavelet domain algorithm, and a superwavelet domain algorithm. The present invention does not specifically limit the watermarking algorithm.
步骤S203、提取各带水印待发布消息的公共部分和差异部分,分别记为公共消息和差异消息。Step S203, extracting the common part and the difference part of each watermarked message to be published, and denoting it as the common message and the difference message respectively.
各待发布消息由于嵌入不同的节点标识而具有相同的部分和不同的部分,通过将各带水印待发布消息进行对比而提取出其公共部分和差异部分,其中,公共部分记为公共消息,差异部分记为差异消息。Each message to be published has the same part and different part due to the embedding of different node identifiers. By comparing the watermarked messages to be published, the common part and the difference part are extracted. The common part is recorded as the public message, and the difference is Parts are recorded as difference messages.
步骤S204、利用预设加密密钥对公共消息进行加密,以得到加密公共消息。Step S204: Encrypt the public message by using a preset encryption key to obtain an encrypted public message.
本发明中,当公共消息占待发布消息的比例较大时,公共消息容易泄露出待发布消息,此时,利用预设加密密钥对公共消息进行加密,从而保证待发布消息的信息安全性。In the present invention, when the public message accounts for a large proportion of the message to be published, the public message is prone to leak the message to be published. At this time, the public message is encrypted by using a preset encryption key, thereby ensuring the information security of the message to be published. .
当然,在一些实施例中,当公共消息不能表现出待发布消息时,此时无需对公共消息进行加密,即可省略步骤S204。Of course, in some embodiments, when the public message cannot represent the message to be published, the public message does not need to be encrypted at this time, and step S204 can be omitted.
步骤S205、针对每个差异消息,利用该差异消息所对应的目标节点的公钥对包括有该差异消息和预设加密密钥的差异综合消息进行加密,得到加密差异消息。Step S205: For each difference message, encrypt the difference synthesis message including the difference message and the preset encryption key by using the public key of the target node corresponding to the difference message to obtain an encrypted difference message.
本发明中,当利用预设加密密钥对公共消息进行加密时,在对差异消息进行加密时,需要对差异消息和预设加密密钥同时进行加密,即,先将差异消息和预设加密密钥进行组合形成差异综合消息,然后利用每个差异消息对应的目标节点的公钥对差异综合消息进行加密。其中,差异消息由于是从带水印待发布消息中提取出来的,因而,差异消息是与目标节点对应的,目标节点的公钥可通过查询区块链存储区域获取。In the present invention, when using the preset encryption key to encrypt the public message, when encrypting the difference message, the difference message and the preset encryption key need to be encrypted at the same time, that is, the difference message and the preset encryption key are encrypted first. The keys are combined to form a differential synthesis message, and then the differential synthesis message is encrypted by using the public key of the target node corresponding to each differential message. Among them, since the difference message is extracted from the message to be published with a watermark, the difference message corresponds to the target node, and the public key of the target node can be obtained by querying the blockchain storage area.
需要说明的是,本实施例中,步骤S204和步骤S205可同步执行也可顺序执行,且不限定二者的先后执行顺序,只要能对公共消息和差异消息进行加密即可。图2仅示出了其中一种实施方式,其不对本发明起限定作用。It should be noted that, in this embodiment, step S204 and step S205 may be executed synchronously or sequentially, and the sequence of execution of the two is not limited, as long as the common message and the difference message can be encrypted. FIG. 2 only shows one of the embodiments, which does not limit the present invention.
步骤S206、利用自身私钥对加密公共消息和各加密差异信息添加签名。Step S206, adding a signature to the encrypted public message and each encrypted difference information by using its own private key.
在对公共消息和加密差异信息进行发布之前,利用自身私钥对公共消息和各加密差异信息添加签名,以对消息发布节点的身份进行验证。Before publishing the public message and encrypted difference information, use its own private key to add a signature to the public message and each encrypted difference information to verify the identity of the message publishing node.
步骤S207、向区块链发布完成加密公共消息和全部加密差异消息。Step S207, publishing the completed encrypted public message and all encrypted difference messages to the blockchain.
实施例三Embodiment 3
图3为本发明实施例三提供的一种区块链消息管理方法的流程图,该方法以上述实施例中涉及的目标节点作为执行主体,如图3所示,该方法包括:FIG. 3 is a flowchart of a method for managing a blockchain message provided in Embodiment 3 of the present invention. The method uses the target node involved in the above embodiment as an execution body. As shown in FIG. 3 , the method includes:
步骤S301、通过区块链接收加密公共消息和全部加密差异消息。Step S301: Receive the encrypted public message and all encrypted difference messages through the blockchain.
目标节点基于区块链接收消息发布节点发布的包含加密公共消息和各加密差异消息的广播消息。The target node receives the broadcast message containing the encrypted public message and each encrypted difference message published by the message publishing node based on the blockchain.
步骤S302、根据自身私钥对其中一个加密差异消息进行解密,以获得自身所对应的差异消息和预设加密密钥。Step S302: Decrypt one of the encrypted difference messages according to the own private key to obtain the difference message corresponding to the self and the preset encryption key.
本发明中,目标节点在接收到消息发布节点的广播消息后,利用自身私钥对各加密差异消息依次进行解密,当自身私钥能够对某一加密差异消息解密成功时,则说明该加密差异消息即为自身对应的差异消息,通过私钥解密而获取到自身对应的差异消息和预设加密密钥。In the present invention, after receiving the broadcast message of the message publishing node, the target node uses its own private key to decrypt each encrypted difference message in turn, and when its own private key can successfully decrypt a certain encrypted difference message, it means the encrypted difference message The message is the difference message corresponding to itself, and the corresponding difference message and the preset encryption key are obtained by decrypting the private key.
本实施例中,由于目标节点仅需要对加密差异消息进行解密,相较于现有技术,避免了对整体的待发布消息进行解密,从而提升了解密效率。In this embodiment, since the target node only needs to decrypt the encrypted difference message, compared with the prior art, the decryption of the entire message to be published is avoided, thereby improving the decryption efficiency.
步骤S303、利用预设加密密钥对公共消息进行解密,以得到解密后的公共消息。Step S303: Decrypt the public message by using the preset encryption key to obtain the decrypted public message.
目标节点利用解密加密差异消息获取的预设加密密钥对加密公共消息进行解密,而获取到解密后的公共消息。The target node decrypts the encrypted public message by using the preset encryption key obtained by decrypting the encrypted difference message, and obtains the decrypted public message.
步骤S304、根据公共消息和所获得的差异消息得到消息发布节点的待发布消息。Step S304: Obtain the message to be published of the message publishing node according to the common message and the obtained difference message.
目标节点将公共消息和所获得的差异消息进行组合得到消息发布节点的待发布消息,并且该待发布消息中嵌入有该目标节点自身的节点标识水印。The target node combines the public message and the obtained difference message to obtain the message to be published of the message publishing node, and the message to be published is embedded with the node identification watermark of the target node itself.
本实施例提供的区块链消息管理方法,目标节点接收消息发布节点的广播消息后,通过自身私钥对加密差异消息进行解密以获取自身对应的差异消息和预设加密密钥,进而利用预设加密密钥对加密公共消息进行解密,最后将公共消息和自身对应的差异消息进行组合而得到完整的待发布消息,该完整的待发布消息携带有该目标节点的节点标识水印。相较于现有技术,本发明中由于目标节点获取到的待发布消息中携带有自身节点标识的水印,因而当目标节点泄密时,可对目标节点进行便捷追踪,从而大大降低了目标节点泄密的风险;同时,由于区块链中保存的是各待发布消息的公共部分和差异部分,因而降低了对区块链有效空间的占用。In the blockchain message management method provided by this embodiment, after the target node receives the broadcast message of the message publishing node, it decrypts the encrypted difference message with its own private key to obtain its corresponding difference message and the preset encryption key, and then uses the Set the encryption key to decrypt the encrypted public message, and finally combine the public message and its corresponding difference message to obtain a complete message to be published, and the complete message to be published carries the node identification watermark of the target node. Compared with the prior art, in the present invention, since the message to be published obtained by the target node carries the watermark of its own node identification, when the target node leaks the secret, the target node can be tracked conveniently, thereby greatly reducing the leakage of the target node. At the same time, because the public part and the difference part of each message to be published are stored in the blockchain, the occupation of the effective space of the blockchain is reduced.
实施例四Embodiment 4
图4为本发明实施例四提供的一种区块链消息管理方法的流程图,如图4所示,该方法包括:FIG. 4 is a flowchart of a method for managing blockchain messages according to Embodiment 4 of the present invention. As shown in FIG. 4 , the method includes:
步骤S401、通过区块链接收加密公共消息和全部加密差异消息。Step S401: Receive the encrypted public message and all encrypted difference messages through the blockchain.
步骤S402、利用消息发布节点的公钥对加密公共消息和全部加密差异消息进行签名验证。Step S402, using the public key of the message publishing node to perform signature verification on the encrypted public message and all encrypted differential messages.
步骤S403、当签名验证通过时,根据自身私钥对其中一个加密差异消息进行解密,以获得自身所对应的差异消息和预设加密密钥。Step S403 , when the signature verification is passed, decrypt one of the encrypted difference messages according to the private key of the self, so as to obtain the difference message corresponding to the self and the preset encryption key.
步骤S404、利用预设加密密钥对所述加密公共消息进行解密,以获得解密后的公共消息。Step S404: Decrypt the encrypted public message by using a preset encryption key to obtain a decrypted public message.
步骤S405、根据公共消息和所获得的差异消息得到消息发布节点的待发布消息。Step S405: Obtain the message to be published of the message publishing node according to the common message and the obtained difference message.
本实施例中,加密的公共消息和加密差异消息还携带有消息发送节点的签名,本实施例在进行解密前,还需要对加密的公共消息和加密差异消息进行签名验证,以确保消息发布节点的身份合法性。In this embodiment, the encrypted public message and encrypted difference message also carry the signature of the message sending node. Before decryption in this embodiment, signature verification of the encrypted public message and encrypted difference message is also required to ensure that the message publishing node identity legality.
本实施例中其他步骤的描述与实施例三对应相同,具体请参照实施例三的描述,此处不再赘述。The descriptions of other steps in this embodiment are the same as those in Embodiment 3. For details, please refer to the descriptions of Embodiment 3, which will not be repeated here.
实施例五Embodiment 5
图5为本发明实施例五提供的一种区块链消息管理方法的流程图,如图5所示,该方法包括:FIG. 5 is a flowchart of a method for managing a blockchain message according to Embodiment 5 of the present invention. As shown in FIG. 5 , the method includes:
步骤S501、消息发布节点获取各目标节点的节点标识。Step S501, the message publishing node obtains the node identifier of each target node.
例如,各目标节点的节点标识分别为a1、a2……an。For example, the node identifiers of each target node are respectively a1, a2...an.
步骤S502、针对每个目标节点的节点标识,消息发布节点将该目标节点的节点标识以水印方式嵌入至待发布消息中,得到带水印待发布消息。Step S502: For the node identifier of each target node, the message publishing node embeds the node identifier of the target node into the message to be published in the form of a watermark to obtain a message to be published with a watermark.
将目标节点标识a1以水印方式嵌入到待发布消息M,得到带水印待发布消息Ma1,将目标节点标识a2以水印方式嵌入到待发布消息M,得到带水印待发布消息Ma2,以此类推,直到将目标节点标识an以水印方式嵌入到待发布消息M,得到带水印待发布消息Man。Embed the target node identification a1 into the message M to be published in the form of a watermark to obtain the message to be published with a watermark M a1 , and embed the target node identification a2 into the message M to be published in a watermark manner to obtain the message to be published with a watermark M a2 , so that By analogy, until the target node identifier an is embedded in the message M to be published in the form of a watermark, the message M an to be published with a watermark is obtained.
步骤S503、消息发布节点提取各带水印待发布消息的公共部分和差异部分,分别记为公共消息和差异消息。Step S503, the message publishing node extracts the common part and the difference part of each watermarked message to be published, which are respectively recorded as the common message and the difference message.
消息发布节点提取各带水印待发布消息Ma1,Ma2……Man的公共部分,得到Mpub,同时提取每个带水印待发布消息的差异部分,分别为Mdiff1,Mdiff2,……Mdiffn,Ma1=f(Mpub,Mdiff1),Man=f(Mpub,Mdiffn),其中,f为组合函数。The message publishing node extracts the public parts of each watermarked message to be published M a1 , M a2 ...... M diffn , M a1 =f(M pub , M diff1 ), M an= f(M pub , M diffn ), where f is a combination function.
步骤S504、消息发布节点利用预设加密密钥对公共消息进行加密,得到加密公共消息。Step S504, the message publishing node encrypts the public message by using a preset encryption key to obtain an encrypted public message.
消息发布节点利用预设加密密钥K来对公共消息Mpub进行加密,得到加密后的公共消息Cpub,其中,Cpub=Ck(Mpub),Ck为加密函数。The message publishing node uses the preset encryption key K to encrypt the public message M pub to obtain the encrypted public message C pub , where C pub =C k (M pub ), and C k is an encryption function.
步骤S505、针对每个差异消息,消息发布节点利用该差异消息所对应的目标节点的公钥对包括有该差异消息和预设加密密钥的差异综合消息进行加密,得到加密差异消息。Step S505: For each difference message, the message publishing node encrypts the difference synthesis message including the difference message and the preset encryption key by using the public key of the target node corresponding to the difference message to obtain an encrypted difference message.
消息发布节点利用目标节点的公钥(PKa1,PKa2……PKan)对对应的差异消息和预设加密密钥进行加密得到加密差异消息,即Cdiff1=CPKa1(Mdiff1,K),Cdiff2=CPKa2(Mdiff2,K)……Cdiffn=CPKan(Mdiffn,K),其中,CPKa1……CPKan为加密算法。The message publishing node uses the public key (PK a1 , PK a2 ...... PK an ) of the target node to encrypt the corresponding difference message and the preset encryption key to obtain the encrypted difference message, that is, C diff1 =CPKa1(M diff1 , K), C diff2 =CPKa2(M diff2 , K)... C diffn =CPKan(M diffn , K), wherein CPKa1... CPKan is an encryption algorithm.
步骤S506、消息发布节点利用自身私钥对加密公共消息和各加密差异信息添加签名。Step S506, the message publishing node adds a signature to the encrypted public message and each encrypted difference information by using its own private key.
步骤S507、消息发布节点向区块链发布加密公共消息和全部加密差异消息。Step S507, the message publishing node publishes the encrypted public message and all encrypted difference messages to the blockchain.
步骤S508、目标节点通过区块链接收加密公共消息和全部加密差异消息。Step S508, the target node receives the encrypted public message and all encrypted difference messages through the blockchain.
步骤S509、利用消息发布节点的公钥对加密公共消息和全部加密差异消息进行签名验证。Step S509, using the public key of the message publishing node to perform signature verification on the encrypted public message and all encrypted differential messages.
步骤S510、当签名验证通过后,目标节点根据自身私钥对其中一个加密差异消息进行解密,以获得自身所对应的差异消息和预设加密密钥。Step S510: After the signature verification is passed, the target node decrypts one of the encrypted difference messages according to its own private key to obtain its own corresponding difference message and a preset encryption key.
目标节点利用自身私钥对加密差异消息进行解密以获取自身对应的差异消息,例如a1节点利用自身私钥SKa1对Cdiff1进行解密即可获得自身对应的差异消息Mdiff1和预设加密密钥K,其他节点也依此进行解密。The target node uses its own private key to decrypt the encrypted difference message to obtain its corresponding difference message. For example, the a1 node uses its own private key SKa1 to decrypt C diff1 to obtain its corresponding difference message M diff1 and preset encryption key K. , and other nodes also decrypt accordingly.
步骤S511、目标节点利用预设加密密钥对所述加密公共消息进行解密,以得到解密后的公共消息。Step S511, the target node decrypts the encrypted public message by using a preset encryption key to obtain the decrypted public message.
各目标节点利用对加密差异消息解密获取到的预设加密密钥K对公共消息Cpub进行解密以得到解密后的公共消息Mpub。Each target node uses the preset encryption key K obtained by decrypting the encrypted difference message to decrypt the public message C pub to obtain the decrypted public message M pub .
步骤S512、目标节点根据公共消息和所获得的差异消息得到消息发布节点的待发布消息。Step S512, the target node obtains the message to be published of the message publishing node according to the common message and the obtained difference message.
目标节点将Mpub和自身对应的差异消息进行组合以得到待发布消息M,例如目标节点1将Mpub与自身对应的差异消息Mdiff1得到待发布消息M,目标节点2将Mpub与自身对应的差异消息Mdiff2得到待发布消息M,等。The target node combines M pub and the difference message corresponding to itself to obtain the message M to be published. For example, the target node 1 obtains the message M to be published by using the difference message M diff1 corresponding to M pub and itself, and the target node 2 corresponds to M pub and itself. The diff message M diff2 gets the message M to be published, etc.
实施例六Embodiment 6
本发明实施例还提供一种节点设备,其包括:一个或多个处理器及第一存储装置,该第一存储装置上存储有一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现本发明实施例一和实施例二所提供的区块链消息管理方法。An embodiment of the present invention further provides a node device, which includes: one or more processors and a first storage device, where one or more programs are stored on the first storage device, when the one or more programs are stored The one or more processors execute, so that the one or more processors implement the blockchain message management methods provided in Embodiment 1 and Embodiment 2 of the present invention.
实施例七Embodiment 7
本发明实施例还提供一种节点设备,其包括:一个或多个处理器和第二存储装置,该第二存储装置上存储有一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现实施例三和实施例四所述的区块链消息管理方法。An embodiment of the present invention further provides a node device, which includes: one or more processors and a second storage device, where one or more programs are stored on the second storage device, when the one or more programs are stored The one or more processors execute, so that the one or more processors implement the blockchain message management methods described in Embodiment 3 and Embodiment 4.
实施例八Embodiment 8
本发明实施例还提供一种区块链节点系统,该区块链节点系统包括:实施例六和实施例七所述的节点设备。An embodiment of the present invention further provides a blockchain node system, where the blockchain node system includes the node devices described in Embodiment 6 and Embodiment 7.
可以理解的是,以上实施方式仅仅是为了说明本发明的原理而采用的示例性实施方式,然而本发明并不局限于此。对于本领域内的普通技术人员而言,在不脱离本发明的精神和实质的情况下,可以做出各种变型和改进,这些变型和改进也视为本发明的保护范围。It can be understood that the above embodiments are only exemplary embodiments adopted to illustrate the principle of the present invention, but the present invention is not limited thereto. For those skilled in the art, without departing from the spirit and essence of the present invention, various modifications and improvements can be made, and these modifications and improvements are also regarded as the protection scope of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010355269.7A CN111586008A (en) | 2020-04-29 | 2020-04-29 | A block chain message management method, node device and block chain node system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010355269.7A CN111586008A (en) | 2020-04-29 | 2020-04-29 | A block chain message management method, node device and block chain node system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111586008A true CN111586008A (en) | 2020-08-25 |
Family
ID=72111801
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010355269.7A Pending CN111586008A (en) | 2020-04-29 | 2020-04-29 | A block chain message management method, node device and block chain node system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111586008A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115017532A (en) * | 2022-08-09 | 2022-09-06 | 北京航天奥祥通风科技股份有限公司 | User data processing method, device and system based on block chain |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1483286A (en) * | 2000-11-01 | 2004-03-17 | 松下电器产业株式会社 | Data sending device and data receiving device |
US20170366357A1 (en) * | 2016-06-16 | 2017-12-21 | The Bank Of New York Mellon | Distributed, centrally authored block chain network |
CN108491697A (en) * | 2018-01-26 | 2018-09-04 | 四川中环法智互联网科技有限公司 | File content is divulged a secret management system and retroactive method of divulging a secret |
CN108599952A (en) * | 2017-12-29 | 2018-09-28 | 重庆小犀智能科技有限公司 | A kind of communication means based on block chain |
CN109417549A (en) * | 2016-04-30 | 2019-03-01 | 西伟科技有限公司 | The method and apparatus of information proof is provided using centralization or distributed ledger |
CN111062045A (en) * | 2019-12-17 | 2020-04-24 | 北京推想科技有限公司 | Information encryption and decryption method and device, electronic equipment and storage medium |
-
2020
- 2020-04-29 CN CN202010355269.7A patent/CN111586008A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1483286A (en) * | 2000-11-01 | 2004-03-17 | 松下电器产业株式会社 | Data sending device and data receiving device |
CN109417549A (en) * | 2016-04-30 | 2019-03-01 | 西伟科技有限公司 | The method and apparatus of information proof is provided using centralization or distributed ledger |
US20170366357A1 (en) * | 2016-06-16 | 2017-12-21 | The Bank Of New York Mellon | Distributed, centrally authored block chain network |
CN108599952A (en) * | 2017-12-29 | 2018-09-28 | 重庆小犀智能科技有限公司 | A kind of communication means based on block chain |
CN108491697A (en) * | 2018-01-26 | 2018-09-04 | 四川中环法智互联网科技有限公司 | File content is divulged a secret management system and retroactive method of divulging a secret |
CN111062045A (en) * | 2019-12-17 | 2020-04-24 | 北京推想科技有限公司 | Information encryption and decryption method and device, electronic equipment and storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115017532A (en) * | 2022-08-09 | 2022-09-06 | 北京航天奥祥通风科技股份有限公司 | User data processing method, device and system based on block chain |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6547079B1 (en) | Registration / authorization method, device and system | |
US9774573B2 (en) | Secure transfer and use of secret material in a shared environment | |
CN108989339B (en) | Ciphertext encryption method, system and storage medium with strategy hiding function | |
US11050745B2 (en) | Information processing apparatus, authentication method, and recording medium for recording computer program | |
CN109274644B (en) | Data processing method, terminal and watermark server | |
US12034862B2 (en) | Anonymous broadcast method, key exchange method, anonymous broadcast system, key exchange system, communication device, and program | |
US20150043735A1 (en) | Re-encrypted data verification program, re-encryption apparatus and re-encryption system | |
CN109754226B (en) | Data management method, device and storage medium | |
US10754968B2 (en) | Peer-to-peer security protocol apparatus, computer program, and method | |
US20180278417A1 (en) | Apparatus and method for generating key, and apparatus and method for encryption | |
JP2009033721A (en) | Group subordinate terminal, group management terminal, server, key update system and key update method thereof | |
CN111970114A (en) | File encryption method, system, server and storage medium | |
CN102694650B (en) | Secret key generating method based on identity encryption | |
CN117220865A (en) | Longitude and latitude encryption method, longitude and latitude verification device and readable storage medium | |
CN114553557A (en) | Key calling method, key calling device, computer equipment and storage medium | |
CN101764694A (en) | Device, method and system for protecting data | |
CN114841701B (en) | NFT-based digital artwork anti-theft and trusted transaction method and device | |
CN111586008A (en) | A block chain message management method, node device and block chain node system | |
CN105191332A (en) | Method and device to embed watermark in uncompressed video data | |
CN110012024A (en) | A data sharing method, system, device and computer-readable storage medium | |
CN100518060C (en) | Encryption protection method and client device for digital document | |
CN110798306A (en) | Safe and credible data hosting method | |
US9106882B2 (en) | Terminal device, content recording system, title key recording method, and computer program | |
JP6792191B2 (en) | Information transmission method, information processing method, program, decoding method, program | |
CN116644393A (en) | Vector diagram right determining method based on block chain and careless transmission |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200825 |