A consortium chain key management system and method

Through the root key and application derived key management module of the alliance chain key management system, combined with mnemonics and cryptography mechanism, the problem of poor key security and user experience in the alliance chain key management system is solved, and the problem of poor key security and user experience is realized The full life cycle management and security control of alliance chain keys improve the security and user experience of alliance chain systems.

CN114189388BActive Publication Date: 2024-11-12CHINA ELECTRONICS TECH CYBER SECURITY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111554403.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-17
Publication Date
2024-11-12
Estimated Expiration
2041-12-17

AI Technical Summary

Technical Problem

The existing alliance chain key management system lacks closed-loop control throughout the life cycle, which makes it difficult to ensure the security of keys and poor user experience, especially in terms of key update frequency and secure storage, and it is difficult for users to properly keep long and confidential secrets. Key, resulting in a high risk of key loss.

Method used

Provide a alliance chain key management system, including a root key management module and an application derived key management module, supports the full life cycle management of multi-trust source keys, through user registration, root key generation, storage, recovery, and update and revocation processes, combined with mnemonics and cryptography mechanisms, realize the secure control of keys and user-friendly experience.

Benefits of technology

Implement the multi-center management mechanism of alliance chain keys, meet the technical characteristics of blockchain distributed and trustless networks, improve the security and user experience of key management, reduce the complexity of key management, and enhance the alliance chain. System security and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114189388B_ABST
    Figure CN114189388B_ABST
Patent Text Reader

Abstract

The present invention discloses a consortium chain key management system and method, which belongs to the field of blockchain technology, including a root key management module and an application derived key management module, wherein the application derived key management module is generated by a root key. The present invention meets the technical characteristics of a distributed and trustless blockchain network, provides root keys and multi-type key derivation functions, supports the full life cycle management of multi-trust source keys, makes up for the shortcomings of traditional centralized key management in efficiency and scalability when applied to blockchain, and can provide key management guarantees for various consortium chain systems and applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and more specifically, to a consortium chain key management system and method. Background Art

[0002] Blockchain is a chain data structure that combines data blocks in a sequential manner in chronological order, and uses cryptography to ensure that the distributed ledger cannot be tampered with or forged. From the perspective of cryptographic engineering, blockchain is a cryptographic application that solves the problems of data tampering and forgery. Alliance chain is a relatively new way to apply blockchain technology to enterprises. The blockchain, which is jointly participated and managed by multiple parties, only serves certain specific groups and is an important branch of blockchain development. At present, more and more well-known enterprises and institutions have joined the alliance chain research, and its basic technical framework has been basically improved, and the chain application business is becoming more and more abundant. The basis of the ownership verification mechanism on the blockchain is cryptography, and the key is the core element of building a blockchain trust network. The key management system is an important infrastructure in the future of the blockchain field. However, there is no complete and systematic alliance chain key management solution or related products. As a distributed, multi-center innovative technology, the alliance chain is quite different from the traditional centralized system. It is necessary to design a special and more targeted key management technology mechanism to ensure the safe and reliable operation of the alliance chain platform and applications.

[0003] There are many types of existing alliance chain keys, including blockchain node keys, alliance chain keys, application access keys, terminal keys, regulatory keys, etc., involving the full life cycle management of key generation, update, storage, destruction, etc., and need to meet the distributed characteristics of blockchain, which puts high demands on key management. At present, the research on the security of alliance chain keys is still in its infancy, with little work involved, and there are common problems such as difficulty in ensuring key security and poor user experience.

[0004] (1) The problem of difficulty in ensuring key security. Currently, many alliance chain systems have not yet established a systematic key management mechanism. Many types of keys lack closed-loop control over the entire life cycle. There are security risks in terms of key update frequency and safe storage. Once a key leak occurs, it will further threaten the privacy security of data on the blockchain.

[0005] (2) Poor user experience of key management. Currently, many consortium chain systems leave the responsibility of key management to the users themselves, requiring them to keep it properly. This is not very usable for users and requires users to remember multiple long, random, and unrelated keys, which is difficult. This leads to a greater risk of key loss. Once the key cannot be retrieved, the on-chain data corresponding to the key will no longer be usable. Summary of the invention

[0006] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a consortium chain key management system and method that meets the technical characteristics of a distributed, trustless blockchain network, provides root key and multi-type key derivation functions, supports the full life cycle management of multi-trust source keys, and makes up for the shortcomings of traditional centralized key management in efficiency and scalability when applied to blockchains. It can provide key management guarantees for various consortium chain systems and applications.

[0007] The object of the present invention is achieved through the following solutions:

[0008] A consortium chain key management system includes a root key management module and an application-derived key management module, wherein the application-derived key management module is generated by a root key.

[0009] Furthermore, the root key management module includes a user registration module, a root key generation / import module, a root key storage module, a root key recovery module and a password reset module.

[0010] Furthermore, the application-derived key management module includes a signature / encryption key derivation module, a key storage module, a key recovery module, a key update module and a key revocation module.

[0011] A key management method based on the above-mentioned alliance chain key management system, the user registration module, comprises the following steps:

[0012] A11, the user sends a mobile phone number TelNum or email to the key management system to initiate a registration request;

[0013] A12, the password management system checks whether the mobile phone number or email address has been registered. If the mobile phone number or email address has been registered, a message is returned to the user to inform him that the mobile phone number or email address has been registered.

[0014] A13, if the mobile phone number or email address has not been registered, the password management system generates a user ID and pushes a verification code to the user's mobile phone or email address;

[0015] A14, the user sets the password PW, the client uses the SM3 hash algorithm to calculate the password hash value h = H (PW), and sends h to the key management system;

[0016] A15, the client password management system stores the user's mobile phone number TelNum or email address Email, ID, and password hash value h.

[0017] Furthermore, the root key generation / import module includes a root key generation module and / or a root key import module; the root key generation module includes the following steps:

[0018] A21, the client uses a random number generation algorithm to generate a root key seed;

[0019] A22, storing the root key according to the root key storage protocol;

[0020] The root key import module includes the following steps: the root key is generated by the key maker, imported into the key management system, and then other blockchain keys are derived based on the root key.

[0021] A key management method based on the above-mentioned alliance chain key management system, wherein the root key storage module includes a mnemonic storage module, and / or a key management system ciphertext trusteeship module, and / or a key management system plaintext trusteeship module;

[0022] The mnemonic storage module includes the following methods: after the client generates the mnemonic, the user stores the mnemonic in a physical manner; or stores the mnemonic in a physical manner or stores the mnemonic locally;

[0023] The ciphertext trusteeship module of the ciphertext management system comprises the following steps:

[0024] A301, the client calculates the symmetric encryption key: key = SM3 (ID || PW), and uses the key to encrypt the root key: C = SM4 key (seed), use the default root key description information seed_desp = "seed", and send (ID, C, seed_desp, h) to the key management system;

[0025] A302, after verifying the password hash value, the key management system stores the user ID, root key ciphertext, root key description information and password hash value h;

[0026] The secret management system plain text trusteeship module includes the following steps:

[0027] A311, the client sends the user ID, root key seed, root key description information and password hash value h to the key management system;

[0028] A312, after verifying the password hash value, the key management system stores the user ID, the root key plain text, the root key description information seed_desp = "seed" and the password hash value h.

[0029] A key management method based on the above-mentioned alliance chain key management system, wherein the root key recovery module includes a mnemonic recovery module, and / or a key management system ciphertext recovery module, and / or a key management system plaintext acquisition module;

[0030] The mnemonic recovery module includes the following steps: the user inputs the mnemonic, and the client uses the mnemonic M 1 ,M 2 ,…,M24 Calculate the root key seed;

[0031] The ciphertext recovery module of the key management system includes the following steps:

[0032] B401, the user logs in and authenticates using the user ID and password PW. The client calculates the password hash value h=SM3(PW), and sends the user ID and password hash value h to the key management system to request the ciphertext of the root key.

[0033] B402, the password management system verifies the password hash value h;

[0034] B403, after verification, the key management system searches for the root key ciphertext according to the user name ID, and then sends the stored ciphertext C to the client;

[0035] B404, the client uses the SM3 hash algorithm to calculate the symmetric encryption key key = SM3 (ID | | PW), and uses the SM4 decryption algorithm to decrypt the ciphertext to obtain the root key: seed = SM4_DEC key (C);

[0036] The plaintext acquisition module of the secret management system includes the following steps:

[0037] B411, the user logs in and authenticates using the user ID and password PW. The client calculates the password hash value h=SM3(PW) and sends the user ID and password hash value h to the key management system to request the root key.

[0038] B412, the password management system verifies the password hash value h;

[0039] B413, after verification, the key management system searches for the root key based on the user name ID, and then sends the stored root key in plain text to the client.

[0040] A key management method based on the above-mentioned alliance chain key management system, the password reset module comprises the following steps:

[0041] C501, the client performs login authentication through the user ID and password PW, calculates the password hash value h=SM3(PW), and sends the user ID and password hash value h to the key management system to request a password reset;

[0042] C502, the password management system searches for the user's registered mobile phone number or email address, and pushes a verification code to the user's mobile phone;

[0043] C503: The client passes the verification code authentication, and the key management system returns the ciphertext of the key after verification;

[0044] C504, the client uses the SM3 hash algorithm to calculate the symmetric encryption key key = SM3 (ID || PW), and then decrypts the ciphertext to obtain the key recv_key = SM4_DECkey (C). The recovered key includes the root key and the response key;

[0045] C505, the user resets the password PW′, the client uses the SM3 hash algorithm to calculate the symmetric encryption key key = SM3 (ID || PW), and then re-encrypts the key to calculate the ciphertext C = SM4key (seed);

[0046] C506, the client uses the SM3 hash algorithm to calculate the password hash value h = SM3 (PW), and then sends ID, h, C, key_desp_ex to the key management system;

[0047] C507, the key management system stores the user ID, password hash value h, key ciphertext C and key description information key_desp_ex;

[0048] C508, the key management system sends a reset success message to the client.

[0049] A key management method based on the above-mentioned alliance chain key management system, the signature / encryption key derivation module, comprises the following steps:

[0050] S101, the user inputs the description information desp of the new key, the initial value of index is 0, indicating the number of times the key is updated;

[0051] Use the master key to derive a symmetric key:

[0052] key_desp="symm"||desp,key_desp_ex=key_desp||index

[0053] symm_key=SM3(seed||ID||key_desp_ex)

[0054] Or use the master key to derive an asymmetric key:

[0055] key_desp="asymm"||desp,key_desp_ex=key_desp||index

[0056] asymm_key=SM3(seed||ID||key_desp_ex)

[0057] Or use the master key to derive a dual key pair:

[0058] key_desp="asymm_d"||desp,key_desp_ex=key_desp||index

[0059] asymm_dkey 1 =SM3(seed||ID||key_desp_ex||1)

[0060] asymm_dkey 2 =SM3(seed||ID||key_desp_ex||2)

[0061] S102, the client stores the signature and encryption keys according to the key storage protocol.

[0062] A key management method based on the above-mentioned alliance chain key management system, wherein the key storage module includes a key management system plaintext trusteeship module and / or a key management system ciphertext trusteeship module;

[0063] The secret management system plain text trusteeship module includes the following steps:

[0064] S201, the client sends the user ID, key pair (sk, pk), key description information key_desp_ex and password hash value h to the key management system;

[0065] S202, after verifying the password hash value, the key management system stores the user ID, key pair (sk, pk), key description information key_desp_ex and password hash value h;

[0066] The ciphertext trusteeship module of the ciphertext management system comprises the following steps:

[0067] S21, the client calculates the symmetric encryption key: key = SM3 (ID || PW), and uses the key to encrypt the private key: C = SM4 key (sk), calculate signature: sig = SM2 sk (ID||C), send (ID,C,key_desp_ex,sig,pk) to the key management system;

[0068] S22, after verifying the password hash value and signature, the key management system stores the user ID, root key ciphertext C, public key pk, root key description information key_desp_ex and password hash value h.

[0069] A key management method based on the above-mentioned alliance chain key management system, wherein the key recovery module includes a root key derivation module, a key management system plaintext acquisition module, and a key management system ciphertext acquisition module;

[0070] The root key derivation module comprises the following steps:

[0071] S301, the user logs in and authenticates using the user ID and password PW, the client calculates the password hash value h=SM3(PW), and sends the user ID, password hash value h and key description key_desp to the key management system;

[0072] S302, the key management system verifies the password hash value h. After the verification is passed, the key management system searches for the extended key description information key_desp_ex according to the user name ID and the key description key_desp, and then sends key_desp_ex to the client;

[0073] S303, the client calculates the key key=SM3(seed||ID||key_desp_ex);

[0074] The secret management system obtains the plaintext module, including the following steps:

[0075] S31, the user logs in and authenticates using the user ID and password PW, the client calculates the password hash value h=SM3(PW), and sends the user ID and password hash value h to the key management system to request the application key;

[0076] S32, the password management system verifies the password hash value h;

[0077] S33, after the verification is passed, the key management system searches for the application key according to the user name ID, and then sends the stored application key in plain text to the client;

[0078] The key management system obtains the ciphertext module, including the following steps:

[0079] S341, the user logs in and authenticates using the user ID and password PW, the client calculates the password hash value h=SM3(PW), and sends the user ID, password hash value h and key description key_desp to the key management system;

[0080] S342, the password management system verifies the password hash value h;

[0081] S343, after the verification is passed, the key management system searches for the key ciphertext according to the user name ID and the key description key_desp, and then sends the stored ciphertext C to the client;

[0082] S344, the client uses the SM3 hash algorithm to calculate the symmetric encryption key key = SM3 (ID | | PW), and uses the SM4 decryption algorithm to decrypt the ciphertext to obtain the symmetric key: key = SM4_DEC key (C).

[0083] A key management method based on the above-mentioned alliance chain key management system, wherein the key update module comprises the following steps:

[0084] S401, the user logs in and authenticates using the user ID and password PW, the client calculates the password hash value h=SM3(PW), and sends the user ID, password hash value h and key description key_desp to the key management system;

[0085] S402, the key management system verifies the password hash value h. After the verification is passed, the key management system searches for the extended key description information key_desp_ex according to the user name ID and the key description key_desp, and then sends key_desp_ex to the client;

[0086] S403, the client executes the key revocation protocol to revoke the key whose key description information is key_desp;

[0087] S404, the client increases the key update count index by one, and then executes the key derivation protocol to derive a key whose extended key description information is key_desp||index+1.

[0088] A key management method based on the above-mentioned alliance chain key management system, wherein the key revocation module comprises the following steps:

[0089] S501, the user logs in and authenticates using the user ID and password PW, the client calculates the password hash value h=SM3(PW), and sends the user ID, password hash value h and key description key_desp to the key management system;

[0090] S502, the password management system verifies the password hash value h;

[0091] S503, after verification, the client sends a key revocation request key description key_desp to the key management system;

[0092] S504: The key management system deletes the key ciphertext with the key description key_desp and returns the revocation result to the client.

[0093] A key management method based on the above-mentioned alliance chain key management system, after the client generates a mnemonic, includes the following sub-steps: the client calculates the 8-bit fingerprint value fingerprint of the seed, recorded as seed||fingerprint; selects a word list A containing 2048 different words; divides seed||fingerprint into 24 groups: seed 1 ,seed 2 ,…seed 24; Each group is 11 bits long, and each group represents an integer idx in the interval [0,2047] i , map each group to a word in the vocabulary: M 1 =A[idx 1 ],M 2 =A[idx 2 ],…,M 24 =A[idx 24 ], the mnemonic is M 1 ,M 2 ,…,M 24 .

[0094] A key management method based on the above alliance chain key management system, wherein the client is composed of a mnemonic word M 1 ,M 2 ,…,M 24 Calculating the root key seed includes the following sub-steps: For each mnemonic M i , find the word in word list A, get the index of the word in the word list, the index is in the interval [0,2047], convert the index into a bit string seed of length 11 i , get the bit string seed with a length of 264 bits 1 ,seed 2 ,…,seed 24 After that, take the first 256 bits as the root key seed and the last 8 bits as the checksum; calculate the 8-bit fingerprint value fingerprint of the seed, compare the fingerprint and checksum, if they are equal, the recovered root key is the seed, if they are not equal, the root key recovery fails.

[0095] The beneficial effects of the present invention are:

[0096] (1) The system and method provided by the present invention propose a multi-center key management mechanism for the alliance chain, which meets the technical characteristics of the distributed and trustless network of the blockchain. The solution of the present invention provides root key and multi-type key derivation functions, supports the full life cycle management of multi-trust source keys, and makes up for the shortcomings of traditional centralized key management in the application of blockchain in terms of efficiency and scalability, and can provide key management guarantees for various alliance chain systems and applications.

[0097] (2) The solution provided by the present invention can not only meet the security requirements of key management, but also achieve a user-friendly key management experience. The consortium chain implements data encryption and decryption and user ownership verification through a variety of cryptographic mechanisms, which involve a variety of types of keys. The management solution designed by the embodiment of the present invention combines the root key with the derived key. The management focuses on the security control of the root key, which can minimize the complexity of key management. At the same time, the mnemonic method is used to replace the memory and storage of the private key itself, achieving a good user experience of key management. BRIEF DESCRIPTION OF THE DRAWINGS

[0098] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0099] Figure 1 Register an interactive flow chart for users;

[0100] Figure 2 Generate an interactive flow chart for the root key;

[0101] Figure 3 Provides a flow chart for the interaction of ciphertext hosting in the ciphertext management system;

[0102] Figure 4 It is a plaintext hosting interaction flow chart for the secret management system;

[0103] Figure 5 Provide interactive flow chart for ciphertext recovery in key management system;

[0104] Figure 6 Obtain the interactive flow chart in plain text for the secret management system;

[0105] Figure 7 An interactive flow chart for password reset;

[0106] Figure 8 Derivation of interactive flow chart for signature / encryption keys;

[0107] Fig. 9 A plaintext escrow interaction flow chart for the secret management system for key storage;

[0108] Fig.10 The interactive flow chart of ciphertext hosting of the secret management system for key storage;

[0109] Fig.11 Derivation of interactive flow chart for root key;

[0110] Fig.12 Obtain a plaintext interaction flow chart for the secret management system;

[0111] Fig.13 Obtain the ciphertext interaction flow chart for the cipher management system;

[0112] Fig.14 It is a flowchart for key update interaction;

[0113] Fig.15 It is a flowchart of the key revocation interaction;

[0114] Fig.16 This is the overall interaction flow chart of alliance chain key management. DETAILED DESCRIPTION

[0115] All features disclosed in all embodiments in this specification, or steps in all methods or processes implicitly disclosed, except for mutually exclusive features and / or steps, can be combined and / or expanded or replaced in any manner.

[0116] Example 1

[0117] This embodiment aims to solve the technical problem of key life cycle security management under the multi-center management model. Fig.16 As shown, a consortium chain key management system is provided, including a root key management module and an application derived key management module, and the application derived key management module is generated by the root key. This embodiment adopts a key derivation mechanism to construct a consortium chain key management system based on root key derivation. All participating organizations in the consortium chain have independent key management systems. Each organization generates or imports a root key, and derives node keys, consortium chain keys, application access keys, terminal keys, regulatory keys and other blockchain application keys based on the root key. In specific applications, key management objects include root keys and application derived keys, where application derived keys are generated from root keys, and application keys include blockchain node keys, consortium chain keys, application access keys, terminal keys, regulatory keys, etc. The root key management process includes processes such as user registration, password reset, root key generation, root key storage, and root key acquisition; the application derived key management process includes processes such as derived key generation, key storage, key recovery, key update, and key revocation.

[0118] Example 2

[0119] Based on Example 1, the root key management module involves processes such as user registration, root key generation, storage, recovery, and password reset. In specific applications, it includes a user registration module, a root key generation / import module, a root key storage module, a root key recovery module, and a password reset module.

[0120] As shown in 1, a key management method based on the above alliance chain key management system is provided, and the user registration module implements that when a user uses the key management system for the first time, the user needs to register according to the following steps:

[0121] A11, the user sends a mobile phone number TelNum or email to the key management system to initiate a registration request;

[0122] A12, the password management system checks whether the mobile phone number or email address has been registered. If the mobile phone number or email address has been registered, a message is returned to the user to inform him that the mobile phone number or email address has been registered.

[0123] A13, if the mobile phone number or email address has not been registered, the password management system generates a user ID and pushes a verification code to the user's mobile phone or email address;

[0124] A14, the user sets the password PW, the client uses the SM3 hash algorithm to calculate the password hash value h = H (PW), and sends h to the key management system;

[0125] A15, the client password management system stores the user's mobile phone number TelNum or email address Email, ID, and password hash value h.

[0126] Example 3

[0127] Based on Example 1, a key management method based on the above-mentioned alliance chain key management system is provided. The root key generation process is as follows: Figure 2 The root key generation / import module includes a root key generation module and / or a root key import module; the root key generation module includes the following steps:

[0128] A21, the client uses a random number generation algorithm to generate a root key seed (length 256 bits);

[0129] A22, storing the root key according to the root key storage protocol;

[0130] The root key import module includes the following steps: the root key is generated by the key maker, imported into the key management system, and then other blockchain keys are derived based on the root key.

[0131] Example 4

[0132] This embodiment provides a key management method based on the above-mentioned alliance chain key management system, and the root key storage is implemented by three methods. In specific applications, the root key storage module includes a mnemonic storage module, and / or a key management system ciphertext trusteeship module, and / or a key management system plaintext trusteeship module;

[0133] The mnemonic storage module optionally includes the following method: after the client generates the mnemonic, the user stores the mnemonic in a physical manner. In a specific application, the client calculates the 8-bit fingerprint value fingerprint of the seed (intercepts the first 8 bits of SM3 (seed)), and calculates the mnemonic (a total of 24 words) for the seed||fingerprint (a total of 264 bits). The specific method is as follows: select a word list A containing 2048 different words. Divide the seed||fingerprint into 24 groups: seed||fingerprint ... 1 ,seed 2 ,…seed 24 , each group is 11 bits long, and each group can represent an integer idx in the interval [0,2047] i , map each group to a word in the vocabulary: M 1 =A[idx 1 ],M 2 =A[idx 2 ],…,M 24 =A[idx 24 ], the mnemonic is M 1 ,M 2 ,…,M 24 .

[0134] Alternatively, store the mnemonic phrase physically or locally.

[0135] The ciphertext trusteeship module of the ciphertext management system is as follows: Figure 3 As shown, the following steps are included:

[0136] A301, the client calculates the symmetric encryption key: key = SM3 (ID || PW), and uses the key to encrypt the root key: C = SM4 key (seed), use the default root key description information seed_desp = "seed", and send (ID, C, seed_desp, h) to the key management system;

[0137] A302, after verifying the password hash value, the key management system stores the user ID, root key ciphertext, root key description information and password hash value h;

[0138] The secret management system plain text hosting module, such as Figure 4 As shown, the following steps are included:

[0139] A311, the client sends the user ID, root key seed, root key description information and password hash value h to the key management system;

[0140] A312, after verifying the password hash value, the key management system stores the user ID, the root key plain text, the root key description information seed_desp = "seed" and the password hash value h.

[0141] Example 5

[0142] A key management method based on the alliance chain key management system as described above, wherein the root key recovery module includes a mnemonic recovery module, and / or a key management system ciphertext recovery module, and / or a key management system plaintext acquisition module.

[0143] The mnemonic recovery module may optionally include the following steps: a user inputs a mnemonic, and the client uses the mnemonic M 1 ,M 2 ,…,M 24 Calculate the root key seed. In specific applications, for each mnemonic M i , find the word in the word list A and get the index idx of the word in the word list i (M i =A[idx i ]), the index is in the interval [0,2047], convert the index into a bit string seed of length 11 i , get the bit string seed with a length of 264 bits 1 ,seed 2 ,…,seed 24 Finally, take the first 256 bits as the root key seed, and the last 8 bits as the checksum. Calculate the 8-bit fingerprint value of the seed (intercept the first 8 bits of SM3 (seed)), compare the fingerprint and checksum, if they are equal, the recovered root key is the seed, if not equal, the root key recovery fails.

[0144] The ciphertext recovery module of the key management system, as shown in 5, includes the following steps:

[0145] B401, the user logs in and authenticates using the user ID and password PW. The client calculates the password hash value h=SM3(PW), and sends the user ID and password hash value h to the key management system to request the ciphertext of the root key.

[0146] B402, the password management system verifies the password hash value h;

[0147] B403, after verification, the key management system searches for the root key ciphertext according to the user name ID, and then sends the stored ciphertext C to the client;

[0148] B404, the client uses the SM3 hash algorithm to calculate the symmetric encryption key key = SM3 (ID | | PW), and uses the SM4 decryption algorithm to decrypt the ciphertext to obtain the root key: seed = SM4_DEC key (C);

[0149] The secret management system plain text acquisition module, such as Figure 6 As shown, the following steps are included:

[0150] B411, the user logs in and authenticates using the user ID and password PW. The client calculates the password hash value h=SM3(PW) and sends the user ID and password hash value h to the key management system to request the root key.

[0151] B412, the password management system verifies the password hash value h;

[0152] B413, after verification, the key management system searches for the root key based on the user name ID, and then sends the stored root key in plain text to the client.

[0153] Example 6

[0154] like Figure 7 As shown, a key management method based on the above-mentioned alliance chain key management system is provided, and the password reset module enables the user to apply for password reset through a mobile phone number or email, including the following steps:

[0155] C501, the client performs login authentication through the user ID and password PW, calculates the password hash value h=SM3(PW), and sends the user ID and password hash value h to the key management system to request a password reset;

[0156] C502, the password management system searches for the user's registered mobile phone number or email address, and pushes a verification code to the user's mobile phone;

[0157] C503: The client passes the verification code authentication, and the key management system returns the ciphertext of the key after verification;

[0158] C504, the client uses the SM3 hash algorithm to calculate the symmetric encryption key key = SM3 (ID | | PW), and then decrypts the ciphertext to obtain the key recv_key = SM4_DEC key (C), the recovered keys include the root key and the response key;

[0159] C505, the user resets the password PW′, the client uses the SM3 hash algorithm to calculate the symmetric encryption key key = SM3 (ID || PW), and then re-encrypts the key to calculate the ciphertext C = SM4 key (seed);

[0160] C506, the client uses the SM3 hash algorithm to calculate the password hash value h = SM3 (PW), and then sends ID, h, C, key_desp_ex to the key management system;

[0161] C507, the key management system stores the user ID, password hash value h, key ciphertext C and key description information key_desp_ex;

[0162] C508, the key management system sends a reset success message to the client.

[0163] Example 7

[0164] Based on Example 1, all application derived keys are derived from the root key, mainly including signature and encryption keys. The key (signature, encryption key) management process includes signature / encryption key derivation and storage, key recovery, key update, key revocation and other processes. In specific applications, the application derived key management module includes a signature / encryption key derivation module, a key storage module, a key recovery module, a key update module and a key revocation module.

[0165] As shown in 8, the signature / encryption key derivation module includes the following steps:

[0166] S101, the user inputs the description information desp of the new key, the initial value of index is 0, indicating the number of times the key is updated;

[0167] Use the master key to derive a symmetric key:

[0168] key_desp="symm"||desp,key_desp_ex=key_desp||index

[0169] symm_key=SM3(seed||ID||key_desp_ex)

[0170] Or use the master key to derive an asymmetric key:

[0171] key_desp="asymm"||desp,key_desp_ex=key_desp||index

[0172] asymm_key=SM3(seed||ID||key_desp_ex)

[0173] Or use the master key to derive a dual key pair:

[0174] key_desp="asymm_d"||desp,key_desp_ex=key_desp||index

[0175] asymm_dkey 1 =SM3(seed||ID||key_desp_ex||1)

[0176] asymm_dkey 2 =SM3(seed||ID||key_desp_ex||2)

[0177] S102, the client stores the signature and encryption keys according to the key storage protocol.

[0178] Example 8

[0179] On the basis of Example 1, a key management method based on the above-mentioned alliance chain key management system is provided, wherein the key storage module is implemented in two ways: plain text hosting of the key management system and ciphertext hosting of the key management system. In specific applications, the key management system plain text hosting and / or ciphertext hosting module of the key management system are included;

[0180] The secret management system plain text hosting module, such as Fig. 9 As shown, the following steps are included:

[0181] S201, the client sends the user ID, key pair (sk, pk), key description information key_desp_ex and password hash value h to the key management system;

[0182] S202, after verifying the password hash value, the key management system stores the user ID, key pair (sk, pk), key description information key_desp_ex and password hash value h;

[0183] The ciphertext trusteeship module of the ciphertext management system is as follows: Fig.10 As shown, the following steps are included:

[0184] S21, the client calculates the symmetric encryption key: key = SM3 (ID || PW), and uses the key to encrypt the private key: C = SM4 key (sk), calculate signature: sig = SM2 sk (ID||C), send (ID,C,key_desp_ex,sig,pk) to the key management system;

[0185] S22, after verifying the password hash value and signature, the key management system stores the user ID, root key ciphertext C, public key pk, root key description information key_desp_ex and password hash value h.

[0186] Example 9

[0187] Based on Example 1, a key management method based on the above-mentioned alliance chain key management system is provided, and the key recovery module is implemented by three methods: root key derivation, key management system obtaining plaintext, and key management system obtaining ciphertext. In specific applications, it includes a root key derivation module, a key management system obtaining plaintext module, and a key management system obtaining ciphertext module.

[0188] The root key derivation module, such as Fig.11 As shown, the following steps are included:

[0189] S301, the user logs in and authenticates using the user ID and password PW, the client calculates the password hash value h=SM3(PW), and sends the user ID, password hash value h and key description key_desp to the key management system;

[0190] S302, the key management system verifies the password hash value h. After the verification is passed, the key management system searches for the extended key description information key_desp_ex according to the user name ID and the key description key_desp, and then sends key_desp_ex to the client;

[0191] S303, the client calculates the key key=SM3(seed||ID||key_desp_ex);

[0192] The secret management system obtains the plain text module, such as Fig.12 As shown, the following steps are included:

[0193] S31, the user logs in and authenticates using the user ID and password PW, the client calculates the password hash value h=SM3(PW), and sends the user ID and password hash value h to the key management system to request the application key;

[0194] S32, the password management system verifies the password hash value h;

[0195] S33, after the verification is passed, the key management system searches for the application key according to the user name ID, and then sends the stored application key in plain text to the client;

[0196] The secret management system obtains the ciphertext module, such as Fig.13 As shown, the following steps are included:

[0197] S341, the user logs in and authenticates using the user ID and password PW, the client calculates the password hash value h=SM3(PW), and sends the user ID, password hash value h and key description key_desp to the key management system;

[0198] S342, the password management system verifies the password hash value h;

[0199] S343, after the verification is passed, the key management system searches for the key ciphertext according to the user name ID and the key description key_desp, and then sends the stored ciphertext C to the client;

[0200] S344, the client uses the SM3 hash algorithm to calculate the symmetric encryption key key = SM3 (ID | | PW), and uses the SM4 decryption algorithm to decrypt the ciphertext to obtain the symmetric key: key = SM4_DEC key (C).

[0201] Example 10

[0202] Based on Example 1, a key management method based on the above-mentioned alliance chain key management system is provided, wherein the key update module is as follows: Fig.14 As shown, the following steps are included:

[0203] S401, the user logs in and authenticates using the user ID and password PW, the client calculates the password hash value h=SM3(PW), and sends the user ID, password hash value h and key description key_desp to the key management system;

[0204] S402, the key management system verifies the password hash value h. After the verification is passed, the key management system searches for the extended key description information key_desp_ex according to the user name ID and the key description key_desp, and then sends key_desp_ex to the client;

[0205] S403, the client executes the key revocation protocol to revoke the key whose key description information is key_desp;

[0206] S404, the client increases the key update count index by one, and then executes the key derivation protocol to derive a key whose extended key description information is key_desp||index+1.

[0207] Embodiment 11

[0208] Based on Example 1, a key management method based on the above-mentioned alliance chain key management system is provided, such as Fig.15 As shown, the key revocation module includes the following steps:

[0209] S501, the user logs in and authenticates using the user ID and password PW, the client calculates the password hash value h=SM3(PW), and sends the user ID, password hash value h and key description key_desp to the key management system;

[0210] S502, the password management system verifies the password hash value h;

[0211] S503, after verification, the client sends a key revocation request key description key_desp to the key management system;

[0212] S504: The key management system deletes the key ciphertext with the key description key_desp and returns the revocation result to the client.

[0213] If the functions of the present invention are implemented in the form of software functional units and sold or used as independent products, they 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 the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium, and all or part of the steps of the methods described in various embodiments of the present invention are executed in a computer device (which can be a personal computer, a server, or a network device, etc.) and corresponding software. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, or an optical disk, and the test or actual data exists in a read-only memory (Random Access Memory, RAM), a random access memory (Random Access Memory, RAM), etc. in the program implementation.

Claims

1. A consortium chain key management system, characterized in that: It includes a root key management module and an application derived key management module, wherein the application derived key management module is generated by the root key; The root key management module includes a user registration module, a root key generation / import module, a root key storage module, a root key recovery module and a password reset module; the root key recovery module includes a mnemonic recovery module, and / or a key management system ciphertext recovery module, and / or a key management system plaintext acquisition module; The mnemonic recovery module includes the following steps: the user inputs the mnemonic, and the client uses the mnemonic M1, M2, ..., M 24 Calculate the root key seed; The ciphertext recovery module of the key management system includes the following steps: B401, the user logs in and authenticates using the user ID and password PW. The client calculates the password hash value h=SM3(PW), and sends the user ID and password hash value h to the key management system to request the ciphertext of the root key. B402, the password management system verifies the password hash value h; B403, after verification, the key management system searches for the root key ciphertext according to the user name ID, and then sends the stored ciphertext C to the client; B404, the client uses the SM3 hash algorithm to calculate the symmetric encryption key key = SM3 (ID || PW), and uses the SM4 decryption algorithm to decrypt the ciphertext to obtain the root key: seed = SM4 _ DEC key (C); The plaintext acquisition module of the secret management system includes the following steps: B411, the user logs in and authenticates using the user ID and password PW. The client calculates the password hash value h=SM3(PW) and sends the user ID and password hash value h to the key management system to request the root key. B412, the password management system verifies the password hash value h; B413, after verification, the key management system searches for the root key based on the user name ID, and then sends the stored root key in plain text to the client.

2. The alliance chain key management system according to claim 1, characterized in that: The application derived key management module includes a signature / encryption key derivation module, a key storage module, a key recovery module, a key update module and a key revocation module.

3. The alliance chain key management system according to claim 1, characterized in that: The client consists of mnemonics M1, M2, ..., M 24 Calculating the root key seed includes the following sub-steps: For each mnemonic M i , search for the word in word list A, get the index of the word in the word list, the index is in the interval [0,2047], convert the index into a bit string seed of length 11 i , and obtain the bit string seed1, seed2, ..., seed with a length of 264 bits 24 After that, take the first 256 bits as the root key seed and the last 8 bits as the checksum; calculate the 8-bit fingerprint value fingerprint of the seed, compare the fingerprint and checksum, if they are equal, the recovered root key is the seed, if they are not equal, the root key recovery fails.

4. A key management method based on the alliance chain key management system according to claim 1, characterized in that: The user registration module includes the following steps: A11, the user sends a mobile phone number TelNum or email to the key management system to initiate a registration request; A12, the password management system checks whether the mobile phone number or email address has been registered. If the mobile phone number or email address has been registered, a message is returned to the user to inform him that the mobile phone number or email address has been registered. A13, if the mobile phone number or email address has not been registered, the password management system generates a user ID and pushes a verification code to the user's mobile phone or email address; A14, the user sets the password PW, the client uses the SM3 hash algorithm to calculate the password hash value h = H (PW), and sends h to the key management system; A15, the client password management system stores the user's mobile phone number TelNum or email address Email, ID, and password hash value h.

5. A key management method based on the alliance chain key management system according to claim 1, characterized in that: The root key generation / import module includes a root key generation module and / or a root key import module; the root key generation module includes the following steps: A21, the client uses a random number generation algorithm to generate a root key seed; A22, storing the root key according to the root key storage protocol; The root key import module includes the following steps: the root key is generated by the key maker, imported into the key management system, and then other blockchain keys are derived based on the root key.

6. A key management method based on the alliance chain key management system according to claim 1, characterized in that: The root key storage module includes a mnemonic storage module, and / or a key management system ciphertext trusteeship module, and / or a key management system plaintext trusteeship module; The mnemonic storage module includes the following methods: after the client generates the mnemonic, the user stores the mnemonic in a physical manner; or stores the mnemonic in a physical manner or stores the mnemonic locally; The ciphertext trusteeship module of the ciphertext management system comprises the following steps: A301, the client calculates the symmetric encryption key: key = SM3 (ID || PW), and uses the key to encrypt the root key: C = SM4 key (seed), use the default root key description information seed_desp = "seed", and send (ID, C, seed_desp, h) to the key management system; A302, after verifying the password hash value, the key management system stores the user ID, root key ciphertext, root key description information and password hash value h; The secret management system plain text trusteeship module includes the following steps: A311, the client sends the user ID, root key seed, root key description information and password hash value h to the key management system; A312, after verifying the password hash value, the key management system stores the user ID, the root key plain text, the root key description information seed_desp = "seed" and the password hash value h.

7. The method according to claim 6, characterized in that After the client generates the mnemonic, the following sub-steps are included: the client calculates the 8-bit fingerprint value fingerprint of the seed, recorded as seed||fingerprint; selects a word list A containing 2048 different words; divides seed||fingerprint into 24 groups: seed1, seed2, ...seed 24 ; Each group is 11 bits long, and each group represents an integer idx in the interval [0,2047] i , map each group to a word in the vocabulary: M1 = A[idx1], M2 = A[idx2], …, M 24 =A[idx 24 ], the mnemonics are M1,M2,…,M 24 .

8. A key management method based on the alliance chain key management system according to claim 1, characterized in that: The password resetting module comprises the following steps: C501, the client performs login authentication through the user ID and password PW, calculates the password hash value h=SM3(PW), and sends the user ID and password hash value h to the key management system to request a password reset; C502, the password management system searches for the user's registered mobile phone number or email address, and pushes a verification code to the user's mobile phone; C503: The client passes the verification code authentication, and the key management system returns the ciphertext of the key after verification; C504, the client uses the SM3 hash algorithm to calculate the symmetric encryption key key = SM3 (ID | | PW), and then decrypts the ciphertext to obtain the key recv_key = SM4_DEC key (C), the recovered keys include the root key and the response key; C505, the user resets the password PW′, the client uses the SM3 hash algorithm to calculate the symmetric encryption key key = SM3 (ID || PW), and then re-encrypts the key to calculate the ciphertext C = SM4 key (seed); C506, the client uses the SM3 hash algorithm to calculate the password hash value h = SM3 (PW), and then sends ID, h, C, key_desp_ex to the key management system; C507, the key management system stores the user ID, password hash value h, key ciphertext C and key description information key_desp_ex; C508, the key management system sends a reset success message to the client.

9. A key management method based on the alliance chain key management system according to claim 2, characterized in that: The signature / encryption key derivation module comprises the following steps: S101, the user inputs the description information desp of the new key, the initial value of index is 0, indicating the number of times the key is updated; Use the master key to derive a symmetric key: key _ desp="symm"||desp,key _ desp _ ex=key _ desp||index symm _ key=SM3(seed||ID||key _ desp _ ex) Or use the master key to derive an asymmetric key: key _ desp="asymm"||desp,key _ desp _ ex=key _ desp||index asymm _ key=SM3(seed||ID||key _ desp _ ex) Or use the master key to derive a dual key pair: key _ desp="asymm _ d"||desp,key _ desp _ ex=key _ desp||index asymm _ dkey1=SM3(seed||ID||key _ desp _ ex||1) asymm _ dkey2=SM3(seed||ID||key _ desp _ ex||2) Among them, key_desp_ex represents the key description information; S102, the client stores the signature and encryption keys according to the key storage protocol.

10. A key management method based on the alliance chain key management system according to claim 2, characterized in that: The key storage module includes a key management system plaintext trusteeship module and / or a key management system ciphertext trusteeship module; The secret management system plain text trusteeship module includes the following steps: S201, the client sends the user ID, key pair (sk, pk), key description information key_desp_ex and password hash value h to the key management system; S202, after verifying the password hash value, the key management system stores the user ID, key pair (sk, pk), key description information key_desp_ex and password hash value h; The ciphertext trusteeship module of the ciphertext management system comprises the following steps: S21, the client calculates the symmetric encryption key: key = SM3 (ID || PW), and uses the key to encrypt the private key: C = SM4 key (sk), calculate signature: sig = SM2 sk (ID||C), put (ID,C,key _ desp _ ex,sig,pk) are sent to the secret management system; S22, after verifying the password hash value and signature, the key management system stores the user ID, root key ciphertext C, public key pk, root key description information key_desp_ex and password hash value h.

11. A key management method based on the alliance chain key management system according to claim 2, characterized in that: The key recovery module includes a root key derivation module, a key management system plaintext acquisition module, and a key management system ciphertext acquisition module; The root key derivation module comprises the following steps: S301, the user logs in and authenticates using the user ID and password PW, the client calculates the password hash value h=SM3(PW), and sends the user ID, password hash value h and key description key _ desp is sent to the secret management system; S302, the key management system verifies the password hash value h. After the verification is passed, the key management system generates a new key according to the user name ID and key description key. _ desp finds the extended key description information key _ desp_ex, and then key _ desp_ex is sent to the client; S303, the client calculates the key key = SM3 (seed | | ID | | key _ desp _ ex); The secret management system obtains the plaintext module, including the following steps: S31, the user logs in and authenticates using the user ID and password PW, the client calculates the password hash value h=SM3(PW), and sends the user ID and password hash value h to the key management system to request the application key; S32, the password management system verifies the password hash value h; S33, after the verification is passed, the key management system searches for the application key according to the user name ID, and then sends the stored application key in plain text to the client; The key management system obtains the ciphertext module, including the following steps: S341, the user logs in and authenticates using the user ID and password PW, the client calculates the password hash value h=SM3(PW), and sends the user ID, password hash value h and key description key _ desp is sent to the secret management system; S342, the password management system verifies the password hash value h; S343, after verification, the key management system describes the key according to the user name ID and key _ desp searches for the key ciphertext and then sends the stored ciphertext C to the client; S344, the client uses the SM3 hash algorithm to calculate the symmetric encryption key key = SM3 (ID || PW), and uses the SM4 decryption algorithm to decrypt the ciphertext to obtain the symmetric key: key = SM4 _ DEC key (C).

12. A key management method based on the alliance chain key management system according to claim 2, characterized in that: The key update module comprises the following steps: S401, the user logs in and authenticates using the user ID and password PW, the client calculates the password hash value h=SM3(PW), and sends the user ID, password hash value h and key description key _ desp is sent to the secret management system; S402, the key management system verifies the password hash value h. After the verification is passed, the key management system generates a new key according to the user name ID and key description key. _ desp finds the extended key description information key _ desp_ex, and then key _ desp_ex is sent to the client; S403: The client executes the key revocation protocol to revoke the key description information key _ The key of desp; S404, the client increases the key update count index by one, and then executes the key derivation protocol to derive the extended key description information as key _ The key of desp||index+1.

13. A key management method based on the alliance chain key management system according to claim 2, characterized in that: The key revocation module comprises the following steps: S501, the user logs in and authenticates using the user ID and password PW, the client calculates the password hash value h=SM3(PW), and sends the user ID, password hash value h and key description key _ desp is sent to the secret management system; S502, the password management system verifies the password hash value h; S503: After verification, the client sends a key revocation request to the key management system. _ desp; S504, the key management system deletes the key described as key _ The key ciphertext of desp returns the revocation result to the client.