Key management method, apparatus, device, and medium

By combining the Chameleon Shrubs tree and the Shrubs node authentication tree, and using the Chameleon hash function to update the key management scheme, the problem of high key management overhead in the single-signature scheme is solved, and a shorter authentication path and the validity of public keys for multiple signatures are achieved.

CN119449328BActive Publication Date: 2025-11-07CETC CYBERSPACE SECURITY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411937854.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-11-07
Estimated Expiration
2044-12-26

AI Technical Summary

Technical Problem

In existing technologies, key management overhead is relatively large for single-signature schemes, especially when using chameleon authentication trees that combine chameleon hash functions with Merkle trees, where the authentication path is long and update operations are costly.

Method used

A combined scheme of Chameleon Shrubs tree and Shrubs node authentication tree is adopted. By writing the public key of the signature key pair into the Chameleon Shrubs tree once, and using the trapdoor key of the Chameleon hash function and the updated message value of the target Shrubs node, the structure of the Chameleon-Shrubs authentication tree is updated, maintaining the consistency of the public key of multiple signatures and reducing the average traceability path and authentication path.

Benefits of technology

It effectively reduces the overhead of key management, shortens the authentication path length, maintains the validity of public keys used for multiple signatures, and enables verification capabilities for keys used multiple times.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449328B_ABST
    Figure CN119449328B_ABST
Patent Text Reader

Abstract

The application discloses a key management method, device, equipment and medium, and relates to the technical field of information security, and comprises the following steps: the chameleon-Shrubs authentication tree comprises a chameleon-Shrubs tree and a Shrubs node authentication tree, and the multiple signature public key remains unchanged; the topmost node of the Shrubs node authentication tree is a verification root node obtained based on the Shrubs node of each layer in the chameleon-Shrubs tree; a one-time signature public key is written into a target empty node in the previous chameleon-Shrubs tree, and a target Shrubs node of the target empty node is determined; an updated random number of the target Shrubs node is determined, so that the structure of the previous chameleon-Shrubs authentication tree is updated to obtain a current chameleon-Shrubs authentication tree; and the multiple signature public key is used to verify the signature of a message obtained based on an authentication path from the target empty node to the verification root node. The key management overhead is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of information security, and in particular to a key management method, device, equipment and medium. BACKGROUND

[0002] A one-time signature is a special digital signature, and the basic idea thereof is to sign a message by using a one-way function. Compared with a public key signature based on a trapdoor function, the generation and verification of the one-time signature are more efficient. However, the one-time signature will expose part of a private key in a signing process. Therefore, in order to ensure the security of the signature, each pair of keys can only be used once. Therefore, if different keys are generated for different messages, a heavy key management burden will be caused.

[0003] In order to reduce the space complexity of the one-time signature scheme and solve the problem of complex key management, one solution is an improved scheme based on a Merkle tree. However, all one-time signature key pairs need to be calculated in advance, and the authentication path is long, which leads to a large key management overhead. Another solution is to combine a chameleon hash function with a Merkle tree to construct a chameleon authentication tree (CAT), and combine the chameleon authentication tree with the one-time signature scheme. However, when adding a leaf node, the whole path from the root node to the leaf node needs to be traversed, and then the missing nodes and sibling nodes in the path are generated, and the real leaf node is updated from bottom to top until the chameleon hash node. The authentication path is still long, and the update operation overhead is also large.

[0004] In summary, how to reduce the overhead of key management is a problem to be solved in the field. SUMMARY

[0005] Therefore, the purpose of the present application is to provide a key management method, device, equipment and medium, which reduces the overhead of key management. The specific solutions are as follows:

[0006] In a first aspect, the present application discloses a key management method, comprising:

[0007] signing a to-be-signed message by using a private key in a one-time signature key pair to obtain a first digital signature;

[0008] obtaining a last chameleon-Shrubs authentication tree containing a last chameleon Shrubs tree and a Shrubs node authentication tree; wherein a topmost node of the Shrubs node authentication tree is a verification root node obtained based on Shrubs nodes in each layer of the last chameleon Shrubs tree;

[0009] determining a target null node from the last chameleon-Shrubs tree, and writing a public key in the one-time signature key pair into the target null node, and determining a target Shrubs node corresponding to the target null node in the last chameleon-Shrubs tree;

[0010] determining an updated nonce of the target Shrubs node by using a trapdoor key of the chameleon hash function and an updated message value of the target Shrubs node, and updating a structure of the last chameleon-Shrubs authentication tree by using the updated nonce to obtain a current chameleon-Shrubs authentication tree, and keeping a multi-time signature public key of the last chameleon-Shrubs authentication tree consistent with a multi-time signature public key of the current chameleon-Shrubs authentication tree;

[0011] obtaining a message signature pair by using the first digital signature, the public key in the one-time signature key pair, and the message to be signed based on an authentication path from the target null node to a verification root node generated according to the current chameleon-Shrubs authentication tree, and verifying the message signature pair by using the multi-time signature public key to obtain a verification result.

[0012] Optionally, the initial chameleon-Shrubs authentication tree is obtained, and the method comprises:

[0013] generating a trapdoor key and a hash key of a chameleon hash function by using preset security parameters;

[0014] constructing an initial chameleon-Shrubs tree based on a preset depth, and initializing a leftmost node of each layer in the initial chameleon-Shrubs tree by using the hash key to obtain chameleon hash nodes, and determining each chameleon hash node as a corresponding Shrubs node in each layer in the initial chameleon-Shrubs tree;

[0015] constructing a Shrubs node authentication tree by taking the corresponding Shrubs node in each layer in the initial chameleon-Shrubs tree as a leaf node, and the topmost node of the Shrubs node authentication tree is a verification root node obtained based on the Shrubs nodes in the initial chameleon-Shrubs tree;

[0016] obtaining an initial chameleon-Shrubs authentication tree based on the Shrubs nodes in the initial chameleon-Shrubs tree, the Shrubs node authentication tree, a value of an initialized counter, and an initialized tree capacity.

[0017] Optionally, the key management method further comprises:

[0018] The trapdoor key of the chameleon hash function and the updated message value of the target Shrubs node are used to determine the updated random number of the target Shrubs node.

[0019] Optionally, the determining the target empty node from the previous chameleon Shrubs tree comprises:

[0020] determining whether the value of the previous counter is equal to the initialized tree capacity, and if the value of the previous counter is not equal to the initialized tree capacity, determining the target empty node from the previous chameleon Shrubs tree.

[0021] Correspondingly, after the trapdoor key of the chameleon hash function and the updated message value of the target Shrubs node are used to determine the updated random number of the target Shrubs node, the method further comprises:

[0022] increasing the value of the previous counter to obtain the value of the current counter.

[0023] Optionally, the determining the target Shrubs node corresponding to the target empty node in the previous chameleon Shrubs tree comprises:

[0024] if the target empty node is a Shrubs node at the layer, determining the target empty node as the target Shrubs node corresponding to the target empty node in the previous chameleon Shrubs tree, and determining the public key in the one-time signature key pair saved by the target Shrubs node as the updated message value of the target Shrubs node;

[0025] if the target empty node is not a Shrubs node at the layer, tracing upwards based on the target empty node in the previous chameleon Shrubs tree to determine the target Shrubs node corresponding to the target empty node and the traced nodes passed through during the upward tracing, determining the hash value of the traced nodes, and using the hash value of the traced nodes to determine the updated message value of the target Shrubs node;

[0026] Correspondingly, the trapdoor key of the chameleon hash function and the updated message value of the target Shrubs node are used to determine the updated random number of the target Shrubs node, comprising:

[0027] The trapdoor key of the chameleon hash function, the updated message value of the target Shrubs node, the initial message value of the target Shrubs node, and an initial random number are used to determine an updated random number of the target Shrubs node, and an index of a public key in the one-time signature key pair is set as a value of the previous counter.

[0028] Optionally, the message signature pair is obtained based on the first digital signature, the public key in the one-time signature key pair, and the to-be-signed message.

[0029] An authentication path from the target null node to the verification root node is generated according to the current chameleon-Shrubs authentication tree, and a second digital signature is generated based on the authentication path and the index.

[0030] The target digital signature is obtained based on the first digital signature, the second digital signature, and the public key in the one-time signature key pair, so as to obtain a message signature pair containing the target digital signature and the to-be-signed message.

[0031] Optionally, the verification result is obtained by verifying the message signature pair based on the multiple signature public key.

[0032] The first digital signature and the to-be-signed message in the message signature pair are verified based on the public key in the one-time signature key pair, so as to obtain a first type of verification result, and if the first type of verification result indicates that the verification is passed, the target digital signature in the message signature pair is verified based on the multiple signature public key, so as to obtain a second type of verification result.

[0033] In a second aspect, the present application discloses a key management device, comprising:

[0034] The digital signature module is configured to sign the to-be-signed message based on a private key in a one-time signature key pair, so as to obtain a first digital signature.

[0035] The authentication tree obtaining module is configured to obtain a previous chameleon-Shrubs authentication tree containing a previous chameleon Shrubs tree and a Shrubs node authentication tree.

[0036] determine a target empty node from the last chameleon-Shrubs tree, and write a public key in the one-time signature key pair into the target empty node, determine a target Shrubs node corresponding to the target empty node in the last chameleon-Shrubs tree;

[0037] a structure updating module, configured to determine an updated nonce of the target Shrubs node by using a trapdoor key of the chameleon hash function and an updated message value of the target Shrubs node, and update a structure of the last chameleon-Shrubs authentication tree by using the updated nonce to obtain a current chameleon-Shrubs authentication tree, and keep a multi-time signature public key of the last chameleon-Shrubs authentication tree consistent with a multi-time signature public key of the current chameleon-Shrubs authentication tree;

[0038] a signature verification module, configured to obtain a message signature pair by using the multi-time signature public key based on an authentication path from the target empty node to the verification root node generated according to the current chameleon-Shrubs authentication tree, the first digital signature, the public key in the one-time signature key pair, and the message to be signed, and verify the message signature pair by using the multi-time signature public key to obtain a verification result.

[0039] In a third aspect, the present application discloses an electronic device, comprising:

[0040] a memory, configured to save a computer program;

[0041] a processor, configured to execute the computer program to implement the steps of the key management method disclosed above.

[0042] In a fourth aspect, the present application discloses a computer readable storage medium, configured to store a computer program; wherein the computer program is executed by a processor to implement the steps of the key management method disclosed above.

[0043] The application has the beneficial effects that: the private key in a one-time signature key pair is used to sign a to-be-signed message to obtain a first digital signature; an upper chameleon-Shrubs authentication tree containing an upper chameleon-Shrubs tree and a Shrubs node authentication tree is obtained; the topmost node of the Shrubs node authentication tree is a verification root node obtained based on Shrubs nodes of each layer in the upper chameleon-Shrubs tree; a target empty node is determined from the upper chameleon-Shrubs tree, and the public key in the one-time signature key pair is written into the target empty node, and a target Shrubs node corresponding to the target empty node in the upper chameleon-Shrubs tree is determined; a trapdoor key of a chameleon hash function and an updated message value of the target Shrubs node are used to determine an updated random number of the target Shrubs node, and the updated random number is used to update the structure of the upper chameleon-Shrubs authentication tree to obtain a current chameleon-Shrubs authentication tree, so that the multiple signature public keys of the upper chameleon-Shrubs authentication tree are consistent with the multiple signature public keys of the current chameleon-Shrubs authentication tree; a message signature pair is obtained based on an authentication path from the target empty node to the verification root node generated according to the current chameleon-Shrubs authentication tree, the first digital signature, the public key in the one-time signature key pair, and the to-be-signed message, so as to verify the message signature pair by using the multiple signature public keys to obtain a verification result.

[0044] It can be seen that the chameleon-Shrubs authentication tree includes a chameleon Shrubs tree and a Shrubs node authentication tree, and the chameleon Shrubs tree has Shrubs nodes at each layer, and the top node of the Shrubs node authentication tree is a verification root node obtained based on the Shrubs nodes at each layer in the chameleon Shrubs tree, so that the chameleon-Shrubs authentication tree has collision resistance, and after the public key in the one-time signature key pair is written into the target empty node, the average traceable path can be reduced when the target Shrubs node corresponding to the target empty node in the previous chameleon Shrubs tree is determined, and in the case that the hash value of the Shrubs node remains unchanged, the trapdoor key of the chameleon hash function and the updated message value of the target Shrubs node are used to determine the updated random number of the target Shrubs node, because of the collision resistance of the chameleon-Shrubs authentication tree, only the message value and the random number need to be updated, that is, the updated message value and the updated random number of the target Shrubs node are determined, so that the hash value of the target Shrubs node does not need to be changed, and then the multiple signature public keys of the previous chameleon-Shrubs authentication tree and the multiple signature public keys of the current chameleon-Shrubs authentication tree can remain consistent, that is, when a new one-time signature public key is added to the chameleon Shrubs tree in the chameleon-Shrubs authentication tree, only the message value and the random number of the target Shrubs node need to be updated, so that the multiple signature public keys can also be used for verification of the newly added one-time signature public key, and the average authentication path is reduced, and the overhead of the chameleon-Shrubs authentication tree for managing one-time signature public keys is reduced. BRIEF DESCRIPTION OF DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only embodiments of the present application, and those skilled in the art can also obtain other drawings according to the provided drawings without creative labor.

[0046] Figure 1 A specific Shrubs tree initialization state diagram disclosed by the present application;

[0047] Figure 2 A specific leaf node adding process diagram disclosed by the present application;

[0048] Figure 3 A specific corresponding relationship diagram disclosed by the present application;

[0049] Figure 4 A specific key management method flowchart disclosed by the present application;

[0050] Figure 5 A specific chameleon Shrubs tree diagram disclosed in the present application;

[0051] Figure 6 A specific chameleon Shrubs tree diagram disclosed in the present application;

[0052] Figure 7 A specific public key writing diagram disclosed in the present application;

[0053] Figure 8 A specific chameleon Shrubs tree diagram disclosed in the present application;

[0054] Figure 9 A key management device structure diagram disclosed in the present application;

[0055] Figure 10 An electronic device structure diagram disclosed in the present application. DETAILED DESCRIPTION

[0056] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the present application.

[0057] A one-time signature is a special digital signature, and the basic idea is to sign a message by using a one-way function. Compared with a public key signature based on a trapdoor function, the generation and verification of a one-time signature are more efficient. However, a one-time signature will expose part of a private key in the signing process. Therefore, in order to ensure the security of the signature, each pair of keys can be used only once. Therefore, if different keys are generated for different messages, the key management burden will be too heavy.

[0058] In order to reduce the space complexity of a one-time signature scheme and solve the problem of complex key management, one solution is an improved scheme based on a Merkle tree. However, all one-time signature key pairs need to be calculated in advance, and the authentication path is long, which leads to a large key management overhead. Another solution is to combine a chameleon hash function with a Merkle tree to construct a chameleon authentication tree (CAT), and combine the chameleon authentication tree with a one-time signature scheme. However, when adding a leaf node, the whole path from the root node to the leaf node needs to be traversed, and then the missing nodes and sibling nodes in the path are generated, and the real leaf node is updated from bottom to top until the chameleon hash node. The authentication path is still long, and the update operation overhead is also large.

[0059] To this end, the application correspondingly provides a key management scheme, which reduces the overhead of key management.

[0060] For the convenience of understanding, first, the chameleon hash function and shrubs tree involved in the key management scheme are introduced.

[0061] The chameleon hash function family includes three algorithms , which are defined as follows:

[0062] 1.1) The key generation function is: , input security parameter , output hash key and trapdoor key ;

[0063] 1.2) The chameleon hash function is: , input hash key message random number , output hash value with fixed length , wherein , message range and random number range are set in advance;

[0064] 1.3) The random number update function is: , input trapdoor key , message random number output , and satisfies ,

[0065] According to the above content, a secure chameleon hash function needs to satisfy the following two properties:

[0066] 1.1) Collision resistance: the enemy, without knowing the trapdoor key TK, for a given message , random number , output random number satisfies The probability is negligible, that is, the same hash value can be obtained by updating the message and the random number, that is, the hash value can be kept unchanged;

[0067] 1.2) Semantic security: for any message , the probability distribution of hash value and is computationally indistinguishable. In particular, for randomly selected , no information about can be obtained from the hash value .

[0068] Further, Shrubs tree is a variant of Merkle tree, with the following characteristics:

[0069] 2.1) A series of Shrubs nodes "represent" the whole tree: Unlike Merkle tree, Shrubs tree is not represented by only one root node, but each layer selects a node (called Shrubs node) to "represent" the whole tree. Assuming a Shrubs tree with depth D, D Shrubs nodes are needed as the root nodes of the sub-trees, which can represent a complete Merkle tree (uniqueness) and cover all the added leaf nodes. Among them, the Shrubs node is the root of the rightmost complete sub-tree in the layer, that is, the Shrubs node is the left neighbor of the rightmost node in the layer.

[0070] 2.2) The storage update when adding leaf nodes is O(1): When adding a leaf node, calculate the hash value upwards until the nearest sub-tree root of the leaf node, and then update the sub-tree root node to the Shrubs node in the layer. In this way, only one Shrubs node needs to be updated each time a leaf node is added.

[0071] 2.3) The authentication path is shorter: To prove whether a leaf node is in the Shrubs tree, only the authentication path of the nearest sub-tree of the leaf node needs to be given.

[0072] Next, take a Shrubs tree with depth D=4 as an example:

[0073] For example Figure 1 A specific Shrubs tree initialization state diagram is shown, which initializes the Shrubs node with empty nodes, Figure 1 The green nodes in the figure are the initialized Shrubs nodes, a total of 4, and the remaining gray nodes are empty nodes, that is, nodes that do not exist in the initialization state.

[0074] For example Figure 2 A specific leaf node addition process diagram is shown, a total of 8 leaf nodes are added, and each time a leaf node is added, one nearest sub-tree root node (Shrubs node) is updated. With the addition of leaf nodes, Figure 2The gray empty leaf node gradually changes to black, while the purple color is the current corresponding and already updated Shrubs node, the green color is the un-updated Shrubs node, and the orange line is the tracing path thereof, i.e., the tracing path from the leaf node to the Shrubs node. Specifically, if the left leaf node is added, the position of the added node is the subtree root, and the update can be performed; if the right leaf node is added, the tracing is performed upwards until the left node, and then the Shrubs node is updated.

[0075] For example Figure 3 A specific corresponding relationship diagram is shown, which represents the corresponding relationship of updating the Shrubs node in the process of adding the leaf node to the Shrubs tree. It can be seen that the left node of each layer is updated once, and only once, and therefore, the average update path length AvePathLen is:

[0076] ;

[0077] For the authentication path, only the authentication path of the Shrubs node closest to the leaf node needs to be found. Therefore, if the authentication path of the leaf node is given immediately after the leaf node is added, the average authentication path length is , which is one less than the traditional update path because the authentication path does not include the verification root node (the Shrubs node).

[0078] Specifically, Table 1 shows the comparison between the Shrubs tree and the Merkle tree. It can be seen that the Shrubs tree has obvious advantages in terms of update overhead and authentication path. However, it should be noted that the Shrubs tree needs D subtree root nodes to represent the entire tree, while the Merkle tree only needs one root node

[0079] Table 1

[0080]

[0081] Referring to Figure 4 As shown in the figure, the embodiment of the application discloses a key management method, comprising:

[0082] Step S11: signing the to-be-signed message by using the private key in the one-time signature key pair to obtain a first digital signature.

[0083] Let be a one-time signature scheme, first generate a one-time signature key pair by using a one-time signature key pair generation algorithm The one-time signature key pair is generated as follows: , wherein is the private key in the one-time signature key pair, is the public key in the one-time signature key pair, represents a security parameter, and then the one-time signature scheme is used signing the message m to be signed to obtain a first digital signature , the formula is .

[0084] Step S12: obtaining a previous chameleon-Shrubs authentication tree containing a previous chameleon Shrubs tree and a Shrubs node authentication tree; wherein the topmost node of the Shrubs node authentication tree is a verification root node obtained based on the Shrubs node of each layer in the previous chameleon Shrubs tree.

[0085] In the embodiment, the initial chameleon-Shrubs authentication tree is obtained by: generating a trapdoor key and a hash key of a chameleon hash function by using a preset security parameter; constructing an initial chameleon Shrubs tree based on a preset depth, and initializing the leftmost node of each layer in the initial chameleon Shrubs tree by using the hash key to obtain a chameleon hash node, and determining each chameleon hash node as the Shrubs node corresponding to each layer in the initial chameleon Shrubs tree; taking the Shrubs node corresponding to each layer in the initial chameleon Shrubs tree as a leaf node, and constructing a Shrubs node authentication tree; wherein the topmost node of the Shrubs node authentication tree is a verification root node obtained based on each Shrubs node in the initial chameleon Shrubs tree; and obtaining an initial chameleon-Shrubs authentication tree based on each Shrubs node in the initial chameleon Shrubs tree, the Shrubs node authentication tree, the value of the initialized counter, and the initialized tree capacity.

[0086] The chameleon Shrubs authentication tree (CST) introduces a chameleon hash node into the Shrubs tree, so that the number of final verification root nodes is only one. The specific construction is as follows:

[0087] 1) For example, as shown in a specific chameleon Shrubs tree diagram Figure 5 , first generate D chameleon hash nodes as Shrubs nodes to obtain a chameleon Shrubs tree, so that the value in the Shrubs node is no longer a normal hash value, but a chameleon hash value, and a chameleon Shrubs tree is obtained;

[0088] 2) For example, as shown in a specific chameleon Shrubs tree diagram Figure 6A specific Shrubs node authentication tree is shown, and a Shrubs node authentication tree (SNAT) is constructed with D Shrubs nodes as leaf nodes, and then the root node of the tree is used as the verification root node of the CSAT, so that the number of final verification root nodes is reduced from D to 1, so that the authentication path is increased ;

[0089] Therefore, the chameleon-Shrubs authentication tree (CSAT) is composed of a chameleon Shrubs tree (CST) and a Shrubs node authentication tree (SNAT). Wherein, the initial chameleon-Shrubs authentication tree is obtained , the multi-signature private key , the multi-signature public key , that is, input the security parameter and the depth D of the tree, output the public key of the chameleon Shrubs authentication tree and the private key of the chameleon Shrubs authentication tree , the process of obtaining the initial chameleon-Shrubs authentication tree is as follows:

[0090] 1) Generate a public-private key pair of the chameleon hash function ;

[0091] 2) Initialize D chameleon hash nodes as Shrubs nodes, that is , wherein ; randomly select a message from the pre-set message range , and select a random number from the pre-set random number range ;

[0092] 3) Construct a Shrubs node Merkle tree (SNMT) with a height related to with D Shrubs nodes as leaf nodes, and the root node is denoted as root;

[0093] 4) Initialize the database storing data as empty DB←NULL;

[0094] 5) Set the value of the initialized counter n to 0, and the initialized tree capacity capacity to ;

[0095] 6) Add the Shrubs node, SNMT, n, and capaticy to the CSAT structure, that is ​Thus, the initial chameleon-Shrubs authentication tree is obtained, and the root node root is a verification root node of the Shrubs node authentication tree.

[0096] The embodiment also includes: using the initial chameleon-Shrubs authentication tree, the trapdoor key, and the multiple signature private key of the initial chameleon-Shrubs tree to save the multiple signature public key of the initial chameleon-Shrubs authentication tree in the verification root node, wherein the multiple signature public key of the initial chameleon-Shrubs authentication tree corresponds to the public key in each one-time signature key pair saved by the initial chameleon-Shrubs tree. The root node of the initial chameleon-Shrubs authentication tree and the hash key are used to generate the multiple signature public key of the initial chameleon-Shrubs authentication tree, that is, In this way, the public and private key pair of the chameleon-Shrubs authentication tree can be generated It should be noted that the multiple signature public key of the initial chameleon-Shrubs authentication tree corresponds to the public key in each one-time signature key pair saved by the initial chameleon-Shrubs tree, that is, the multiple signature public key in the embodiment can be used multiple times and can correspond to different one-time signature public keys.

[0097] It can be understood that after the initial chameleon-Shrubs authentication tree is obtained, if the public key in the one-time signature key pair needs to be written into the initial chameleon-Shrubs authentication tree, the initial chameleon-Shrubs authentication tree serves as the previous chameleon-Shrubs authentication tree, and the initial chameleon-Shrubs tree and the Shrubs node authentication tree serve as the previous chameleon-Shrubs tree and the Shrubs node authentication tree, respectively.

[0098] Step S13: determining a target empty node from the previous chameleon-Shrubs tree, writing the public key in the one-time signature key pair into the target empty node, and determining a target Shrubs node corresponding to the target empty node in the previous chameleon-Shrubs tree.

[0099] In the embodiment, determining the target empty node from the previous chameleon Shrubs tree comprises: judging whether the value of the previous counter is equal to the initialized tree capacity, and if the value of the previous counter is not equal to the initialized tree capacity, determining the target empty node from the previous chameleon Shrubs tree. First, it is judged whether n == capacity is true, that is, whether the tree capacity of the previous chameleon Shrubs tree is full, that is, whether there is an empty leaf node in the previous chameleon Shrubs tree for saving a signature public key. If true, it indicates that there is no empty leaf node, and thus the public key writing process is exited. If not true, it indicates that there is an empty leaf node for saving a signature public key, and then the target empty node is determined from the previous chameleon Shrubs tree. The target empty node is the right adjacent empty leaf node of the leaf node that has saved the public key.

[0100] In the embodiment, determining the target Shrubs node corresponding to the target empty node in the previous chameleon Shrubs tree comprises: if the target empty node is a Shrubs node at the current layer, determining the target empty node as the target Shrubs node corresponding to the target empty node in the previous chameleon Shrubs tree, and determining the public key in the signature key pair saved by the target Shrubs node as the updated message value of the target Shrubs node; and if the target empty node is not a Shrubs node at the current layer, tracing upwards based on the target empty node in the previous chameleon Shrubs tree to determine the target Shrubs node corresponding to the target empty node and the traced nodes passed through during the upward tracing, determining the hash value of the traced nodes, and determining the updated message value of the target Shrubs node by using the hash value of the traced nodes.

[0101] In a specific case of determining the target Shrubs node, if the target empty node is a Shrubs node at the current layer, that is, if the target empty node itself is a Shrubs node, it is not necessary to further trace upwards the Shrubs node, and the target empty node can be directly determined as the target Shrubs node corresponding to the target empty node in the previous chameleon Shrubs tree, and the public key in the signature key pair saved by the target Shrubs node is determined as the updated message value of the target Shrubs node. .

[0102] In the specific case of determining the target Shrubs node, if the target null node is not a Shrubs node in the layer, the target null node is traced upwards in the previous chameleon Shrubs tree to determine the target Shrubs node corresponding to the target null node and the traced nodes in the tracing, the hash value of the traced node is determined, and the updated message value of the target Shrubs node is determined by using the hash value of the traced node , for example Figure 7 A specific public key writing diagram is shown, the depth of the previous chameleon Shrubs tree is 4, and nodes 6, 10, 12, and 14 are Shrubs nodes in the layer, and node 7 is the target null node. Since node 7 is not a Shrubs node in the layer, it needs to be traced upwards to determine the target Shrubs node corresponding to the target null node. It can be understood that node 14 is the target Shrubs node corresponding to the target null node 7, and the traced nodes in the tracing are nodes 11 and 13. The updated message value of node 14 needs to be determined by using the hash value of the traced node 13 , that is .

[0103] Step S14: determining the updated random number of the target Shrubs node by using the trapdoor key of the chameleon hash function and the updated message value of the target Shrubs node, and updating the structure of the previous chameleon-Shrubs authentication tree by using the updated random number to obtain the current chameleon-Shrubs authentication tree, and keeping the multiple signature public key of the previous chameleon-Shrubs authentication tree consistent with the multiple signature public key of the current chameleon-Shrubs authentication tree.

[0104] In this embodiment, the determination of the updated random number of the target Shrubs node by using the trapdoor key of the chameleon hash function and the updated message value of the target Shrubs node includes: determining the updated random number of the target Shrubs node by using the trapdoor key of the chameleon hash function, the updated message value of the target Shrubs node, the initial message value of the target Shrubs node, and the initial random number, and setting the index of the public key in the one-time signature key pair as the value of the previous counter.

[0105] It can be understood that, according to the random number update function , the updated random number of node 14 can be determined by using the trapdoor key of the chameleon hash function , the updated message value of the target Shrubs node 14 , and the initial message value of the target Shrubs node 14 , initial random number to determine, i.e. , i.e. , so that the multiple signature public key of the previous chameleon-Shrubs authentication tree can be kept consistent with the multiple signature public key of the current chameleon-Shrubs authentication tree. After updating the random number, the index of the public key in the one-time signature key pair is set to the value of the previous counter, i.e. the index of data in the tree is set to , the public key data is added to the database DB.

[0106] In this embodiment, after determining the updated random number of the target Shrubs node by using the trapdoor key of the chameleon hash function and the updated message value of the target Shrubs node, the value of the previous counter is increased to obtain the value of the current counter. Because the counter can represent the current capacity of the tree, i.e. represent the number of one-time signature public keys that have been saved in the current chameleon-Shrubs tree, when the one-time signature public key is added again, the previous counter needs to be increased by 1, i.e. if it is the first time to add the public key, the previous counter is set to 0. .

[0107] The structure of the previous chameleon-Shrubs authentication tree is updated by using the updated random number to obtain the current chameleon-Shrubs authentication tree , and the update content specifically includes the random number of the leaf node, the intermediate hash node and the chameleon hash node, and then the current chameleon-Shrubs authentication tree The multiple signature private key of the chameleon-Shrubs authentication tree is updated , specifically .

[0108] Step S15: based on the authentication path from the target null node to the verification root node generated according to the current chameleon-Shrubs authentication tree, the first digital signature, the public key in the one-time signature key pair and the message signature pair to be signed, the message signature pair is verified by using the multiple signature public key to obtain a verification result.

[0109] In the embodiment, the message signature pair is obtained by using the first digital signature, the second digital signature and the public key in the one-time signature key pair. The authentication path from the target null node to the verification root node is generated , the public key in the one-time signature key pair is added to the chameleon-Shrubs authentication tree, and finally the index, the updated multi-time signature key and the authentication path are outputted.

[0110] For example, as shown in a specific Shrubs node authentication tree diagram, the authentication path from the target null node 7 to the verification root node includes the target null node 7 to the target Shrubs node 14 and the node 14 to the verification root node 17, and thus the authentication path is Figure 8 , and the index of the output data, the updated multi-time signature private key and the authentication path are Further, the second digital signature is generated by using the authentication path and the index , that is ; thus the target digital signature is obtained by using the first digital signature , the second digital signature and the public key in the one-time signature key pair , that is , to obtain the message signature pair containing the target digital signature and the message to be signed .

[0111] ​​​​​​​​​​In this embodiment, the step of verifying the message signature pair using the multiple signature public key to obtain a verification result includes: using the public key in the single signature key pair to verify the first digital signature and the message to be signed in the message signature pair to obtain a first type of verification result; if the first type of verification result indicates that the verification is successful, then using the multiple signature public key to verify the target digital signature in the message signature pair to obtain a second type of verification result. During the process of verifying the message signature pair using the multiple signature public key to obtain a verification result ( The verification process mainly falls into two categories. First, it utilizes the public key from a signature key pair. The first digital signature in the message signature pair Verification is performed, i.e., 0 / 1 Secondly, the CSAT verification algorithm is run again, using the public key of multiple signatures to verify the target digital signature in the message signature pair, in order to obtain the second type of verification result, i.e. ,verify Is it the first in the current Chameleon-Shrubs certification tree? Each element is considered. If both validations pass, the output is 1; otherwise, the output is 0. Furthermore, the CSAT validation algorithm is as follows:

[0112] 1) Validate the first in the database Is each element a public key in a signature key pair? ;

[0113] 2) If so, then utilize and Calculate the root node hash value Determine the calculated hash value Is it equal to ; such as Figure 7 and Figure 8 Taking the target empty node 7 as an example, the authentication path is: First, the public key in the signature key pair is calculated. Calculate Then calculate the hash value of chameleon hash node 14. ,Right now reuse Calculate the root node hash value ,determination Is it equal to If the expression is equal to the expression, the verification passes and the output is 1; if the expression is not equal to the expression, the verification fails and the output is 0.

[0114] Therefore, the chameleon-Shrubs authentication tree of the application includes a chameleon-Shrubs tree and a Shrubs node authentication tree, and the chameleon-Shrubs tree has Shrubs nodes at each layer, and the top node of the Shrubs node authentication tree is a verification root node obtained based on the Shrubs nodes at each layer in the chameleon-Shrubs tree, so that the chameleon-Shrubs authentication tree has collision resistance, and after the public key in the one-time signature key pair is written into the target empty node, the average traceability path can be reduced when the target Shrubs node corresponding to the target empty node in the previous chameleon-Shrubs tree is determined, and in the case that the hash value of the Shrubs node remains unchanged, the trapdoor key of the chameleon hash function and the updated message value of the target Shrubs node are used to determine the updated random number of the target Shrubs node, because of the collision resistance of the chameleon-Shrubs authentication tree, only the message value and the random number need to be updated to determine the updated message value and the updated random number of the target Shrubs node, so that the hash value of the target Shrubs node does not need to be changed, and then the multiple signature public keys of the previous chameleon-Shrubs authentication tree and the multiple signature public keys of the current chameleon-Shrubs authentication tree can still remain consistent, that is, when a new one-time signature public key is added to the chameleon-Shrubs tree in the chameleon-Shrubs authentication tree, only the message value and the random number of the target Shrubs node need to be updated, so that the multiple signature public keys can also be used for verification of the newly added one-time signature public key, and the average authentication path is reduced, and the overhead of the chameleon-Shrubs authentication tree for managing the one-time signature public key is reduced.

[0115] The chameleon-Shrubs authentication tree includes a chameleon-Shrubs tree and a Shrubs node authentication tree, specifically, the Shrubs nodes in the Shrubs tree are replaced with chameleon hash nodes to obtain a chameleon-Shrubs tree, and then a Shrubs node authentication tree is constructed with the chameleon hash nodes as leaf nodes, finally, the chameleon-Shrubs authentication tree is composed of a chameleon-Shrubs tree and a Shrubs node authentication tree, and the root node of the Shrubs node authentication tree is used as the verification root node of the chameleon-Shrubs authentication tree; the chameleon-Shrubs authentication tree is used for dynamic bounded management of one-time signature keys, and the public key of one-time signature is used as a leaf node, and in the case that the tree size is determined, the leaf node can be dynamically added, and the chameleon-Shrubs authentication tree is compared with the chameleon authentication tree as shown in Table 2:

[0116] Table 2

[0117]

[0118] As shown in Table 2, CSAT and CAT are comparable in terms of the number of root nodes, capacity, average update path length, and the number of chameleon hash collisions calculated per update. However, CAT requires the generation of... CSAT requires only D chameleon hash nodes to generate the entire tree, thus reducing the overhead of generating the entire tree. Furthermore, CSAT's average authentication path length is logarithmically related to its depth, while CAT's is linearly related, giving CSAT a significant advantage in authentication path length. Therefore, this embodiment optimizes the authentication path of leaf nodes, ensuring that the average authentication path length is logarithmically related to the tree depth, rather than linearly. Moreover, adding leaf nodes eliminates the need for "generating first and then updating," further reducing the overhead of generating the entire tree and the update overhead to only a fraction of the total cost, with an average update path length close to 2.

[0119] See Figure 9 As shown in the figure, this application discloses a key management device, including:

[0120] The digital signature module 11 is used to sign the message to be signed using the private key in a signature key pair to obtain a first digital signature;

[0121] The authentication tree acquisition module 12 is used to acquire the previous chameleon-Shrubs authentication tree, which includes the previous chameleon-Shrubs tree and the Shrubs node authentication tree; wherein, the topmost node of the Shrubs node authentication tree is the verification root node acquired based on the Shrubs nodes of each level in the previous chameleon-Shrubs tree.

[0122] The node determination module 13 is used to determine the target empty node from the previous chameleon shrubs tree, and write the public key in the first signature key pair into the target empty node, thereby determining the target shrubs node in the previous chameleon shrubs tree that corresponds to the target empty node;

[0123] The structure update module 14 is used to determine the updated random number of the target Shrubs node using the trapdoor key of the Chameleon hash function and the updated message value of the target Shrubs node, and to update the structure of the previous Chameleon-Shrubs authentication tree using the updated random number to obtain the current Chameleon-Shrubs authentication tree, while keeping the multiple signature public key of the previous Chameleon-Shrubs authentication tree consistent with the multiple signature public key of the current Chameleon-Shrubs authentication tree.

[0124] The signature verification module 15 is configured to obtain a message signature pair based on the authentication path from the target null node to the verification root node generated according to the current chameleon-Shrubs authentication tree, the first digital signature, the public key in the one-time signature key pair and the message to be signed, and verify the message signature pair with the multi-time signature public key to obtain a verification result.

[0125] It can be seen that the chameleon-Shrubs authentication tree includes a chameleon Shrubs tree and a Shrubs node authentication tree, and the chameleon Shrubs tree has Shrubs nodes at each layer, and the top node of the Shrubs node authentication tree is a verification root node obtained based on the Shrubs nodes at each layer in the chameleon Shrubs tree, so that the chameleon-Shrubs authentication tree has collision resistance, and after the public key in the one-time signature key pair is written into the target null node, the average traceability path can be reduced when the target Shrubs node corresponding to the target null node in the previous chameleon Shrubs tree is determined, and in the case that the hash value of the Shrubs node is unchanged, the trapdoor key of the chameleon hash function and the updated message value of the target Shrubs node are used to determine the updated random number of the target Shrubs node, because the chameleon-Shrubs authentication tree has collision resistance, only the message value and the random number need to be updated, that is, the updated message value and the updated random number of the target Shrubs node are determined, so that the hash value of the target Shrubs node does not need to be changed, and then the multi-time signature public key of the previous chameleon-Shrubs authentication tree and the multi-time signature public key of the current chameleon-Shrubs authentication tree can still be consistent, that is, when a new one-time signature public key is added to the chameleon Shrubs tree in the chameleon-Shrubs authentication tree, only the message value and the random number of the target Shrubs node need to be updated, so that the multi-time signature public key can also be used for verification of the newly added one-time signature public key, and the average authentication path is reduced, and the overhead of the chameleon-Shrubs authentication tree for managing the one-time signature public key is reduced.

[0126] Further, the embodiment of the application further provides an electronic device. Figure 10 The electronic device 20 shown in the figure is a structural diagram according to an exemplary embodiment, and the content in the figure cannot be considered as any limitation on the use range of the application.

[0127] Figure 10A structural schematic diagram of an electronic device is provided in the embodiments of the present application. Specifically, it can include at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is configured to store a computer program, and the processor 21 is configured to load and execute the computer program to implement the related steps in the key management method performed by the electronic device disclosed in any of the preceding embodiments.

[0128] In the embodiments, the power supply 23 is configured to provide operating voltage for each hardware device on the electronic device; the communication interface 24 is capable of creating a data transmission channel between the electronic device and external devices, and the communication protocol followed by the communication interface 24 is any communication protocol applicable to the technical solution of the present application, which is not limited specifically herein; the input / output interface 25 is configured to obtain external input data or output data to the outside world, and the specific interface type can be selected according to the specific application needs, which is not limited specifically herein.

[0129] The processor 21 can include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one of a hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 21 can also include a main processor and a coprocessor. The main processor is a processor for processing data in a wake-up state, also known as a CPU (Central Processing Unit). The coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 21 can be integrated with a GPU (Graphics Processing Unit) that is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 can also include an AI (Artificial Intelligence) processor for processing machine learning-related computing operations.

[0130] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, a random access memory, a magnetic disk, or an optical disk, etc. The resources stored thereon include an operating system 221, a computer program 222, and data 223, etc. The storage mode can be temporary storage or permanent storage.

[0131] The operating system 221 is used to manage and control each hardware device on the electronic device and the computer program 222, so as to realize the operation and processing of the processor 21 on the mass data 223 in the memory 22, and can be Windows, Unix, Linux, etc. In addition to the computer program capable of completing the key management method disclosed by the electronic device executed by any one of the foregoing embodiments, the computer program 222 can further include a computer program capable of completing other specific work. The data 223 can include data transmitted by an external device received by the electronic device, and can also include data collected by the self input / output interface 25, etc.

[0132] Further, the application also discloses a computer readable storage medium for storing a computer program; wherein the computer program is executed by a processor to realize the key management method disclosed above. For the specific steps of the method, please refer to the corresponding content disclosed in the foregoing embodiments, which will not be described here.

[0133] In the specification, each embodiment is described in a progressive manner, and each embodiment focuses on the difference from other embodiments. For the same or similar parts between each embodiment, please refer to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the relevant part is described in the method part.

[0134] Those skilled in the art will further appreciate that the units and algorithm steps of the examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or any combination thereof. To clearly illustrate this interchangeability of hardware and software, various examples have been described herein in terms of their functionality, which has been described generally and symbolically in flow charts. Having thus described the functionality of the examples in terms of a process, it is appreciated that this functionality can be implemented by one or more types of electrical circuits or computer software, which are collectively referred to herein as a "circuit" that can carry out a variety of operations described herein. The circuit can include a variety of different types of general purpose or special purpose circuits, or combinations thereof. In addition, it is further noted that the embodiments disclosed herein can be modified to incorporate any or all of the optional features of the examples previously described, and these features can take any appropriate form disclosed or described herein.

[0135] Finally, it should be noted that, in this document, the terms "comprises", "comprising", or other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements is not necessarily limited to only those elements, but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. In addition, it should be noted that the terms "first", "second", or the like, are intended to distinguish between similar objects or actions, and are not necessarily intended to denote a physical or chronological priority.

[0136] The above describes in detail the key management method, device, equipment and medium provided by the application. The principles and implementation manners of the application are described by using specific examples. The above description of the examples is only used to help understand the method of the application and its core idea. Meanwhile, for those skilled in the art, the specific implementation manners and application ranges can be changed according to the idea of the application. In conclusion, the content of the specification should not be understood as a limitation of the application.

Claims

1. A key management method characterized by comprising: comprising: signing the message to be signed with the private key of the one-time signature key pair to obtain a first digital signature; obtaining a last chameleon-Shrubs authentication tree containing a last chameleon Shrubs tree and a Shrubs node authentication tree; wherein the topmost node of the Shrubs node authentication tree is a verification root node obtained based on the Shrubs nodes of each layer in the last chameleon Shrubs tree; determining a target empty node from the last chameleon Shrubs tree, and writing the public key of the one-time signature key pair into the target empty node, and determining a target Shrubs node corresponding to the target empty node in the last chameleon Shrubs tree; determining an updated nonce of the target Shrubs node using a trapdoor key of a chameleon hash function and an updated message value of the target Shrubs node, and updating the structure of the last chameleon-Shrubs authentication tree using the updated nonce to obtain a current chameleon-Shrubs authentication tree, and keeping the multiple signature public key of the last chameleon-Shrubs authentication tree consistent with the multiple signature public key of the current chameleon-Shrubs authentication tree; obtaining a message signature pair based on an authentication path from the target empty node to the verification root node generated according to the current chameleon-Shrubs authentication tree, the first digital signature, the public key of the one-time signature key pair, and the message to be signed, so as to verify the message signature pair using the multiple signature public key to obtain a verification result.

2. The key management method according to claim 1, characterized by, obtaining an initial chameleon-Shrubs authentication tree, comprising: generating a trapdoor key and a hash key of a chameleon hash function using a preset security parameter; constructing an initial chameleon Shrubs tree based on a preset depth, and initializing the leftmost node of each layer in the initial chameleon Shrubs tree using the hash key to obtain chameleon hash nodes, and determining each chameleon hash node as a Shrubs node corresponding to each layer in the initial chameleon Shrubs tree; taking the Shrubs node corresponding to each layer in the initial chameleon Shrubs tree as a leaf node, and constructing a Shrubs node authentication tree; wherein the topmost node of the Shrubs node authentication tree is a verification root node obtained based on each Shrubs node in the initial chameleon Shrubs tree; obtaining an initial chameleon-Shrubs authentication tree based on each Shrubs node in the initial chameleon Shrubs tree, the Shrubs node authentication tree, the value of the initialized counter, and the initialized tree capacity.

3. The key management method according to claim 2, wherein, further comprising: The trapdoor key of the chameleon hash function and the updated message value of the target Shrubs node are used to determine the updated random number of the target Shrubs node, and the updated random number of the target Shrubs node is saved in the target Shrubs node.

4. The key management method according to claim 2, wherein, The target empty node is determined from the previous chameleon Shrubs tree, and the target Shrubs node corresponding to the target empty node in the previous chameleon Shrubs tree is determined. The value of the previous counter is increased to obtain the value of the current counter. The target empty node is determined from the previous chameleon Shrubs tree, and the target Shrubs node corresponding to the target empty node in the previous chameleon Shrubs tree is determined. If the target empty node is a Shrubs node at the layer, the target empty node is determined as the target Shrubs node corresponding to the target empty node in the previous chameleon Shrubs tree, and the public key in the one-time signature key pair saved in the target Shrubs node is determined as the updated message value of the target Shrubs node.

5. The key management method according to claim 4, wherein, If the target empty node is not a Shrubs node at the layer, the target Shrubs node corresponding to the target empty node is determined based on upward tracing of the target empty node in the previous chameleon Shrubs tree, and the hash value of the traced node is determined. The trapdoor key of the chameleon hash function and the updated message value of the target Shrubs node are used to determine the updated random number of the target Shrubs node, and the updated random number of the target Shrubs node is saved in the target Shrubs node. The target empty node is determined from the previous chameleon Shrubs tree, and the target Shrubs node corresponding to the target empty node in the previous chameleon Shrubs tree is determined. If the target empty node is a Shrubs node at the layer, the target empty node is determined as the target Shrubs node corresponding to the target empty node in the previous chameleon Shrubs tree, and the public key in the one-time signature key pair saved in the target Shrubs node is determined as the updated message value of the target Shrubs node. If the target empty node is not a Shrubs node at the layer, the target Shrubs node corresponding to the target empty node is determined based on upward tracing of the target empty node in the previous chameleon Shrubs tree, and the hash value of the traced node is determined.

6. The key management method according to claim 5, wherein, The trapdoor key of the chameleon hash function and the updated message value of the target Shrubs node are used to determine the updated random number of the target Shrubs node, and the updated random number of the target Shrubs node is saved in the target Shrubs node. The target empty node is determined from the previous chameleon Shrubs tree, and the target Shrubs node corresponding to the target empty node in the previous chameleon Shrubs tree is determined. If the target empty node is a Shrubs node at the layer, the target empty node is determined as the target Shrubs node corresponding to the target empty node in the previous chameleon Shrubs tree, and the public key in the one-time signature key pair saved in the target Shrubs node is determined as the updated message value of the target Shrubs node. If the target empty node is not a Shrubs node at the layer, the target Shrubs node corresponding to the target empty node is determined based on upward tracing of the target empty node in the previous chameleon Shrubs tree, and the hash value of the traced node is determined. The trapdoor key of the chameleon hash function and the updated message value of the target Shrubs node are used to determine the updated random number of the target Shrubs node, and the updated random number of the target Shrubs node is saved in the target Shrubs node. The target empty node is determined from the previous chameleon Shrubs tree, and the target Shrubs node corresponding to the target empty node in the previous chameleon Shrubs tree is determined. generate an authentication path from the target empty node to the verification root node according to the current chameleon-Shrubs authentication tree, and generate a second digital signature by using the authentication path and the index; obtain a target digital signature by using the first digital signature, the second digital signature and a public key in the one-time signature key pair, so as to obtain a message signature pair containing the target digital signature and the message to be signed.

7. The key management method according to claim 6, wherein, The verification of the message signature pair by using the multiple signature public key includes: verify the first digital signature and the message to be signed in the message signature pair by using the public key in the one-time signature key pair, so as to obtain a first type of verification result, and if the first type of verification result indicates that the verification is passed, verify the target digital signature in the message signature pair by using the multiple signature public key, so as to obtain a second type of verification result.

8. A key management apparatus characterized by comprising: It includes: a digital signature module configured to sign the message to be signed by using a private key in a one-time signature key pair, so as to obtain a first digital signature; an authentication tree obtaining module configured to obtain a previous chameleon-Shrubs authentication tree containing a previous chameleon-Shrubs tree and a Shrubs node authentication tree; wherein a topmost node of the Shrubs node authentication tree is a verification root node obtained based on Shrubs nodes in each layer of the previous chameleon-Shrubs tree; a node determining module configured to determine a target empty node from the previous chameleon-Shrubs tree, and write a public key in the one-time signature key pair into the target empty node, and determine a target Shrubs node corresponding to the target empty node in the previous chameleon-Shrubs tree; a structure updating module configured to determine an updated nonce of the target Shrubs node by using a trapdoor key of a chameleon hash function and an updated message value of the target Shrubs node, and update a structure of the previous chameleon-Shrubs authentication tree by using the updated nonce, so as to obtain a current chameleon-Shrubs authentication tree, and keep the multiple signature public key of the previous chameleon-Shrubs authentication tree consistent with the multiple signature public key of the current chameleon-Shrubs authentication tree; a signature verification module configured to obtain a message signature pair based on an authentication path from the target empty node to the verification root node generated according to the current chameleon-Shrubs authentication tree, the first digital signature, the public key in the one-time signature key pair and the message to be signed, so as to verify the message signature pair by using the multiple signature public key to obtain a verification result.

9. An electronic device, comprising: It includes: a memory configured to save a computer program; a processor configured to execute the computer program to implement the steps of the key management method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, a memory configured to save a computer program; wherein the computer program is executed by a processor to implement the steps of the key management method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Anti-quantum signature method, signature certificate, signature verification method and electronic equipment

    CN115085939A

  • Data authentication method and system

    CN115328875A