Key management methods, electronic devices, and storage media

By dividing the master private key into multiple secret shares and verifying their trustworthiness on multiple key generation servers to generate the target device's private key, the problem of private key leakage caused by the untrustworthiness of a single server is solved, thus achieving security in private key generation and confidentiality in data transmission.

CN116566595BActive Publication Date: 2025-11-14ZHEJIANG DAHUA TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310189647.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-23
Publication Date
2025-11-14
Estimated Expiration
2043-02-23

AI Technical Summary

Technical Problem

During the private key generation process of the target device, a single key generation server may be untrusted, leading to the leakage of client terminal private keys, device private keys, or platform server private keys, resulting in frequent information security problems.

Method used

After generating the master private key, it is divided into multiple secret shares through polynomial partitioning and sent to multiple key generation servers for verification. After ensuring the trustworthiness of the servers, the private key of the target device is generated, and then generated and sent to the target device through multiple servers.

Benefits of technology

It improves the security and reliability of private key generation, avoids the risk of private key leakage, and enhances the confidentiality of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116566595B_ABST
    Figure CN116566595B_ABST
Patent Text Reader

Abstract

This invention discloses a key management method, an electronic device, and a storage medium. The key management method includes: generating a master private key in response to receiving a private key request instruction from a target device; verifying the trustworthiness of multiple key generation servers using the master private key; and, in response to the trustworthiness of the multiple key generation servers, generating a private key for the target device through the multiple key generation servers and sending it to the target device. Through this method, the present invention can improve the security and reliability of private key generation for the target device, avoid the risk of private key leakage, and improve the confidentiality of data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of key generation, and in particular to key management methods, electronic devices, and storage media. Background Technology

[0002] In recent years, with the rapid development of the internet and computer technology, human society has gradually entered the information age, and the coverage and use of the internet in daily life have become increasingly widespread. After more than 20 years of rapid development, my country's internet has now reached the stage of interconnection between people and things. While the internet and computing technology bring convenience to human society, information security issues such as user privacy leaks, sensitive information leaks, and cyberattacks are becoming increasingly frequent.

[0003] During the private key calculation process for the target device, if only a single key generation server is used, the server may become untrusted. In this case, the client terminal's private key, the device's private key, or the platform server's private key could be leaked. Summary of the Invention

[0004] This invention provides a key management method, an electronic device, and a storage medium to improve the security of private key generation.

[0005] To address the aforementioned technical problems, this invention provides a key management method, comprising: generating a master private key in response to receiving a private key request instruction from a target device; verifying the trustworthiness of multiple key generation servers using the master private key; and generating a private key for the target device through the multiple key generation servers in response to the trustworthiness of the multiple key generation servers, and sending it to the target device.

[0006] The process of verifying the trustworthiness of multiple key generation servers using a master private key includes: dividing the master private key into multiple sub-secret shares and sending each sub-secret share to the corresponding key generation server; receiving the sub-secret shares to be verified sent by each key generation server to be verified; constructing a master private key to be verified based on each sub-secret share to be verified; and determining that the multiple key generation servers are trustworthy in response to the master private key being consistent with the master private key.

[0007] The process of dividing the master private key into multiple sub-secret shares and sending each sub-secret share to multiple key generation servers includes: dividing the master private key into multiple sub-secret shares and sending each sub-secret share and its corresponding segmentation verification information to the corresponding key generation server, so that each key generation server can verify the correctness of the sub-secret share based on the corresponding segmentation verification information.

[0008] The process involves dividing the master private key into multiple sub-secret shares and sending each sub-secret share and its corresponding segmentation verification information to the corresponding key generation server. This allows the key generation server to verify the correctness of the sub-secret shares based on the segmentation verification information. The steps include: setting a secret number; dividing the secret number and master private key using a polynomial to obtain multiple sub-secret numbers and multiple sub-master private keys; determining each sub-secret number and its corresponding sub-master private key as the sub-secret share of the corresponding key generation server; generating corresponding segmentation verification information based on the polynomial; and sending each sub-secret share and its corresponding segmentation verification information to the corresponding key generation server so that the key generation server can verify the correctness of the sub-secret share based on the segmentation verification information.

[0009] The process of generating a master private key in response to receiving a private key request instruction from the target device further includes: generating a master private key in response to receiving a private key request instruction from the target device, and generating a master public key based on the master private key; sending the master public key to the target device so that the target device can encrypt the target device's identifier using the master public key to obtain an encrypted identifier, and receiving the encrypted identifier sent by the target device.

[0010] The process of generating a private key for the target device through multiple key generation servers and sending it to the target device includes: decrypting the encrypted identifier using the master private key to obtain the identifier of the target device, and sending the identifier of the target device to any one of the key generation servers; and generating a private key for the target device based on the corresponding sub-secret share and the identifier of the target device through multiple key generation servers and sending it to the target device.

[0011] This includes generating a private key for the target device based on the corresponding sub-secret share and the identifier of the target device through multiple key generation servers, and sending it to the target device.

[0012] The target device uses its private key to sign its data, obtaining signed data, and then transmits the signed data to the target object, so that the target object can verify the signed data using the public key corresponding to the private key.

[0013] To address the aforementioned technical problems, the present invention also provides an electronic device comprising: a memory and a processor coupled to each other, wherein the processor is configured to execute program instructions stored in the memory to implement the key management method described above.

[0014] To address the aforementioned technical problems, the present invention also provides a computer-readable storage medium storing program data that can be executed to implement the key management method as described above.

[0015] The beneficial effects of this invention are as follows: Unlike the prior art, this invention generates a master private key after receiving a private key request instruction from the target device; verifies the trustworthiness of multiple key generation servers using the master private key; and when the multiple key generation servers are trustworthy, generates the target device's private key through the multiple key generation servers and sends it to the target device, thereby improving the security and reliability of the target device's private key generation, avoiding the risk of private key leakage, and improving the confidentiality of data transmission. Attached Figure Description

[0016] Figure 1 This is a flowchart illustrating an embodiment of the key management method provided by the present invention;

[0017] Figure 2 This is a flowchart illustrating another embodiment of the key management method provided by the present invention;

[0018] Figure 3 This is a structural diagram of one implementation of a key management center;

[0019] Figure 4 This is a schematic diagram of the structure of an embodiment of the electronic device provided by the present invention;

[0020] Figure 5 This is a schematic diagram of an embodiment of the computer-readable storage medium provided by the present invention. Detailed Implementation

[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0022] Please see Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the key management method provided by the present invention.

[0023] Step S11: In response to receiving the private key request instruction from the target device, generate the master private key.

[0024] The target devices can include client terminals, terminal devices, and platform servers, as well as other devices capable of transmitting messages with external devices. Client terminals include user-side terminals such as smart mobile terminals and computer terminals, while terminal devices include terminals such as cameras, testing instruments, and sensors. Platform servers refer to servers that provide resource management, performance maintenance, and monitoring configuration services to various terminals.

[0025] When a target device needs to encrypt data transmission, it sends a private key request instruction to the key management center to obtain the target device's private key from the key management center and then encrypts the data before transmission.

[0026] Upon receiving a private key request instruction from a client terminal, terminal device, or platform server, the key management center generates a master private key. The master private key in this step can be randomly generated or generated based on the identifier of the target device; no limitation is imposed here.

[0027] Step S12: Verify the trustworthiness of multiple key generation servers using the master private key.

[0028] A key generation server is a server used to generate the private key for the target device. This step uses the generated master private key to verify multiple key generation servers, determining the trustworthiness of each server. This prevents information leakage in the event that a key generation server generates the target device's private key under untrusted circumstances such as being attacked, hijacked, or forged.

[0029] In a specific application scenario, after generating the master private key, it can be sent to each key generation server in an encrypted manner. Then, it receives the master private key to be verified from each key generation server. If the master private key to be verified matches the previously generated master private key, the corresponding key generation server is considered trustworthy. If the master private key to be verified does not match the master private key, the corresponding key generation server is considered untrustworthy.

[0030] In another specific application scenario, after generating the master private key, it can be divided into multiple sub-master private keys using a special method. Each sub-master private key is then sent to its corresponding key generation server. The system then receives the sub-master private keys to be verified from each key generation server and uses a specific concatenation method to combine them into the master private key to be verified. If the master private key to be verified matches the master private key, the key generation servers are considered trustworthy. If the master private key to be verified does not match the master private key, the key generation servers are considered untrustworthy. Specifically, the method for verifying the trustworthiness of multiple key generation servers using the master private key is not limited here.

[0031] Step S13: In response to the trustworthiness of multiple key generation servers, generate a private key for the target device through the multiple key generation servers and send it to the target device.

[0032] When multiple key generation servers are all trustworthy, it means that the multiple key generation servers are operating normally in a trusted environment. The private key of the target device is generated by the multiple key generation servers and sent to the target device, so that the target device can securely use the private key to perform encrypted data transmission.

[0033] Through the above steps, the key management method of this embodiment generates a master private key after receiving a private key request instruction from the target device; verifies the trustworthiness of multiple key generation servers using the master private key; and when multiple key generation servers are trustworthy, generates the target device's private key through the multiple key generation servers and sends it to the target device, thereby improving the security and reliability of the target device's private key generation, avoiding the risk of private key leakage, and improving the confidentiality of data transmission.

[0034] Please see Figure 2 , Figure 2 This is a flowchart illustrating another embodiment of the key management method provided by the present invention.

[0035] Step S21: In response to receiving the private key request instruction from the target device, generate a master private key and generate a master public key based on the master private key.

[0036] When the target device needs to encrypt the data it transmits, it sends a private key request instruction to the key management center to obtain the private key from the key management center and encrypt the data for transmission.

[0037] Please see Figure 3 , Figure 3 This is a structural diagram of one implementation method of the key management center.

[0038] The key management center 30 in this embodiment includes n key generation servers 33, a master key generation center 31, and a communication module 32. n can be any positive integer greater than and not equal to 1, such as 2, 5, 6, 8, 10, etc. The specific value can be set based on the actual situation and is not limited here.

[0039] In a specific application scenario, n key generation servers 33, master key generation center 31 and communication module 32 can communicate with each other.

[0040] The key generation server 33 is used to calculate and generate the private key of the target device. The master key generation center 31 (Key Generation Center, KGC) runs in a trusted environment and is used to generate the master private key and the master public key; the communication module 32 is used to communicate with the target device to realize various information transmissions.

[0041] The master key generation center 31 includes a secret sharing module (not shown) and a secret reconstruction module (not shown). The secret sharing module is responsible for splitting the master private key, and the secret reconstruction module is responsible for reconstructing the master private key. The key generation server 33 mainly consists of key generation, communication, and other functional modules.

[0042] When a private key request instruction is received from the target device and sent to the key management center 30, the master key generation center 31 randomly generates a master private key and generates a master public key based on the master private key. The master public key and the master private key are a key pair obtained through an encryption algorithm (i.e., a public key and a private key, which is an asymmetric encryption method).

[0043] Step S22: Send the master public key to the target device so that the target device can encrypt the target device's identifier using the master public key to obtain the encrypted identifier, and receive the encrypted identifier sent by the target device.

[0044] The master key generation center 31 sends the master public key to the target device through the communication module 32. After receiving the master public key, the target device uses the master public key to encrypt its identifier to obtain an encrypted identifier, and then sends the encrypted identifier to the master key generation center 31 running in the trusted environment, so that the master key generation center 31 receives the encrypted identifier.

[0045] The identifier of a target device refers to the unique identification information of the target device, which can represent the uniqueness of the target device.

[0046] Step S23: Divide the master private key into multiple sub-secret shares and send each sub-secret share to multiple key generation servers respectively.

[0047] The master private key is divided into multiple sub-secret shares, the number of which can be the same as the number of key generation servers 33, so that they can be sent separately.

[0048] In a specific application scenario, the master private key is divided into multiple sub-secret shares by the secret sharing module of the master key generation center 31. Each sub-secret share and its corresponding segmentation verification information are then sent to the corresponding key generation server 33, allowing each key generation server 33 to verify the correctness of the sub-secret share based on the corresponding segmentation verification information. In a specific application scenario with 5 key generation servers, the master private key is divided into 5 sub-secret shares, namely s1, s2, s3, s4, and s5, by the secret sharing module of the master key generation center 31. The segmentation verification information for each sub-secret share is E1, E2, E3, E4, and E5, respectively. Each sub-secret share and its corresponding segmentation verification information are then sent to the corresponding key generation server; for example, sub-secret share s1 and segmentation verification information E1 are sent to the first key generation server, allowing the first key generation server to verify the correctness of sub-secret share s1 based on segmentation verification information E1. The same applies to other key generation servers, and will not be elaborated further.

[0049] In a specific application scenario, a secret number is set, and the secret number and master private key are divided by constructing a polynomial to obtain multiple sub-secret numbers and multiple sub-master private keys. Each sub-secret number and its corresponding sub-master private key is then determined as a sub-secret share of the corresponding key generation server 33. Corresponding segmentation verification information is generated based on the polynomial. Each sub-secret share and its corresponding segmentation verification information are sent to the corresponding key generation server 33 so that each key generation server 33 can verify the correctness of the sub-secret share based on the corresponding segmentation verification information.

[0050] Specifically, a large prime number p is randomly selected, q is a large prime factor of the prime number p-1, and G is a finite field Z. p The unique q-order subgroup in G, where g and h are generators of G, s is the master private key, and s∈Z. q The number of key generation servers 33 is n, where i is any one of the n key generation servers 33 (i = 1, 2, ..., n), and t is a threshold value, indicating that only sub-secret shares held by more than or equal to t key generation servers 33 can be reconstructed into the master private key. Where Z... q It is a finite field of secret space and secret share space.

[0051] In Z p Choose a secret number k, where Z p It is a finite field of the secret number space and the secret number share space. Calculate the commitment E0 = E(s, k) = g. s h k Then in Z p Randomly selected polynomial:

[0052] f(x) = s + a1x + a2x 2 +...+a t-1 x t-1 (1)

[0053] g(x) = k + b1x + b2x 2 +...+b t-1 x t-1 (2)

[0054] but:

[0055] s i =f(i) (3)

[0056] k i =g(i) (4)

[0057] Among them, s i It is the sub-master private key corresponding to the i-th key generation server 33 after the master private key is split. iIt is the sub-secret number corresponding to the i-th key generation server 33 after the secret number k is divided. The secret number and the master private key are divided into multiple sub-secret numbers and multiple sub-master private keys by constructing polynomials through formulas (1)-(4).

[0058] The secret number k i and the corresponding child master private key s i The sub-secret share (s) of the corresponding key generation server 33 is determined. i ,k i ), will the sub-secret share (s i ,k i The information is sent to the corresponding i-th key generation server 33. Then, the segmentation verification information E corresponding to the key generation server 33 is calculated and broadcast. i :

[0059] E i =E(a) i ,b i ) = g ai h bi (5)

[0060] The i-th key is generated based on the coefficients of the polynomials. Server 33 then segments and verifies the information E. i .

[0061] The master private key is divided into molecular secret shares (s) using the above polynomial. i ,k i And generate the corresponding verification information E i And each sub-secret share (s) i ,k i ) and the corresponding segmentation verification information E i The information is sent to the corresponding i-th key generation server 33, so that each key generation server 33 can verify the information based on the corresponding segmentation information E. i Verifier secret share (s) i ,k i The correctness of ).

[0062] The key generation server 33 can verify the correctness of possessing the sub-secret share using the following verification formula:

[0063]

[0064] If the above formula is true, it means that the sub-secret share received by the key generation server 33 is valid. Otherwise, it is invalid.

[0065] The above segmentation verification information E iThis setting enables each key generation server 33 participating in the private key calculation to verify the correctness of its own sub-secret share of the master private key before performing the private key calculation. If the sub-secret share is incorrect, the private key is not calculated; if the sub-secret share is correct, the private key is calculated. This further improves the security of the private key generation of the target device.

[0066] Step S24: Receive the sub-secret share to be verified sent by each key generation server to be verified; construct the master private key to be verified based on each sub-secret share to be verified; in response to the master private key to be verified being consistent with the master private key, determine that the multiple key generation servers are trustworthy.

[0067] Master key generation center 31 will generate sub-secret shares (s) i ,k i ) and the corresponding segmentation verification information E i After sending the keys to the corresponding key generation server 33, the system receives the sub-secret shares to be verified from each key generation server 33. Based on each sub-secret share, it constructs the master private key to be verified.

[0068] In a specific application scenario, the shared secret can be reconstructed using Lagrange interpolation:

[0069]

[0070] If the reconstructed master private key to be verified matches the master private key, the multiple key generation servers 33 are deemed trustworthy. If the reconstructed master private key to be verified does not match the master private key, the multiple key generation servers 33 are deemed untrustworthy.

[0071] Step S25: Decrypt the encrypted identifier using the master private key to obtain the identifier of the target device, and send the identifier of the target device to any key generation server.

[0072] After obtaining the encrypted identifier, the master key generation center 31 decrypts the encrypted identifier using the master private key to obtain the identifier of the target device, and then sends the identifier of the target device to any one of the key generation servers 33. Since the subsequent generation of the target device's private key requires the integration of the sub-secret shares of each key generation server 33, and the key generation servers 33 will exchange information, sending the identifier of the target device to any one of the key generation servers 33 will enable the generation of the private key.

[0073] The steps of receiving and decrypting the encrypted identifier and sending the identifier of the target device to any key generation server can occur before step S26 and after the master public key is sent, and their order is not restricted.

[0074] Step S26: Generate the private key of the target device based on the corresponding sub-secret share and the identifier of the target device through multiple key generation servers, and send it to the target device.

[0075] In a specific application scenario, the private key of the target device can be generated by combining the sub-secret shares corresponding to each key generation server 33 and the identifier of the target device, and then sent to the target device.

[0076] Since the identifier of the target device refers to the unique identification information of the target device, the private key generated by combining the identifier of the target device and the corresponding sub-secret share of each key generation server 33 can be bound to the target device, thereby further improving the specificity between the private key and the target device, and further improving the reliability and security of the private key and message transmission.

[0077] In this process, each key generation server 33 achieves the synthesis of sub-secret shares by exchanging sub-secret shares with each other. When a key generation server 33 receives a sub-secret share from another key generation server 33, it first verifies the correctness of the received sub-secret share using the corresponding segmentation verification information. Only after successful verification does it perform the synthesis calculation, thereby further ensuring the security of private key generation. For specific verification methods, please refer to formula (6), which will not be elaborated here.

[0078] In a specific application scenario, when there are two key generation servers 33, the method for combining the sub-secret shares corresponding to each key generation server 33 and the identifier of the target device is as follows:

[0079] The first key generation server and the second key generation server each possess sub-secret shares (s1,k1) and (s2,k2) of the master private key. The first key generation server and the second key generation server respectively use the corresponding segmented verification information E(s1,k1) and E(s2,k2) to verify the correctness of the sub-secret shares (s1,k1) and (s2,k2).

[0080] Specifically, the first key generation server and the second key generation server send their respective sub-secret shares to the master key generation center 31. The master key generation center 31 reconstructs the master private key and determines whether it is consistent with the original master private key, thereby verifying the authenticity of the first key generation server and the second key generation server.

[0081] After verifying the authenticity of the first and second key generation servers, the private key generation begins: The first key generation server first randomly selects an integer a1 from [0, n-1] and calculates a2 = (a1) - 1, where a2 is the modular multiplicative inverse of a1 modulo n. Then, it calculates:

[0082] c0=E(a1) (8)

[0083] c1=(a1(h id +s1))mod n (9)

[0084] Where c0 / E(a1) is the encryption of a1 using a homomorphic encryption function, h id c1 is a hash value calculated from the target device's identifier and other information. c1 is the value obtained by combining the target device's identifier and the sub-secret share s1 of the first key generation server.

[0085] The first key generation server sends c0 and c1 to the second key generation server. After receiving the data, server 2 randomly selects two integers b1 and w2 from [0, n-1], calculates b2 = n - b1, and then calculates:

[0086]

[0087] c3=(w2 c1+b2)mod n (11)

[0088] In this context, ⊕ represents the addition operator in homomorphic encryption, ⊙ represents the multiplication operator between the plaintext and ciphertext numbers in homomorphic encryption, and z1 and z2 are integers known only to the second key generation server. c2 combines the sub-secret shares s2, w2, and z2 from the second key generation server, and c3 combines w2, c1, and b2.

[0089] The second key generation server sends c2 and c3 to the first key generation server. The first key generation server calculates c4 = D(c2), where D() is the decryption function for homomorphic encryption. The first key generation server checks whether c3 or c4 is 0. If a 0 exists, the calculation terminates; otherwise:

[0090] c = (a²(c³ + c⁴)) mod n (12)

[0091] Q1=[(h id c -1 ) mod n]P1 (13)

[0092] Where c-1 is the modular inverse of c modulo n, and Q1 combines the sub-secret shares of the first key generation server and the second key generation server, as well as the identifier of the target device. The first key generation server sends Q1 to the second key generation server. Here, P1 is the generator of G.

[0093] The second key generation server receives Q1 and calculates the private key Q2 of the target device using Q2 = P1 - [w2]Q1.

[0094] The key generation server 33 generates a private key for the target device and sends the private key to the target device through the communication module 32.

[0095] In a specific application scenario, when there are multiple key generation servers 33, the method of combining the sub-secret shares corresponding to each key generation server 33 and the identifier of the target device is similar to that described above, and will not be repeated here.

[0096] After obtaining the private key, the target device uses it to sign its own data, obtaining signed data, and then transmits the signed data to the target object. The target object's device classification is the same as the target device's. The target object then uses the public key corresponding to the private key to verify the signed data, thus confirming its legitimacy.

[0097] The interaction between the client terminal or terminal device in the target device and the platform server uses the client terminal's private key, device's private key, or platform server's private key to sign messages, ensuring the reliability and integrity of the message source. The specific steps are as follows:

[0098] In a specific application scenario, when a client terminal sends a message to the platform server, it signs the message using its private key and then sends the message along with the signature value to the platform server. Before receiving the message, the platform server verifies the authenticity of the message's origin by verifying the signature using the public key corresponding to the client terminal's private key. If the signature is valid, the platform server processes the received message.

[0099] In a specific application scenario, when a platform server sends a message to a client terminal, it signs the message using the platform server's private key and then sends the message along with the signature value to the client terminal. Before receiving the message, the client terminal verifies the authenticity of the message's origin by verifying the signature using the public key corresponding to the platform server's private key. If the signature is valid, the client terminal processes the received message.

[0100] In a specific application scenario, when a terminal device sends a message to a platform server, it signs the message using its private key and then sends the message along with the signature value to the platform server. Before receiving the message, the platform server verifies the authenticity of the message's origin by verifying the signature using the public key corresponding to the device's private key. If the signature is valid, the platform server processes the received message.

[0101] In a specific application scenario, when a platform server sends a message to a terminal device, it signs the message using the platform server's private key and then sends the message along with the signature value to the terminal device. Before receiving the message, the terminal device verifies the authenticity of the message's origin by verifying the signature using the public key corresponding to the platform server's private key. If the signature is valid, the terminal device processes the received message.

[0102] In a specific application scenario, the platform server can also use the above method to send messages to other platform servers; the client terminal can also use the above method to send messages to other client terminals; and the terminal device can also use the above method to send messages to other terminal devices.

[0103] By signing the transmitted message with the target device's private key, the problem of message forgery during transmission can be solved. The receiving end uses the corresponding public key to verify the signature, which can ensure the reliability and integrity of the message source.

[0104] Through the above steps, the key management method of this embodiment divides the master private key using a polynomial to obtain multiple secret shares of the master private key, which are then distributed to the key generation servers participating in the calculation. Before performing key calculation, each participating key generation server verifies the correctness of its own master private key secret share and the authenticity of the key generation server using the principle of verifiable secret sharing, thus achieving the security of the target device's private key generation. Furthermore, by using the target device's private key to sign the transmitted message, and the receiving end verifying the signature using the corresponding public key, the reliability and integrity of the message source are guaranteed. Finally, by encrypting the target device's identifier with the master public key for network transmission, the confidentiality of the target device's identifier is achieved.

[0105] Based on the same inventive concept, the present invention also proposes an electronic device capable of executing the key management method of any of the above embodiments. Please refer to [link to relevant documentation]. Figure 4 , Figure 4 This is a schematic diagram of an embodiment of the electronic device provided by the present invention. The electronic device includes a processor 41 and a memory 42.

[0106] The processor 41 is used to execute the program instructions stored in the memory 42 to implement the steps of any of the key management methods described above. In a specific implementation scenario, the electronic device may include, but is not limited to, a microcomputer or a server. In addition, the electronic device may also include mobile devices such as laptops and tablets, which are not limited here.

[0107] Specifically, processor 41 controls itself and memory 42 to implement the steps of any of the above embodiments. Processor 41 may also be referred to as a CPU (Central Processing Unit). Processor 41 may be an integrated circuit chip with signal processing capabilities. Processor 41 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor. Furthermore, processor 41 may be implemented using integrated circuit chips.

[0108] The above solution can improve the accuracy and robustness of color recognition.

[0109] Based on the same inventive concept, the present invention also proposes a computer-readable storage medium, please refer to [link to relevant documentation]. Figure 5 , Figure 5 This is a schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. The computer-readable storage medium 50 stores at least one program data 51, which is used to implement any of the methods described above. In one embodiment, the computer-readable storage medium 50 includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0110] In the several embodiments provided by this invention, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

[0111] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0112] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0113] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium.

[0114] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A key management method, characterized in that, include: In response to receiving a private key request instruction from the target device, a master private key is generated; The master private key is used to verify the trustworthiness of multiple key generation servers; wherein, the master private key is divided into multiple sub-secret shares, and each sub-secret share is sent to the corresponding key generation server; wherein, the master private key is divided into multiple sub-secret shares, and each sub-secret share and its corresponding segmentation verification information are sent to the corresponding key generation server, so that each key generation server verifies the correctness of the sub-secret share based on the corresponding segmentation verification information; Receive the sub-secret shares to be verified sent by each key generation server to be verified; construct the master private key to be verified based on each sub-secret share to be verified; in response to the master private key to be verified being consistent with the master private key, determine that the multiple key generation servers are trustworthy; In response to the trustworthiness of the multiple key generation servers, a private key for the target device is generated through the multiple key generation servers and sent to the target device.

2. The key management method according to claim 1, characterized in that, The step of dividing the master private key into multiple sub-secret shares and sending each sub-secret share and its corresponding segmentation verification information to a corresponding key generation server, so that each key generation server verifies the correctness of the sub-secret share based on the corresponding segmentation verification information, includes: Set a secret number, and divide the secret number and the master private key by constructing a polynomial to obtain multiple sub-secret numbers and multiple sub-master private keys; Each sub-secret number and its corresponding sub-master private key are determined as the sub-secret share of the corresponding key generation server; Generate corresponding segmentation verification information based on the polynomial; Each of the sub-secret shares and the corresponding segmentation verification information are sent to the corresponding key generation server, so that each key generation server can verify the correctness of the sub-secret shares based on the corresponding segmentation verification information.

3. The key management method according to claim 1, characterized in that, The step of generating a master private key in response to receiving a private key request instruction from the target device further includes: In response to receiving a private key request instruction from the target device, a master private key is generated, and a master public key is generated based on the master private key; The master public key is sent to the target device so that the target device can encrypt its identifier using the master public key to obtain an encrypted identifier, and the target device can receive the encrypted identifier sent by the target device.

4. The key management method according to claim 3, characterized in that, The step of generating the private key for the target device through the plurality of key generation servers and sending it to the target device includes: The encrypted identifier is decrypted using the master private key to obtain the identifier of the target device, and the identifier of the target device is sent to any one of the key generation servers; The multiple key generation servers generate the private key of the target device based on the corresponding sub-secret share and the identifier of the target device, and then send it to the target device.

5. The key management method according to claim 4, characterized in that, The step of generating a private key for the target device based on the corresponding sub-secret share and the identifier of the target device through the multiple key generation servers, and sending it to the target device, includes: The private key of the target device is generated by combining the sub-secret shares corresponding to each of the key generation servers and the identifier of the target device, and then sent to the target device.

6. The key management method according to claim 1, characterized in that, The step of responding to the premise that the multiple key generation servers are trustworthy, generating a private key for the target device through the multiple key generation servers, and sending it to the target device, then includes: The target device uses the private key to sign its data to obtain signed data, and then transmits the signed data to the target object so that the target object can verify the signed data using the public key corresponding to the private key.

7. An electronic device, characterized in that, The electronic device includes a memory and a processor coupled to each other, the processor being configured to execute program instructions stored in the memory to implement the key management method as described in any one of claims 1 to 6.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program data that can be executed to implement the key management method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Key generation and management method and server

    CN110830242A

  • Secure distributed key management system

    CN111971929A

  • Threshold identity authentication method and device based on zero knowledge and cloud computing system

    CN115694812A