Method and system for obtaining preset root key offline by quantum safety equipment terminal
By generating root keys on demand and combining path separation and dual authentication, the security problem of quantum security device terminals during their first network access is solved, achieving efficient management of key resources and secure and reliable root key transmission, thus enhancing the security of the terminal side.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- MATRICTIME DIGITAL TECH CO LTD
- Filing Date
- 2026-02-25
- Publication Date
- 2026-05-19
AI Technical Summary
In existing technologies, quantum-safe devices lack security protection when they first join the network, and there is a risk that keys may be stolen, tampered with, or injected by impersonation. Especially during remote key distribution, ensuring the confidentiality, integrity, authenticity of the source of the root key during transmission and the controllability of the injection operation has become a key challenge.
The system employs an on-demand root key generation design, which separates the device identity code from the root key ciphertext through a physical or logical path. It also combines an irreducible polynomial hash function and a dual authentication mechanism to ensure the security of the key during transmission.
It enables secure and reliable acquisition of the root key on the terminal side, avoids idle and wasteful key resources, enhances the security of the transmission process, ensures that key and identity information are not leaked, and provides two-factor security protection.
Smart Images

Figure CN122069028A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a method and system for offline acquisition of a preset root key by a quantum-safe device terminal. Background Technology
[0002] With the rapid development of quantum computing technology, traditional public-key cryptography systems (such as RSA and ECC) face the potential threat of being cracked by quantum computing attacks (especially Shor's algorithm). To address this challenge, quantum-secure communication technology, especially secure devices and terminals based on quantum key distribution or quantum-resistant cryptographic algorithms, has become an important development direction for ensuring future network information security.
[0003] In practical deployment and operation models, a common requirement is that quantum security devices are not pre-configured with the final operational root key at the factory, but are delivered to end users or operators in a "blank" or "initialized" state. This model separates device production from key operation and management, and is particularly suitable for enterprises or dedicated network operators that wish to independently control their core cryptographic assets. For example, when a company builds its own internal secure communication network, it expects the generation, injection, and control of the root key to be entirely performed by its own controlled key management system, without relying on the device manufacturer.
[0004] However, in this model, when a terminal device first joins the network at the deployment location, it needs to securely obtain and inject an initial root key from a remote or local key management system. This process involves the interaction of key data in the transmission channel, and without sufficient security protection, it may face the risk of key theft, tampering, or spoofing injection. Especially when distributing keys remotely over public or untrusted networks, ensuring the confidentiality, integrity, authenticity of the source, and controllability of the injection operation of the root key during transmission becomes a key challenge for the practical implementation of this deployment model.
[0005] Currently, existing technologies may employ methods such as pre-shared temporary keys or encrypted transmission based on traditional public key infrastructure (PKI) for initial key configuration. However, these methods may suffer from insufficient foresight regarding quantum security, reliance on complex traditional PKI systems leading to management burdens, or low operational efficiency and unsuitability for large-scale deployment. Therefore, there is an urgent need for a method and system specifically designed for quantum-safe device terminals that can securely, reliably, and efficiently obtain pre-configured root keys offline upon their first network connection. Summary of the Invention
[0006] Purpose of the invention: This application provides a method and system for obtaining a preset root key offline on a quantum-safe device terminal, in order to solve the problems mentioned in the background art.
[0007] Technical Solution: This invention provides a method for a quantum-safe device terminal to obtain a pre-set root key offline. The participants in the method include a quantum-safe device terminal, a network communication device, a root key server, and an intermediary medium. The method includes the following steps:
[0008] Step 1: The quantum-safe device terminal initiates a registration application to the root key server via network communication equipment based on its own hardware number (No.).
[0009] Step 2: The root key server generates a root key file file0 for the quantum security device terminal based on the registration application, encrypts the root key file file0 using the encryption key key0, and sends the root key ciphertext FILE0 offline to the quantum security device terminal via an intermediate medium.
[0010] Step 3: The quantum-safe device terminal performs an identity authentication operation to obtain the decryption key key0' of the root key ciphertext FILE0';
[0011] Step 4: The quantum-safe device terminal uses the received decryption key key0' to decrypt the root key ciphertext FILE0', obtains the root key file file0 in plaintext state, and stores it locally.
[0012] As an improvement to the present invention, the specific process of step 2 includes:
[0013] Step 2-1: Based on the registration application, the device registration unit of the root key server records the hardware number No. of the quantum security device terminal, and sends a first instruction to the root key generation unit of the root key server to generate a root key; wherein, the first instruction includes the hardware number No.;
[0014] Step 2-2: The root key generation unit responds to the first instruction, generates a root key file file0 and an encryption key key0 based on the hardware number No. in the first instruction, sends the hardware number No., the generated root key file file0, and the encryption key key0 to the root key storage unit of the root key server, and sends a first feedback indicating that the root key generation is complete to the device registration unit; the first feedback carries the hardware number No.
[0015] Steps 2-3: Based on the first feedback, the device registration unit generates a corresponding device identity code ID based on the hardware number No., and sends the device identity code ID to the quantum security device terminal via network communication equipment, and also sends the device identity code ID to the root key storage unit; the root key storage unit stores the device identity code ID in correspondence with the hardware number No., root key file file0, and encryption key key0 from step 2-2; the quantum security device terminal stores the device identity code ID and hardware number No. in correspondence.
[0016] Steps 2-4: The device registration unit instructs the root key distribution unit of the root key server to encrypt the generated root key and send it to the quantum security device terminal via an intermediate medium.
[0017] As an improvement to the present invention, the specific process of steps 2-4 includes:
[0018] The root key distribution unit retrieves the corresponding root key file file0 and encryption key key0 from the root key storage unit based on the hardware number No. in the device registration unit, performs an XOR operation to obtain the encrypted root key ciphertext FILE0 = file0 ⊕ key0; simultaneously, it calculates the first hash value H1 of the device identity code ID and hardware number No., records the first hash value parameter string str1 and the input random number s1, and sends the root key ciphertext FILE0, the first hash value H1, the first hash value parameter string str1 and the input random number s1 to the intermediate medium, which performs the authentication operation. After the authentication operation of the intermediate medium is successful, the root key ciphertext FILE0 is transmitted to the quantum security device terminal offline.
[0019] As an improvement of the present invention, the specific process of recording the first hash value H1 of the computing device identification code ID and hardware number No., and the first hash value parameter string str1 and the input random number s1 includes:
[0020] The root key distribution unit generates an irreducible polynomial p1(x) locally and obtains an input random number s1 from locally. It denotes the string consisting of the coefficients of each term in the irreducible polynomial p1(x) except for the highest term as str1. The root key distribution unit uses the irreducible polynomial p1(x) and the input random number s1 to generate the first hash function h. p1,s1 Input the device identification code (ID) and hardware serial number (No.) into the first hash function h. p1,s1 The first hash value H1=h is obtained. p1,s1 (ID, No.); Records the string str1 and the input random number s1 as the first hash value parameter;
[0021] The root key distribution unit sends the first hash value H1, the first hash value parameter string str1, and the input random number s1 to the root key storage unit. The root key storage unit stores the device identification code ID in correspondence with the first hash value H1, the first hash value parameter string str1, and the input random number s1.
[0022] As an improvement of the present invention, the specific process of the intermediate medium performing the authentication operation includes:
[0023] An intermediate medium establishes a connection with the quantum-safe device terminal, obtains the hardware number No. and device identification code ID from the quantum-safe device terminal, calculates a hash value H1'' based on the hash value parameter string str1' sent by the root key distribution unit, the input random number s1', and the hardware number No. and device identification code ID obtained from the quantum-safe device terminal, and compares it with the hash value H1' sent by the root key distribution unit. If they match, the authentication operation of the intermediate medium is successful, and the root key ciphertext FILE0 is sent offline to the quantum-safe device terminal; otherwise, the authentication operation of the intermediate medium fails, and the root key ciphertext FILE0 is discarded.
[0024] The specific process for calculating the hash value H1'' is as follows:
[0025] The intermediate medium generates a hash function h based on the string str1' and the input random number s1'. p1’,s1’ Input the hardware number (No.) and device identification code (ID) into the hash function h. p1’,s1’ Calculate the hash value H1''=h p1’,s1’ (ID, No.).
[0026] As an improvement to the present invention, the specific process of step 3 includes:
[0027] Step 3-1: In response to the successful authentication operation of the intermediate medium, the quantum security device terminal obtains the string str1' from the intermediate medium, obtains a random number rand from the string str1' as the factor for this authentication, and records the index idx-rand of the random number rand in the string str1';
[0028] Step 3-2: The quantum security device terminal calculates the device identity code ID, hardware number No., random number rand, and the second hash value H2 of the root key ciphertext FILE0' locally, records the second hash value parameter string str2 and the input random number s2, and sends the device identity code ID, index idx-rand, second hash value H2, second hash value parameter string str2 and input random number s2 to the root key authentication unit of the root key server via the network communication device;
[0029] Step 3-3: The root key authentication unit performs the authentication operation;
[0030] Steps 3-4: In response to the successful authentication operation of the root key authentication unit, the root key distribution unit obtains the encryption key key0 from the root key storage unit and sends the encryption key key0 to the quantum security device terminal via the network communication device; in response to the unsuccessful authentication operation of the root key authentication unit, the process returns to step 2 to re-execute the root key distribution operation.
[0031] As an improvement of the present invention, in step 3-2, the specific process of recording the second hash value parameter string str2 and the input random number s2 of the computing device identification code ID, hardware number No., random number rand, and the second hash value H2 of the root key ciphertext FILE0' includes:
[0032] The quantum-safe device terminal generates an irreducible polynomial p2(x) locally and obtains an input random number s2 from the local machine. The string representing the coefficients of each term in the irreducible polynomial p2(x), excluding the highest term, is denoted as str2. The quantum-safe device terminal uses the irreducible polynomial p2(x) and the input random number s2 to generate a second hash function h. p2,s2 Input the device identification code (ID), hardware serial number (No.), random number (rand), and root key ciphertext (FILE0') into the second hash function (h). p2,s2 The second hash value H2 = h is obtained. p2,s2 (ID, No., rand, FILE0'); Records the string str2 and the input random number s2 as the second hash value parameter.
[0033] As an improvement to the present invention, the specific process of step 3-3 includes:
[0034] Step 3-3-1: The root key authentication unit obtains the corresponding stored input random number s1 from the root key storage unit according to the received device identity code ID', and obtains the random number rand' from the input random number s1 according to the index idx-rand';
[0035] Step 3-3-2: The root key authentication unit obtains the hardware number No., device identification code ID, root key file file0 and encryption key key0 from the root key storage unit based on the received device identification code ID'. It then performs an XOR operation on the root key file file0 using the encryption key key0 to obtain the root key ciphertext FILE0 = file0 ⊕ key0.
[0036] Step 3-3-3: The root key authentication unit calculates the hash value H2'' based on the hardware number No., device identification code ID, random number rand', root key ciphertext FILE0, hash value parameter string str2', and input random number s2' and compares them. If they match, the root key authentication operation passes; otherwise, the root key authentication operation fails.
[0037] The specific process of calculating the hash value H2'' and performing the comparison is as follows:
[0038] The root key authentication unit generates a hash function h based on the hash value parameter string str2' and the input random number s2'. p2’,s2’ Input the device identification code (ID), hardware serial number (No.), random number (rand'), and root key ciphertext (FILE0) into the hash function h. p2’,s2’ Calculate the hash value H2''=h p2’,s2’ (ID, No., rand', FILE0);
[0039] The root key authentication unit compares the hash value H2' obtained from the quantum security device terminal with the calculated hash value H2''. If they match, the authentication operation of the root key authentication unit passes; otherwise, the authentication operation of the root key authentication unit fails.
[0040] As an improvement of the present invention, in steps 3-4, during the process of sending the encryption key key0 to the quantum security device terminal, the transmission of the encryption key key0 is encrypted.
[0041] This invention also provides a system for a quantum-safe device terminal to obtain a preset root key offline, used to execute the method described above for obtaining a preset root key offline. The system includes a root key server, a network communication device, a quantum-safe device terminal, and an intermediate medium connected in sequence. The root key server is used to perform the preset and encrypted distribution of root key files. The network communication device is used to perform data forwarding operations. The quantum-safe device terminal is used to receive the encrypted root key file and perform authentication operations. After successful authentication, it obtains a decryption key to decrypt the file, acquires and stores the root key file. The intermediate medium is used to perform offline distribution and authentication operations.
[0042] The root key server includes: a device registration unit, a root key generation unit, a root key distribution unit, a root key storage unit, and a root key authentication unit. The device registration unit, root key generation unit, root key storage unit, root key authentication unit, and root key distribution unit are sequentially and communicatively connected. The root key storage unit, root key distribution unit, and device registration unit are connected in pairs. The device registration unit, root key distribution unit, and root key authentication unit are respectively connected to external network communication devices and / or intermediate media.
[0043] The device registration unit is used to receive registration applications and first feedback on the completion of root key generation, generate corresponding device identity code ID based on the first feedback, distribute the device identity code ID to the quantum security device terminal via network communication equipment, send the device identity code ID to the root key storage unit, and instruct the root key distribution unit to encrypt the generated root key and distribute it to the quantum security device terminal via an intermediate medium.
[0044] The root key generation unit is used to generate the root key file file0 and the encryption key key0;
[0045] The root key storage unit is used to store the device identification code ID in correspondence with the hardware number No., the root key file file0 and the encryption key key0, and is also used to store the device identification code ID in correspondence with the first hash value H1, the first hash value parameter string str1 and the input random number s1.
[0046] The root key distribution unit is used to encrypt the root key file file0 using the encryption key key0 to obtain the root key ciphertext FILE0, calculate the first hash value H1 of the device identification code ID and hardware number No., record the first hash value parameter string str1 and the input random number s1, send the root key ciphertext FILE0 and the first hash value H1, the first hash value parameter string str1 and the input random number s1 to the intermediate medium; and obtain the encryption key key0 from the root key storage unit and send it to the quantum security device terminal via the network communication device.
[0047] The root key authentication unit is used to perform authentication operations.
[0048] Beneficial effects:
[0049] 1. In this invention, the root key is generated and pre-configured only when the terminal device is formally registered, rather than being generated and stored in batches when the device leaves the factory or is put into storage. This "generate as needed" mode avoids storing a large number of inactive root keys in the root key server for a long time, significantly reducing its memory space occupation and improving the utilization rate of storage resources. At the same time, it also prevents the idleness and waste of key resources, enabling key resources to be dynamically matched with actual business needs, and improving the overall management efficiency and scalability of the root key server.
[0050] 2. In the core distribution process, this invention creatively transmits the device identity code (ID) and root key ciphertext (FILE0) through two physically or logically separate independent paths. Even if one path or intermediate storage medium (such as a USB flash drive or temporary database) is intercepted by an attacker, they can only obtain the encrypted root key ciphertext or the identity-related one-way hash value, and cannot simultaneously obtain the complete device identity plaintext and root key plaintext. This fundamentally eliminates the risk of simultaneous leakage of key and identity information due to a single point of failure in the transmission process. More importantly, before distributing the ciphertext, the root key server will first verify the authentication request from the intermediate medium, ensuring the legitimacy of the distribution operation subject and realizing the security logic of "authentication first, authorized distribution", making the entire distribution process secure and controllable.
[0051] 3. After receiving the root key ciphertext, the quantum-safe device terminal does not decrypt it directly. Instead, it actively initiates a secondary authentication request to the root key server. Only after this authentication is successful can the terminal obtain the decryption key or parameters necessary to decrypt the ciphertext. This step adds a critical security barrier: even if the ciphertext FILE0 is potentially accessed illegally after transmission or storage to the terminal, attackers will still be unable to obtain the "final key" for decryption due to the inability to pass this dynamic authentication. This design achieves "two-factor" security protection (possessing the ciphertext + passing authentication) in the key injection process, greatly enhancing the security of the root key in the final restoration and injection stage on the terminal side, and effectively defending against possible theft or tampering attacks on the terminal side. Attached Figure Description
[0052] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0053] Figure 1 This is a schematic diagram of the connection of the method system of this application;
[0054] Figure 2This is a schematic diagram of the root key server structure in the method system of this application;
[0055] Figure 3 This is a flowchart illustrating the method described in this application. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0057] To address the problems mentioned in the prior art, this invention provides a method and system for offline acquisition of a preset root key by a quantum-safe device terminal. For example... Figure 1 As shown, the system of the present invention includes a root key server, a network communication device, a quantum security device terminal, and an intermediate medium connected in sequence. The root key server is used to perform the pre-setting and encrypted distribution of the root key file; the network communication device is used to perform data forwarding operations, wherein the data includes a registration application, device identification code ID, index idx-rand, second hash value H2, second hash value parameter string str2, input random number s2, encryption key, etc.; the quantum security device terminal is used to receive the encrypted root key file and perform authentication operations, and after successful authentication, obtains the decryption key to decrypt and obtain and store the root key file; the intermediate medium is used to perform offline distribution and authentication operations.
[0058] Among them, such as Figure 2 As shown, the root key server includes a device registration unit, a root key generation unit, a root key distribution unit, a root key storage unit, and a root key authentication unit. The device registration unit, root key generation unit, root key storage unit, root key authentication unit, and root key distribution unit are sequentially and communicatively connected. The root key storage unit, root key distribution unit, and device registration unit are connected in pairs. The device registration unit, root key distribution unit, and root key authentication unit are respectively connected to external network communication devices and / or intermediate media.
[0059] The purpose of each unit is as follows:
[0060] The device registration unit is used to receive registration applications and first feedback on the completion of root key generation, generate corresponding device identity code ID based on the first feedback, distribute the device identity code ID to the quantum security device terminal via network communication equipment, send the device identity code ID to the root key storage unit, and instruct the root key distribution unit of the root key server to encrypt the generated root key and distribute it to the quantum security device terminal via an intermediate medium.
[0061] The root key generation unit is used to generate the root key file file0 and the encryption key key0.
[0062] The root key storage unit is used to store the device identification code ID in correspondence with the hardware number No., the root key file file0 and the encryption key key0, and to store the device identification code ID in correspondence with the first hash value H1, the first hash value parameter string str1 and the input random number s1.
[0063] The root key distribution unit is used to encrypt the root key file file0 using the encryption key key0 to obtain the root key ciphertext FILE0, calculate the first hash value H1 of the device identification code ID and hardware number No., record the first hash value parameter string str1 and the input random number s1, send the root key ciphertext FILE0 and the first hash value H1, the first hash value parameter string str1 and the input random number s1 to the intermediate medium; and obtain the encryption key key0 from the root key storage unit and send it to the quantum security device terminal via the network communication device.
[0064] The root key authentication unit is used to perform authentication operations.
[0065] like Figure 3 As shown, the method of the present invention includes the following steps:
[0066] Step 1: The quantum-safe device terminal initiates a registration request to the root key server via network communication equipment (e.g., routers, gateways, and other communication network elements) based on its own hardware number (e.g., the device hardware number assigned to the quantum-safe device terminal by the manufacturer at the time of manufacture, which should be unique across the entire network). The registration request may include the hardware number (No.) and the required key size (M).
[0067] Step 2: The root key server generates a root key file (file0) for the quantum secure device terminal based on the registration application, encrypts the root key file using the encryption key (key0), and then offline distributes the ciphertext root key (FILE0) to the quantum secure device terminal via an intermediate medium. This offline distribution can be performed using an intermediate medium and offline data copying.
[0068] The specific process of step 2 includes:
[0069] Step 2-1: Based on the registration application, the device registration unit of the root key server records the hardware number No. of the quantum security device terminal, and sends a first instruction to the root key generation unit of the root key server to generate a root key. The first instruction includes the hardware number No. and the required key size M.
[0070] Step 2-2: The root key generation unit responds to the first instruction, generates a root key file file0 and an encryption key key0 based on the hardware number No. in the first instruction, sends the hardware number No., the generated root key file file0, and the encryption key key0 to the root key storage unit of the root key server, and sends a first feedback indicating that root key generation is complete to the device registration unit. The first feedback carries the hardware number No. In the root key server, the root key generation unit may include a quantum random number generator to generate quantum random numbers as the root key file file0 and the encryption key key0. The root key file file0 and the encryption key key0 are generated according to the key size M in the first instruction, and the encryption key key0 is used to encrypt the root key file file0.
[0071] Steps 2-3: Based on the first feedback, the device registration unit generates a corresponding device identification code ID based on the hardware number No. , and distributes the device identification code ID to the quantum security device terminal via network communication equipment, and also sends the device identification code ID to the root key storage unit. The root key storage unit stores the device identification code ID in correspondence with the hardware number No. from step 2-2, the root key file file0, and the encryption key key0. The quantum security device terminal also stores the device identification code ID and the hardware number No. in correspondence.
[0072] Steps 2-4: The device registration unit instructs the root key distribution unit of the root key server to encrypt the generated root key and send it to the quantum security device terminal via an intermediate medium.
[0073] Specifically, the root key distribution unit retrieves the corresponding root key file file0 and encryption key key0 from the root key storage unit based on the hardware number No. in the device registration unit, performs an XOR operation to obtain the encrypted root key ciphertext FILE0 = file0 ⊕ key0; simultaneously, it calculates the first hash value H1 of the device identity code ID and hardware number No., records the first hash value parameter string str1 and the input random number s1, and sends the root key ciphertext FILE0, the first hash value H1, the first hash value parameter string str1 and the input random number s1 to the intermediate medium, which performs the authentication operation. After the authentication operation of the intermediate medium is successful, the root key ciphertext FILE0 is transmitted to the quantum security device terminal offline.
[0074] The specific process of recording the first hash value H1 of the computing device identification code ID and hardware number No., and the first hash value parameter string str1 and input random number s1 includes:
[0075] The specific process of recording the first hash value H1 of the computing device identification code ID and hardware number No., and the first hash value parameter string str1 and input random number s1 includes:
[0076] The root key distribution unit generates an irreducible polynomial p1(x) locally and obtains an input random number s1 from locally. It denotes the string consisting of the coefficients of each term in the irreducible polynomial p1(x) except for the highest term as str1. The root key distribution unit uses the irreducible polynomial p1(x) and the input random number s1 to generate the first hash function h. p1,s1 Input the device identification code (ID) and hardware serial number (No.) into the first hash function h. p1,s1 The first hash value H1=h is obtained. p1,s1 (ID, No.); Record string str1 and input random number s1 as the first hash value parameters. The root key distribution unit sends the first hash value H1, the first hash value parameter string str1 and the input random number s1 to the root key storage unit, and the root key storage unit stores the device identification code ID in correspondence with the first hash value H1, the first hash value parameter string str1 and the input random number s1.
[0077] The specific process by which the intermediate medium performs the authentication operation includes:
[0078] The intermediate medium establishes a connection with the quantum-safe device terminal, obtains the hardware number No. and device identification code ID from the quantum-safe device terminal, calculates the hash value H1'' based on the hash value parameter string str1' sent by the root key distribution unit, the input random number s1', and the hardware number No. and device identification code ID obtained from the quantum-safe device terminal, and compares it with the hash value H1' sent by the root key distribution unit. If they match, the root key ciphertext FILE0 is sent offline to the quantum-safe device terminal.
[0079] The specific process for calculating the hash value H1'' is as follows:
[0080] The intermediate medium generates a hash function h based on the string str1' and the input random number s1'. p1’,s1’ Input the hardware number (No.) and device identification code (ID) into the hash function h. p1’,s1’ Calculate the hash value H1''=h p1’,s1’ (ID, No.);
[0081] If the hash value H1'' obtained by comparing and calculating the intermediate medium matches the hash value H1' obtained by sending, it means that the information to be transmitted in the intermediate medium has not been tampered with, the authentication operation of the intermediate medium is successful, and the root key ciphertext FILE0 can be sent to the quantum security device terminal; otherwise, it means that the data in the intermediate medium has been tampered with during transmission, the authentication operation of the intermediate medium fails, the root key ciphertext FILE0 is unusable and should be discarded.
[0082] In this step, the authentication of the quantum secure device terminal by the intermediate medium is based on two parts: the hardware number (No.) and the device identity code (ID). The device identity code is generated by the root key server based on the registration application of the quantum secure device terminal. Even if a malicious user forges the hardware number (No.) of the quantum secure device terminal, they will not be able to obtain the device identity code issued via the network communication device. The device identity code and the root key ciphertext FILE0 are distributed through two paths. Even if the intermediate medium is intercepted, it will only contain the root key ciphertext and the identity-related hash value, and will not reveal the root key plaintext or the device identity code, thus ensuring the security of the root key in this step.
[0083] Step 3: The quantum-safe device terminal performs an identity authentication operation to obtain the decryption key key0' of the root key ciphertext FILE0'.
[0084] The specific process of step 3 includes:
[0085] Step 3-1: In response to the successful authentication operation of the intermediate medium, the quantum security device terminal obtains a random number rand from the string str1' in the intermediate medium as the factor for this authentication, and records the index idx-rand of the random number rand in the string str1'.
[0086] Step 3-2: The quantum security device terminal calculates the device identity code ID, hardware number No., random number rand, and the second hash value H2 of the root key ciphertext FILE0' locally, records the second hash value parameter string str2 and the input random number s2, and sends the device identity code ID, index idx-rand, second hash value H2, second hash value parameter string str2 and input random number s2 to the root key authentication unit of the root key server via the network communication device;
[0087] The specific process of recording the second hash value parameter string str2 and the input random number s2 of the computing device identification code ID, hardware number No., random number rand, and root key ciphertext FILE0' includes:
[0088] The quantum-safe device terminal generates an irreducible polynomial p2(x) locally and obtains an input random number s2 from the local machine. The string representing the coefficients of each term in the irreducible polynomial p2(x), excluding the highest term, is denoted as str2. The quantum-safe device terminal uses the irreducible polynomial p2(x) and the input random number s2 to generate a second hash function h. p2,s2 Input the device identification code (ID), hardware serial number (No.), random number (rand), and root key ciphertext (FILE0') into the second hash function (h). p2,s2 The second hash value H2 = h is obtained. p2,s2 (ID, No., rand, FILE0'); Record the string str2 and the input random number s2 as the parameters of this second hash value.
[0089] Step 3-3: The root key authentication unit performs the authentication operation:
[0090] Step 3-3-1: The root key authentication unit obtains the corresponding stored input random number s1 from the root key storage unit according to the received device identity code ID', and obtains the random number rand' from the input random number s1 according to the index idx-rand';
[0091] Step 3-3-2: The root key authentication unit obtains the hardware number No., device identification code ID, root key file file0 and encryption key key0 from the root key storage unit based on the received device identification code ID'. It then performs an XOR operation on the root key file file0 using the encryption key key0 to obtain the root key ciphertext FILE0 = file0 ⊕ key0.
[0092] Step 3-3-3: The root key authentication unit calculates the hash value H2'' based on the hardware number No., device identification code ID, random number rand', root key ciphertext FILE0, hash value parameter string str2', and input random number s2' and compares them. If they match, the root key authentication operation passes; otherwise, the root key authentication operation fails.
[0093] The specific process of calculating the hash value H2'' and performing the comparison is as follows:
[0094] The root key authentication unit generates a hash function h based on the hash value parameter string str2' and the input random number s2'. p2’,s2’ Input the device identification code (ID), hardware serial number (No.), random number (rand'), and root key ciphertext (FILE0) into the hash function h. p2’,s2’ Calculate the hash value H2''=h p2’,s2’ (ID, No., rand', FILE0);
[0095] The root key authentication unit compares the hash value H2' obtained from the quantum security device terminal with the calculated hash value H2''. If they match, it means that the information transmitted by the quantum security device terminal has not been tampered with, and the authentication operation of the root key authentication unit is successful; otherwise, it means that the information transmitted by the quantum security device terminal has been tampered with, and the authentication operation of the root key authentication unit is unsuccessful.
[0096] Steps 3-4: In response to the successful authentication by the root key authentication unit, the root key distribution unit obtains the encryption key key0 from the root key storage unit and sends it to the quantum security device terminal via the network communication device.
[0097] The transmission of the encryption key key0 here can be encrypted. The encrypted key can be a pre-agreed first key, or a hash function str2 or s2 that is reused, or a set of keys calculated based on the above parameters according to a pre-agreed algorithm.
[0098] In response to the failure of the root key authentication unit, it is necessary to return to step 2 and re-execute the root key distribution operation.
[0099] Step 4: The quantum-safe device terminal uses the received decryption key key0' to decrypt the root key ciphertext FILE0', obtains the root key file file0 in plaintext state, and stores it locally.
[0100] In summary, this invention, through a multi-layered security design involving on-demand generation, path separation, and dual authentication, forms a tightly linked, defense-in-depth root key security acquisition system. It not only optimizes key resource management but also provides robust protection during the most vulnerable transmission and injection phases of the key lifecycle, ensuring the security, reliability, and controllability of quantum security device terminals throughout the entire network initialization process, thus possessing significant practical application value.
Claims
1. A method for offline acquisition of a preset root key by a quantum-safe device terminal, characterized in that, The participants in the method include quantum-safe device terminals, network communication devices, root key servers, and intermediate media. The method includes the following steps: Step 1: The quantum-safe device terminal initiates a registration application to the root key server via network communication equipment based on its own hardware number No. Step 2: The root key server generates a root key file file0 for the quantum security device terminal based on the registration application, encrypts the root key file file0 using the encryption key key0, and sends the root key ciphertext FILE0 offline to the quantum security device terminal via an intermediate medium. Step 3: The quantum-safe device terminal performs an identity authentication operation to obtain the decryption key key0' of the root key ciphertext FILE0'; Step 4: The quantum-safe device terminal uses the received decryption key key0' to decrypt the root key ciphertext FILE0', obtains the root key file file0 in plaintext state, and stores it locally.
2. The method for offline acquisition of a preset root key by a quantum-safe device terminal according to claim 1, characterized in that, The specific process of step 2 includes: Step 2-1: Based on the registration application, the device registration unit of the root key server records the hardware number No. of the quantum security device terminal, and sends a first instruction to the root key generation unit of the root key server to generate a root key; wherein, the first instruction includes the hardware number No.; Step 2-2: The root key generation unit responds to the first instruction, generates a root key file file0 and an encryption key key0 based on the hardware number No. in the first instruction, sends the hardware number No., the generated root key file file0, and the encryption key key0 to the root key storage unit of the root key server, and sends a first feedback indicating that the root key generation is complete to the device registration unit; the first feedback carries the hardware number No. Steps 2-3: Based on the first feedback, the device registration unit generates a corresponding device identity code ID based on the hardware number No., and sends the device identity code ID to the quantum security device terminal via network communication equipment, and also sends the device identity code ID to the root key storage unit; the root key storage unit stores the device identity code ID in correspondence with the hardware number No., root key file file0, and encryption key key0 from step 2-2; the quantum security device terminal stores the device identity code ID and hardware number No. in correspondence. Steps 2-4: The device registration unit instructs the root key distribution unit of the root key server to encrypt the generated root key and send it to the quantum security device terminal via an intermediate medium.
3. The method for offline acquisition of a preset root key by a quantum-safe device terminal according to claim 2, characterized in that, The specific process of steps 2-4 includes: The root key distribution unit retrieves the corresponding root key file file0 and encryption key key0 from the root key storage unit based on the hardware number No. in the device registration unit, performs an XOR operation to obtain the encrypted root key ciphertext FILE0 = file0 ⊕ key0; simultaneously, it calculates the first hash value H1 of the device identity code ID and hardware number No., records the first hash value parameter string str1 and the input random number s1, and sends the root key ciphertext FILE0, the first hash value H1, the first hash value parameter string str1 and the input random number s1 to the intermediate medium, which performs the authentication operation. After the authentication operation of the intermediate medium is successful, the root key ciphertext FILE0 is transmitted to the quantum security device terminal offline.
4. The method for offline acquisition of a preset root key by a quantum-safe device terminal according to claim 3, characterized in that, The specific process of recording the first hash value H1 of the computing device identification code ID and hardware number No., and the first hash value parameter string str1 and input random number s1 includes: The root key distribution unit generates an irreducible polynomial p1(x) locally and obtains an input random number s1 from locally. It denotes the string consisting of the coefficients of each term in the irreducible polynomial p1(x) except for the highest term as str1. The root key distribution unit uses the irreducible polynomial p1(x) and the input random number s1 to generate the first hash function h. p1,s1 Input the device identification code (ID) and hardware serial number (No.) into the first hash function h. p1,s1 The first hash value H1=h is obtained. p1,s1 (ID, No.); Records the string str1 and the input random number s1 as the first hash value parameter; The root key distribution unit sends the first hash value H1, the first hash value parameter string str1, and the input random number s1 to the root key storage unit. The root key storage unit stores the device identification code ID in correspondence with the first hash value H1, the first hash value parameter string str1, and the input random number s1.
5. The method for offline acquisition of a preset root key by a quantum-safe device terminal according to claim 3 or 4, characterized in that, The specific process by which the intermediate medium performs the authentication operation includes: An intermediate medium establishes a connection with the quantum-safe device terminal, obtains the hardware number No. and device identification code ID from the quantum-safe device terminal, calculates a hash value H1'' based on the hash value parameter string str1' sent by the root key distribution unit, the input random number s1', and the hardware number No. and device identification code ID obtained from the quantum-safe device terminal, and compares it with the hash value H1' sent by the root key distribution unit. If they match, the authentication operation of the intermediate medium is successful, and the root key ciphertext FILE0 is sent offline to the quantum-safe device terminal; otherwise, the authentication operation of the intermediate medium fails, and the root key ciphertext FILE0 is discarded. The specific process for calculating the hash value H1'' is as follows: The intermediate medium generates a hash function h based on the string str1' and the input random number s1'. p1’,s1’ Input the hardware number (No.) and device identification code (ID) into the hash function h. p1’,s1’ Calculate the hash value H1''=h p1’,s1’ (ID, No.).
6. The method for offline acquisition of a preset root key by a quantum-safe device terminal according to claim 3, characterized in that, The specific process of step 3 includes: Step 3-1: In response to the successful authentication operation of the intermediate medium, the quantum security device terminal obtains the string str1' from the intermediate medium, obtains a random number rand from the string str1' as the factor for this authentication, and records the index idx-rand of the random number rand in the string str1'; Step 3-2: The quantum security device terminal calculates the device identity code ID, hardware number No., random number rand, and the second hash value H2 of the root key ciphertext FILE0' locally, records the second hash value parameter string str2 and the input random number s2, and sends the device identity code ID, index idx-rand, second hash value H2, second hash value parameter string str2 and input random number s2 to the root key authentication unit of the root key server via the network communication device; Step 3-3: The root key authentication unit performs the authentication operation; Steps 3-4: In response to the successful authentication operation of the root key authentication unit, the root key distribution unit obtains the encryption key key0 from the root key storage unit and sends the encryption key key0 to the quantum security device terminal via the network communication device; in response to the unsuccessful authentication operation of the root key authentication unit, the process returns to step 2 to re-execute the root key distribution operation.
7. The method for offline acquisition of a preset root key by a quantum-safe device terminal according to claim 6, characterized in that, In step 3-2, the specific process of recording the second hash value parameter string str2 and the input random number s2 of the computing device identification code ID, hardware number No., random number rand, and the second hash value H2 of the root key ciphertext FILE0' includes: The quantum-safe device terminal generates an irreducible polynomial p2(x) locally and obtains an input random number s2 from the local machine. The string representing the coefficients of each term in the irreducible polynomial p2(x), excluding the highest term, is denoted as str2. The quantum-safe device terminal uses the irreducible polynomial p2(x) and the input random number s2 to generate a second hash function h. p2,s2 Input the device identification code (ID), hardware serial number (No.), random number (rand), and root key ciphertext (FILE0') into the second hash function (h). p2,s2 The second hash value H2 = h is obtained. p2,s2 (ID, No., rand, FILE0'); Records the string str2 and the input random number s2 as the second hash value parameter.
8. The method for offline acquisition of a preset root key by a quantum-safe device terminal according to claim 9, characterized in that, The specific process of step 3-3 includes: Step 3-3-1: The root key authentication unit obtains the corresponding stored input random number s1 from the root key storage unit according to the received device identity code ID', and obtains the random number rand' from the input random number s1 according to the index idx-rand'; Step 3-3-2: The root key authentication unit obtains the hardware number No., device identification code ID, root key file file0 and encryption key key0 from the root key storage unit based on the received device identification code ID'. It then performs an XOR operation on the root key file file0 using the encryption key key0 to obtain the root key ciphertext FILE0 = file0 ⊕ key0. Step 3-3-3: The root key authentication unit calculates the hash value H2'' based on the hardware number No., device identification code ID, random number rand', root key ciphertext FILE0, hash value parameter string str2', and input random number s2' and compares them. If they match, the root key authentication operation passes; otherwise, the root key authentication operation fails. The specific process of calculating the hash value H2'' and performing the comparison is as follows: The root key authentication unit generates a hash function h based on the hash value parameter string str2' and the input random number s2'. p2’,s2’ Input the device identification code (ID), hardware serial number (No.), random number (rand'), and root key ciphertext (FILE0) into the hash function h. p2’,s2’ Calculate the hash value H2''=h p2’,s2’ (ID, No., rand', FILE0); The root key authentication unit compares the hash value H2' obtained from the quantum security device terminal with the calculated hash value H2''. If they match, the authentication operation of the root key authentication unit passes; otherwise, the authentication operation of the root key authentication unit fails.
9. The method for offline acquisition of a preset root key by a quantum-safe device terminal according to claim 6, characterized in that, In steps 3-4, during the process of sending the encryption key key0 to the quantum security device terminal, the transmission of the encryption key key0 is encrypted.
10. A system for offline acquisition of a preset root key by a quantum-safe device terminal, used to execute the method for offline acquisition of a preset root key by a quantum-safe device terminal according to any one of claims 1 to 9, characterized in that, The system includes a root key server, a network communication device, a quantum security device terminal, and an intermediate medium connected in sequence; the root key server is used to perform the preset and encrypted distribution of root key files; the network communication device is used to perform data forwarding operations; The quantum-safe device terminal is used to receive the encrypted root key file and perform authentication operations. After successful authentication, it obtains the decryption key to decrypt the root key file and stores it. The intermediate medium is used to perform offline distribution and authentication operations; The root key server includes: a device registration unit, a root key generation unit, a root key distribution unit, a root key storage unit, and a root key authentication unit. The device registration unit, root key generation unit, root key storage unit, root key authentication unit, and root key distribution unit are sequentially and communicatively connected. The root key storage unit, root key distribution unit, and device registration unit are connected in pairs. The device registration unit, root key distribution unit, and root key authentication unit are respectively connected to external network communication devices and / or intermediate media. The device registration unit is used to receive registration applications and first feedback on the completion of root key generation, generate corresponding device identity code ID based on the first feedback, distribute the device identity code ID to the quantum security device terminal via network communication equipment, send the device identity code ID to the root key storage unit, and instruct the root key distribution unit to encrypt the generated root key and distribute it to the quantum security device terminal via an intermediate medium. The root key generation unit is used to generate the root key file file0 and the encryption key key0; The root key storage unit is used to store the device identification code ID in correspondence with the hardware number No., the root key file file0 and the encryption key key0, and is also used to store the device identification code ID in correspondence with the first hash value H1, the first hash value parameter string str1 and the input random number s1. The root key distribution unit is used to encrypt the root key file file0 using the encryption key key0 to obtain the root key ciphertext FILE0, calculate the first hash value H1 of the device identification code ID and hardware number No., record the first hash value parameter string str1 and the input random number s1, send the root key ciphertext FILE0 and the first hash value H1, the first hash value parameter string str1 and the input random number s1 to the intermediate medium; and obtain the encryption key key0 from the root key storage unit and send it to the quantum security device terminal via the network communication device. The root key authentication unit is used to perform authentication operations.