Sensor group key management method based on block chain and edge computing
Through the sensor group key management method based on blockchain and edge computing, using packet construction, head node election and key tree management, the system overhead problems caused by node increase and decrease are solved, and efficient in the Internet of Things environment is achieved Key management.
Patent Information
- Application Number
- CN202411257458.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2024-12-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing group key management solution needs to re-derive new keys and key delivery when nodes are added or decreased, resulting in high system overhead, especially in IoT environments to consume more computing resources.
Using sensor group key management method based on blockchain and edge computing, key management is managed through the steps of group construction, head node election, key tree construction and device node update, balanced binary key tree and network encoding are used for key management. Reduce the system overhead caused by the increase and decrease of nodes.
It effectively reduces the system overhead required for re-derived new keys and the transfer of keys between nodes within the packet due to the increase or decrease of nodes within the packet, reduces computing resource consumption, and is suitable for IoT environments.
Smart Images

Figure CN119109666A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to a sensor group key management method based on blockchain and edge computing. Background Art
[0002] Blockchain can be figuratively understood as a chain composed of multiple blocks. This chain has two characteristics: one is decentralized storage, and the other is that data tampering is difficult. Decentralized storage is reflected in the fact that the blockchain will not be stored in a single server, but will be stored in all servers of the system at the same time. Therefore, as long as there is a server in the system that can operate normally, the data stored in the blockchain will not be lost. These servers are called system nodes. If a user wants to modify the data stored in the blockchain, he needs to obtain the approval of more than half of the nodes. Therefore, it is extremely difficult to privately tamper with the data stored in the blockchain. Therefore, the information recorded in the blockchain is more authentic and reliable, which can help solve the problem of people's distrust.
[0003] Edge computing is a decentralized, distributed computing model. Compared with cloud computing, which centrally deploys both software and hardware resources in large data centers, the core concept of edge computing is to place computing resources in network edge devices that are closer to users or devices, thereby alleviating the computing pressure of the central cloud server and reducing network latency and bandwidth consumption.
[0004] Group key management schemes are mainly divided into centralized group key management schemes, decentralized group key management schemes, distributed group key management schemes and other schemes. In the centralized group key management scheme, there is a group controller, which is responsible for managing the members in the group and generating, distributing and updating the keys; the decentralized group key management scheme is to divide the group into multiple small groups and set up a controller in each small group, so as to reduce the impact of the failure of the controller in the centralized group key management scheme on the entire system; in the distributed group key management scheme, each group member has the same status, and group members can use randomly selected temporary keys or collaborate with other group members to complete the generation of group keys. Compared with the decentralized group key management scheme and the distributed group key management scheme, the centralized group key management scheme has lower requirements on the computing power of the edge device nodes, and consumes less computing resources when updating the keys. Therefore, the centralized group key management scheme is more suitable for the actual environment of the Internet of Things. Summary of the invention
[0005] The purpose of the present invention is to provide a sensor group key management method based on blockchain and edge computing, so as to effectively reduce the system overhead required for re-deriving new keys due to the increase or decrease of nodes in the group and transferring keys between nodes.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] A sensor group key management method based on blockchain and edge computing includes several edge device nodes and a blockchain system, specifically including the following methods:
[0008] S1, group construction, dividing the device nodes into several groups according to the difference in attributes, each of the groups has a device node as a head node for distributing keys, and a management node is correspondingly set to store the corresponding keys;
[0009] S2, head node election, the management node compares the attributes and selects the best attribute as the head node;
[0010] S3, constructing a key tree, the management node constructs a logical key tree for storing the key according to the number of device nodes in the corresponding group, and signs the key corresponding to each node of the key tree, and then sends it to the corresponding device node through the head node of the corresponding group. The key tree includes a root node, an intermediate node, and a leaf node, and each node stores a corresponding key, which are a group key, a logical key, and a device node key respectively;
[0011] S4, device node update. When the device node exits, the leaf node corresponding to the device node in the key tree is deleted, and the key on the deleted leaf node to the corresponding root node path is updated; when the device node joins, a new intermediate node and leaf node are created accordingly.
[0012] Furthermore, the attributes include vitality value, availability, and trustworthiness of the device node.
[0013] Furthermore, the node election method specifically includes the following steps:
[0014] S21, after signing the specific information, the edge device node sends the specific information to the management node of the corresponding group for election, where the specific information includes the node identifier and the attribute information;
[0015] S22, after receiving the specific information, the management node compares the attribute with the currently received optimal attribute, until all device nodes in the corresponding group participate in the election, and selects the device node with the optimal attribute as the head node;
[0016] S23. The management node notifies and sends relevant information of the head node to all the device nodes in the corresponding group.
[0017] Furthermore, the device node stores all keys on the path from the corresponding leaf node to the root node.
[0018] Furthermore, the key tree is a balanced binary key tree.
[0019] Furthermore, after the key tree is constructed, the management node shares the group key corresponding to the group and the relevant information of the device node in the fog layer of the blockchain system, and uploads the relevant information to the cloud layer storage of the blockchain system.
[0020] Furthermore, the device node update in step S4 specifically includes the following method:
[0021] When a device node is ready to exit, if the number of device nodes in the corresponding group is odd, the corresponding leaf node is deleted, and the key from the leaf node to the root node is updated; if the number of device nodes in the corresponding group is even, the sibling node of the deleted leaf node is used to replace the intermediate node of the upper layer, and the key from the sibling node to the root node is updated accordingly;
[0022] When a device node joins, the joining device node performs two-way identity authentication with the corresponding management node, and then the management node uses the hierarchy to traverse the corresponding key tree. If there is an intermediate node whose left and right children are at least one empty, the device node to be joined is placed under it, and new intermediate nodes and leaf nodes are generated accordingly; if there is no intermediate node whose left and right children are at least one empty, a new intermediate node is created in the first intermediate node at the bottom layer of the corresponding key tree, and a corresponding leaf node is created; finally, the management node uses its private key to sign the corresponding group key and sends it to the newly joined edge device node.
[0023] Furthermore, the device nodes in the group transmit information by means of network coding, specifically, the device nodes acting as forwarding nodes encode and merge multiple groups of information received simultaneously into one piece of information, and selectively forward it to the next node.
[0024] The present invention also provides a computer-readable storage medium storing a computer program, characterized in that when the computer program in the computer-readable storage medium is executed by a processor, it is used to implement the steps of any one of the above methods.
[0025] Beneficial effects of the present invention:
[0026] By grouping the edge nodes corresponding to the edge devices, electing the head node to distribute the keys, and managing the edge nodes through the key tree, the system overhead required for re-deriving new keys due to the increase or decrease of nodes in the group and transferring keys between nodes can be effectively reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 The overall flow chart of the method of the embodiment of the present invention;
[0028] Figure 2 A flow chart of a method for constructing device groups according to an embodiment of the present invention;
[0029] Figure 3 This is a binary logic key tree architecture diagram of an embodiment of the present invention;
[0030] Figure 4 A diagram of a calculation process when a device leaves a group according to an embodiment of the present invention;
[0031] Figure 5 A diagram of the calculation process when a new node joins a group according to an embodiment of the present invention;
[0032] Figure 6 This is a diagram of the operation process of the key distribution method for secure network coding according to an embodiment of the present invention. DETAILED DESCRIPTION
[0033] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0034] See also Figure 1 The embodiment of the present invention provides a sensor group key management method based on blockchain and edge computing, including several edge device nodes and a blockchain system, specifically including the following methods:
[0035] S1. Grouping of devices based on the same attributes, see Figure 2 In this embodiment, the device nodes are divided into two groups, Group_a and Group_b, according to the difference in attributes. The attributes A, L, and T include the vitality value A, availability L, and trustworthiness T of the device nodes. There is one device node in each group as the head node GHN for distributing keys, and a management node KMN is correspondingly set to store the corresponding keys.
[0036] S2. Election of the head node GHN based on edge computing. The management node KMN compares the attributes and selects the best attribute as the head node;
[0037] The head node election method based on edge computing specifically includes the following steps:
[0038] S21, after signing the specific information, the edge device node sends the specific information to the management node KMN of the corresponding group for election, wherein the specific information includes the node identifier node_id, the vitality value A, the availability L, and the trustworthiness T information of the attribute;
[0039] S22, after receiving the specific information, the management node KMN compares the attribute with the currently received optimal attribute until all device nodes in the corresponding group participate in the election, and selects the device node with the optimal attribute as the head node GHN;
[0040] S23. The management node KMN notifies and sends relevant information of the head node GHN to all the device nodes in the corresponding group.
[0041] S3. Constructing a key tree based on the group key management method of blockchain and key book, see Figure 3 In the management node KMN, a binary balanced logical key tree LKH is constructed according to the number of device nodes in the corresponding group to store the key, where the depth h of LKH can be expressed as:
[0042] h=log2N, where N is the number of device nodes.
[0043] After the construction is completed, the management node KMN distributes the key through the head node GHN using secure network coding, signs the key corresponding to each node of the key tree, and then sends it to the corresponding device node through the head node of the corresponding group. The key tree includes a root node R_node, an intermediate node M_node, and a leaf node L_node. Each node stores a corresponding key, which are the group key GK, the logic key LK, and the device node key NK.
[0044] The corresponding device node stores all keys on the path from the corresponding leaf node L_node to the root node R_node. The mathematical expression formula of the number of keys M that the device node needs to store is:
[0045] M=log2N+1, where N is the number of device nodes.
[0046] After the key tree LKH is constructed, the management node KMN shares the group key GK corresponding to the group and the relevant information of the device node in the fog layer of the blockchain system, and uploads the relevant information to the cloud layer storage of the blockchain system.
[0047] S4, device node update, when the device node exits, delete the leaf node L_node corresponding to the device node in the key tree, and update the key on the path from the deleted leaf node L_node to the corresponding root node R_node; when the device node joins, create a new intermediate node M_node and leaf node L_node accordingly, specifically including the following methods:
[0048] See also Figure 3 and 4 When the device node U8 is ready to exit, since the device node U8 stores the group key GK_00, the logical keys LK_24 and LK_38, in order to ensure that the keys are not leaked, it is necessary to update the above keys in the group. If the number of device nodes in the corresponding group is odd, the corresponding leaf node L_node is deleted, and the key to the root node R_nod is updated; if the number of device nodes in the corresponding group is even, the brother node of the deleted leaf node L_node is used to replace the intermediate node M_node on the upper layer, and the key from the brother node to the root node R_nod is updated accordingly; the key distribution updated after the above-mentioned U8 node exits all uses the key distribution method of secure network coding to distribute keys.
[0049] See also Figure 3 and Figure 5 When a device node joins, firstly, a new key tree is initialized and pre-built according to the method of step S3, and the joined device node performs two-way identity authentication with the corresponding management node KMN, and then the management node KMN uses the hierarchy to traverse the corresponding key tree LKH. If there is an intermediate node whose left and right children are at least one empty, the device node to be joined is placed under it, and a new intermediate node newM_node and a leaf node newLK are generated accordingly; if there is no intermediate node M_node whose left and right children are at least one empty, a new intermediate node M_node is created in the first intermediate node at the bottom layer of the corresponding key tree, and a corresponding leaf node newLK is created; finally, the management node KMN uses its private key to sign the corresponding group key GK, and assigns it to the newly joined edge device node.
[0050] See also Figure 6 , the embodiment of the present invention adopts a key distribution method of secure network coding to distribute keys. In these two figures, Figure 6 (a) describes the process of information transmission without network coding, while Figure 6 (b) is the transmission process of network coding information in the embodiment of the present invention. It is assumed in the figure that each path can only carry one unit of information per second and can only move in the direction indicated by the arrow. Figure 6 (a) with Figure 6The purpose of (b) is to send the information x1 and x2 sent by the starting device node 1 to the destination device nodes 5 and 6. The remaining nodes are all forwarding nodes. If network coding is not used, Figure 6 As shown in (a), forwarding node 4 will randomly discard x1 or x2, resulting in a 50% chance that destination node 5 receives information x1, and a 50% chance that destination node 6 receives information x2. Figure 6 In (b), a network coding structure is used. In the figure, the forwarding node 4 can be regarded as two nodes, 4a and 4b. 4b can decode the information received in 4a and selectively send information in the information, so that the destination node receives the corresponding information. This method can improve the load balancing of the network and save network bandwidth consumption.
[0051] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modification, equivalent substitution or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A sensor group key management method based on blockchain and edge computing, Features: It includes several edge device nodes and blockchain systems, and specifically includes the following methods: S1, group construction, dividing the device nodes into several groups according to the difference in attributes, each of the groups has a device node as a head node for distributing keys, and a management node is correspondingly set to store the corresponding keys; S2, head node election, the management node compares the attributes and selects the best attribute as the head node; S3, constructing a key tree, the management node constructs a logical key tree for storing the key according to the number of device nodes in the corresponding group, and signs the key corresponding to each node of the key tree, and then sends it to the corresponding device node through the head node of the corresponding group. The key tree includes a root node, an intermediate node, and a leaf node, and each node stores a corresponding key, which are a group key, a logical key, and a device node key respectively; S4, device node update, when the device node exits, delete the leaf node corresponding to the device node in the key tree, and update the key on the path from the deleted leaf node to the corresponding root node; When the device node is added, a new intermediate node and leaf node are created accordingly.
2. A sensor group key management method based on blockchain and edge computing as claimed in claim 1, Features: The attributes include vitality value, availability, and trustworthiness of the device node.
3. A sensor group key management method based on blockchain and edge computing as claimed in claim 1, Features: The node election method specifically includes the following steps: S21, after signing the specific information, the edge device node sends the specific information to the management node of the corresponding group for election, where the specific information includes the node identifier and the attribute information; S22, after receiving the specific information, the management node compares the attribute with the currently received optimal attribute, until all device nodes in the corresponding group participate in the election, and selects the device node with the optimal attribute as the head node; S23. The management node notifies and sends relevant information of the head node to all the device nodes in the corresponding group.
4. A sensor group key management method based on blockchain and edge computing as claimed in claim 1, Features: The device node stores all keys on the path from the corresponding leaf node to the root node.
5. A sensor group key management method based on blockchain and edge computing as claimed in claim 1, Features: The key tree is a balanced binary key tree.
6. A sensor group key management method based on blockchain and edge computing as claimed in claim 1, Features: After the key tree is constructed, the management node shares the group key corresponding to the group and the relevant information of the device node in the fog layer of the blockchain system, and uploads the relevant information to the cloud layer storage of the blockchain system.
7. A sensor group key management method based on blockchain and edge computing as claimed in claim 1, Features: The device node update in step S4 specifically includes the following method: When a device node is ready to exit, if the number of device nodes in the corresponding group is odd, the corresponding leaf node is deleted, and the key from the leaf node to the root node is updated; if the number of device nodes in the corresponding group is even, the sibling node of the deleted leaf node is used to replace the intermediate node of the upper layer, and the key from the sibling node to the root node is updated accordingly; When a device node joins, the joining device node performs two-way identity authentication with the corresponding management node, and then the management node uses the hierarchy to traverse the corresponding key tree. If there is an intermediate node whose left and right children are at least one empty, the device node to be joined is placed under it, and a new intermediate node and leaf node are generated accordingly; If there is no intermediate node whose left and right children are at least one empty, a new intermediate node is created in the first intermediate node at the bottom of the corresponding key tree, and a corresponding leaf node is created; finally, the management node uses its private key to sign the corresponding group key and sends it to the newly added edge device node.
8. A sensor group key management method based on blockchain and edge computing as claimed in claim 1, Features: The device nodes in the group transmit information by means of network coding, specifically, a node in the device node that serves as a forwarding node encodes and combines multiple groups of information received simultaneously into one piece of information, and selectively forwards it to the next node.
9. A computer-readable storage medium storing a computer program, Features: When the computer program of the readable storage medium is executed by a processor, it is used to implement the steps of the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Dynamic wireless sensor network construction method based on block chain and key management
CN114928835A
Efficient identity-based and certificateless cryptosystems
US10673625B1
