CN111737770A - Key management method and application - Google Patents

Key management method and application Download PDF

Info

Publication number
CN111737770A
CN111737770A CN202010477864.8A CN202010477864A CN111737770A CN 111737770 A CN111737770 A CN 111737770A CN 202010477864 A CN202010477864 A CN 202010477864A CN 111737770 A CN111737770 A CN 111737770A
Authority
CN
China
Prior art keywords
key
application
hsm
management method
root
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010477864.8A
Other languages
Chinese (zh)
Other versions
CN111737770B (en
Inventor
黄俊耿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ningbo Sanxing Electric Co Ltd
Original Assignee
Ningbo Sanxing Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ningbo Sanxing Electric Co Ltd filed Critical Ningbo Sanxing Electric Co Ltd
Priority to CN202010477864.8A priority Critical patent/CN111737770B/en
Publication of CN111737770A publication Critical patent/CN111737770A/en
Application granted granted Critical
Publication of CN111737770B publication Critical patent/CN111737770B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/72Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information in cryptographic circuits
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S40/00Systems for electrical power generation, transmission, distribution or end-user application management characterised by the use of communication or information technologies, or communication or information technology specific aspects supporting them
    • Y04S40/20Information technology specific aspects, e.g. CAD, simulation, modelling, system security

Abstract

The invention relates to a key management method, which comprises the steps of establishing a root key stored in an NVRAM (random access memory) area of an HSM (high speed memory) inside the HSM, and setting a security policy of the root key in the HSM at the same time to ensure that the root key does not leave the HSM; the application program sends an information request HSM to establish an application key according to the unique identifier and the key version number of the equipment or the user; the HSM internally generates an application key by using a derivative algorithm, and the application key is stored in a RAM area of the HSM or the computer; after encrypting the application key in the HSM, the HSM sends the ciphertext of the application key to the application program; and finally, the application program encrypts and decrypts the application data according to the decrypted application key, namely, the safe interaction between the application program and the equipment or the user is completed. An application is also disclosed. The management method has better safety, reduces the risk of data leakage and ensures high availability.

Description

Key management method and application
Technical Field
The present invention relates to the field of keys, and in particular, to a key management method and an application thereof.
Background
The HSM (Hardware Security Module) is a reinforced and tamper-proof special Hardware device, has various Security-related functions such as key creation, data encryption and decryption, data signing and signature verification, and provides support for data confidentiality, integrity and effectiveness under various business scenes such as finance and communication by being executed inside the device to block external threats.
Because the internal storage space of the HSM is small, such as nSiheld Connect of Thales, the NVRAM (Non-Volatile random access Memory) space of the HSM is only about 1M, the number of keys that can be stored is very limited, and many application systems need to manage ten million levels of keys, such as a power data acquisition system, a bank financial system, or a mobile communication application.
Therefore, the existing key management method is often designed as follows:
first, key storage
Designing an MK (Master Key) for encrypting and protecting other sub-keys, wherein the MK is stored in an NVRAM area of the HSM; the remaining keys are stored outside the HSM device, such as in a database or disk file of the computer, so the number of subkeys may not be limited by the storage capacity of the HSM.
Second, key creation
1. Creating a key as MK (master key) by using a random number generator in HSM, and storing the key in NVRAM;
2. creating all AKs (Application Key Application keys) by using a random number generator inside the HSM, wherein one AK is usually associated with a certain device (such as a certain electric energy meter in a power acquisition network) or a user (such as a certain user account number on the internet);
3. executing AES-wrap (advanced Encryption Standard Key WrapAlgorithm) algorithm in HSM, and packaging AK with MK to generate Wrapped AK;
4. exporting the Wrapped AK from the HSM, establishing good association between the Wrapped AK and equipment or a user in application software, and storing the association into a database or a disk file;
third, key application
1. The application program queries corresponding WrappedAK from a database or a disk file according to the identifier of the equipment or the user;
2. the application program sends the Wrapped AK to the HSM;
3. the HSM decrypts by using MK (master Key) to obtain AK plaintext, encrypts the AK plaintext by using RSA Key or Pre-share Key to obtain ciphertext and transmits the ciphertext to an application program;
4. after obtaining the AK ciphertext, the application program decrypts by using an RSA Key or a Pre-share Key to obtain an AK plaintext, and finally encrypts and decrypts the application data by using the AK to complete a safe interaction process with equipment or a user;
however, all AK in the existing key management method is stored in a database or a disk file, and data is easy to leak out and becomes an object for an intruder to crack attack, so that the relative risk is higher; in addition, all AK are generated in a random number mode and cannot be reconstructed in HSM, so that once a database or a disk file is damaged, continuous interaction with equipment or a user cannot be caused, and potential usability hazards exist; finally, when MK is no longer secure, all persisted AKs must be updated in their entirety (protected and persisted with new MK), which has a large impact on the system, possibly resulting in temporary traffic disruption. Further improvements are therefore desirable.
Disclosure of Invention
The first technical problem to be solved by the present invention is to provide a key management method with better security, reduced data leakage risk and guaranteed high availability, aiming at the current situation of the prior art.
A second technical problem to be solved by the present invention is to provide an application of the above key management method in view of the current state of the art.
The technical scheme adopted by the invention for solving the first technical problem is as follows: a method of key management, characterized by: the method comprises the following steps:
step 1, a key is established inside the HSM, the key is used as a root key, the root key is stored in an NVRAM area of the HSM, and meanwhile, a security policy of the root key is set in the HSM and is used for ensuring that the root key does not leave the HSM;
step 2, the application program sends information request HSM to establish application key according to the unique identifier and key version number of the equipment or the user;
step 3, the inside of the HSM generates an application key by using a derivative algorithm, and the application key is stored in an RAM area of the HSM or the computer;
step 4, encrypting the generated application key in the HSM to obtain a ciphertext of the application key;
step 5, the HSM sends the ciphertext of the application key to the application program;
step 6, after the application program obtains the ciphertext of the application key, decrypting the ciphertext of the application key to obtain a decrypted application key;
and 7, the application program encrypts and decrypts the application data according to the decrypted application key, namely, the secure interaction between the application program and the equipment or the user is completed.
As an improvement, the step 1 further comprises the following steps: and backing up the root key by using a special medium matched with the HSM, and synchronizing the root key to other HSMs in the cluster environment through the backup medium.
Specifically, the method for creating the root key inside the HSM in step 1 includes: a root key is created by a random number generator.
Preferably, in step 2, the unique identifier of the device or the user is a code of the device or an identity number of the user.
Preferably, the derivation algorithm used in step 3 is a KB-KDF derivation algorithm, and in the KB-KDF derivation algorithm derivation process, the root key is used as an upper-level key of the KB-KDF derivation algorithm, and the unique identifier and the key version number of the device or the user are used as parameters of the KB-KDF derivation algorithm to derive the application key matched with the device or the user.
In this scheme, the encryption method using the secret key in step 4 is a symmetric encryption method or an asymmetric encryption method.
Preferably, the encryption method used in step 4 is an AES-WRAP algorithm in a symmetric encryption method.
As an improvement, the method for decrypting the ciphertext of the application key in step 6 is the same algorithm as the encryption algorithm of the application key.
The technical scheme adopted by the invention for solving the second technical problem is as follows: an application of the key management method is used for realizing the safe interaction of data between the acquisition system and the electric energy meter, and is characterized in that: and the data interaction is carried out between the acquisition system and the electric energy meter by the key management method.
Preferably, the collection system comprises a collector and a concentrator in communication connection with the collector.
Compared with the prior art, the invention has the advantages that: by adjusting a key management mechanism in the existing scheme, a root key RK and a multi-level derivation algorithm are introduced, an application key AK is derived through the root key RK, and the application key AK only temporarily exists in an RAM area of an HSM or a computer, and no persistent operation of any physical medium is performed, so that the risk of data leakage is avoided, and the disaster recovery requirement is reduced; in addition, when the root key RK is updated, large-scale persistence action does not need to be executed, the influence on a service system can be reduced, and the problems of key storage, high availability risk and the like are solved.
Drawings
Fig. 1 is a flowchart of a key management method according to an embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the accompanying examples.
As shown in fig. 1, a key management method includes the following steps:
step 1, a key is established in the HSM, the key is used as a root key RK, the root key RK is stored in an NVRAM area of the HSM, and meanwhile, a security policy of the root key RK is set in the HSM and is used for ensuring that the root key RK does not leave the HSM; wherein, a root key RK is created through a random number generator, and the creation method belongs to the existing method;
in order to ensure the security of the root key RK, the method further comprises the following steps: backing up the root key RK by using a special medium matched with the HSM, and synchronizing the root key RK to other HSMs in the cluster environment through the backup medium;
step 2, the application program sends an information request HSM to establish an application key AK according to the unique identifier and the key version number of the equipment or the user; the unique identification is used for distinguishing equipment or users, and the identification is corresponding to the unique equipment or users; in this embodiment, the unique identifier of the device or the user is a code of the device or an identification number of the user
Step 3, generating an application key AK by using a derivative algorithm in the HSM, and storing the application key AK in an RAM area of the HSM or the computer;
in the embodiment, the used derivation algorithm is a KB-KDF derivation algorithm, the derivation algorithm is an existing derivation algorithm, in the KB-KDF derivation algorithm derivation process, the root key RK is used as a superior key of the KB-KDF derivation algorithm, the unique identifier and the key version number of the device or the user are used as parameters of the KB-KDF derivation algorithm, the application key AK matched with the device or the user is derived, and meanwhile, other information in the HSM can be added as a derivation factor to enhance the discreteness and the security of the derivation result;
step 4, encrypting the generated application key AK in the HSM to obtain a ciphertext of the application key AK;
the encryption method may be a symmetric encryption method or an asymmetric encryption method, and in this embodiment, an AES-WRAP algorithm in the symmetric encryption method is used;
step 5, the HSM sends the ciphertext of the application key AK to the application program;
step 6, after the application program obtains the ciphertext of the application key AK, decrypting the ciphertext of the application key AK to obtain a decrypted application key AK;
the same algorithm must be used for both decryption of the ciphertext of the application key AK and encryption of the application key AK, in addition, the same key is used for encryption and decryption of the symmetric encryption algorithm, and the same algorithm must be used for encryption and decryption, that is: an AES-WRAP algorithm is used during encryption, and the AES-WRAP algorithm must be used during decryption; in the asymmetric encryption algorithm, two parties needing interaction respectively generate a pair of public private keys, then the public keys of the two parties are used for encryption during encryption, and the private keys of the two parties are used for decryption;
and 7, the application program encrypts and decrypts the application data according to the decrypted application key AK, namely, the secure interaction between the application program and the equipment or the user is completed.
In the invention, an NVRAM area inside the HSM only stores the root key RK, and the required storage space is small; in the management method, the root key RK is backed up through a special medium matched with the HSM, and the root key RK is synchronized to other HSMs in the cluster environment through the backup medium, so that when a certain HSM fails, the root keys RK in other HSMs in the cluster environment can be continuously used, single-point failure can be effectively avoided, and the availability of the root key RK is improved, and the management method is a high-availability key management method; in addition, when the root key RK is updated, the updated root key RK is used for deriving the application key AK again, the generation method and the updating of the application key AK are simpler, and the high availability of the key is realized. Therefore, the key management method provides good disaster recovery capability on the premise of meeting the requirement of high security level, and ensures high availability of the whole solution.
The key management can be applied to encrypted transmission between data, so that the security of the data is ensured; for example: the key management method is applied to the collection system to read data of the electric energy meter, and the collection system and the electric energy meter perform data security interaction through the key management method. In this embodiment, the collection system includes a collector and a concentrator communicatively connected to the collector. Of course, the key management method can also be applied to reading data of the water meter or the gas meter.
When reading the data of the electric energy meter, the application program in the key management method is the application program in the acquisition system, and the application program in the acquisition system sends an information request HSM to establish the application key AK according to the unique identifier and the key version number of the electric energy meter so as to realize the safe interaction between the acquisition system and the electric energy meter.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the technical principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method of key management, characterized by: the method comprises the following steps:
step 1, a key is established inside the HSM, the key is used as a Root Key (RK), the Root Key (RK) is stored in an NVRAM area of the HSM, and meanwhile, a security policy of the Root Key (RK) is set in the HSM and is used for ensuring that the Root Key (RK) does not leave the HSM;
step 2, the application program sends an information request HSM to establish an Application Key (AK) according to the unique identifier and the key version number of the equipment or the user;
step 3, the inside of the HSM generates an Application Key (AK) by using a derivative algorithm, and stores the Application Key (AK) in an RAM area of the HSM or the computer;
step 4, encrypting the generated Application Key (AK) in the HSM to obtain a ciphertext of the Application Key (AK);
step 5, the HSM sends the ciphertext of the Application Key (AK) to the application program;
step 6, after the application program obtains the ciphertext of the Application Key (AK), decrypting the ciphertext of the Application Key (AK) to obtain the decrypted Application Key (AK);
and 7, the application program encrypts and decrypts the application data according to the decrypted Application Key (AK), namely, the secure interaction between the application program and the equipment or the user is completed.
2. The key management method according to claim 1, wherein: the step 1 further comprises the following steps: and backing up the Root Key (RK) by using a special medium matched with the HSM, and synchronizing the Root Key (RK) to other HSMs in the cluster environment through the backup medium.
3. The key management method according to claim 1, wherein: the method for creating the Root Key (RK) inside the HSM in step 1 comprises the following steps: a Root Key (RK) is created by a random number generator.
4. The key management method according to claim 1, wherein: and in the step 2, the unique identifier of the equipment or the user is the code of the equipment or the identity card number of the user.
5. The key management method according to claim 1, wherein: the derivation algorithm used in the step 3 is a KB-KDF derivation algorithm, and in the KB-KDF derivation algorithm derivation process, the Root Key (RK) is used as a superior key of the KB-KDF derivation algorithm, and the unique identifier and key version number of the device or the user are used as parameters of the KB-KDF derivation algorithm to derive the Application Key (AK) matched with the device or the user.
6. The key management method according to claim 1, wherein: the encryption method using the key (AK) in step 4 is a symmetric encryption method or an asymmetric encryption method.
7. The key management method according to claim 5, wherein: the encryption method used in the step 4 is an AES-WRAP algorithm in a symmetric encryption method.
8. The key management method according to claim 1, wherein: the method for decrypting the ciphertext of the Application Key (AK) in the step 6 is the same algorithm as the encryption algorithm of the Application Key (AK).
9. An application for realizing the safe interaction of data between an acquisition system and an electric energy meter is characterized in that: the data security interaction is carried out between the acquisition system and the electric energy meter through the key management method according to any one of claims 1 to 8.
10. Use according to claim 9, characterized in that: the acquisition system comprises an acquisition device and a concentrator in communication connection with the acquisition device.
CN202010477864.8A 2020-05-29 2020-05-29 Key management method and application method Active CN111737770B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010477864.8A CN111737770B (en) 2020-05-29 2020-05-29 Key management method and application method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010477864.8A CN111737770B (en) 2020-05-29 2020-05-29 Key management method and application method

Publications (2)

Publication Number Publication Date
CN111737770A true CN111737770A (en) 2020-10-02
CN111737770B CN111737770B (en) 2023-04-28

Family

ID=72646522

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010477864.8A Active CN111737770B (en) 2020-05-29 2020-05-29 Key management method and application method

Country Status (1)

Country Link
CN (1) CN111737770B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112637156A (en) * 2020-12-14 2021-04-09 卓尔智联(武汉)研究院有限公司 Key distribution method, device, computer equipment and storage medium
CN112738083A (en) * 2020-12-28 2021-04-30 福建正孚软件有限公司 Cross-network cross-border data transmission based secure access key management system and method
CN114302258A (en) * 2021-12-21 2022-04-08 广东纬德信息科技股份有限公司 Intelligent gas meter safety meter reading method and system
CN114662135A (en) * 2022-05-19 2022-06-24 深圳市航顺芯片技术研发有限公司 Data access method, computer device and readable storage medium
CN115102752A (en) * 2022-06-17 2022-09-23 一汽奔腾轿车有限公司 Automobile data safe storage method based on commercial cryptographic algorithm
WO2023274010A1 (en) * 2021-06-30 2023-01-05 湖南国科微电子股份有限公司 Key derivation method and apparatus, device, and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102339498A (en) * 2010-05-20 2012-02-01 欧贝特技术公司 Method of managing electronic devices, such as integrated circuits, with internal generation of a personal authentication key
CN105871858A (en) * 2016-04-15 2016-08-17 浪潮集团有限公司 Method and system for ensuring high data safety
US10615969B1 (en) * 2017-02-10 2020-04-07 Wells Fargo Bank, N.A. Database encryption key management

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102339498A (en) * 2010-05-20 2012-02-01 欧贝特技术公司 Method of managing electronic devices, such as integrated circuits, with internal generation of a personal authentication key
CN105871858A (en) * 2016-04-15 2016-08-17 浪潮集团有限公司 Method and system for ensuring high data safety
US10615969B1 (en) * 2017-02-10 2020-04-07 Wells Fargo Bank, N.A. Database encryption key management

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112637156A (en) * 2020-12-14 2021-04-09 卓尔智联(武汉)研究院有限公司 Key distribution method, device, computer equipment and storage medium
CN112637156B (en) * 2020-12-14 2022-08-02 卓尔智联(武汉)研究院有限公司 Key distribution method, device, computer equipment and storage medium
CN112738083A (en) * 2020-12-28 2021-04-30 福建正孚软件有限公司 Cross-network cross-border data transmission based secure access key management system and method
CN112738083B (en) * 2020-12-28 2023-05-19 福建正孚软件有限公司 System and method for managing secure access key based on cross-network and cross-border data transmission
WO2023274010A1 (en) * 2021-06-30 2023-01-05 湖南国科微电子股份有限公司 Key derivation method and apparatus, device, and storage medium
CN114302258A (en) * 2021-12-21 2022-04-08 广东纬德信息科技股份有限公司 Intelligent gas meter safety meter reading method and system
CN114662135A (en) * 2022-05-19 2022-06-24 深圳市航顺芯片技术研发有限公司 Data access method, computer device and readable storage medium
CN115102752A (en) * 2022-06-17 2022-09-23 一汽奔腾轿车有限公司 Automobile data safe storage method based on commercial cryptographic algorithm

Also Published As

Publication number Publication date
CN111737770B (en) 2023-04-28

Similar Documents

Publication Publication Date Title
CN111737770B (en) Key management method and application method
CN106789052B (en) Remote key issuing system based on quantum communication network and use method thereof
CN103138939B (en) Based on the key access times management method of credible platform module under cloud memory module
CN108924147B (en) Communication terminal digital certificate issuing method, server and communication terminal
CN105681031B (en) A kind of storage encryption gateway key management system and method
US11831753B2 (en) Secure distributed key management system
WO2020192285A1 (en) Key management method, security chip, service server and information system
EP3841702A1 (en) Method, user device, management device, storage medium and computer program product for key management
CN102904712A (en) Information encrypting method
CN109150517A (en) Key security management system and method based on SGX
CN112565265B (en) Authentication method, authentication system and communication method between terminal devices of Internet of things
CN111970114B (en) File encryption method, system, server and storage medium
CN110650011A (en) Encryption storage method and encryption storage card based on quantum key
CN102769525B (en) The user key backup of a kind of TCM and restoration methods
CN115632880A (en) Reliable data transmission and storage method and system based on state cryptographic algorithm
JP2001103045A (en) Storage device for backing up cryptographic key
CN114942729A (en) Data safety storage and reading method for computer system
CN112787996B (en) Password equipment management method and system
CN112865965B (en) Train service data processing method and system based on quantum key
CN114244508A (en) Data encryption method, device, equipment and storage medium
CN109412799B (en) System and method for generating local key
CN103916237A (en) Method and system for managing user encrypted-key retrieval
CN100566239C (en) The key transmission method of multi-stage intelligent key apparatus and system
CN105426705A (en) Encryption control system for accounting software
CN115801232A (en) Private key protection method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant