Quantum key offline charging method and system
By generating random key offset components and multi-layer encryption mechanisms, combined with quantum storage media and key management system, the systematic and security problems of offline charging of quantum keys are solved, and the secure generation, transmission and storage of quantum keys are realized to prevent unauthorized use and cracking.
Patent Information
- Application Number
- CN202510681096.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2025-08-19
AI Technical Summary
Existing quantum key offline charging methods lack systematicity and integrity, and fail to effectively prevent unauthorized devices from being abused and quantum computer cracked, resulting in key leakage and insufficient communication security.
By generating random key offset components, combining multi-layer encryption mechanisms that manage quantum keys and quantum storage media, the security of the charging keys in the generation, transmission and storage process is ensured, and the legality of quantum security devices is verified through the key management system, allowing only authorized devices to activate the key.
Improve the security of offline charging of quantum keys, prevent unauthorized use and cracking, ensure the integrity and confidentiality of charging keys, and enhance the security of the system.
Smart Images

Figure CN120512243A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of quantum mechanics and information security technology, and in particular to a quantum key offline filling method and system. Background Art
[0002] During quantum cryptography communication, quantum cryptography communication terminals need to be primed with quantum keys as encryption keys for session keys. Offline key filling is a method for filling quantum keys into quantum cryptography communication terminals. However, current offline quantum key filling methods have the following problems: On the one hand, offline quantum key charging methods lack systematic and complete process design. Most offline charging methods focus solely on the security of a single link, while neglecting the coordinated security of other links. For example, patent application number CN202111648220.1 discloses a quantum key charging method, system, and components based on a quantum cryptography service platform. While leveraging the digital envelope mechanism of an asymmetric algorithm to achieve security in the quantum key distribution process, it lacks a clear mechanism for authenticating the user (such as the client or user) during key charging or use. This could lead to the misuse or access of keys by unauthorized parties, increasing security risks. On the other hand, offline quantum key charging methods overly rely on asymmetric encryption algorithms. Since the public keys of asymmetric algorithms are typically public, if a quantum computer exploits its powerful computing power to brute force the public key, the security of the entire key charging system would be seriously threatened, resulting in key leakage and loss of communication security. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a method and system for offline quantum key filling, which can provide collaborative security protection for the entire process of offline quantum key filling and effectively improve the security of offline quantum key filling.
[0004] In order to solve the above technical problems, a technical solution adopted by the present invention is: A quantum key offline filling method, comprising: After initializing and filling the administrator device, the key filling device generates a first random key offset component, and obtains the management quantum key of the administrator device according to the first random key offset component; The key charging device obtains a charging key ciphertext from a quantum cryptography server according to the first random key offset component and the management quantum key, and encrypts the charging key ciphertext and writes it into a quantum storage medium to obtain a target key ciphertext; After obtaining access rights to the quantum storage medium, the quantum security device generates a second random key offset component and a third random key offset component, and obtains a medium key of the quantum storage medium according to the target key ciphertext and the second random key offset component; The quantum security device sends an activation request for key activation to a key management system according to the medium key of the quantum storage medium and the third random key offset component; The key management system verifies the legitimacy of the quantum security device according to the activation request; If the verification is successful, the quantum security device updates the target key offset component in the target key ciphertext to the third random key offset component to complete key activation.
[0005] In order to solve the above technical problems, another technical solution adopted by the present invention is: A quantum key offline charging system comprises a key charging device, a quantum cryptography server, a quantum security device and a key management system; the key charging device is used to execute each step implemented by the key charging device in the above-mentioned quantum key offline charging method; the quantum cryptography server is used to execute each step implemented by the quantum cryptography server in the above-mentioned quantum key offline charging method; the quantum security device is used to execute each step implemented by the quantum security device in the above-mentioned quantum key offline charging method; and the key management system is used to execute each step implemented by the key management system in the above-mentioned quantum key offline charging method.
[0006] The present invention has the following beneficial effects: During the key charging phase of a quantum storage medium, after the key charging device initializes and charges the administrator device, it first generates a first random key offset component. Because the first random key offset component is random and unpredictable, the administrator device's management quantum key is obtained based on the first random key offset component, making the acquisition process of the management quantum key more secure and reliable, and increasing the difficulty of cracking. Simultaneously, the key charging device combines the first random key offset component with the management quantum key to obtain a charging key ciphertext from a quantum cryptography server. This ciphertext is then encrypted and written to the quantum storage medium to obtain a target key ciphertext. This ensures that the charging key remains encrypted and protected during generation, transmission, and storage, preventing the charging key from being stolen or tampered with, and ensuring its integrity and confidentiality. During the key activation phase of the quantum storage medium by the quantum security device, the medium key is obtained based on the target key ciphertext. This is used to verify the legitimacy of the quantum security device through the key management system, ensuring that only authorized quantum security devices can activate and use the keys stored in the quantum storage medium. This mechanism effectively prevents unauthorized access to the system by unauthorized devices, prevents unauthorized use of quantum keys, and enhances system security. The present invention designs a complete offline key charging security solution from the system level. It collaboratively encrypts the charging process by managing quantum keys, charging key ciphertexts, target key ciphertexts, and media keys in sequence. It takes into account the collaborative security effect between offline key charging and offline key activation, and effectively improves the security of offline quantum key charging. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1 A flow chart of the stages of a quantum key offline injection method provided by an embodiment of the present invention; Figure 2 A schematic diagram of equipment connection in the first filling stage provided by an embodiment of the present invention; Figure 3 A flow chart of the second and third filling stages provided by an embodiment of the present invention; Figure 4 A schematic diagram of equipment connection for the third filling stage provided by an embodiment of the present invention; Figure 5 A flow chart of a first charging stage provided by an embodiment of the present invention; Figure 6 A schematic diagram of a multi-layer encryption structure provided by an embodiment of the present invention; Figure 7 A schematic structural diagram of a quantum key offline filling system provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0008] To illustrate the technical content, achieved objectives and effects of the present invention in detail, the following description is given in conjunction with the embodiments and accompanying drawings.
[0009] An embodiment of the present invention provides a quantum key offline filling method, comprising: After initializing the key injection device to inject the administrator device, the key injection device generates a first random key offset component, and obtains the management quantum key of the administrator device according to the first random key offset component; The key charging device obtains a charging key ciphertext from a quantum cryptography server according to the first random key offset component and the management quantum key, and encrypts the charging key ciphertext and writes it into a quantum storage medium to obtain a target key ciphertext; After obtaining access rights to the quantum storage medium, the quantum security device generates a second random key offset component and a third random key offset component, and obtains a medium key of the quantum storage medium according to the target key ciphertext and the second random key offset component; The quantum security device sends an activation request for key activation to a key management system according to the medium key of the quantum storage medium and the third random key offset component; The key management system verifies the legitimacy of the quantum security device according to the activation request; If the verification is successful, the quantum security device updates the target key offset component in the target key ciphertext to the third random key offset component to complete key activation.
[0010] As can be seen from the foregoing description, the beneficial effects of the present invention are as follows: during the key charging phase of a quantum storage medium, the key charging device initializes and charges the administrator device, first generating a first random key offset component. Because the first random key offset component is random and unpredictable, the administrator device's management quantum key is obtained based on the first random key offset component, making the acquisition process of the management quantum key more secure and reliable, and increasing the difficulty of cracking. Simultaneously, the key charging device combines the first random key offset component with the management quantum key to obtain a charging key ciphertext from a quantum cryptography server, then encrypts the ciphertext and writes it to the quantum storage medium to obtain a target key ciphertext. This ensures that the charging key remains encrypted and protected during generation, transmission, and storage, preventing the charging key from being stolen or tampered with, and ensuring its integrity and confidentiality. During the key activation phase of the quantum storage medium by the quantum security device, the medium key is obtained based on the target key ciphertext. This allows the key management system to verify the legitimacy of the quantum security device, ensuring that only authorized quantum security devices can activate and use the key stored in the quantum storage medium, preventing unauthorized use of the quantum key and enhancing system security. The present invention designs a complete offline filling security solution from the system level, and collaboratively encrypts the filling process by managing quantum keys, filling key ciphertexts, target key ciphertexts, and medium keys in sequence. It takes into account the collaborative security effect between offline key filling and offline key activation, and effectively improves the security of offline quantum key filling.
[0011] Furthermore, before the key injection device initializes the administrator device, the method further includes: The key injection device sends a request for issuing the administrator device certificate to the quantum cryptography server; The quantum cryptography server verifies the legitimacy of the key injection device according to the issuance request; If the verification is successful, the quantum cryptography server returns the issued administrator device certificate to the key injection device according to the issuance request; The key injection device sends a management injection request to the quantum cryptography server in a digital envelope according to the administrator device certificate; The quantum cryptography server generates a management key ciphertext according to the management charging request, and returns the management key ciphertext to the key charging device; The key injection device stores the management key ciphertext in the administrator device, so that the administrator device is bound to the key injection device.
[0012] As can be seen from the above description, the quantum cryptography server first verifies the legitimacy of the key charging device, ensuring that only authorized devices can perform subsequent charging operations. This effectively prevents unauthorized charging devices from accessing the system and enhances system security. The administrator device certificate is then used to encrypt the digital envelope, ensuring the security and integrity of the management charging request during transmission. This strengthens the authentication and data protection mechanisms and prevents tampering or forgery of the request. Finally, the management key ciphertext is stored on the administrator device, binding the administrator device to the key charging device. This binding mechanism ensures that only authorized administrator devices can perform charging operations, preventing unauthorized devices from interfering and ensuring security at every stage, from the key charging device to the quantum cryptography server and back to the administrator device.
[0013] Furthermore, the management key ciphertext includes a management key storage object, a management root key ciphertext, and a management key offset component ciphertext; The quantum cryptography server generates a management key ciphertext according to the management charging request, including: The quantum cryptography server generates a management key storage object, a management root key, and a management key offset component through a quantum random number generator; The quantum cryptography server encrypts the management root key and the management key offset component according to the certificate public key of the administrator device certificate to obtain a management root key ciphertext and a management key offset component ciphertext.
[0014] As can be seen from the above description, the management key ciphertext includes the management key storage object, the management root key ciphertext, and the management key offset component ciphertext. This multi-layered key structure increases the security and complexity of the management key. The quantum cryptography server encrypts the management root key and the management key offset components using the public key of the administrator device certificate. This asymmetric encryption method utilizes the characteristics of public key encryption and private key decryption. Only the administrator device holding the corresponding private key can decrypt and obtain the management root key and the management key offset components. This effectively prevents the management key from being stolen or tampered with during transmission and storage, thereby improving the security of the entire quantum key injection system.
[0015] Furthermore, the key injection device generates a first random key offset component, and obtaining the management quantum key of the administrator device according to the first random key offset component includes: The key filling device decrypts the management key offset component ciphertext using an internal quantum key to obtain the management key offset component, and generates a first random key offset component using a first quantum random number chip; The key injection device generates a management random index according to the management key offset component and the first random key offset component, and obtains the management quantum key of the administrator device according to the management random index.
[0016] As can be seen from the above description, the randomness introduced by random index generation makes each acquisition of the management quantum key unique, increasing the difficulty of cracking. The management quantum key is crucial for the subsequent filling process. Its secure acquisition ensures the security of the entire filling process, preventing the risk of tampering or misuse of the filling key due to the leakage of the management quantum key, thus ensuring the security of the quantum key filling process.
[0017] Furthermore, the key charging device obtains the charging key ciphertext from the quantum cryptography server according to the first random key offset component and the management quantum key, comprising: The key filling device obtains a medium filling request ciphertext according to the management quantum key encryption medium filling request, and sends the medium filling request ciphertext and the first random key offset component to the quantum cryptography server; The quantum cryptography server decrypts the media charging request ciphertext according to the first random key offset component to obtain the media charging request, and reads the quantum security device certificate in the quantum storage medium according to the media charging request; The quantum cryptography server verifies the medium charging request according to the quantum security device certificate; If the verification passes, the quantum cryptography server generates a charging key and a fourth random key offset component through a quantum random number generator according to the medium charging request; The quantum cryptography server double-encrypts the fourth random key offset component and the charging key according to the certificate public key in the quantum security device certificate and the management quantum key to obtain a charging key ciphertext, and returns the charging key ciphertext to the key charging device.
[0018] As can be seen from the above description, compared with the traditional quantum key filling method that only encrypts the certificate public key, the quantum cryptography server of the present invention, when generating the filling key, double-encrypts the filling key according to the certificate public key in the quantum security device certificate and the randomly obtained management quantum key to obtain the filling key ciphertext. This double encryption mechanism combines the public key encryption of the quantum security device certificate and the encryption of the management quantum key. Even if an attacker obtains the certificate private key and cracks the public key encryption, the existence of the management quantum key makes it difficult for the attacker to directly obtain the filling key, making the filling key more secure during transmission.
[0019] Furthermore, the key charging device encrypts the charging key ciphertext and writes it into the quantum storage medium to obtain the target key ciphertext, including: The key charging device decrypts the charging key ciphertext according to the management quantum key to obtain a charging key sub-ciphertext; The key charging device writes the charging key sub-ciphertext into the quantum storage medium, so that the quantum storage medium decrypts the charging key sub-ciphertext according to the certificate private key in the quantum security device certificate to obtain the fourth random key offset component and the charging key, and encrypts the fourth random key offset component and the charging key according to the internal encryption key to obtain the target key ciphertext.
[0020] As can be seen from the above description, the charging key always exists in ciphertext form during the transmission process. Only the quantum storage medium can decrypt and obtain the charging key. The internal encryption mechanism of the quantum storage medium further ensures the secure storage of the charging key, preventing the charging key from being stolen or tampered with in plaintext form in the storage medium.
[0021] Furthermore, the quantum security device obtaining the medium key of the quantum storage medium according to the target key ciphertext and the second random key offset component includes: The quantum security device obtains a fourth random key offset component from the quantum storage medium according to an internal encryption key of the quantum storage medium, and generates a medium random index according to the second random key offset component and the fourth random key offset component; The quantum security device obtains a medium key of the quantum storage medium according to the medium random index.
[0022] As can be seen from the above description, the quantum security device obtains the fourth random key offset component based on the quantum storage medium's internal encryption key, and combines it with the second random key offset component to generate a medium random index, thereby obtaining the medium key. Because the fourth random key offset component is generated by the quantum cryptography server and the second random key offset component is generated by the quantum security device, the two random key offset components are generated independently by different devices, ensuring that the two random key offset components are generated independently, reducing the risk of simultaneous attacks. Furthermore, the medium random index is generated by combining the fourth random key offset component with the second random key offset component, introducing a double layer of randomness into the medium random index, increasing the complexity and unpredictability of the index, thereby increasing the complexity and security of the medium key.
[0023] Furthermore, the activation request includes an activation authentication code and a quantum security device identifier; The key management system verifies the legitimacy of the quantum security device according to the activation request, including: The key management system searches for a quantum security device address according to the quantum security device identifier, and detects whether the quantum security device address is in a blacklist; If not, the key management system calls the quantum cryptography server to obtain the medium key according to the third random key offset component, and obtains the activation authentication code according to the medium key; The key management system generates a verification authentication code according to the quantum security device address, and compares the activation authentication code with the verification authentication code to see whether they are consistent; If they are consistent, the legitimacy verification of the quantum security device is successful.
[0024] As can be seen from the above description, the activation request contains the activation authentication code and quantum security device identification. The key management system ensures the legitimacy of the quantum security device through multiple verification mechanisms such as device address check, blacklist detection and authentication code comparison, prevents illegal devices from accessing the system to activate the key, and ensures user consistency between key injection and key use.
[0025] Furthermore, the quantum security device sending an activation request for key activation to a key management system according to the medium key of the quantum storage medium and the third random key offset component includes: The quantum security device encrypts the third random key offset component according to the medium key to obtain a target random key offset component, and generates activation data according to the target random key offset component and the activation authentication code; The quantum security device encrypts the activation data according to the medium key to obtain an activation ciphertext, and generates an activation request for key activation according to the quantum security device identifier and the activation ciphertext; The quantum security device sends the activation request to the key management system.
[0026] As can be seen from the above description, the quantum security device uses the media key to encrypt the third random key offset component to generate the target random key offset component, ensuring the security and confidentiality of the target random key offset component during transmission. The target random key offset component is then combined with the activation authentication code to generate activation data, which contains device-specific information and randomness. The activation data is then encrypted again using the media key to generate activation ciphertext. This dual encryption mechanism further enhances the security of the activation request, ensuring its safety and integrity during transmission.
[0027] Another embodiment of the present invention provides a quantum key offline filling system, comprising a key filling device, a quantum cryptography server, a quantum security device, and a key management system; the key filling device is used to execute the various steps implemented by the key filling device in the above-mentioned quantum key offline filling method; the quantum cryptography server is used to execute the various steps implemented by the quantum cryptography server in the above-mentioned quantum key offline filling method; the quantum security device is used to execute the various steps implemented by the quantum security device in the above-mentioned quantum key offline filling method; and the key management system is used to execute the various steps implemented by the key management system in the above-mentioned quantum key offline filling method.
[0028] The embodiments of the present invention provide a method and system for offline quantum key filling, which can provide collaborative security assurance for the entire process of offline quantum key filling, effectively improving the security of offline quantum key filling. The following is an explanation of the specific implementation methods: Please refer to Figures 1 to 4 , embodiment 1 of the present invention is: A quantum key offline filling method, such as Figure 1 As shown, the system includes three charging phases: the first phase involves offline key charging of the administrator device bound to the key charging device in an off-network state; the second phase involves offline key charging of the quantum storage medium via the administrator device bound to the key charging device; and the third phase involves offline key activation of the quantum storage medium in the bound quantum security device. It should be noted that all keys referred to in this invention are quantum keys.
[0029] The first charging phase is used to initialize the key charging device. Since the key charging device is a newly initialized device and the administrator device configured for it has not completed the corresponding binding operation, the key charging device is prohibited from accessing the network before the initialization is complete. In other words, the quantum key charging device is in a physically isolated environment. The key charging device can only access the network after the administrator device binding operation is completed, thereby ensuring the security of the key charging device during the initialization process. The administrator device is the administrator Ukey (hardware encryption device).
[0030] like Figure 2 As shown, in the first charging phase, the device connection is specifically as follows: the key charging device is directly connected to the network port of the quantum cryptography server. The server ID, IP address, and service port of the quantum cryptography server are entered into the key charging device to bind the quantum cryptography server. At the same time, the administrator Ukey is connected to the USB port of the key charging device, and the administrator Ukey username and related parameters are configured to bind the administrator Ukey. Finally, the key charging device is connected to the quantum storage medium.
[0031] The specific steps of the first charging stage include: S101: The key charging device initializes and charges the administrator device.
[0032] During the second key filling phase, information must be pre-installed in the relevant devices. Specifically, the quantum storage medium must be pre-installed with a quantum security device certificate. The signature information in the quantum security device certificate includes device information such as the quantum security device identifier and address. The key filling device then imports the CA certificate (certification authority certificate) corresponding to the quantum security device certificate in the quantum storage medium. The device connection during the second key filling phase specifically involves connecting the key filling device to the quantum storage medium.
[0033] like Figure 3 As shown, the specific steps of the second charging stage include: S201. A key injection device generates a first random key offset component, and obtains a management quantum key of the administrator device according to the first random key offset component.
[0034] Prior to step S201, the process further includes: upon receiving a key injection instruction including the injection key type, quantum storage medium identifier, and injection key quantity, the key injection device reads the currently connected quantum storage medium identifier and the quantum security device certificate in the quantum storage medium through a standard interface. The key injection device verifies the signature of the read quantum security device certificate using the CA certificate. If the signature verification succeeds, step S201 is executed; if the signature verification fails, the injection process ends.
[0035] S202: The key charging device obtains a charging key ciphertext from a quantum cryptography server according to the first random key offset component and the management quantum key, and encrypts the charging key ciphertext and writes it into a quantum storage medium to obtain a target key ciphertext.
[0036] As can be seen from the above description, the second charging phase uses the administrator's quantum key to complete the charging process, with sensitive information written directly to the quantum storage medium in encrypted form. During the charging process, the charging key only appears briefly on the quantum cryptography server. The key charging device uses the quantum storage medium's dedicated interface to directly import sensitive information into the quantum storage medium, ensuring the secure storage of the quantum key. The associated parties in the second charging phase include the administrator's device and charging-related devices, which are directly connected within the intranet to isolate them from external network attacks. The administrator's device only has the authority to select the charging key amount and initiate the key charging process. The quantum key charging process is fully automated and confidential, making it impossible for administrators to intercept any plaintext charging-related information through the access interface or network, thus isolating security risks caused by poor management.
[0037] In the third filling phase, information needs to be preset in the relevant devices. Specifically, the quantum security device needs to preset the access key of the quantum storage medium to ensure that the quantum security device can obtain the access rights to the quantum storage medium and ensure that the quantum storage medium will not be stolen during the transmission process. Figure 4 As shown, the device connection in the third charging stage is specifically as follows: the quantum storage medium storing the target key ciphertext is installed in the quantum security device, the quantum security device is coupled with the key management system, and the key management system is coupled with the quantum key server.
[0038] like Figure 3 As shown, the specific steps of the third charging stage include: S301: After obtaining access rights to the quantum storage medium, the quantum security device generates a second random key offset component and a third random key offset component, and obtains a medium key of the quantum storage medium according to the target key ciphertext and the second random key offset component.
[0039] S302: The quantum security device sends an activation request for key activation to a key management system according to the medium key of the quantum storage medium and the third random key offset component.
[0040] S303: The key management system verifies the legitimacy of the quantum security device according to the activation request.
[0041] S304: If the verification is successful, the quantum security device updates the target key offset component in the target key ciphertext to the third random key offset component to complete key activation.
[0042] As can be seen from the above description, the third charging phase achieves four-in-one binding verification of the quantum storage medium, quantum security device, quantum cryptography server, and key management system, preventing uncontrolled use of the quantum storage medium after offline charging, which could lead to quantum key leakage. Furthermore, the quantum security device pre-sets the random key offset component, eliminating the need to transmit the complete quantum key index during actual quantum key use. Quantum key addressing only requires transmitting the additional random key offset component generated by the quantum random number chip, further enhancing the security of quantum key use.
[0043] It should be noted that the offline key in the present invention refers to the management key injected into the administrator device in the first injection phase and the target key injected into the quantum storage medium in the second injection phase.
[0044] Please refer to Figures 5 and 6 , the second embodiment of the present invention is: like Figure 5As shown, a quantum key offline filling method is provided, which differs from the first embodiment in that the specific implementation method of step S101 is limited.
[0045] Specifically, step S101 includes: S111. The key injection device sends a request for issuing an administrator device certificate to the quantum cryptography server.
[0046] The issuance request specifically includes the quantum cryptography server's server ID, administrator Ukey ID, key charging device ID, key charging device address, key charging device certificate and other device-related information.
[0047] S112. The quantum cryptography server verifies the legitimacy of the key injection device according to the issuance request.
[0048] The quantum cryptography server verifies the binding information of the key injection device based on the issuance request. After the verification is passed, a two-way binding operation is completed between the quantum cryptography server and the key injection device.
[0049] S113. If the verification is successful, the quantum cryptography server returns the issued administrator device certificate to the key injection device according to the issuance request.
[0050] The quantum cryptography server issues and saves the digital certificate of the administrator device for the key injection device, and returns the digital certificates of both the quantum cryptography server and the administrator device to the key injection device.
[0051] S114. The key injection device sends an administration injection request to the quantum cryptography server in a digital envelope according to the administrator device certificate.
[0052] The management filling request specifically includes the number of quantum keys to be filled and the fixed bytes of each quantum key.
[0053] S115. The quantum cryptography server generates a management key ciphertext according to the management charging request, and returns the management key ciphertext to the key charging device.
[0054] The management key ciphertext includes the management key storage object, the management root key ciphertext and the management key offset component ciphertext. Step S115 specifically includes: S151. The quantum cryptography server generates a management key storage object, a management root key, and a management key offset component through a quantum random number generator.
[0055] The quantum cryptography server obtains quantum random numbers from the quantum random number generator and generates management key storage objects, management root keys and management key offset components according to the quantum key storage system format. Among them, all key storage objects in the present invention adopt a multi-level encryption storage structure, such as Figure 6 As shown, the root key is used to encrypt the key storage object, and then the encryption key is used to encrypt the root key and the protection key offset component respectively. Finally, the chip key is generated after the cryptographic chip is initialized, and the encryption key is encrypted using the chip key. The chip key is only stored in the cryptographic chip and cannot be exported.
[0056] S152. The quantum cryptography server encrypts the management root key and the management key offset component according to the certificate public key of the administrator device certificate to obtain a management root key ciphertext and a management key offset component ciphertext.
[0057] The public key of the certificate is encrypted using an asymmetric algorithm, where SM2 is the preferred asymmetric algorithm.
[0058] S116: The key injection device stores the management key ciphertext in an administrator device, so that the administrator device is bound to the key injection device.
[0059] Specifically, the key charging device writes the management key storage object into the confidential storage area of the administrator Ukey in the form of a file; writes the management root key ciphertext into the administrator Ukey through the corresponding import interface, and in the administrator Ukey, first uses the private key of the key charging device to decrypt the management root key ciphertext to obtain the management root key, and then uses the encryption key to encrypt and store it; writes the management key offset component ciphertext into the administrator Ukey through the corresponding import interface, and in the administrator Ukey, first uses the private key of the key charging device to decrypt the management key offset component ciphertext to obtain the management key offset component, and then uses the encryption key to encrypt and store it.
[0060] As can be seen from the above description, the first key charging phase is tied to the initialization process of the key charging device. This initialization process is physically isolated through institutional mechanisms, achieving absolute security. During the charging process, even if the physical isolation of the key charging device fails and the key charging device is connected to the network, the key charging device is protected by the digital certificate, maintaining a certain level of security during the charging process. Because the digital certificate is self-signed, transmitted only once, and the process is extremely short, and the digital certificate does not need to be exposed on the network afterwards, the risk of digital certificate hacking caused by public disclosure is greatly reduced.
[0061] The third embodiment of the present invention is: A quantum key offline filling method is different from the first embodiment in that the specific implementation methods of step S201 and step S202 are limited.
[0062] Specifically, step S201 includes: S211. The key charging device decrypts the management key offset component ciphertext using an internal quantum key to obtain the management key offset component, and generates a first random key offset component using a first quantum random number chip.
[0063] The key injection device randomly determines an internal quantum key to decrypt the management key offset component ciphertext to obtain the management key offset component, and generates a 16-byte random number as the first random key offset component through the first quantum random number chip.
[0064] S212. The key injection device generates a management random index according to the management key offset component and the first random key offset component, and obtains the management quantum key of the administrator device according to the management random index.
[0065] The key charging device performs an XOR operation on the management key offset component and the first random key offset component to obtain a management random index (denoted as qki1). The management quantum key obtained by the management random index (qki1) is denoted as qk1.
[0066] Specifically, step S202 includes: S221. The key charging device obtains a medium charging request ciphertext according to the management quantum key encryption medium charging request, and sends the medium charging request ciphertext and the first random key offset component to the quantum cryptography server.
[0067] The media charging request includes an authentication code, the administrator's Ukey identifier bound to the key charging device, the quantum storage medium identifier, the number of keys to be charged, the type of keys to be charged, and a 32-bit quantum random number r1. The media charging request also includes the quantum security device certificate and the corresponding CA certificate. The authentication code is calculated using the commercial cryptographic digest algorithm SM3 on the first concatenated data. The first concatenated data includes the quantum cryptography server identifier, the administrator's Ukey identifier, the quantum storage medium identifier, and the quantum security device address (MAC). The authentication code is SM3 (quantum cryptography server identifier || administrator's Ukey identifier || quantum storage medium identifier || quantum security device MAC || 32-bit quantum random number r1), where || represents the concatenation of two data items.
[0068] S222: The quantum cryptography server decrypts the media charging request ciphertext according to the first random key offset component to obtain the media charging request, and reads the quantum security device certificate in the quantum storage medium according to the media charging request.
[0069] The quantum cryptography server obtains the internally stored management key offset component of the key charging device and performs an XOR operation on the management key offset component with the first random key offset component to obtain a management random index. The management random index is used to obtain the management quantum key used by the key charging device to encrypt the media charging request. The quantum cryptography server decrypts the media charging request ciphertext using the obtained management quantum key to obtain the media charging request.
[0070] S223: The quantum cryptography server verifies the medium charging request according to the quantum security device certificate.
[0071] The quantum cryptography server verifies the quantum security device certificate using the CA certificate. If verification passes, the server uploads the quantum security device certificate and CA certificate to the key management system for storage, and records the name of the quantum security device certificate as the quantum security device identifier. Simultaneously, the server reads the server identifier to calculate a verification code and compares the calculated verification code with the authentication code in the media fill request to see if they are consistent. If they are, verification passes.
[0072] S224: If the verification passes, the quantum cryptography server generates a charging key and a fourth random key offset component through a quantum random number generator according to the medium charging request.
[0073] The key charging includes the key storage object and the root key. The quantum cryptography server reads a sufficient number of quantum random numbers from the quantum random number generator based on the number and type of keys in the medium charging request, and generates the key storage object and the root key in the quantum key storage system format.
[0074] S225. The quantum cryptography server double-encrypts the fourth random key offset component and the charging key according to the certificate public key in the quantum security device certificate and the management quantum key to obtain a charging key ciphertext, and returns the charging key ciphertext to the key charging device.
[0075] The quantum cryptography server uses the certificate public key of the quantum security device certificate to encrypt the charging root key and the fourth random key offset component in the charging key in an asymmetric algorithm; then obtains the next management quantum key (expressed as qk2) according to the next index (expressed as qki2) of the management random index (expressed as qki1) generated in step S212, and uses the next management quantum key (qk2) to perform an equal-length exclusive-OR operation on the charging root key to obtain a ciphertext of the charging root key; then obtains the next management quantum key (expressed as qk3) according to the next index (expressed as qki3) of the index (qki2), and uses the next management quantum key (qk3) to perform an equal-length exclusive-OR operation on the fourth random key offset component to obtain a ciphertext of the fourth random key offset component; finally, uses the management quantum key (qk1) to encrypt the charging key storage object, the ciphertext of the charging root key, and the ciphertext of the fourth random key offset component in a symmetric algorithm to obtain a charging key ciphertext.
[0076] S226. The key charging device decrypts the charging key ciphertext according to the management quantum key to obtain a charging key sub-ciphertext.
[0077] The charging key sub-ciphertext includes the charging key storage object, the ciphertext of the charging root key, and the ciphertext of the fourth random key offset component. The key charging device uses the management quantum key (qk1) in the administrator's Ukey to decrypt the charging key ciphertext to obtain the charging key sub-ciphertext. The management quantum key (qk2) in the administrator's Ukey is used to perform an equal-length XOR operation with the ciphertext of the charging root key to obtain the charging root key encrypted by the certificate public key. The management quantum key (qk3) in the administrator's Ukey is used to perform an equal-length XOR operation with the ciphertext of the fourth random key offset component to obtain the fourth random key offset component encrypted by the certificate public key. Finally, the key charging device destroys the management quantum keys (qk1, qk2, and qk3) in the administrator's Ukey.
[0078] S227. The key charging device writes the charging key sub-ciphertext into the quantum storage medium, so that the quantum storage medium decrypts the charging key sub-ciphertext according to the certificate private key in the quantum security device certificate to obtain the fourth random key offset component and the charging key, and encrypts the fourth random key offset component and the charging key according to the internal encryption key to obtain the target key ciphertext.
[0079] The key charging device obtains the charging authority of the confidential partition of the quantum storage medium, and writes the charging key storage object into the confidential partition of the quantum storage medium in the form of a data block; the charging root key encrypted by the certificate public key is written into the quantum storage medium through the corresponding import interface, so that the quantum storage medium uses the certificate private key to decrypt and obtain the charging root key; the fourth random key offset component encrypted by the certificate public key is written into the quantum storage medium through the corresponding import interface, so that the quantum storage medium uses the certificate private key to decrypt and obtain the fourth random key offset component.
[0080] The fourth embodiment of the present invention is: A quantum key offline filling method is different from the first embodiment in that the specific implementation methods of steps S301 to S304 are limited.
[0081] Specifically, in step S301, the quantum security device generates the second random key offset component and the third random key offset component after obtaining the access right of the quantum storage medium. Specifically, the quantum security device obtains the access right of the quantum storage medium according to the preset access key to complete the one-to-one binding operation, and generates the second random key offset component and the third random key offset component after confirming the key integrity in the quantum storage medium through the verification interface.
[0082] Specifically, in step S301, the quantum security device obtains the medium key of the quantum storage medium according to the target key ciphertext and the second random key offset component, including: S311. The quantum security device obtains a fourth random key offset component from the quantum storage medium according to the internal encryption key of the quantum storage medium, and generates a medium random index according to the second random key offset component and the fourth random key offset component.
[0083] The quantum security device decrypts the quantum storage medium using its internal encryption key to obtain a fourth random key offset component, and performs an XOR operation on the second random key offset component and the fourth random key offset component to obtain a medium random index (denoted as qki10).
[0084] S312: The quantum security device obtains a medium key of the quantum storage medium according to the medium random index. The medium key obtained by the medium random index (qki10) is denoted as qk10.
[0085] Specifically, step S302 includes: S321. The quantum security device encrypts the third random key offset component according to the medium key to obtain a target random key offset component, and generates activation data according to the target random key offset component and the activation authentication code.
[0086] S322: The quantum security device encrypts the activation data according to the media key to obtain an activation ciphertext, and generates an activation request for key activation according to the quantum security device identifier and the activation ciphertext.
[0087] The quantum security device encrypts the third random key offset component using the media key (qk10) to obtain the target random key offset component, and encrypts the activation data using the next media key (denoted as qk11) of the media key (qk10) to obtain the activation ciphertext.
[0088] S323: The quantum security device sends the activation request to the key management system.
[0089] The activation request includes an activation authentication code and a quantum security device identifier.
[0090] Specifically, step S303 includes: S331. The key management system searches for a quantum security device address according to the quantum security device identifier, and detects whether the quantum security device address is in a blacklist.
[0091] S332: If not, the key management system calls the quantum cryptography server to obtain the media key according to the third random key offset component, and obtains the activation authentication code according to the media key.
[0092] The key management system invokes the quantum cryptography server to calculate the medium random index using the third random key offset component, thereby obtaining the medium keys (qk10 and qk11) based on the medium random index. The activation ciphertext is decrypted using the medium keys (qk10 and qk11) to obtain the activation authentication code. Specifically, the activation authentication code is calculated using the commercial cryptographic digest algorithm SM3 on the second concatenated data. The second concatenated data includes the key management system identifier and the quantum security device address (MAC). Specifically, the authentication code = SM3(key management system identifier || quantum security device MAC || 32-bit quantum random number r2), where || represents the concatenation of two data items.
[0093] S333: The key management system generates a verification authentication code according to the quantum security device address, and compares the activation authentication code with the verification authentication code to see whether they are consistent.
[0094] S334: If they are consistent, the legitimacy verification of the quantum security device is successful.
[0095] After step S334, the key management system further includes: calling the quantum cryptography server to perform an equal-length exclusive-OR operation on the target random key offset component using the medium key (qk10) to obtain a third random key offset component, and using the third random key offset component to update the fourth random key offset component in the target key ciphertext. Simultaneously, the key management system records the activation information of the quantum security device corresponding to the quantum security device identifier, changes its status to usable, and returns a response message indicating successful activation to the quantum security device.
[0096] After receiving the activation success response information, the quantum security device destroys the media keys (qk10 and qk11) in the quantum storage medium.
[0097] Step S304 is specifically as follows: the quantum security device writes the third random key offset component into the quantum storage medium through the plaintext import interface of the key offset component, so that the target key offset component in the target key ciphertext is updated to the third random key offset component, and encrypts and stores the third random key offset component using the internal encryption key in the quantum storage medium in the plaintext import interface.
[0098] Please refer to Figure 7 , the fifth embodiment of the present invention is: A quantum key offline charging system includes a key charging device, a quantum cryptography server, a quantum security device, and a key management system; the key charging device is used to execute each step implemented by the key charging device in a quantum key offline charging method as described in Examples 1 to 3; the quantum cryptography server is used to execute each step implemented by the quantum cryptography server in a quantum key offline charging method as described in Examples 1 to 3; the quantum security device is used to execute each step implemented by the quantum security device in a quantum key offline charging method as described in Examples 1 to 3; and the key management system is used to execute each step implemented by the key management system in a quantum key offline charging method as described in Examples 1 to 3.
[0099] In summary, the present invention provides a method and system for offline quantum key filling, which significantly improves the security of quantum key filling and activation through the introduction of multi-level encryption mechanisms and randomness. During the filling stage, the key filling device generates a first random key offset component, and obtains the filling key ciphertext from the quantum cryptography server in combination with the management quantum key. The filling key is always in an encrypted protection state during the generation, transmission and storage process, effectively preventing the filling key from being stolen or tampered with. At the same time, the legitimacy of the key filling device is verified by the quantum cryptography server, and the digital envelope is encrypted using the administrator device certificate to ensure the authorization and security of the filling operation. During the activation stage, the quantum security device obtains the medium key based on the target key ciphertext, and sends an activation request to the key management system in combination with the third random key offset component. The key management system ensures that only authorized quantum security devices can activate and use the key in the quantum storage medium through multiple verification mechanisms. The entire solution designs a complete offline charging security solution from the system level. By managing quantum keys, charging key ciphertexts, target key ciphertexts and media keys to collaboratively encrypt the charging process, it effectively improves the security of offline quantum key charging, ensures the integrity and confidentiality of quantum keys during the charging, storage and activation processes, and enhances the overall security of the system.
[0100] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's description and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A quantum key offline filling method, characterized in that: include: After initializing and filling the administrator device, the key filling device generates a first random key offset component, and obtains the management quantum key of the administrator device according to the first random key offset component; The key charging device obtains a charging key ciphertext from a quantum cryptography server according to the first random key offset component and the management quantum key, and encrypts the charging key ciphertext and writes it into a quantum storage medium to obtain a target key ciphertext; After obtaining access rights to the quantum storage medium, the quantum security device generates a second random key offset component and a third random key offset component, and obtains a medium key of the quantum storage medium according to the target key ciphertext and the second random key offset component; The quantum security device sends an activation request for key activation to a key management system according to the medium key of the quantum storage medium and the third random key offset component; The key management system verifies the legitimacy of the quantum security device according to the activation request; If the verification is successful, the quantum security device updates the target key offset component in the target key ciphertext to the third random key offset component to complete key activation.
2. The method according to claim 1, characterized in that The key charging device initializes the administrator device by charging the following: The key injection device sends a request for issuing the administrator device certificate to the quantum cryptography server; The quantum cryptography server verifies the legitimacy of the key injection device according to the issuance request; If the verification is successful, the quantum cryptography server returns the issued administrator device certificate to the key injection device according to the issuance request; The key injection device sends a management injection request to the quantum cryptography server in a digital envelope according to the administrator device certificate; The quantum cryptography server generates a management key ciphertext according to the management charging request, and returns the management key ciphertext to the key charging device; The key injection device stores the management key ciphertext in the administrator device, so that the administrator device is bound to the key injection device.
3. The method according to claim 2, characterized in that The management key ciphertext includes a management key storage object, a management root key ciphertext, and a management key offset component ciphertext; The quantum cryptography server generates a management key ciphertext according to the management charging request, including: The quantum cryptography server generates a management key storage object, a management root key, and a management key offset component through a quantum random number generator; The quantum cryptography server encrypts the management root key and the management key offset component according to the certificate public key of the administrator device certificate to obtain a management root key ciphertext and a management key offset component ciphertext.
4. The method according to claim 3, characterized in that The key injection device generates a first random key offset component, and obtains the management quantum key of the administrator device according to the first random key offset component, including: The key filling device decrypts the management key offset component ciphertext using an internal quantum key to obtain the management key offset component, and generates a first random key offset component using a first quantum random number chip; The key injection device generates a management random index according to the management key offset component and the first random key offset component, and obtains the management quantum key of the administrator device according to the management random index.
5. The method according to claim 4, characterized in that The key charging device obtains the charging key ciphertext from the quantum cryptography server according to the first random key offset component and the management quantum key, comprising: The key filling device obtains a medium filling request ciphertext according to the management quantum key encryption medium filling request, and sends the medium filling request ciphertext and the first random key offset component to the quantum cryptography server; The quantum cryptography server decrypts the media charging request ciphertext according to the first random key offset component to obtain the media charging request, and reads the quantum security device certificate in the quantum storage medium according to the media charging request; The quantum cryptography server verifies the medium charging request according to the quantum security device certificate; If the verification passes, the quantum cryptography server generates a charging key and a fourth random key offset component through a quantum random number generator according to the medium charging request; The quantum cryptography server double-encrypts the fourth random key offset component and the charging key according to the certificate public key in the quantum security device certificate and the management quantum key to obtain a charging key ciphertext, and returns the charging key ciphertext to the key charging device.
6. The method according to claim 5, characterized in that The key charging device encrypts the charging key ciphertext and writes it into the quantum storage medium to obtain the target key ciphertext, which includes: The key charging device decrypts the charging key ciphertext according to the management quantum key to obtain a charging key sub-ciphertext; The key charging device writes the charging key sub-ciphertext into the quantum storage medium, so that the quantum storage medium decrypts the charging key sub-ciphertext according to the certificate private key in the quantum security device certificate to obtain the fourth random key offset component and the charging key, and encrypts the fourth random key offset component and the charging key according to the internal encryption key to obtain the target key ciphertext.
7. The method according to claim 1, characterized in that The quantum security device obtaining the medium key of the quantum storage medium according to the target key ciphertext and the second random key offset component includes: The quantum security device obtains a fourth random key offset component from the quantum storage medium according to an internal encryption key of the quantum storage medium, and generates a medium random index according to the second random key offset component and the fourth random key offset component; The quantum security device obtains a medium key of the quantum storage medium according to the medium random index.
8. The method according to claim 1, characterized in that The activation request includes an activation authentication code and a quantum security device identifier; The key management system verifies the legitimacy of the quantum security device according to the activation request, including: The key management system searches for a quantum security device address according to the quantum security device identifier, and detects whether the quantum security device address is in a blacklist; If not, the key management system calls the quantum cryptography server to obtain the medium key according to the third random key offset component, and obtains the activation authentication code according to the medium key; The key management system generates a verification authentication code according to the quantum security device address, and compares the activation authentication code with the verification authentication code to see whether they are consistent; If they are consistent, the legitimacy verification of the quantum security device is successful.
9. The method according to claim 8, characterized in that The quantum security device sending an activation request for key activation to a key management system according to the medium key of the quantum storage medium and the third random key offset component includes: The quantum security device encrypts the third random key offset component according to the medium key to obtain a target random key offset component, and generates activation data according to the target random key offset component and the activation authentication code; The quantum security device encrypts the activation data according to the medium key to obtain an activation ciphertext, and generates an activation request for key activation according to the quantum security device identifier and the activation ciphertext; The quantum security device sends the activation request to the key management system.
10. A quantum key offline filling system, characterized in that: Including key injection equipment, quantum cryptography server, quantum security equipment and key management system; The key injection device is used to perform each step implemented by the key injection device in the quantum key offline injection method according to any one of claims 1 to 9; The quantum cryptography server is used to execute the steps implemented by the quantum cryptography server in the quantum key offline filling method according to any one of claims 1 to 9; The quantum security device is used to perform each step implemented by the quantum security device in the quantum key offline injection method according to any one of claims 1 to 9; The key management system is used to execute each step implemented by the key management system in a quantum key offline injection method as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Quantum key charging method, system and component based on quantum cryptography service platform
CN116418485A
Cited By
Method and system for protecting quantum key distribution process, medium and quantum computer
CN120768547A