Multi-party broadcast encryption method, device and equipment based on MPT tree
Through the multi-party broadcast encryption method based on MPT tree, the efficiency and security problems of broadcast encryption in traditional technology in large-scale users and dynamic environments are solved, and an efficient, secure and flexible broadcast encryption system is realized to adapt to user number changes and permission management. need.
Patent Information
- Application Number
- CN202411239591.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-09-05
AI Technical Summary
When facing large-scale users and dynamic user environments, existing broadcast encryption technology has problems such as poor scalability, insufficient security and high management complexity, especially when the number of users increases and permissions changes, the deep growth of traditional binary tree structures This results in reduced efficiency, reduced security, and increased management complexity.
Using a multi-party broadcast encryption method based on the MPT tree, the MPT tree is built to support dynamic user management, real-time joining, exiting and state modification of users is realized, and advanced encryption algorithms and key management strategies are adopted to ensure that only authorized users can decrypt or Send broadcast information and design a well-designed user management policy to prevent unauthorized access.
It improves encryption and decryption efficiency, supports dynamic user management, enhances the security and integrity of data transmission, reduces system management complexity and maintenance costs, and realizes a flexible and secure broadcast encryption system.
Smart Images

Figure CN118764196B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of broadcast encryption technology, and in particular to a multi-party broadcast encryption method, device and equipment based on an MPT tree. Background Art
[0002] In today's era of rapid development of information technology, data security and privacy protection have become the focus of global attention. With the continuous acceleration of the digitalization of society, from enterprises to individuals, more and more sensitive information is stored and transmitted in digital form. At the same time, the risk of cyber attacks and data leakage is also increasing year by year. Therefore, ensuring the security and confidentiality of information during transmission has become an urgent need.
[0003] The digitalization of data transmission and communication has brought many conveniences, but also new challenges. Traditional one-to-one encryption methods become inefficient when facing a large number of users and large-scale distributed systems. They are both resource-consuming and prone to transmission delays. In addition, the uncertainty of the network environment makes data at risk of being stolen or tampered with during transmission. Therefore, how to improve transmission efficiency and flexibility while ensuring information security has become a key issue that needs to be solved in the field of network security.
[0004] Broadcast encryption is an effective solution. Its core concept is to allow the sender to broadcast encrypted information to specific multiple receivers through a single encryption operation. This not only greatly reduces the complexity of encryption and decryption, but also significantly improves the efficiency of data dissemination. In addition, broadcast encryption technology can ensure that unauthorized users cannot decrypt, thus providing strong privacy protection. This feature has made broadcast encryption widely used in many fields, such as digital media, online education, and corporate communications. Broadcast encryption technology originated from the security needs of pay TV systems. In pay TV systems, content providers want to provide encrypted content to a specific group of subscribers without allowing unauthorized users to access it. The emergence of broadcast encryption solves this need and also provides new solutions for other fields. Today, broadcast encryption is used in a wider range of fields, such as satellite communications, digital rights management, and large-scale enterprise data distribution.
[0005] With the rise of cloud computing and big data technology, broadcast encryption faces new challenges and opportunities. The surge in data volume has put forward higher requirements for encryption technology, which not only needs to ensure security, but also needs to provide high efficiency and scalability. In addition, the dynamic user rights management requirements also increase the complexity of broadcast encryption technology. The broadcast encryption methods in the prior art mainly have the following technical problems: poor scalability. With the increase in the number of users, the depth of the traditional binary tree structure will grow rapidly, resulting in a significant increase in the number of nodes that need to be traversed during the encryption and decryption process, thereby affecting the efficiency of encryption and decryption; insufficient security. In a dynamic user environment, the joining and leaving of users may lead to a decrease in the security of the broadcast encryption system. When the nodes of the traditional binary tree structure change, it may be necessary to rebuild the entire tree or perform complex key update operations, which increases the risk of security vulnerabilities; high management complexity. In terms of user management, traditional broadcast encryption schemes may require complex user rights management strategies to ensure that the system can run safely and stably when user rights change, which increases the management complexity and maintenance cost of the system. Summary of the invention
[0006] In view of the technical problems existing in the prior art, the present invention proposes a multi-party broadcast encryption method, device and equipment based on MPT tree.
[0007] The dynamic multi-party broadcast encryption scheme based on the MPT tree aims to realize a broadcast system that can dynamically manage users and allow multi-party transmission, and to ensure the security of broadcast encryption. Therefore, the implementation process should focus on the following three goals:
[0008] First, the solution needs to build a broadcast system based on the MPT tree, and use its flexible structure and efficient operation to ensure that the system can achieve dynamic user management. This means that the system must support real-time user joining, exiting, and status modification. The MPT tree's add, delete, query, and modify functions can meet this requirement, making user management more flexible and ensuring that the system can correctly handle user changes at any time.
[0009] Secondly, the security of the broadcast encryption system is critical. It must be ensured that only authorized users can decrypt or send broadcast information, and unauthorized users cannot decrypt even if they receive encrypted information. The system also needs to ensure that authorized receivers cannot decrypt each other's information. This means that the encryption algorithm and key management must be highly reliable to prevent information leakage or unauthorized access.
[0010] Finally, the solution must also have a comprehensive user management strategy to ensure that when user permissions are revoked, they can no longer access keys or sensitive information. This is very important because if a user still retains the key after the permission is revoked, it may allow unauthorized users to crack encrypted information or send broadcast information. Therefore, the user management solution needs to strictly control user permissions and ensure the integrity of key management.
[0011] To achieve this goal, the program will work in the following three areas:
[0012] (1) Constructing the MPT tree: Based on the requirements of multi-party broadcast encryption, design and implement the MPT tree to ensure that it can support real-time import and initialization of users and quickly build the corresponding tree structure. The implementation of the MPT tree must ensure the correctness and efficiency of the operation.
[0013] (2) Implement multi-party broadcast encryption algorithm: Based on relevant research and literature, implement the multi-party broadcast encryption algorithm to ensure that it can meet the needs of dynamic broadcast systems. Focus on the security and stability of the algorithm.
[0014] (3) Design a user management solution: Analyze the needs of the broadcast system and design a complete user management solution to ensure the security and stability of the system. Focus on the management of user permissions to prevent security vulnerabilities after permissions are changed.
[0015] Through the above three aspects, the dynamic multi-party broadcast encryption scheme based on the MPT tree will be able to realize a flexible and secure broadcast system to meet the needs of dynamic user management and broadcast encryption.
[0016] The technical solution adopted by the present invention is as follows:
[0017] The first aspect provides a multi-party broadcast encryption method based on an MPT tree, including:
[0018] Constructing an MPT tree, wherein the MPT tree includes an extension node, a branch node, and a leaf node, wherein the leaf node stores a path, a secret value set, and a key set, wherein the path represents a complete path from a root node to a leaf node; the secret value set is used to store secret values of nodes on the path from the root node to the leaf node, and the secret value is a secret value when the user is a receiver; the key set is used to store encryption keys, which are obtained by different receivers after calculation based on the secret value stored by the receiver and the key of the sender, and the encryption key is a key stored when the user is a sender, and is used to encrypt the session key, and the path stored in the leaf node represents the user, and the user includes a sender and a receiver, and before the encryption session is established, the sender and the authorized receiver are determined based on the constructed MPT tree;
[0019] The sender generates a session key based on a random number, uses the session key to encrypt the message to be sent, and uses the stored encryption key to encrypt the session key, and then sends the encrypted message and the encrypted session key to the authorized recipient;
[0020] The authorized recipient uses the secret value stored by itself to derive the subset key, and uses the subset key to decrypt the encrypted session key to obtain the original session key, and then uses the original session key to decrypt the encrypted message to obtain the original message.
[0021] In one embodiment, before the encryption session is established, when determining the sender and the authorized receiver based on the constructed MPT tree, the method further includes grouping the authorized receivers using a complete subtree method, specifically:
[0022] Pair all authorized receivers in pairs and find the nearest common prefix between two authorized receivers;
[0023] According to the most recent common prefix, retrieve all leaf nodes with the most recent common prefix as the path. If these leaf nodes include leaf nodes that do not belong to the receiver, it means that the two authorized receivers do not have a complete subtree, and their respective complete subtrees are themselves; if these leaf nodes only have leaf nodes corresponding to the authorized receiver, it means that the most recent common prefix is a complete subtree;
[0024] According to the divided complete subtrees, the authorized receivers belonging to a complete subtree are grouped together.
[0025] In one embodiment, based on the grouping of authorized recipients, the stored encryption keys include different subsets, and the sender encrypts the session key using the stored encryption keys, including:
[0026] The sender encrypts the session key using the subset keys corresponding to different authorized receiver groups.
[0027] In one embodiment, according to the grouping of authorized recipients, the stored encryption key includes different subsets, and the authorized recipients derive the subset key using the secret value stored by themselves, and use the subset key to decrypt the encrypted session key to obtain the original session key, including:
[0028] The authorized receiver searches for the encrypted session key that it can decipher from the encrypted session key sent by the sender;
[0029] The authorized receiver uses the secret value stored by itself and the sender's key to perform a combined calculation to obtain the subset key;
[0030] The authorized recipient uses the corresponding subset key to decrypt the encrypted session key that it can crack to obtain the original session key.
[0031] In one embodiment, the method further includes: when a new user joins, creating a new leaf node in the constructed MPT tree, and generating a secret value and a key related to the user.
[0032] In one embodiment, the method further comprises:
[0033] When a user's receiving authority is revoked, the user is deleted from the sender's authorization group;
[0034] When a user's sending authority is revoked, all keys stored in the leaf nodes corresponding to the user are deleted in the MPT tree.
[0035] In one implementation, the method further includes: when a user is logged out, deleting a leaf node corresponding to the user in the MPT tree.
[0036] Based on the same inventive concept, the second aspect of the present invention provides a multi-party broadcast encryption device based on an MPT tree, comprising:
[0037] An MPT tree construction module is used to construct an MPT tree, wherein the MPT tree includes an extension node, a branch node and a leaf node, wherein the leaf node stores a path, a secret value set and a key set, wherein the path represents a complete path from a root node to a leaf node; the secret value set is used to store secret values of nodes on the path from the root node to the leaf node, and the secret value is a secret value when the user is a receiver; the key set is used to store encryption keys, which are obtained by different receivers after calculation based on the secret value stored by the receiver and the key of the sender, and the encryption key is a key stored when the user is a sender, and is used to encrypt the session key, and the path stored in the leaf node represents the user, and the user includes a sender and a receiver, and before the encryption session is established, the sender and the authorized receiver are determined based on the constructed MPT tree;
[0038] A broadcast information encryption module is used for the sender to generate a session key based on a random number, encrypt the message to be sent using the session key, encrypt the session key using the stored encryption key, and then send the encrypted message and the encrypted session key to the authorized recipient;
[0039] The information decryption module is used to authorize the recipient to derive a subset key using the secret value stored by itself, and use the subset key to decrypt the encrypted session key to obtain the original session key, and then use the original session key to decrypt the encrypted message to obtain the original message.
[0040] Based on the same inventive concept, the third aspect of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the multi-party broadcast encryption method based on the MPT tree described in the first aspect is implemented.
[0041] Based on the same inventive concept, the fourth aspect of the present invention provides an electronic device, comprising: at least one processor, at least one memory and a communication interface; wherein the processor, memory and communication interface communicate with each other; the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the multi-party broadcast encryption method based on the MPT tree described in the first aspect.
[0042] Compared with the prior art, the advantages and beneficial technical effects of the present invention are as follows:
[0043] The present invention provides a multi-party broadcast encryption method based on an MPT tree. First, an MPT tree is constructed. The complete path stored in the leaf node of the MPT tree represents the user. Before the encryption session is established, the sender and the authorized receiver are determined based on the constructed MPT tree. The core process of the broadcast encryption based on the MPT tree begins with the generation of a session key. First, the sender generates a session key based on a random number. This key generation method ensures the unpredictability and uniqueness of the session key. Then, the message to be broadcast is encrypted by the given session key. Next, the broadcast encryption needs to generate an encrypted session key list, and the session key is encrypted using the stored encryption key. The stored encryption key is obtained by different receivers based on the secret value stored by the receiver and the key of the sender after calculation, which can ensure that the generated encryption key is highly secure. The session key is encrypted using the generated encryption key. This step ensures that the session key is secure during transmission, and only the receiver holding the correct decryption key can decrypt it. The generated encrypted session key is stored in a dictionary and associated with the corresponding complete subtree root node. Next, the encrypted session key and the encrypted message are sent to the receiver together. The receiver finds the session key that it can crack, uses the secret value it has stored to derive the subset key, decrypts the subset key to get the session key, and then uses the decrypted session key to decrypt the message. Such a broadcast encryption method ensures the confidentiality and integrity of the message, while making broadcast encryption work under the framework of the MPT tree.
[0044] In summary, the present invention can achieve: 1. High efficiency. By optimizing the tree structure and reducing the number of traversed nodes, the efficiency of encryption and decryption is significantly improved, especially when dealing with large-scale dynamic user environments. The performance is particularly outstanding; 2. Scalability. It supports dynamic user management and can flexibly respond to changes in the number of users without rebuilding the entire encryption system or performing complex key update operations; 3. Security. The use of advanced encryption algorithms and key management strategies ensures the security and integrity of data transmission. At the same time, the structural characteristics of the MPT tree also increase the system's anti-attack capabilities; 4. Flexibility. It supports multi-party broadcast encryption and can meet the broadcast encryption requirements in different scenarios. At the same time, the perfection of the user management solution also ensures the safe and stable operation of the system under different authority changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 A flowchart of a multi-party broadcast encryption method based on an MPT tree provided in an embodiment of the present invention;
[0047] Figure 2 A schematic diagram of the structure of the MPT tree constructed in an embodiment of the present invention;
[0048] Figure 3 An example diagram of an MPT tree for multi-party broadcast encryption provided by an embodiment of the present invention;
[0049] Figure 4 A detailed implementation flow chart of broadcast encryption provided by an embodiment of the present invention;
[0050] Figure 5 An example diagram of multi-party transmission provided by an embodiment of the present invention;
[0051] Figure 6 A structural diagram of a multi-party broadcast encryption device based on an MPT tree provided in an embodiment of the present invention;
[0052] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0053] The inventor of this application has found through extensive research and practice that the MPT (Merkle Patricia Tree, a data structure that combines the Merkle tree and the prefix tree) tree is a flexible and efficient tree data structure that has only been proposed in recent years. It is mainly used in blockchains and distributed databases, but has not yet been widely used in the field of broadcast encryption. This data structure combines the security of the Merkle tree and the efficient retrieval ability of the Patricia tree, providing new possibilities for broadcast encryption. The application of the MPT tree in broadcast encryption can achieve more flexible user rights management and more efficient data transmission. Research on the combination of the MPT tree and broadcast encryption may bring new breakthroughs to broadcast encryption technology.
[0054] Therefore, a dynamic multi-party broadcast encryption method based on MPT tree is proposed to improve the data security and transmission efficiency of distributed systems. This not only helps to have a deeper understanding of MPT tree and broadcast encryption technology, but also provides new possibilities for improving the performance of distributed systems.
[0055] Problems with existing broadcast encryption methods: poor scalability. As the number of users increases, the depth of the traditional binary tree structure will grow rapidly, resulting in a significant increase in the number of nodes that need to be traversed during the encryption and decryption process, thereby affecting the efficiency of encryption and decryption; insufficient security. In a dynamic user environment, the joining and leaving of users may lead to reduced security of the broadcast encryption system. When a node changes, the traditional binary tree structure may need to rebuild the entire tree or perform complex key update operations, which increases the risk of security vulnerabilities; high management complexity. In terms of user management, traditional broadcast encryption schemes may require complex user authority management strategies to ensure that the system can run safely and stably when user authorities change, which increases the management complexity and maintenance costs of the system.
[0056] The main differences between the present invention and the prior art include: tree structure optimization. The MPT tree has better structural characteristics than the traditional binary tree, its path length is shorter, and it is more efficient in processing sparse data. This makes it possible to significantly reduce the number of nodes traversed during the broadcast encryption process and improve the efficiency of encryption and decryption; dynamic adaptability. The MPT tree supports dynamic user management, including real-time import, initialization and rapid construction of the tree structure of users. When users join or leave, the MPT tree can be flexibly adjusted without rebuilding the entire tree or performing complex key update operations, thereby improving the scalability and security of the system; security enhancement. The multi-party broadcast encryption scheme based on the MPT tree adopts more advanced encryption algorithms and key management strategies during the encryption and decryption process to ensure the security and integrity of data transmission. At the same time, the structural characteristics of the MPT tree also increase the difficulty for attackers to crack the encryption.
[0057] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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.
[0058] Embodiment 1
[0059] The present invention discloses a multi-party broadcast encryption method based on MPT tree, see Figure 1 , the method comprising:
[0060] S1: Construct an MPT tree, wherein the MPT tree includes an extension node, a branch node, and a leaf node. The leaf node stores a path, a secret value set, and a key set. The path represents a complete path from the root node to the leaf node. The secret value set is used to store the secret values of the nodes on the path from the root node to the leaf node. The secret value is the secret value when the user is the receiver. The key set is used to store encryption keys. The encryption keys are calculated by different receivers based on the secret values stored by the receiver and the key of the sender. The encryption key is the key stored when the user is the sender and is used to encrypt the session key. The path stored in the leaf node represents the user. The user includes the sender and the receiver. Before the encryption session is established, the sender and the authorized receiver are determined based on the constructed MPT tree.
[0061] S2: The sender generates a session key based on a random number, uses the session key to encrypt the message to be sent, and uses the stored encryption key to encrypt the session key, and then sends the encrypted message and the encrypted session key to the authorized recipient;
[0062] S3: The authorized recipient uses the secret value stored by itself to derive the subset key, and uses the subset key to decrypt the encrypted session key to obtain the original session key, and then uses the original session key to decrypt the encrypted message to obtain the original message.
[0063] Specifically, if Figure 2 As shown in the figure, there are three types of nodes in the MPT tree constructed by S1: extension nodes, branch nodes, and leaf nodes. These three types of nodes together form an efficient storage and retrieval mechanism in MPT. By combining these nodes, MPT can store a large number of key-value pairs in an efficient way and provide faster performance when retrieving data. Since the MPT tree may change at any time, these three types of nodes support changes. Figure 3As shown, in order to support the multi-party broadcast encryption scheme, the MPT tree in the present invention is slightly different from the traditional MPT tree. The settings of the three nodes of the present invention are as follows.
[0064] 1. Extended Node
[0065] In the present invention, the extended node contains three parts: a compressed prefix (in Figure 3 ch in the ), indicating the prefix part of the shared key; a pointer (in Figure 3 ), pointing to the next node. This pointer can be a hash value pointing to another extended node, branch node, or leaf node, or an identifier of another node; a secret value ( Figure 3 The secret is in the middle), which will be saved by subsequent leaf nodes and may be used to derive keys in the broadcast encryption and decryption stages.
[0066] The expansion node enables the MPT tree to store compressed data. When several keys have the same prefix, they can share an expansion node, which can greatly reduce storage space. At the same time, when searching for a key, the MPT tree can use the expansion node to quickly jump to the part with the same prefix, thereby reducing the search time. By storing the shared prefix in the prefix part, the MPT can skip some nodes and directly locate the subtree that may contain the required key.
[0067] When the value of a key under an extended node changes, or a new key-value pair needs to be inserted, the corresponding extended node may be modified and the child node pointer needs to be updated.
[0068] 2. Branch Node
[0069] A branch node also consists of two parts: a list of length 16, each item corresponds to a hexadecimal character (0-9, af), which stores the hash value of the child node. If a branch has no child node, the corresponding list element is empty; a value, which is used only when a key completely matches the branch node.
[0070] The branch node enables the path in the MPT tree to branch to multiple different child nodes. Since it stores the hash value of the child node, when a child node changes, its hash value will also change. Therefore, the branch node also needs to update the corresponding array elements to point to the new child node.
[0071] 3. Leaf nodes
[0072] The leaf node is the end node of the MPT tree and will not have any child nodes. In the present invention, the leaf node represents the user and needs to store three parts: a compressed and hexadecimal-encoded path representing the complete path from the root node to the leaf node for easy retrieval; a secret value set for storing the secret values of the nodes on the path from the root node to this node, which is stored when the user is the receiver; and a key set, which is stored when the user is the sender.
[0073] In the code, to protect user security, both secret values and secret collections are private variables.
[0074] In general, the differences between the MPT tree constructed in the present invention and the traditional MPT tree are as follows: the MPT tree of the present invention is a data structure based on cryptography, which provides an underlying data structure based on cryptographic verification for storing key-value pairs. It combines the advantages of the Merkle tree and the Patricia tree to ensure data integrity and security; efficient data verification and tamper-proofing. The characteristics of the Merkle tree enable the MPT tree to efficiently perform data verification to prevent data tampering. Each node stores the hash value of its child node, and any modification of the data will change its root hash value, thereby ensuring data integrity; fast data retrieval. Through the MPT tree, the value of any key can be quickly retrieved without traversing the entire tree, thanks to its unique node structure and hash calculation method.
[0075] The MPT tree constructed by the present invention can achieve the following technical effects: improve efficiency, by optimizing the structure and operation of the MPT tree, improve the storage and retrieval efficiency of data, which is crucial for broadcast encryption systems that need to process a large number of users and data; support dynamics, allowing the system to adjust according to real-time changes in user status, so that the broadcast encryption system can flexibly respond to user joining and exiting; enhance security, by embedding secret values and related security mechanisms in the MPT tree, improve the security of the entire broadcast encryption system, and ensure the confidentiality and integrity of data transmission.
[0076] In one embodiment, before the encryption session is established, when determining the sender and the authorized receiver based on the constructed MPT tree, the method further includes grouping the authorized receivers using a complete subtree method, specifically:
[0077] Pair all authorized receivers in pairs and find the nearest common prefix between two authorized receivers;
[0078] According to the most recent common prefix, retrieve all leaf nodes with the most recent common prefix as the path. If these leaf nodes include leaf nodes that do not belong to the receiver, it means that the two authorized receivers do not have a complete subtree, and their respective complete subtrees are themselves; if these leaf nodes only have leaf nodes corresponding to the authorized receiver, it means that the most recent common prefix is a complete subtree;
[0079] According to the divided complete subtrees, the authorized receivers belonging to a complete subtree are grouped together.
[0080] In one embodiment, based on the grouping of authorized recipients, the stored encryption keys include different subsets, and the sender encrypts the session key using the stored encryption keys, including:
[0081] The sender encrypts the session key using the subset keys corresponding to different authorized receiver groups.
[0082] In one embodiment, according to the grouping of authorized recipients, the stored encryption key includes different subsets, and the authorized recipients derive the subset key using the secret value stored by themselves, and use the subset key to decrypt the encrypted session key to obtain the original session key, including:
[0083] The authorized receiver searches for the encrypted session key that it can decipher from the encrypted session key sent by the sender;
[0084] The authorized receiver uses the secret value stored by itself and the sender's key to perform a combined calculation to obtain the subset key;
[0085] The authorized recipient uses the corresponding subset key to decrypt the encrypted session key that it can crack to obtain the original session key.
[0086] Before broadcast encryption is performed, the authorized recipients need to be determined. That is, the timing of authorizing recipients usually occurs before the encrypted message is sent, or when the encrypted session is established. This is because before the encrypted message is sent, it is necessary to ensure that only legitimate recipients can decrypt and read the messages. Therefore, the authorization process is a pre-step to determine which recipients have the right to access the encrypted data.
[0087] Identify the recipient: Identifying the authorized recipient typically involves the following steps or mechanisms:
[0088] Authentication: First, the recipient needs to prove their identity through some form of authentication. This may include the use of a password, digital certificate, biometric information, or other security token.
[0089] Permission check: Once the identity of the recipient is verified, the system will check whether the recipient has permission to access the specific encrypted message. This can be done by querying a database, access control list (ACL), or other permission management system.
[0090] Key distribution: For authorized recipients, the system will distribute the encryption session keys they need or allow them to generate these keys through some mechanism (such as pseudo-random functions). These keys are required to decrypt the message.
[0091] Secure channel: The authorization and key distribution process is usually carried out through a secure channel to ensure that this sensitive information cannot be intercepted or tampered with during transmission.
[0092] The following is a detailed introduction to the main processes of multi-party broadcast encryption, including the generation of secret values and keys and multi-party broadcast encryption (receiver grouping, broadcast information encryption, and information decryption).
[0093] 1. Generation of secret values and keys
[0094] The key stored by the receiver is derived from the secret value stored by the receiver, and the secret value stored by the receiver is the secret value of all nodes on the path from the root node to itself. To ensure the security of broadcast encryption, the keys generated between the same sender and different receivers are different, and the keys generated between different senders and the same receiver are also different. Therefore, the secret values used to derive the keys should also be different, must be unique and difficult to crack. In specific implementation, a pseudo-random function can be used to generate secret values and keys.
[0095] This implementation uses the complete keyword represented by the node as input, uses a hash function to obtain a hash value and saves it in hexadecimal. Since the secret value is needed to derive the key later, to prevent the input from being too long, only the first ten digits of the result are saved as the secret value in the experiment. If you need to improve security, you can consider expanding the storage length of the secret value.
[0096] Once the secret value is generated, it can be used to derive various keys. Here, the receiver's secret value and the sender's username (key) are used as input, and the concatenated string can be unique. The generated hash value is the key unique to the sender and the receiver.
[0097] 2. Multi-party broadcast encryption
[0098] Multi-party broadcast encryption is mainly divided into three stages: receiver grouping, broadcast information encryption, and information decryption. Figure 4As shown in the figure, during the initialization process, the receiver is divided into mutually disjoint subsets, each of which is assigned a subset key, where each user is assigned a secret message from which the subset key can be derived. During the broadcast encryption process, the session key K encrypts the message M to obtain the encrypted message M', and the subset key encrypts the session key K to obtain the encrypted session key; during the decryption process, after the user receives the encrypted message and the encrypted session key, he derives the subset key with the secret message, and then decrypts with the subset key to obtain the session key K, and then uses the session key K to decrypt the encrypted message M' to obtain the original message M.
[0099] (1) Receiver grouping
[0100] Before broadcast encryption begins, the sender and receiver must first be determined. To save as much space as possible for the sender to store the key, the receiver's users should be divided into as large groups as possible. The present invention uses the complete subtree method mentioned in the prior art for the division of subsets.
[0101] The complete subtree method is an algorithm used to solve the subset cover problem. A complete subtree represents a subtree starting from a specific node and containing all possible successor paths of the node.
[0102] The key point of the complete subtree method is: assume that the leaf nodes represented by u1, u2, and u3 have a common parent node fn, and in the MPT tree, f n The subtree with the root node as f contains only leaf nodes represented by u1, u2, and u3, and no other nodes. n The subtree with u1 as the root node is a complete subtree; otherwise, the complete subtree of the leaf node represented by u1, u2, and u3 is itself. Otherwise, it means that in the MPT tree, the complete subtree with a common parent node f n In the subtree with f as the root node, in addition to the leaf nodes u1, u2, and u3, it also contains other nodes that do not belong to these three leaf nodes. In other words, if n In the subtree with u1 as the root, there are other extra leaf nodes besides the expected three leaf nodes u1, u2, and u3, then this subtree cannot be called a complete subtree. At this time, the subtrees formed by the three leaf nodes u1, u2, and u3 will be regarded as their own complete subtrees, that is, each leaf node u1, u2, and u3 will form a subtree that only contains itself, and will not form a larger complete subtree with other leaf nodes.
[0103] In MPT, to find a complete subtree, first pair the given list of receivers (the list of authorized receivers) to find their nearest common prefix. Then, based on this common prefix, retrieve all leaf nodes with the prefix as the path. If it is found that there are leaf nodes that do not belong to the receiver, it means that the two receivers do not have a complete subtree, and their respective complete subtrees are themselves.
[0104] However, if there are no extra leaf nodes in the subtree of the common prefix, or there are only leaf nodes in the receiver's list, then this prefix is indeed a complete subtree. At this time, when searching for common prefixes of other nodes in the future, the nodes already included in the complete subtree can be skipped, thus avoiding redundant calculations.
[0105] When further processing the complete subtree, the influence of redundant subsets should be excluded to ensure that the most concise complete subtree set is found. By recursively traversing the MPT, all leaf nodes under each node can be determined to ensure that there are no redundant nodes in the complete subtree. After excluding redundant subsets, the final generated complete subtree set will be more concise and accurate.
[0106] (2) Broadcast information encryption
[0107] The core process of broadcast encryption based on MPT tree starts with the generation of session keys. First, a secure session key can be generated based on a random number using the SHA-256 hash function. This key generation method ensures the unpredictability and uniqueness of the session key. Subsequently, the message to be broadcast is encrypted using the given session key. The encryption process uses the AES encryption algorithm. AES (Advanced Encryption Standard) is a symmetric encryption algorithm with high security and efficiency.
[0108] Next, broadcast encryption needs to generate an encrypted session key list. Each item in this list corresponds to the root node of a complete subtree. For each root node of the complete subtree, the broadcast encryption process combines the sender's key with the secret value of the node and generates an encryption key using a pseudo-random function. Pseudo-random functions are deterministic and unpredictable, ensuring that the generated encryption key is highly secure.
[0109] The session key is encrypted using the generated encryption key. This step ensures that the session key is secure during transmission and only the recipient with the correct decryption key can decrypt it. The generated encrypted session key is stored in a dictionary and associated with the corresponding complete subtree root node.
[0110] Finally, the encrypted session key and the encrypted message are sent to the receiver. The receiver finds the session key that it can crack, uses the secret value it has stored to derive the subset key, decrypts the subset key to get the session key, and then uses the decrypted session key to decrypt the message. This broadcast encryption method ensures the confidentiality and integrity of the message, while allowing broadcast encryption to operate under the framework of the MPT tree.
[0111] (3) Information decryption
[0112] A key step in the decryption process is to ensure that the receiver can accurately decrypt the session key and the original message. To achieve this, the receiver needs to have the secret value associated with the root node of the complete subtree, as well as the sender's key. This information is used to generate a decryption key, decrypt the encrypted session key, and then finally decrypt the encrypted message.
[0113] First, for each authorized receiver, obtain the encrypted message and the encrypted session key that it can crack. After receiving this information, the next step is to use the saved secret value of the root node of the complete subtree and the sender's key to generate a decryption key through a pseudo-random function. This key plays a key role in the decryption process.
[0114] Next, the recipient uses the generated decryption key to decrypt the encrypted session key. The original session key was used to encrypt the original message, so successfully decrypting the encrypted session key is the key step to decrypting the entire message. Once the session key is successfully decrypted, the recipient uses the session key to decrypt the original message.
[0115] If any step in the decryption process fails, the receiver may not be able to read the message. In this case, it is necessary to check whether the secret value of the root node is correctly saved and whether the calculation of the pseudo-random function is accurate. At the same time, ensure the consistency of the session key, decryption key, and encrypted message used during the encryption and decryption process.
[0116] In summary, this process ensures that the message remains secure during broadcast and only the authorized recipient can decrypt and read the original message. The use of pseudo-random functions and the management of secret values play an important role in ensuring the confidentiality of the information and preventing unauthorized access.
[0117] The security of the entire process depends on the encryption of the session key and the encryption of the message. In this way, even if the encrypted message and session key are intercepted, the original message cannot be decrypted without the correct key, thus ensuring the security of communication.
[0118] In one embodiment, the method further includes: when a new user joins, creating a new leaf node in the constructed MPT tree, and generating a secret value and a key related to the user.
[0119] In one embodiment, the method further comprises:
[0120] When a user's receiving authority is revoked, the user is deleted from the sender's authorization group;
[0121] When a user's sending authority is revoked, all keys stored in the leaf nodes corresponding to the user are deleted in the MPT tree.
[0122] Specifically, in order to ensure the information security of users in the broadcasting system, a complete user management solution needs to be designed.
[0123] In one implementation, the method further includes: when a user is logged out, deleting a leaf node corresponding to the user in the MPT tree.
[0124] Since the secret value saved by the receiver can be determined when the user is initialized, and the key to be saved by the sender can be calculated and saved when the receiver determines it, the following situations may threaten the security of user information: users whose receiving rights have been revoked can still crack the sender's encrypted messages, users whose sending rights have been revoked can still send encrypted messages, and users who have been deregistered still exist in the MPT tree of the broadcasting system.
[0125] Solutions are proposed for each of these situations.
[0126] When a user's receiving rights are revoked, he should be removed from the sender's authorization group. In this way, the grouping before broadcast encryption will change, so that the key used by the sender to encrypt the session key is different. The revoked user cannot generate the key and cannot crack the encrypted message.
[0127] When a user's sending permission is revoked, all the keys saved by the user should be cleared so that the user cannot send messages that can be cracked by other users (even if the message is sent, other users cannot decrypt the message because they cannot generate the corresponding key), thereby ensuring the safety of other users.
[0128] When a user is logged out, the leaf node represented by the user should be deleted from the MPT tree and its sending and receiving permissions should be revoked.
[0129] These measures ensure the overall security of the broadcast system and prevent unauthorized users from accessing or destroying the system's sensitive data.
[0130] Specifically, MPT tree-related operations have the four basic functions of adding, deleting, checking, and modifying. These functions are further subdivided for different situations and are included in the three functions of "query", "delete", and "update". The following is a detailed introduction to the three operations.
[0131] 1. Query
[0132] The query operation is used to determine whether a node exists in the MPT tree. Before the query, the query key must first be converted into the corresponding path form, and then starting from the root node, traverse to the leaf, extension, or branch node according to each half byte of the path until the path is exhausted or a matching node is encountered.
[0133] During the matching process, if the current node is a leaf node, check whether the path of the node matches the queried path; if the current node is an extension node, check whether the path matches the path of the extension node. If so, recursively search for the next node pointed to by the extension node; if the current node is a branch node, find the sub-branch corresponding to the first half byte of the path, and then recursively search.
[0134] If the path does not match the node during the traversal process, or the corresponding sub-branch cannot be found on the branch node, a KeyError is thrown, indicating that the search failed.
[0135] In the specific implementation process, the query operation is mainly used in broadcast encryption to verify the identity and authority of the user and to retrieve the key information related to the user. For example, when encrypting a message, the sender may need to query the MPT tree to determine which users are authorized recipients and obtain the secret values associated with these users to generate the encryption key. Similarly, in the decryption phase, the receiver also needs to query the MPT tree to verify whether it has access to the encrypted information and retrieve its own secret value to decrypt the session key. The specific application is that in broadcast encryption, when a user tries to decrypt a message, the system first needs to query the MPT tree to determine whether the user is in the list of authorized users and whether they have the correct key material. The query operation usually involves starting from the root node of the MPT tree and finding the corresponding user leaf node along the path. Once found, the system can confirm the identity and authority of the user and provide the information required for decryption.
[0136] 2. Delete
[0137] In the deletion operation, the system will first determine whether the root node is empty. If it is empty, it will return immediately. Otherwise, it will use the query method to calculate the path from the root node to it according to the user name and find the node, and then recursively perform the deletion operation.
[0138] When the node matched by the path is a leaf node, the node can be deleted directly. If there is no matching node, a KeyError exception is thrown.
[0139] If the node matched by the path is an expansion node, the system will recursively delete the child nodes of the expansion node. Depending on the deletion result of the child nodes, the system may update the reference of the expansion node or convert the expansion node to a leaf node in certain cases. For example, if the expansion node has only one child node left, it can be simplified to a leaf node.
[0140] When the node matched by the path is a branch node, if the subsequent path is empty and the branch node contains data values, the data will be cleared; if the subsequent path is not empty, the system will find the corresponding branch based on the first nibble of the path and recursively delete the child nodes. After deletion, it is necessary to check whether the branch node can be compressed. If the branch node has only one child branch and no data value, the system can convert it to a leaf node or an extended node; if the branch node no longer contains child branches and data values, it means that the branch node has become useless and should be deleted.
[0141] There are three types of results caused by the deletion operation: DELETED (the node is completely deleted), UPDATED (the node is updated but still exists), and USELESS_BRANCH (the node is no longer needed).
[0142] If the result is DELETED, then the trie is empty, so you need to set the root to None.
[0143] If the result is UPDATED or USELESS_BRANCH, then the root of the new configuration needs to be extracted from the info returned by the delete operation and set as the root of the trie.
[0144] Specifically, the deletion operation can be implemented in the following ways when performing path matching:
[0145] 1. Convert key to path: First, the query key is converted into a path form, which usually consists of a series of hexadecimal characters representing the path from the root node of the MPT tree to a specific leaf node.
[0146] 2. Traverse from the root node: The query operation starts from the root node of the MPT tree and compares the path segments of the nodes one by one along the path until a leaf node is reached or the path is exhausted.
[0147] 3. Path matching: During the traversal process, if the current node is a leaf node and its path completely matches the query path, then the target node is found, which means that every hexadecimal character in the query path is the same as the character at the corresponding position on the leaf node path.
[0148] 4. Return result: If the match is successful, the query operation returns the value stored in the leaf node. In the context of broadcast encryption, this may mean returning key information or other data related to the leaf node (user).
[0149] 5. Match failure handling: If the path does not match the node at any point, or the corresponding sub-branch cannot be found on the branch node, the system will throw a KeyError exception, indicating that the search failed.
[0150] In the specific implementation process, the delete operation is used to remove the corresponding node from the MPT tree when the user exits the system or the authority is revoked. This ensures that the deleted user can no longer access the encrypted information because their corresponding secret values and keys will no longer exist in the system. The deletion operation also involves maintaining the structure of the MPT tree, ensuring the integrity and efficiency of the tree, and updating the secret values and keys of other users related to the user to maintain the security of the system. The specific application is that when a user leaves the system or no longer has decryption authority, the broadcast encryption system needs to delete the leaf node corresponding to the user from the MPT tree. This step also needs to maintain the integrity of the MPT tree and update the root hash value to reflect changes in the user set. The deletion operation helps maintain the security and efficiency of the system and prevent invalid or unauthorized users from occupying resources.
[0151] 3. Update
[0152] One of the main functions in the MPT tree is update. In the present invention, both the "addition" and "modification" of the basic functions are included in the update. The update includes: adding a new leaf node (user), adding, deleting or modifying the key set in the node.
[0153] There are six inputs in the update function: node_ref (node reference), path (path from the root node to the node), u_key (user keyword), value (secret value of the root node), identifier (keyword corresponding to the receiver when the user is the sender), bc_key (key used between the user and the identifier when the user is the sender). The default values of identifier and bc_key are None, which is convenient for initialization of a new user who has not joined the broadcast group.
[0154] During the update operation, the system will calculate the location and path of the user node to be updated based on the user name, and check whether the corresponding location node is empty. If it is empty, a new leaf node will be created and the user node will be initialized according to the provided path and value.
[0155] If it is determined that the user node to be updated is a leaf node, and the path (node path) matches the path of the user node to be updated, the value of the leaf node is updated. There are two cases here: ① If identifier and bc_key are provided, it means adding a new key to the key set of the leaf node. ② If bc_key is None and identifier is not None, it means deleting the key between the sender and the node. Finally, return the reference to store the node.
[0156] It should be noted that the node path refers to the path from the root node (or starting node) to the user node to be updated. In a tree structure, in order to find and locate a specific node, it is usually necessary to traverse along a certain path. This path is the node path, which records all nodes or branches from the starting point of the tree (such as the root node) to the target node (such as the user node to be updated).
[0157] If it is determined that the user node to be updated is a leaf node and the path does not match the path of the user node to be updated, the common prefix of the node path and the path to be updated is calculated, and a branch node is created based on the common prefix. Then, the user node to be updated and the non-common prefix part of the path of the user node to be updated are added to the branch node respectively, and a reference to the branch node is returned.
[0158] It should be noted that the "user node to be updated" here refers to the branch node in the tree structure that may change due to the update operation. Specifically, when the system finds that the user node to be updated already exists, but its path (i.e., its position in the tree) may need to be modified, it is necessary to find the "fork point" between the current path and the updated path of this user node, that is, the point where they no longer share a common prefix. The node corresponding to this point is the "branch node" here. This node is a key point between the current path and the updated path of the user node to be updated, and its selection depends on the common prefix length of the two paths. "The non-common prefix part of the path of the user node to be updated": refers to the part of the new path of the user node to be updated after removing the common prefix with the old path. In other words, it is the additional path information in the new path that does not exist in the old path and is used to locate the updated position. This remaining part needs to be added to the tree in order to move the user node to be updated to the new position.
[0159] If the user node to be updated is an extended node and the path does not match the path to be updated, the common prefix of the node path and the path to be updated is calculated, and a branch node is created based on the common prefix. Then, the user node to be updated and the non-common prefix part of the path of the user node to be updated are added to the branch node respectively, and a reference to the branch node is returned.
[0160] It should be noted that the "user node to be updated" here refers to the user node that currently exists in the tree structure and is marked as to be updated, but this node is actually an "extended node" (it may be an intermediate node containing multiple child nodes, rather than a leaf node). Importantly, although it is designated as to be updated, its current path (that is, the position of the node in the tree) does not match the provided path to be updated. Therefore, it needs to be adjusted. The non-common prefix part of the path of the user node to be updated: refers to the part of the path to be updated after removing the common prefix with the path of the current node. In other words, it is additional path information unique to the new path and used to move the node to a new position. Since the path of the current node does not match the path to be updated, this part of information is required to correctly relocate the node.
[0161] If the user node to be updated is an extension node and the path to be updated starts with path, the update is applied to the child nodes of the extension node and a reference to the new extension node is returned. If the node is a branch node and the path to be updated is empty, the value of the branch node is updated and a reference to the branch node is returned. If the path to be updated is not empty, the corresponding branch of the branch node is updated according to the first index of the path to be updated and a reference to the branch node is returned.
[0162] It should be noted that, case a: the user node to be updated is an extension node, and the path to be updated starts with path: if this is the case, the system will apply the update to the child nodes of the extension node and return the reference of the new extension node. Case b: the node is a branch node and the path to be updated is empty: if the node is a branch node, and the path to be updated is empty (which means that the child node structure of the branch node does not need to be changed, only the value of the branch node itself needs to be updated), then the system will update the value of the branch node and return the reference of the branch node.
[0163] When neither of the above two conditions is met, the "otherwise" situation will occur:
[0164] The current node is a branch node, the path to be updated is not empty, and the first index of the path to be updated points to a specific branch in the branch node. In this case, the system needs to find the corresponding child node or branch under the branch node based on the first index of the path to be updated (that is, the first element or node identifier in the path), and update the child node or branch. After the update is completed, the system will return the reference to the branch node.
[0165] In the specific implementation process, in the broadcast encryption system, the update operation is mainly used to add new users, modify the status or permissions of existing users, and update the key information corresponding to the user. When a new user joins the system, a new leaf node needs to be created in the MPT tree, and the secret value and key associated with it need to be generated. If the user status or permissions change, the corresponding nodes and keys also need to be updated. This dynamic user management capability is essential to maintaining the security and flexibility of the system. The specific application is that when a new user joins the system or the permissions of an existing user change, the broadcast encryption system needs to update the MPT tree to reflect these changes. Specifically, the update operation involves inserting or modifying nodes in the MPT tree to ensure that the leaf node corresponding to each user contains the latest permission information and key material (secret value and key). This process must ensure the integrity of the tree, that is, the root hash of the updated MPT tree should correctly reflect the latest status of all users so that subsequent encryption and decryption operations can be performed correctly.
[0166] In order to better describe the multi-party broadcast encryption and decryption process based on the MPT tree, Figure 5 As an example, r_keys represents the secret value when the user is the receiver, and s_keys represents the secret key stored when the user is the sender. Assume that the representative user in the figure is The leaf node of is the sender, but among the remaining users only , , , for Designated receiver (authorized receiver). In this MPT tree, dividing the receiver designated by the sender according to the complete subtree method will result in two subsets: leaf nodes The corresponding subset (including user ), expansion node The corresponding subset (including user , , ). Since each leaf node of the MPT tree stores the secret values of all paths from the root node to itself, the leaf node Stores its own secret value (assuming it is , and the leaf nodes , , As an extension node Subsequent nodes also store extended nodes The secret value (assuming ).
[0167] In the encryption phase, since there are two subsets divided by the complete subtree method, two subset keys will be generated. The secret value With own key (sender's key) The combination is used as the input of a pseudo-random function to derive the key Similarly, the expansion node The secret value With your own key The combination is used as the input of a pseudo-random function to derive the key These two keys will be stored in the leaf node middle.
[0168] Assume that the message the sender wants to send is , the session key is ,use About the message Encrypt to get encrypted information After that, the sender uses the subset key , Session Key Encrypt and obtain the encrypted session key , . and With encrypted information Broadcast together.
[0169] In the decryption phase, after receiving the broadcast information, the user finds the encrypted information from it. The encrypted session key that you can decipher. Leaf node turn up , using the secret value stored in itself The key of the sender's leaf node Combined calculations ,use right Decrypt to get the session key , and then use right Decrypt to get the original message . Leaf nodes , , Similarly, find , using the secret value stored in itself The key of the sender's leaf node Combined calculations ,use right Decrypt to get the session key , and then use right Decrypt to get the original message .
[0170] Embodiment 2
[0171] Based on the same inventive concept, this embodiment discloses a multi-party broadcast encryption device based on an MPT tree, see Figure 6 ,include:
[0172] An MPT tree construction module 201 is used to construct an MPT tree, wherein the MPT tree includes an extension node, a branch node and a leaf node, wherein the leaf node stores a path, a secret value set and a key set, wherein the path represents a complete path from a root node to a leaf node; the secret value set is used to store secret values of nodes on the path from the root node to the leaf node, and the secret value is a secret value when the user is a receiver; the key set is used to store encryption keys, which are obtained by different receivers after calculation based on the secret value stored by the receiver and the key of the sender, and the encryption key is a key stored when the user is a sender, and is used to encrypt the session key, and the path stored in the leaf node represents the user, and the user includes a sender and a receiver, and before the encryption session is established, the sender and the authorized receiver are determined based on the constructed MPT tree;
[0173] Broadcast information encryption module 202, used for the sender to generate a session key based on a random number, encrypt the message to be sent using the session key, encrypt the session key using the stored encryption key, and then send the encrypted message and the encrypted session key to the authorized recipient;
[0174] The information decryption module 203 is used to authorize the recipient to derive a subset key using the secret value stored in the recipient, and use the subset key to decrypt the encrypted session key to obtain the original session key, and then use the original session key to decrypt the encrypted message to obtain the original message.
[0175] It should be noted that since the leaf nodes of the MPT tree store a set of secret values, which are used to store the secret values of nodes on the path from the root node to the current node, when the user is the receiver; and a set of keys, which are stored when the user is the sender, the generation process of secret values and keys in the multi-party broadcast encryption process is included in the MPT tree construction module. In addition, before the broadcast encryption begins, the sender and receiver must be determined first, and the authorized receiver must also be determined before the broadcast encryption.
[0176] Since the device introduced in the second embodiment of the present invention is a device used to implement the multi-party broadcast encryption method based on the MPT tree in the first embodiment of the present invention, based on the method introduced in the first embodiment of the present invention, the person skilled in the art can understand the specific structure and deformation of the device, so it is not repeated here. All devices used in the method in the first embodiment of the present invention belong to the scope of protection of the present invention.
[0177] Embodiment 3
[0178] Based on the same inventive concept, the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the multi-party broadcast encryption method based on the MPT tree described in the first embodiment is implemented.
[0179] Since the computer-readable storage medium introduced in the third embodiment of the present invention is a computer-readable storage medium used to implement the multi-party broadcast encryption method based on the MPT tree in the first embodiment of the present invention, based on the method introduced in the first embodiment of the present invention, those skilled in the art can understand the specific structure and deformation of the computer-readable storage medium, so it is not repeated here. All computer-readable storage media used in the method of the first embodiment of the present invention belong to the scope of protection of the present invention.
[0180] Embodiment 4
[0181] The present invention also provides an electronic device, see Figure 7 ,include:
[0182] At least one processor, at least one memory and a communication interface; wherein,
[0183] The processor, memory and communication interface communicate with each other;
[0184] The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the multi-party broadcast encryption method based on the MPT tree described in the first embodiment.
[0185] Since the electronic device introduced in the fourth embodiment of the present invention is an electronic device used to implement the multi-party broadcast encryption method based on the MPT tree in the first embodiment of the present invention, based on the method introduced in the first embodiment of the present invention, the person skilled in the art can understand the specific structure and deformation of the electronic device, so it is not repeated here. All electronic devices used in the method of the first embodiment of the present invention belong to the scope of protection of the present invention.
[0186] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0187] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0188] Although preferred embodiments of the present invention have been described, additional changes and modifications may be made to these embodiments by those skilled in the art once the basic creative concepts are known. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention. Obviously, those skilled in the art may make various changes and modifications to the embodiments of the present invention without departing from the spirit and scope of the embodiments of the present invention. Thus, if these modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A multi-party broadcast encryption method based on MPT tree, characterized in that: include: Constructing an MPT tree, wherein the MPT tree includes an extension node, a branch node, and a leaf node, wherein the leaf node stores a path, a secret value set, and a key set, wherein the path represents a complete path from a root node to a leaf node; the secret value set is used to store secret values of nodes on the path from the root node to the leaf node, and the secret value is a secret value when the user is a receiver; the key set is used to store encryption keys, which are obtained by different receivers after calculation based on the secret value stored by the receiver and the key of the sender, and the encryption key is a key stored when the user is a sender, and is used to encrypt the session key, and the path stored in the leaf node represents the user, and the user includes a sender and a receiver, and before the encryption session is established, the sender and the authorized receiver are determined based on the constructed MPT tree; The sender generates a session key based on a random number, uses the session key to encrypt the message to be sent, and uses the stored encryption key to encrypt the session key, and then sends the encrypted message and the encrypted session key to the authorized recipient; The authorized recipient uses the secret value stored by itself to derive the subset key, and uses the subset key to decrypt the encrypted session key to obtain the original session key, and then uses the original session key to decrypt the encrypted message to obtain the original message; Before the encryption session is established, when determining the sender and the authorized receiver based on the constructed MPT tree, the method further includes grouping the authorized receivers using a complete subtree method, specifically: Pair all authorized receivers in pairs and find the nearest common prefix between two authorized receivers; According to the most recent common prefix, retrieve all leaf nodes with the most recent common prefix as the path. If these leaf nodes include leaf nodes that do not belong to the receiver, it means that the two authorized receivers do not have a complete subtree, and their respective complete subtrees are themselves; if these leaf nodes only have leaf nodes corresponding to the authorized receiver, it means that the most recent common prefix is a complete subtree; According to the divided complete subtrees, the authorized receivers belonging to a complete subtree are grouped together.
2. The multi-party broadcast encryption method based on the MPT tree according to claim 1, characterized in that: The stored encryption keys include different subsets based on the grouping of authorized recipients, and the sender uses the stored encryption keys to encrypt the session key, including: The sender encrypts the session key using the subset keys corresponding to different authorized receiver groups.
3. The multi-party broadcast encryption method based on the MPT tree according to claim 1, characterized in that: According to the grouping of authorized recipients, the stored encryption keys include different subsets. The authorized recipients derive the subset keys using their own stored secret values, and use the subset keys to decrypt the encrypted session keys to obtain the original session keys, including: The authorized receiver searches for the encrypted session key that it can decipher from the encrypted session key sent by the sender; The authorized receiver uses the secret value stored by itself and the sender's key to perform a combined calculation to obtain the subset key; The authorized recipient uses the corresponding subset key to decrypt the encrypted session key that it can crack to obtain the original session key.
4. The multi-party broadcast encryption method based on the MPT tree according to claim 1, characterized in that: The method further includes: when a new user joins, creating a new leaf node in the constructed MPT tree, and generating a secret value and a key related to the user.
5. The multi-party broadcast encryption method based on the MPT tree according to claim 1, characterized in that: The method further comprises: When a user's receiving authority is revoked, the user is deleted from the sender's authorization group; When a user's sending authority is revoked, all keys stored in the leaf nodes corresponding to the user are deleted in the MPT tree.
6. The multi-party broadcast encryption method based on the MPT tree according to claim 1, characterized in that: The method further includes: when a user is deregistered, deleting a leaf node corresponding to the user in the MPT tree.
7. A multi-party broadcast encryption device based on MPT tree, characterized in that: include: An MPT tree construction module is used to construct an MPT tree, wherein the MPT tree includes an extension node, a branch node and a leaf node, wherein the leaf node stores a path, a secret value set and a key set, wherein the path represents a complete path from a root node to a leaf node; the secret value set is used to store secret values of nodes on the path from the root node to the leaf node, and the secret value is a secret value when the user is a receiver; the key set is used to store encryption keys, which are obtained by different receivers after calculation based on the secret value stored by the receiver and the key of the sender, and the encryption key is a key stored when the user is a sender, and is used to encrypt the session key, and the path stored in the leaf node represents the user, and the user includes a sender and a receiver, and before the encryption session is established, the sender and the authorized receiver are determined based on the constructed MPT tree; A broadcast information encryption module is used for the sender to generate a session key based on a random number, encrypt the message to be sent using the session key, encrypt the session key using the stored encryption key, and then send the encrypted message and the encrypted session key to the authorized recipient; An information decryption module is used to authorize the recipient to derive a subset key using the secret value stored in the recipient, and to decrypt the encrypted session key using the subset key to obtain the original session key, and then to decrypt the encrypted message using the original session key to obtain the original message; The device also includes an authorized receiver grouping module, which is used to group the authorized receivers using a complete subtree method when determining the sender and the authorized receivers based on the constructed MPT tree before the encryption session is established, specifically: Pair all authorized receivers in pairs and find the nearest common prefix between two authorized receivers; According to the most recent common prefix, retrieve all leaf nodes with the most recent common prefix as the path. If these leaf nodes include leaf nodes that do not belong to the receiver, it means that the two authorized receivers do not have a complete subtree, and their respective complete subtrees are themselves; if these leaf nodes only have leaf nodes corresponding to the authorized receiver, it means that the most recent common prefix is a complete subtree; According to the divided complete subtrees, the authorized receivers belonging to a complete subtree are grouped together.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the multi-party broadcast encryption method based on the MPT tree as claimed in any one of claims 1 to 6 is implemented.
9. An electronic device, characterized in that: include: At least one processor, at least one memory and a communication interface; wherein, The processor, memory and communication interface communicate with each other; The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the MPT tree-based multi-party broadcast encryption method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method of managing a key of user for broadcast encryption
US20070079118A1
Blockchain transaction privacy enhancement through broadcast encryption
US20190149325A1
