CN111737770B - Key management method and application method - Google Patents

Key management method and application method Download PDF

Info

Publication number
CN111737770B
CN111737770B CN202010477864.8A CN202010477864A CN111737770B CN 111737770 B CN111737770 B CN 111737770B CN 202010477864 A CN202010477864 A CN 202010477864A CN 111737770 B CN111737770 B CN 111737770B
Authority
CN
China
Prior art keywords
key
application
hsm
root
management method
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.)
Active
Application number
CN202010477864.8A
Other languages
Chinese (zh)
Other versions
CN111737770A (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 Medical and Electric Co Ltd
Original Assignee
Ningbo Sanxing Medical and 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 Medical and Electric Co Ltd filed Critical Ningbo Sanxing Medical and 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, a root key stored in an NVRAM area of an HSM is built in the HSM, and meanwhile, a security policy of the root key is set in the HSM, so that the root key is ensured not to leave the HSM; the application program sends information to request the HSM to create an application key according to the unique identifier and the key version number of the equipment or the user; generating an application key by using a derivative algorithm in the HSM, wherein the application key is stored in the 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 after the application program obtains the ciphertext of the application key, decrypting the ciphertext, and finally encrypting and decrypting the application data according to the decrypted application key by the application program, thereby completing the secure interaction between the application program and the equipment or the user. An application is also disclosed. The management method is better in safety, reduces the risk of data leakage and ensures high availability.

Description

Key management method and application method
Technical Field
The present invention relates to the field of keys, and in particular, to a key management method and an application method.
Background
The HSM (Hardware Security Module hardware security module) is a reinforced and tamper-resistant special hardware device, has various security-related functions such as key creation, data encryption and decryption, data signature and signature verification, and provides support for confidentiality, integrity and effectiveness of data in various business scenes such as finance, communication and the like by executing inside the device to block external threats.
Because of the small internal storage space of HSM, such as nSiheld Connect of Thales, its NVRAM (Non-Volatile Random Access Memory Non-volatile random access memory) space is only about 1M, and the number of storable keys is very limited, and many application systems need to manage tens of millions of keys, such as power data collection systems, banking and financial systems, or mobile communication applications.
Therefore, the existing key management method is often designed as follows:
1. key storage
Designing an MK (Master Key Master Key) for encrypting and protecting other subkeys, wherein 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 a computer, so the number of subkeys may not be limited by the storage capacity of the HSM.
2. Key creation
1. Creating a key as MK (master key) with a random number generator inside the HSM, saving to NVRAM;
2. creating all AK (Application Key) by using a random number generator in the HSM, wherein one AK is usually associated with a certain device (such as a certain electric energy meter in an electric power acquisition network) or a user (such as a certain user account on the Internet);
3. executing an AES-Wrap (Advanced Encryption Standard Key Wrap Algorithm) algorithm in the HSM, and packaging AK by MK to generate wraparound AK;
4. deriving a wraparound AK from the HSM, establishing a relationship between the wraparound AK and the device or user in the application software, and storing the relationship in a database or a disk file;
3. key application
1. The application program queries the corresponding wraparound AK from the database or the disk file according to the identification of the equipment or the user;
2. the application program sends the Wrapped AK to the HSM;
3. the HSM decrypts the AK plaintext by MK (master Key), encrypts the AK plaintext by RSA Key or Pre-share Key (Pre-shared Key), obtains ciphertext and transmits the ciphertext to the application program;
4. after an application program obtains an AK ciphertext, decrypting by using an RSA Key or a Pre-share Key to obtain an AK plaintext, and finally encrypting and decrypting application data by using the AK to finish a safe interaction process with equipment or a user;
however, all AKs in the existing key management method are stored in a database or a disk file, data are easy to leak, and the data become targets of cracking attacks of intruders, so that the relative risk is higher; in addition, all AKs are generated in a random number mode and cannot be reconstructed in an HSM, so that once a database or a disk file is damaged, continuous interaction with equipment or a user cannot be realized, and potential usability hazards exist; finally, when MK is no longer secure, all the persistent AK must be updated (protected and persisted with new MK), which has a large impact on the system and may cause temporary interruption of traffic. Thus, further improvements are needed.
Disclosure of Invention
The first technical problem to be solved by the invention is to provide a key management method which has better security, reduces the risk of data leakage and ensures high availability, aiming at the current state of the art.
The second technical problem to be solved by the present invention is to provide an application method of the key management method, aiming at the current state of the art.
The technical scheme adopted by the invention for solving the first technical problem is as follows: a key management method, characterized in that: the method comprises the following steps:
step 1, a secret key is created in the HSM, the secret key is used as a root secret key, the root secret key is stored in an NVRAM area of the HSM, and meanwhile, a security policy of the root secret key is set in the HSM and used for ensuring that the root secret key does not leave the HSM;
step 2, the application program creates an application key according to the unique identifier and the key version number of the equipment or the user, so as to send an information request HSM;
step 3, generating an application key by using a derivative algorithm inside the HSM, and storing the application key in the HSM or a RAM area of 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 safe 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 in the HSM in the step 1 is as follows: the root key is created by a random number generator.
Preferably, the unique identifier of the device or the user in the step 2 is a code of the device or an identification card number of the user.
Preferably, the derivation algorithm used in the step 3 is a KB-KDF derivation algorithm, in the derivation process of the KB-KDF derivation algorithm, the root key is used as an upper 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 an application key matched with the device or the user.
In this scheme, the encryption method using the key in step 4 adopts a symmetric encryption method or an asymmetric encryption method.
Preferably, the encryption method used in the step 4 is AES-WRAP algorithm in a symmetric encryption method.
As an improvement, the method for decrypting the ciphertext of the application key in the step 6 is the same algorithm as the encryption algorithm of the application key.
The invention solves the second technical problem by adopting the technical proposal that: the application method 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 acquisition system and the electric energy meter perform data interaction through the key management method.
Preferably, the acquisition system includes an acquisition unit and a concentrator in communication with the acquisition unit.
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-stage derivative algorithm are introduced, an application key AK is derived through the root key RK, and the application key AK only temporarily exists in an HSM or a RAM area of a computer, so that no lasting operation of any physical medium is performed, the risk of data leakage is avoided, and meanwhile, the disaster recovery requirement is reduced; in addition, when the root key RK is updated, large-scale persistence action is not required 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.
Description of the embodiments
The invention is described in further detail below with reference to the embodiments of the drawings.
As shown in fig. 1, a key management method includes the steps of:
step 1, a secret key is created in the HSM and used as a root secret key RK, the root secret key RK is stored in an NVRAM area of the HSM, and meanwhile, a security policy of the root secret key RK is set in the HSM and used for ensuring that the root secret key RK does not leave the HSM; wherein, the root key RK is created by 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 into other HSMs in the cluster environment through the backup medium;
step 2, the application program creates an application key AK by sending an information request HSM according to the unique identifier of the equipment or the user and the key version number; the unique identifier is used for distinguishing the equipment or the user, and the identifier corresponds to the unique equipment or the user; in this embodiment, the unique identifier of the device or the user is the code of the device or the identification card number of the user
Step 3, generating an application key AK by using a derivative algorithm inside the HSM, and storing the application key AK in the HSM or a RAM area of a computer;
in this embodiment, the derivative algorithm used is a KB-KDF derivative algorithm, where in the derivative process of the KB-KDF derivative algorithm, the root key RK is used as an upper key of the KB-KDF derivative algorithm, and the unique identifier and the key version number of the device or the user are used as parameters of the KB-KDF derivative algorithm to derive an application key AK matched with the device or the user, and meanwhile, other information in the HSM may be added as a derivative factor to enhance the discreteness and security of the derivative 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 decryption of the ciphertext of the application key AK and encryption of the application key AK, in addition, the symmetric encryption algorithm uses the same key for encryption and decryption, and the algorithm used for encryption and decryption must be the same, namely: the AES-WRAP algorithm is used in encryption and must also be used in decryption; in the asymmetric encryption algorithm, two parties needing interaction respectively generate a pair of public and 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, only the root key RK is stored in an NVRAM area inside the HSM, so that 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 one HSM fails, the root key RK in the other HSMs in the cluster environment can be continuously used, single-point failure can be effectively avoided, 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 application key AK is re-derived from the updated root key RK, and the generation method and the updating of the application key AK are simpler, so that 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 the high availability of the whole solution.
The key management can be applied to encryption transmission between data, so that the security of the data is ensured; for example: the internet payment system or the acquisition system is used as one application, the key management method is applied to the acquisition system to read the data of the electric energy meter, and the acquisition system and the electric energy meter perform data security interaction through the key management method. In this embodiment, the acquisition system includes an acquisition unit and a concentrator in communication with the acquisition unit. Of course, the above-described key management method may be applied to reading data of a water meter or a 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 create an application key AK according to the unique identifier and the key version number of the electric energy meter so as to realize safe interaction between the acquisition system and the electric energy meter.
The foregoing is merely a preferred embodiment of the present invention, and it should be noted that it will be apparent to those skilled in the art that several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the scope of the invention.

Claims (10)

1. A key management method, characterized in that: the method comprises the following steps:
step 1, a secret key is created in the HSM and used as a root secret key RK, the root secret key RK is stored in an NVRAM area of the HSM, and meanwhile, a security policy of the root secret key RK is set in the HSM and used for ensuring that the root secret key RK does not leave the HSM;
step 2, the application program creates an application key AK by sending an information request HSM according to the unique identifier of the equipment or the user and the key version number;
step 3, generating an application key AK by using a derivative algorithm inside the HSM, and storing the application key AK in the HSM or a RAM area of a 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 a 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 into 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 in the HSM in the step 1 is as follows: the root key RK is created by a random number generator.
4. The key management method according to claim 1, wherein: the unique identifier of the equipment or the user in the step 2 is the code of the equipment or the identification 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, in the derivation process of the KB-KDF derivation algorithm, the root key RK is used as an upper 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 an 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 secret key AK in the step 4 adopts 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 symmetrical 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 method 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 performed between the acquisition system and the electric energy meter through the key management method according to any one of claims 1-8.
10. The application method according to claim 9, characterized in that: the acquisition system comprises an acquisition device and a concentrator which is communicated 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 CN111737770A (en) 2020-10-02
CN111737770B true 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)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112637156B (en) * 2020-12-14 2022-08-02 卓尔智联(武汉)研究院有限公司 Key distribution method, device, computer equipment and storage medium
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
CN113434885B (en) * 2021-06-30 2022-12-09 湖南国科微电子股份有限公司 Key derivation method, device, equipment 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

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

Also Published As

Publication number Publication date
CN111737770A (en) 2020-10-02

Similar Documents

Publication Publication Date Title
CN111737770B (en) Key management method and application method
JP6941183B2 (en) Data tokenization
US8239679B2 (en) Authentication method, client, server and system
CN100561916C (en) A kind of method and system that upgrades authenticate key
CN105681031B (en) A kind of storage encryption gateway key management system and method
US9122882B2 (en) Method and apparatus of securely processing data for file backup, de-duplication, and restoration
US11240008B2 (en) Key management method, security chip, service server and information system
CN102355350B (en) A kind of file encrypting method for mobile intelligent terminal and system
CN101388053A (en) Method, system, and apparatus for encrypting, integrity, and anti-replay protecting data
US20130332737A1 (en) Method and apparatus of securely processing data for file backup, de-duplication, and restoration
CN111970114B (en) File encryption method, system, server and storage medium
CN112737781B (en) Quantum key management service method, system and storage medium
CN102769525B (en) The user key backup of a kind of TCM and restoration methods
JP2001103045A (en) Storage device for backing up cryptographic key
CN114942729A (en) Data safety storage and reading method for computer system
US20120250857A1 (en) Method and apparatus of securely processing data for file backup, de-duplication, and restoration
CN104780048A (en) Lightweight mirror image file encryption system and method
CN112865965B (en) Train service data processing method and system based on quantum key
CN111541690B (en) Safety protection method for communication between intelligent terminal and server
CN116155491B (en) Symmetric key synchronization method of security chip and security chip device
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
CN105187546A (en) Network separation storage system and method of separating and storing files
CN112217797B (en) Intelligent gateway Internet of things control system and method applying block chain technology

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