Key management method and system
First Claim
1. A key management method, comprising:
- calling a first hardware and security module to generate a public key Pu and a private key Pr, storing the private key Pr in the first hardware and security module and sending the public key Pu to a security module of the POS terminal, using a Material Tracking and Management (MTMS) system;
calling the first hardware and security module using the MTMS system and calling a second hardware and security module using a KMS system to respectively combine MTMS access components and KMS access components into a protective key PK and a MAC key MAK in the respective first and second hardware and security modules and store the protective key PK and the MAC key MAK in the respective first hardware and security module and the second hardware and security module;
using an operating terminal to generate a transmission key TK and store the transmission key in the security module of the POS terminal, wherein the transmission key TK consists of a transmission encryption key TEK and an authentication key AUK;
encrypting the transmission key TK using the public key Pu to generate a first transmission key cipher text Ctk_Pu in the security module of the POS terminal using the POS terminal;
sending the first transmission key cipher text Ctk_Pu and a terminal sequence number SN to the MTMS system through the operating terminal using the POS terminal;
storing the received terminal sequence number SN and the corresponding first transmission key cipher text Ctk_Pu in an SN-Key_MTMS database using the MTMS system;
calling the first hardware and security module to decrypt the first transmission key cipher text Ctk_Pu using the private key Pr to obtain the transmission key TK, encrypting the transmission key TK using the protective key PK and calculating a MAC value using the MAC key MAK to generate a second transmission key cipher text Ctk_Pk using the MTMS system;
sending the terminal sequence number SN and the second transmission key cipher text Ctk_Pk to the KMS system using the MTMS system;
storing the terminal sequence number SN and the second transmission key cipher text Ctk_Pk sent from the MTMS system in an SN-TK_KMS database using the KMS system;
sending the terminal sequence number SN and a downloading master key application to the KMS system using the POS terminal;
inquiring about the second transmission key cipher text Ctk_Pk corresponding to the terminal sequence number SN using the KMS system after receiving the terminal sequence number SN and the downloading master key application sent by the POS terminal;
calling the second hardware and security module to verify the MAC validity of the inquired-about second transmission key cipher text Ctk_Pk using the MAC key MAK, and if the verification is passed, decrypting the second transmission key cipher text Ctk_Pk using the protective key PK to obtain the transmission key TK, and storing the transmission key TK in the second hardware and security module, using the KMS system;
calling the second hardware and security module to perform bidirectional authentication using an authentication key AUK and the POS terminal by the KMS system after obtaining the transmission key TK, and if the authentication is passed, calling the second hardware and security module to encrypt the terminal master key TMK using the transmission decryption key TEK to generate a master key cipher text Ctmk, and sending the master key cipher text Ctmk to the POS terminal, using the KMS system;
decrypting the master key cipher text Ctmk using the transmission encryption key TEK to obtain the terminal master key TMK and storing the terminal master key TMK in the security module of the POS terminal, using the POS terminal after receiving the master key cipher text Ctmk sent by the KSM system.
3 Assignments
0 Petitions
Accused Products
Abstract
Disclosed are a key management method and system. A master key is remotely downloaded to avoid the problem that the master key is not issued to a merchant until the master key needs be downloaded on a POS terminal, so as to reduce logistics costs and maintenance costs. When a key is remotely downloaded, a KMS system uses a symmetric algorithm to encrypt the key to be transmitted to ensure that the encrypted key can only be decrypted by a corresponding POS terminal, thereby ensuring the security of data transmission. During bidirectional authentication, an application program of the POS terminal can only contact an encrypted text form of the key instead of a plain text key needing to be remotely downloaded to the POS terminal, thereby ensuring security in reproduction.
-
Citations
10 Claims
-
1. A key management method, comprising:
-
calling a first hardware and security module to generate a public key Pu and a private key Pr, storing the private key Pr in the first hardware and security module and sending the public key Pu to a security module of the POS terminal, using a Material Tracking and Management (MTMS) system; calling the first hardware and security module using the MTMS system and calling a second hardware and security module using a KMS system to respectively combine MTMS access components and KMS access components into a protective key PK and a MAC key MAK in the respective first and second hardware and security modules and store the protective key PK and the MAC key MAK in the respective first hardware and security module and the second hardware and security module; using an operating terminal to generate a transmission key TK and store the transmission key in the security module of the POS terminal, wherein the transmission key TK consists of a transmission encryption key TEK and an authentication key AUK; encrypting the transmission key TK using the public key Pu to generate a first transmission key cipher text Ctk_Pu in the security module of the POS terminal using the POS terminal; sending the first transmission key cipher text Ctk_Pu and a terminal sequence number SN to the MTMS system through the operating terminal using the POS terminal; storing the received terminal sequence number SN and the corresponding first transmission key cipher text Ctk_Pu in an SN-Key_MTMS database using the MTMS system; calling the first hardware and security module to decrypt the first transmission key cipher text Ctk_Pu using the private key Pr to obtain the transmission key TK, encrypting the transmission key TK using the protective key PK and calculating a MAC value using the MAC key MAK to generate a second transmission key cipher text Ctk_Pk using the MTMS system; sending the terminal sequence number SN and the second transmission key cipher text Ctk_Pk to the KMS system using the MTMS system; storing the terminal sequence number SN and the second transmission key cipher text Ctk_Pk sent from the MTMS system in an SN-TK_KMS database using the KMS system; sending the terminal sequence number SN and a downloading master key application to the KMS system using the POS terminal; inquiring about the second transmission key cipher text Ctk_Pk corresponding to the terminal sequence number SN using the KMS system after receiving the terminal sequence number SN and the downloading master key application sent by the POS terminal; calling the second hardware and security module to verify the MAC validity of the inquired-about second transmission key cipher text Ctk_Pk using the MAC key MAK, and if the verification is passed, decrypting the second transmission key cipher text Ctk_Pk using the protective key PK to obtain the transmission key TK, and storing the transmission key TK in the second hardware and security module, using the KMS system; calling the second hardware and security module to perform bidirectional authentication using an authentication key AUK and the POS terminal by the KMS system after obtaining the transmission key TK, and if the authentication is passed, calling the second hardware and security module to encrypt the terminal master key TMK using the transmission decryption key TEK to generate a master key cipher text Ctmk, and sending the master key cipher text Ctmk to the POS terminal, using the KMS system; decrypting the master key cipher text Ctmk using the transmission encryption key TEK to obtain the terminal master key TMK and storing the terminal master key TMK in the security module of the POS terminal, using the POS terminal after receiving the master key cipher text Ctmk sent by the KSM system. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A key management system, comprising a first hardware and security module, a second hardware and security module, an operating terminal, a POS terminal, a Material Tracking and Management (MTMS) system and a KMS system;
- the first hardware and security module used to allow calls using the MTMS system, and the second hardware and security module used to allow calls using the KMS system;
wherein,the MTMS is used for calling the first hardware and security module to generate a public key Pu and a private key Pr, storing the private key Pr in the first hardware and security module and sending the public key Pu to a security module of the POS terminal; the MTMS system is used for calling the first hardware and security module and the KMS system is used for calling the second hardware and security module to respectively combine MTMS access components and KMS access components into a protective key PK and a MAC key MAK in the respective first and second hardware and security modules and store the protective key PK and the MAC key MAK in the respective first hardware and security module and the second hardware and security module; the operating system is used for controlling the POS terminal to generate a transmission key TK and store the transmission key in the security module of the POS terminal, wherein the transmission key TK consists of a transmission encryption key TEK and an authentication key AUK; the POS terminal is used for encrypting the transmission key TK by using the public key Pu in the security module of the POS terminal so as to generate a first transmission key cipher text Ctk_Pu, and sending the first transmission key cipher text Ctk_Pu and a terminal sequence number SN to the MTMS system through the operating terminal; the MTMS system is used for storing the received terminal sequence number SN and the corresponding first transmission key cipher text Ctk_Pu in an SN-Key_MTMS database, and calling the first hardware and security module to decrypt the first transmission key cipher text Ctk_Pu by-using the private key Pr so as to obtain the transmission key TK, then encrypting the transmission key TK by using the protective key PK and calculating a MAC value using the MAC key MAK so as to generate a second transmission key cipher text Ctk_Pk, and sending the terminal sequence number SN and the second transmission key cipher text Ctk_Pk to the KMS system; the KMS system is used to store the terminal sequence number SN and the corresponding second transmission key cipher text Ctk_pk sent by the MTMS system into an SN-TK_KMS database; the POS terminal is used to send the terminal sequence number SN and a downloading master key application to the KMS system; the KMS system is used to inquire about the second transmission key cipher text Ctk_Pk corresponding to the terminal sequence number SN after receiving the terminal sequence number SN and the downloading master key application sent by the POS terminal; the KMS system is used to inquire about the second hardware and security module to verify a MAC validity of the inquired-about second transmission key cipher text Ctk_Pk by using the MAC key MAK, and if the verification is passed, decrypts the second transmission key cipher text Ctk_Pk using the protective key PK to obtain the transmission key TK, and store the transmission key in the second hardware and security module; the KMS system is used for calling the second hardware and security module to perform bidirectional authentication by using the authentication key AUK and the POS terminal, and if the authentication is passed, the KMS system calls the second hardware and security module to encrypt a terminal master key TMK using the transmission decryption key TEK so as to generate a master key cipher text Ctmk and send the master key cipher text Ctmk to the POS terminal; the POS terminal is used for decrypting the master key cipher text Ctmk using the transmission encryption key TEK to obtain the terminal master key TMK after receiving the master key cipher text Ctmk sent by the KSM system, and storing the terminal master key TMK in the security module of the POS terminal. - View Dependent Claims (7, 8, 9, 10)
- the first hardware and security module used to allow calls using the MTMS system, and the second hardware and security module used to allow calls using the KMS system;
Specification