Key infusion method and key infusion system based on storage medium

By writing key components to multiple storage media and transmitting them encrypted and authenticated multiple times, the key injection method solves the problems of leakage risk and inconvenience in the key injection process, and realizes a secure and convenient key injection process.

CN118523909BActive Publication Date: 2026-04-24FUJIAN CENTM INFORMATION
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
FUJIAN CENTM INFORMATION
Filing Date
2024-06-26
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

In existing technologies, the key injection process carries the risk of key content leakage and is inconvenient to operate. It is particularly vulnerable to eavesdropping when using Bluetooth or USB ports for communication on mobile peripherals. Furthermore, it lacks legitimacy authentication, and the access restrictions at bank branches create operational obstacles.

Method used

A storage medium-based key injection method is adopted, in which key components are written into multiple storage media through a key management system, and security is ensured through encrypted transmission and multiple authentications. The devices to be injected read and generate keys in sequence.

Benefits of technology

It achieves a simple, efficient, and secure key injection process, avoiding the risk of key component leakage and ensuring the security of key storage and ease of operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118523909B_ABST
    Figure CN118523909B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on storage medium's key infusion method and key infusion system, method includes: key management system sends key request to key management platform, the key request includes the serial number of to be infused equipment, and receives the request response returned by key management platform, the request response includes at least two key components of the to-be-infused key corresponding to the serial number;Key management system respectively at least two key components one-to-one correspondence is written into at least two storage media;To-be-infused equipment reads key component from at least two storage media in turn, and generates to-be-infused key according to the key component read.The application can more securely realize key infusion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of key technology, and in particular to a key injection method and key injection system based on a storage medium. Background Technology

[0002] Currently, the key injection into bank mobile peripherals is generally done using communication methods such as Bluetooth, USB, or serial port, and the key content is carried out according to the instructions customized by the mobile peripheral manufacturer.

[0003] While the process of injecting keys using custom commands from individual manufacturers is relatively simple, it offers insufficient protection for the key content. If these communication commands are eavesdropped on or intercepted by the manufacturer, it could directly lead to the risk of key content leakage, and the process lacks authentication of the mobile peripheral's legitimacy.

[0004] Mobile peripherals typically have Bluetooth and USB communication ports, while serial ports are accessed via a USB-to-serial converter. Using Bluetooth for master key injection exposes the details of the communication process during transmission, potentially leading to eavesdropping, man-in-the-middle attacks, or key leakage due to Bluetooth message capture on mobile tablets or terminals hosting the business system. Using USB or serial ports requires auxiliary cables, necessitating temporary communication connections and enabling injection with the assistance of a key management system. Furthermore, most banks lack direct access to the key management system at their branches, forcing mobile peripherals to send keys to higher-level branches, creating obstacles. Additionally, given the nature of mobile peripherals, devices are often moved from fixed locations when conducting business, making plugging and unplugging communication ports inconvenient. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a key injection method and key injection system based on storage medium, which can realize key injection more simply, efficiently and securely.

[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a key injection method based on a storage medium, comprising:

[0007] The key management system sends a key request to the key management platform, the key request including the serial number of the device to be injected, and receives a request response from the key management platform, the request response including at least two key components of the key to be injected corresponding to the serial number;

[0008] The key management system writes the at least two key components into at least two storage media in a one-to-one correspondence.

[0009] The device to be injected sequentially reads key components from the at least two storage media and generates a key to be injected based on the read key components.

[0010] The present invention also proposes a key injection system, including a key management platform, a key management system, a key injection device, and at least two storage media;

[0011] The key management system is used to send a key request to the key management platform. The key request includes the serial number of the device to be injected. The key management platform also receives a request response, which includes at least two key components of the key to be injected corresponding to the serial number.

[0012] The key management system is also used to write the at least two key components into at least two storage media in a one-to-one correspondence.

[0013] The device to be injected is used to sequentially read key components from the at least two storage media and generate a key to be injected based on the read key components.

[0014] The beneficial effects of this invention are as follows: by writing the key components into different storage media and then injecting the key components into the device to be injected through the storage media, the key injection can be completed very conveniently; during the injection process, the key components are invisible to the operator, which can effectively avoid the risk of key components being leaked and ensure the security of the key components. Attached Figure Description

[0015] Figure 1 This is a flowchart of a key injection method based on a storage medium according to the present invention;

[0016] Figure 2 This is a flowchart illustrating the key injection process according to Embodiment 1 of the present invention;

[0017] Figure 3 This is a flowchart of the key component request process according to Embodiment 1 of the present invention;

[0018] Figure 4 This is a flowchart of the key component writing process according to Embodiment 1 of the present invention;

[0019] Figure 5 This is a flowchart illustrating the key component writing process according to Embodiment 1 of the present invention.

[0020] Figure 6 This is a flowchart illustrating the key component injection process according to Embodiment 1 of the present invention.

[0021] Figure 7 This is a flowchart of the key component reading process according to Embodiment 1 of the present invention;

[0022] Figure 8 This is a schematic diagram of the key component reading process according to Embodiment 1 of the present invention. Detailed Implementation

[0023] To explain the technical content, objectives, and effects of the present invention in detail, the following description is provided in conjunction with the embodiments and accompanying drawings.

[0024] Please see Figure 1 A key injection method based on a storage medium, comprising:

[0025] The key management system sends a key request to the key management platform, the key request including the serial number of the device to be injected, and receives a request response from the key management platform, the request response including at least two key components of the key to be injected corresponding to the serial number;

[0026] The key management system writes the at least two key components into at least two storage media in a one-to-one correspondence.

[0027] The device to be injected sequentially reads key components from the at least two storage media and generates a key to be injected based on the read key components.

[0028] As can be seen from the above description, the beneficial effects of the present invention are that it can achieve key injection more simply, efficiently and securely.

[0029] Further, after the device to be infused sequentially reads key components from the at least two storage media and generates the key to be infused based on the read key components, the process further includes:

[0030] The device to be injected saves the key to be injected into the encryption module.

[0031] As can be seen from the above description, the security of key storage is effectively guaranteed.

[0032] Furthermore, after the key management system sends a key request to the key management platform, it further includes:

[0033] After receiving a key request, the key management platform generates at least two random numbers as at least two key components of the key to be injected. The key to be injected is obtained by XORing the two random numbers.

[0034] Furthermore, the key management system writes the at least two key components one-to-one into at least two storage media, including:

[0035] The key management system reads the media information of a storage medium, the media information including a unique identifier, an effective date, an expiration date, and a first random number;

[0036] The key management system determines whether the storage medium is within its validity period based on the effective date and the expiration date.

[0037] If so, the key management system generates a first authentication key based on the unique identifier, the first random number, and the root key of the storage medium;

[0038] The key management system sends a first external authentication request to the storage medium, the first external authentication request including a first ciphertext obtained by encrypting the first random number with the first authentication key, and receives a first external authentication result returned by the storage medium;

[0039] If the first external authentication result is successful, the key management system sends a key application selection request to the storage medium and receives a second random number returned by the storage medium.

[0040] The key management system generates a second authentication key based on the unique identifier, the second random number, and the root key of the storage medium;

[0041] The key management system sends a second external authentication request to the storage medium, the second external authentication request including a second ciphertext obtained by encrypting the second random number with the second authentication key, and receives a second external authentication result returned by the storage medium;

[0042] If the second external authentication result is successful, the key management system uses the second authentication key to encrypt the key component corresponding to the storage medium to obtain encrypted data, and sends the encrypted data to the storage medium.

[0043] The storage medium decrypts the encrypted data using the second authentication key to obtain the key component corresponding to the storage medium.

[0044] As described above, the application of the storage key component needs to be selected after external authentication. After selection, it needs to be externally authenticated again before it can be written to the storage medium. At the same time, the master key component is transmitted encrypted between the key management system and the storage medium, which can effectively protect the process of writing the key component to the storage medium.

[0045] Furthermore, the key management system generates a first authentication key based on the unique identifier, the first random number, and the root key of the storage medium, specifically as follows:

[0046] Based on the number of bytes of the root key of the storage medium, the unique identifier and the first random number are truncated or padded;

[0047] The root key of the storage medium, the truncated or padded unique identifier, and the first random number are XORed to obtain the first authentication key.

[0048] As described above, the authentication key is derived by XORing the root key of the storage medium, the unique identifier, and a random number. This ensures the randomness of the authentication key, effectively preventing the risk of key leakage and further guaranteeing the security of the key.

[0049] Furthermore, the key management system encrypts the key component corresponding to the storage medium using the second authentication key to obtain encrypted data, specifically as follows:

[0050] The key management system uses the second authentication key to encrypt the serial number of the device to be injected and the key component corresponding to the storage medium to obtain encrypted data.

[0051] Further, the device to be infused sequentially reads key components from the at least two storage media, including:

[0052] The device to be infused reads the media information of a storage medium, the media information including a unique identifier, effective date, expiration date and a third random number;

[0053] The device to be filled determines whether the storage medium is within its validity period based on the effective date and the expiration date;

[0054] If so, the device to be injected generates a third authentication key based on the unique identifier, the third random number, and the root key of the storage medium;

[0055] The device to be infused sends a third external authentication request to the storage medium, the third external authentication request including a third ciphertext obtained by encrypting the third random number with the third authentication key, and receives the third external authentication result returned by the storage medium;

[0056] If the third external authentication result is successful, the device to be infused sends a key application selection request to the storage medium and receives the application selection result returned by the storage medium.

[0057] If the application selection result is successful, the device to be infused sends a key reading request to the storage medium and receives the key component encrypted data returned by the storage medium. The key component encrypted data is obtained by encrypting the key component corresponding to the storage medium using the third authentication key.

[0058] The device to be injected decrypts the encrypted data of the key component using the third authentication key to obtain the key component corresponding to the storage medium.

[0059] As described above, the application storing the master key component needs to be selected after external authentication. At the same time, the master key component is transmitted encrypted between the device to be injected and the storage medium, which can effectively protect the device to be injected from reading the key component from the storage medium.

[0060] Furthermore, the key component encrypted data is obtained by encrypting the serial number of the device to be injected and the key component corresponding to the storage medium using the third authentication key;

[0061] The device to be infused decrypts the encrypted data of the key component using the third authentication key to obtain the key component corresponding to the storage medium, specifically:

[0062] The device to be injected decrypts the encrypted data of the key component using the third authentication key. If the decrypted serial number matches its own serial number, the decrypted key component is saved.

[0063] As described above, by matching the sequence number, the corresponding key component is obtained, thereby ensuring the accuracy of key component acquisition.

[0064] Furthermore, the storage medium is an IC card, and the key management system and the device to be injected are respectively connected to the storage medium through a card reader.

[0065] As described above, the IC card can be directly inserted into the card reader of the device to be filled, eliminating the need for cumbersome communication cable connections. The operation can be performed directly on one end of the device, ensuring that the key component reading process is carried out on a closed device, effectively guaranteeing the security of the key component.

[0066] The present invention also proposes a key injection system, including a key management platform, a key management system, a key injection device, and at least two storage media;

[0067] The key management system is used to send a key request to the key management platform. The key request includes the serial number of the device to be injected. The key management platform also receives a request response, which includes at least two key components of the key to be injected corresponding to the serial number.

[0068] The key management system is also used to write the at least two key components into at least two storage media in a one-to-one correspondence.

[0069] The device to be injected is used to sequentially read key components from the at least two storage media and generate a key to be injected based on the read key components.

[0070] Example 1

[0071] Please refer to Figure 2-8 The first embodiment of the present invention is: a key injection method based on a storage medium. This embodiment takes the injection of the master key of a bank mobile peripheral based on an IC card (Integrated Circuit Card) as an example. That is, the storage medium in this embodiment is an IC card, and the key management system and the device to be injected are respectively connected to the storage medium through a card reader.

[0072] Mobile banking peripherals are devices used for outreach banking operations. They are a collection of peripherals such as IC card readers, PIN pads, ID card readers, and electronic signature devices, utilizing communication methods such as Bluetooth and USB. They are characterized by their small size, light weight, and portability. They also work in conjunction with the business systems integrated into tablets to meet the needs of outreach business operations. At bank branches, before a newly purchased mobile peripheral is used to connect to the banking system for the first time, a master key needs to be injected. The master key is the name of one level of the key in a hierarchical key management system.

[0073] In this embodiment, two IC cards are used to hold different key components, and these two IC cards are referred to as Card A and Card B, respectively. Figure 2 As shown, this embodiment mainly includes the following three parts:

[0074] 1. The key management system requests two master key components from the key management platform;

[0075] 2. The key management system writes the two master key components into card A and card B respectively;

[0076] 3. Imbue the master key components from cards A and B into the encryption chip of the mobile peripheral device, respectively.

[0077] In this embodiment, the key management system needs to be connected to a hardware IC card reader. This reader only needs to support the ISO 7816-1 / 2 / 3 / 4 standard and requires no special modification. In this embodiment, the card reader specifically refers to an abstract set of applications and the hardware IC card reader itself, after relevant IC card functions have been encapsulated in the terminal computer or device connected to the hardware IC card reader. The APDU process of interaction during this process is omitted.

[0078] Among them, such as Figure 3 As shown, the first part specifically includes the following steps:

[0079] S101: The key management system sends a key request to the key management platform. The key request includes the serial number of the device to be injected.

[0080] Specifically, the user logs into the key management system, obtains the serial number of the tag on the device to be injected (i.e., the bank's mobile peripheral), and requests the key management system to register the serial number and its corresponding key component.

[0081] S102: The key management platform generates at least two key components corresponding to the serial number.

[0082] In this embodiment, the key management platform generates two master key components. For example, it can generate two sets of 16-byte random numbers as the two components of the master key. The master key is obtained by XORing these two sets of random numbers.

[0083] S103: The key management system returns a request response to the key management system, which includes the key component generated in step S102.

[0084] After receiving the request response, the key management system writes the two master key components into card A and card B respectively via a card reader, which is the second part. Specifically, as follows: Figure 4 and Figure 5 As shown, it includes the following steps:

[0085] S201: The key management system reads the media information of a storage medium, the media information including a unique identifier, an effective date, an expiration date, and a first random number.

[0086] In this embodiment, the key management system reads the card information of the IC card through a card reader, including the card number, application activation date, application expiration date, and a first random number (random number 1). Here, the IC card application (AID) refers to the application protocol and related dataset between the card and the terminal. In this embodiment, the card application used during the card reading process is referred to as application 1.

[0087] S202: The key management system determines whether the storage medium is within its validity period based on the effective date and the expiration date. If yes, it executes step S203; otherwise, it terminates the writing process.

[0088] In this embodiment, it is determined whether the current time is between the application's effective date and the application's expiration date; if so, it means that the application is within the validity period.

[0089] S203: The key management system generates a first authentication key based on the unique identifier, the first random number, and the root key of the storage medium.

[0090] Specifically, based on the number of bytes of the root key of the storage medium, the unique identifier and the first random number are truncated or padded to make the number of bytes of the three consistent; then, the root key of the storage medium, the truncated or padded unique identifier, and the first random number are XORed to obtain the first authentication key.

[0091] In this embodiment, the root key of card A is 8 bytes of 0x30, and the root key of card B is 8 bytes of 0x38. The key management system processes (truncates or pads) the card number and random number 1 so that the processed card number and random number 1 are 8 bytes in length. Then, it performs an XOR operation with the root key of the IC card to generate the first authentication key (authentication key 1), which is used for the next step of external authentication.

[0092] S204: The key management system sends a first external authentication request to the storage medium, the first external authentication request including a first ciphertext obtained by encrypting a first random number with a first authentication key, and receives a first external authentication result returned by the storage medium.

[0093] In this embodiment, the key management system initiates external authentication to the IC card through the card reader. The IC card at the card reader performs external authentication to determine whether the key management system is a legitimate terminal, whether to continue the subsequent transaction, and returns the external authentication result.

[0094] S205: The key management system determines whether the first external authentication result is successful. If yes, it executes step S206; otherwise, it terminates the writing process.

[0095] S206: The key management system sends a key application selection request to the storage medium and receives a second random number returned by the storage medium.

[0096] In this embodiment, the key management system sends a key application selection request to the card reader to select the application storing the master key component. The IC card determines whether selection is allowed based on the external authentication result of step S204. If so, it returns a second random number (random number 2); otherwise, the process terminates and a selection failure message is returned.

[0097] S207: The key management system generates a second authentication key based on the unique identifier, the second random number, and the root key of the storage medium.

[0098] This step can be referred to as step S203. That is, after truncating or padding the unique identifier and the second random number to the same number of bytes as the root key, it is XORed with the root key to obtain the second authentication key (authentication key 2), which is used for the next step of external authentication.

[0099] S208: The key management system sends a second external authentication request to the storage medium, the second external authentication request including a second ciphertext obtained by encrypting a second random number with a second authentication key, and receives a second external authentication result returned by the storage medium.

[0100] This step can be referred to as step S204. Through this step, the IC card can determine whether the key management system is a legitimate terminal, whether to allow subsequent transactions of the application (i.e., the application storing the master key component), and return the external authentication result.

[0101] S209: The key management system determines whether the second external authentication result is successful. If yes, it executes step S210; otherwise, it terminates the writing process.

[0102] S210: The key management system uses the second authentication key to encrypt the serial number of the device to be injected and the key component corresponding to the storage medium to obtain encrypted data, and sends the encrypted data to the storage medium.

[0103] In this embodiment, the key management system packages the data according to the record format "serial number|key component" and encrypts it using the second authentication key (authentication key 2) to initiate an update or append record to the IC card.

[0104] S211: The storage medium decrypts the encrypted data using the second authentication key to obtain the key component corresponding to the storage medium.

[0105] In this embodiment, the IC card uses the second authentication key (authentication key 2) to decrypt and obtain the plaintext master key component. Then, it performs an update or write operation on the plaintext record and returns the result. The key management system receives the result and completes the writing of the master key component.

[0106] After the master key components are written to cards A and B respectively, as follows: Figure 6 As shown, the user starts the maintenance application with the maintenance password of the device to be injected (i.e., the bank's mobile peripheral), initiates the injection of the master key component in the A card to the system application of the device. The system application interacts with the card reader and the A card to complete the reading of the master key component 1 (i.e. the master key component written to the A card) and saves it into the encryption chip, and then returns the operation result.

[0107] After receiving the operation result, if the operation result indicates that the injection failed, the maintenance application terminates the process; if the operation result indicates that the injection was successful, it continues to initiate the injection of the master key component in the B card to the system application. The system application interacts with the card reader and the B card to complete the reading of master key component 2 (i.e., the master key component written to the B card), saves it to the encryption chip, and then returns the operation result.

[0108] After receiving the operation result, if the operation result is that the injection failed, the maintenance application terminates the process. If the operation result is that the injection was successful, it sends a master key synthesis instruction to the system application. The system application XORs master key component 1 and master key component 2 to obtain the master key, writes the master key into the encryption chip, and then returns the operation result.

[0109] After receiving the operation results, the maintenance application will prompt the user with the master key injection result.

[0110] Among them, such as Figure 7 and Figure 8 As shown, the interaction process between the system application of the filling device and the card reader and IC card includes the following steps:

[0111] S301: The device to be filled reads the media information of a storage medium, the media information including a unique identifier, effective date, expiration date and a third random number.

[0112] In this embodiment, the bank's mobile peripheral device reads the IC card information, including the card number, application activation date, application expiration date, and a third random number (random number 3), using its built-in card reader. The card application accessed is application 1 as described above.

[0113] S302: The device to be filled determines whether the storage medium is within its validity period based on the effective date and the expiration date. If yes, step S303 is executed; otherwise, the key component reading process is terminated.

[0114] In this embodiment, it is determined whether the current time is between the application's effective date and the application's expiration date; if so, it means that the application is within the validity period.

[0115] S303: The device to be injected generates a third authentication key based on the unique identifier, the third random number, and the root key of the storage medium.

[0116] This step can be referred to as step S203. That is, after truncating or padding the unique identifier and the third random number to the same number of bytes as the root key, it is XORed with the root key to obtain the third authentication key (authentication key 3), which is used for the next step of external authentication.

[0117] S304: The device to be filled sends a third external authentication request to the storage medium, the third external authentication request including a third ciphertext obtained by encrypting a third random number with a third authentication key, and receives a third external authentication result returned by the storage medium.

[0118] This step can be referred to as step S204. Through this step, the IC card can determine whether the device to be filled is a legitimate terminal, whether to continue the subsequent transaction, and return the external authentication result.

[0119] S305: The device to be injected determines whether the third external authentication result is successful. If yes, proceed to step S306; otherwise, terminate the key component reading process.

[0120] S306: The device to be infused sends a key application selection request to the storage medium and receives the application selection result returned by the storage medium.

[0121] In this embodiment, the system application of the bank's mobile peripheral sends a request to the card reader to select an application, which is the application that stores the master key component. The IC card determines whether to allow selection based on the third external authentication result in step S304. If the third external authentication result is successful, the system application of the device is allowed to select the stored application; otherwise, a selection failure message is returned.

[0122] S307: The device to be infused determines whether the application selection result is successful. If yes, then proceed to step S308; otherwise, terminate the key component reading process.

[0123] S308: The device to be infused sends a key read request to the storage medium and receives encrypted key component data returned by the storage medium. The encrypted key component data is obtained by encrypting the serial number of the device to be infused and the key component corresponding to the storage medium using the third authentication key.

[0124] In this embodiment, after the system application of the device is allowed to select the application storing the master key component, it initiates a read request for the master key component. The IC card encrypts the master key component it stores using the third authentication key (authentication key 3) and then returns the ciphertext.

[0125] S309: The device to be injected decrypts the encrypted data of the key component using the third authentication key to obtain the key component corresponding to the storage medium and saves it into the encryption module.

[0126] In this embodiment, the device's system application uses the third authentication key (authentication key 3) to decrypt the ciphertext returned by the IC card, and determines whether the returned data matches successfully based on its own device serial number. If successful, the decrypted master key component is written into the encryption chip; otherwise, the key reading request is initiated again until the IC card's record reading fails.

[0127] In this embodiment, two IC cards are used to hold the master key component respectively. The device key maintenance application page is launched on the mobile peripheral device using a maintenance password. Cards A and B are then inserted into the card reader of the mobile peripheral device, allowing for convenient master key injection. Furthermore, the key management system can batch write the master key components corresponding to different devices to be injected into the IC cards.

[0128] Because the master key component is invisible to operators, the risk of master key leakage is effectively mitigated. Furthermore, applications storing the master key component on the IC card require external authentication before selection, and further external authentication is required after selection before it can be written to the IC card. Simultaneously, the key management system and the IC card transmit the master key component encrypted; the key component exists in ciphertext form throughout the interaction, thus effectively protecting the process of storing and writing the master key component to the IC card. Similarly, the interaction process of mobile peripherals reading the master key component from the IC card is also encrypted, effectively protecting the mobile peripherals from reading the master key component from the IC card. During the interaction, the authentication key used for encryption is derived from the IC card root key, card number, and a random number through an XOR operation, ensuring the randomness of the authentication key and effectively preventing the risk of master key leakage, further guaranteeing the security of the master key component.

[0129] This embodiment can effectively ensure the security of the key injection process, and the operation process is simple. Operators can directly perform injection on the device after simple training.

[0130] Example 2

[0131] This embodiment is a key injection system corresponding to the above embodiments, including a key management platform, a key management system, a device to be injected, and at least two storage media, which together implement the key injection method as described in the above embodiments and can achieve the same technical effect, which will not be repeated here.

[0132] In summary, the key injection method and system based on storage media provided by this invention can conveniently complete key injection by writing key components into different storage media and then injecting the key components into the device to be injected through the storage media. During the injection process, the key components are invisible to the operator, effectively avoiding the risk of key leakage and ensuring key security. During the key component writing process, the application storing the key component needs to be selected after external authentication, and after selection, it needs to be externally authenticated again before it can be written to the storage media. Simultaneously, the key management system and the storage media encrypt the transmission of the master key component, thus effectively protecting the key component writing process. Similarly, during the process of the device to be injected reading the key component from the storage media, the application storing the master key component needs to be selected after external authentication, and the device to be injected and the storage media encrypt the transmission of the master key component, thus effectively protecting the device to be injected from the storage media during key component reading. Furthermore, the authentication key is derived by XORing the root key of the storage medium, the unique identifier, and a random number, which ensures the randomness of the authentication key and can effectively prevent the risk of key leakage, thus further ensuring the security of the key.

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

Claims

1. A key injection method based on a storage medium, characterized in that, include: The key management system sends a key request to the key management platform, the key request including the serial number of the device to be injected, and receives a request response from the key management platform, the request response including at least two key components of the key to be injected corresponding to the serial number; The key management system writes the at least two key components into at least two storage media in a one-to-one correspondence. The device to be infused sequentially reads key components from the at least two storage media and generates an infused key based on the read key components; The key management system writes the at least two key components into at least two storage media in a one-to-one correspondence, including: The key management system reads the media information of a storage medium, the media information including a unique identifier, an effective date, an expiration date, and a first random number; The key management system determines whether the storage medium is within its validity period based on the effective date and the expiration date. If so, the key management system generates a first authentication key based on the unique identifier, the first random number, and the root key of the storage medium; The key management system sends a first external authentication request to the storage medium, the first external authentication request including a first ciphertext obtained by encrypting the first random number with the first authentication key, and receives a first external authentication result returned by the storage medium; If the first external authentication result is successful, the key management system sends a key application selection request to the storage medium and receives a second random number returned by the storage medium. The key management system generates a second authentication key based on the unique identifier, the second random number, and the root key of the storage medium; The key management system sends a second external authentication request to the storage medium, the second external authentication request including a second ciphertext obtained by encrypting the second random number with the second authentication key, and receives a second external authentication result returned by the storage medium; If the second external authentication result is successful, the key management system uses the second authentication key to encrypt the key component corresponding to the storage medium to obtain encrypted data, and sends the encrypted data to the storage medium. The storage medium decrypts the encrypted data using the second authentication key to obtain the key component corresponding to the storage medium.

2. The key injection method based on storage medium according to claim 1, characterized in that, The device to be infused sequentially reads key components from the at least two storage media, and after generating the key to be infused based on the read key components, further includes: The device to be injected saves the key to be injected into the encryption module.

3. The key injection method based on storage medium according to claim 1, characterized in that, After the key management system sends a key request to the key management platform, it further includes: After receiving a key request, the key management platform generates at least two random numbers as at least two key components of the key to be injected. The key to be injected is obtained by XORing the two random numbers.

4. The key injection method based on storage medium according to claim 1, characterized in that, The key management system generates a first authentication key based on the unique identifier, the first random number, and the root key of the storage medium, specifically as follows: Based on the number of bytes of the root key of the storage medium, the unique identifier and the first random number are truncated or padded; The root key of the storage medium, the truncated or padded unique identifier, and the first random number are XORed to obtain the first authentication key.

5. The key injection method based on storage medium according to claim 1, characterized in that, The key management system uses the second authentication key to encrypt the key component corresponding to the storage medium to obtain encrypted data, specifically as follows: The key management system uses the second authentication key to encrypt the serial number of the device to be injected and the key component corresponding to the storage medium to obtain encrypted data.

6. The key injection method based on storage medium according to claim 1, characterized in that, The device to be infused sequentially reads key components from the at least two storage media, including: The device to be infused reads the media information of a storage medium, the media information including a unique identifier, effective date, expiration date and a third random number; The device to be filled determines whether the storage medium is within its validity period based on the effective date and the expiration date; If so, the device to be injected generates a third authentication key based on the unique identifier, the third random number, and the root key of the storage medium; The device to be infused sends a third external authentication request to the storage medium, the third external authentication request including a third ciphertext obtained by encrypting the third random number with the third authentication key, and receives the third external authentication result returned by the storage medium; If the third external authentication result is successful, the device to be infused sends a key application selection request to the storage medium and receives the application selection result returned by the storage medium. If the application selection result is successful, the device to be infused sends a key reading request to the storage medium and receives the key component encrypted data returned by the storage medium. The key component encrypted data is obtained by encrypting the key component corresponding to the storage medium using the third authentication key. The device to be injected decrypts the encrypted data of the key component using the third authentication key to obtain the key component corresponding to the storage medium.

7. The key injection method based on storage medium according to claim 6, characterized in that, The encrypted key component data is obtained by encrypting the serial number of the device to be infused and the key component corresponding to the storage medium using the third authentication key; The device to be infused decrypts the encrypted data of the key component using the third authentication key to obtain the key component corresponding to the storage medium, specifically: The device to be injected decrypts the encrypted data of the key component using the third authentication key. If the decrypted serial number matches its own serial number, the decrypted key component is saved.

8. The key injection method based on a storage medium according to any one of claims 1-7, characterized in that, The storage medium is an IC card, and the key management system and the device to be injected are respectively connected to the storage medium through a card reader.

9. A key injection system, characterized in that, Includes a key management platform, a key management system, a device to be injected, and at least two storage media; The key management system is used to send a key request to the key management platform. The key request includes the serial number of the device to be injected. The key management platform also receives a request response, which includes at least two key components of the key to be injected corresponding to the serial number. The key management system is also used to write the at least two key components into at least two storage media in a one-to-one correspondence. The device to be injected is used to sequentially read key components from the at least two storage media, and generate a key to be injected based on the read key components; The step of writing the at least two key components one-to-one into at least two storage media includes: The key management system reads the media information of a storage medium, the media information including a unique identifier, an effective date, an expiration date, and a first random number; The key management system determines whether the storage medium is within its validity period based on the effective date and the expiration date. If so, the key management system generates a first authentication key based on the unique identifier, the first random number, and the root key of the storage medium; The key management system sends a first external authentication request to the storage medium, the first external authentication request including a first ciphertext obtained by encrypting the first random number with the first authentication key, and receives a first external authentication result returned by the storage medium; If the first external authentication result is successful, the key management system sends a key application selection request to the storage medium and receives a second random number returned by the storage medium. The key management system generates a second authentication key based on the unique identifier, the second random number, and the root key of the storage medium; The key management system sends a second external authentication request to the storage medium, the second external authentication request including a second ciphertext obtained by encrypting the second random number with the second authentication key, and receives a second external authentication result returned by the storage medium; If the second external authentication result is successful, the key management system uses the second authentication key to encrypt the key component corresponding to the storage medium to obtain encrypted data, and sends the encrypted data to the storage medium. The storage medium decrypts the encrypted data using the second authentication key to obtain the key component corresponding to the storage medium.

Citation Information

Patent Citations

  • Root key generation method and apparatus, and electronic device

    CN113098679A

  • Data processing method and device for electronic tag and electronic equipment

    CN115018035A