Root key acquisition method and device, and storage medium

By generating a root key file corresponding to the hardware encoding ID in the root key center and performing data authentication and authentication processes, the problems of low root key distribution efficiency and security risks are solved, and efficient and secure key transmission and storage are achieved.

CN121907458APending Publication Date: 2026-04-21MATRICTIME DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

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-04-21

AI Technical Summary

Technical Problem

In existing technical solutions, the distribution of root keys is inefficient and costly, making it difficult to adapt to the large-scale production and deployment of massive devices. Furthermore, there are security risks during key transmission and issues with the lack of integrated device identity binding.

Method used

The quantum-safe device terminal registers with the root key center, generates a root key file corresponding to the hardware encoding ID, and performs data authentication and authentication processes to ensure key uniqueness and device association. It uses random numbers and irreducible polynomial hash functions for encryption and authentication to achieve secure key transmission and storage.

Benefits of technology

It ensures the uniqueness of the root key and its association with the device, prevents the key from being illegally copied or misused, improves the integrity and trustworthiness of key distribution, and enhances the security level of key storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121907458A_ABST
    Figure CN121907458A_ABST
Patent Text Reader

Abstract

The invention discloses a root key acquisition method and device, and a storage medium. The method comprises the following steps: a quantum security device terminal initiates a registration request to a root key center; the root key center locally generates a root key file corresponding to the hardware code ID, generates a root key issuing file DOC based on the root key file, and sends the root key issuing file DOC to the quantum security equipment terminal; the quantum security device terminal receives the root key issuing file DOC and performs data authentication, after the data authentication is passed, the quantum security device terminal generates a root key authentication request and initiates root key authentication to the root key center, and after the root key authentication is passed, the quantum security device terminal persistently stores the root key. According to the method, the hardware code ID of the quantum security equipment terminal is bound with the root key, and the corresponding root key file is locally generated in the root key center, so that the uniqueness of the root key and the equipment relevance are ensured from the source, and the key is effectively prevented from being illegally copied or falsely used.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of key technology, and specifically to a root key acquisition method, device, and storage medium. Background Technology

[0002] With the rapid development of quantum technology, traditional cryptographic systems face severe challenges. To address potential future quantum computing attacks, building quantum-secure networks based on technologies such as quantum key distribution has become an important development direction in the field of cybersecurity. In such networks, ensuring secure and reliable access to the network for terminal devices is a fundamental prerequisite for system construction. Currently, a typical solution is to introduce a trusted root key center, which generates an initial root key for each quantum-secure terminal device.

[0003] When a quantum-safe device terminal attempts to access a quantum-safe network for the first time, the authentication unit will use the root key to securely authenticate the device's unique identity, thereby establishing an initial trust chain and laying the foundation for subsequent processes such as quantum key negotiation and secure communication.

[0004] However, a fundamental core challenge remains: how can the root key center securely, reliably, and efficiently distribute the initial root key to each quantum-safe device terminal? This distribution is not simply key transmission, but a complete process encompassing key generation, injection, storage, transmission, and secure storage at the device terminal.

[0005] Existing technical solutions have the following limitations and risks: First, traditional key distribution methods based on manual or offline media (such as using smart cards or delivery by dedicated personnel) are inefficient, costly, and difficult to adapt to the needs of large-scale production and deployment of massive devices. Furthermore, physical media are susceptible to loss, theft, or duplication during transmission, and their security heavily relies on the reliability of personnel management and logistics, making it difficult to achieve truly controllable security. Second, if an online pre-distribution method is adopted, i.e., remotely injecting the root key into devices via the network on the production line, it faces the threat of eavesdropping or man-in-the-middle attacks during network transmission. Existing solutions also lack an effective mechanism for integrated secure binding of device identity, root key, and device hardware information. This could lead to keys being cloned to unauthorized devices or devices being maliciously replaced during logistics, thus failing to truly achieve the goal of strong identity authentication with "one key per device."

[0006] In summary, designing an initial root key distribution mechanism that is suitable for large-scale deployment and ensures security and reliability throughout the entire process from the root key center to the terminal device has become a key bottleneck restricting the implementation and large-scale application of this technology. Summary of the Invention

[0007] Purpose of the Invention: The purpose of this invention is to provide a root key acquisition method, device, and storage medium, which solves the problems of low efficiency, high cost, and inability to meet the needs of large-scale production and deployment of massive devices in existing technical solutions. The generation, distribution, authentication, and storage process of the root key in this invention is clear and controllable, and each link has a clear verification mechanism, which facilitates the security and controllability of the root key and provides complete technical support for root key lifecycle management.

[0008] Technical solution: The present invention provides a root key acquisition method, the method comprising the following steps:

[0009] (1) The quantum-safe device terminal initiates a registration request to the root key center. The registration request includes the hardware code ID of the quantum-safe device terminal and the requested root key size.

[0010] (2) The root key center generates a root key file file corresponding to the hardware code ID locally, and generates a root key distribution file DOC based on the root key file file and sends it to the quantum security device terminal;

[0011] (3) The quantum security device terminal receives the root key distribution file DOC and performs data authentication. After the data authentication is successful, the quantum security device terminal generates a root key authentication request and initiates root key authentication to the root key center. After the root key authentication is successful, the quantum security device terminal persistently stores the root key.

[0012] Furthermore, the generation of the root key file corresponding to the hardware code ID refers to:

[0013] 1) The root key center generates a root key of size A and four random numbers: Kr1, Er1, Er2, and Er3, based on the root key size A in the registration request;

[0014] 2) Concatenate the root key key and each random number Kr1, Er1, Er2, Er3 to obtain the root key file file;

[0015] 3) Then associate and store the locally stored hardware code ID with the root key file file.

[0016] Furthermore, the specific process of generating the root key distribution file (DOC) based on the root key file (file) and sending it to the quantum security device terminal is as follows:

[0017] A1: The root key center generates a random number Kr2. The length of random number Kr2 is the same as the length of random number Kr1. Then, Kr2||Kr1 is concatenated to form the key seed.

[0018] A2: Next, using the expansion algorithm, the key seed is expanded into a key fileseed of length A;

[0019] A3: The root key center uses the key fileseed to encrypt the root key key to obtain the ciphertext KEY = fileseed ⊕ key. Then, it generates a first hash function to perform a hash calculation on the ciphertext KEY to obtain a first hash value h(KEY), and generates a second hash function to perform a hash calculation on the root key key to obtain a second hash value h(key). Among them, the string consisting of the coefficients of each term except the highest term of the irreducible polynomial P1 used to generate the first hash function is denoted as str1 and the input random number is denoted as s1. The string consisting of the coefficients of each term except the highest term of the irreducible polynomial P2 used to generate the second hash function is denoted as str2 and the input random number is denoted as s2.

[0020] A4: The root key center then uses Er1 to encrypt [h(KEY), str1, s1, Kr1, Er2, Er3] to obtain the parameter ciphertext PARA=Er1⊕[h(KEY), str1, s1, Kr1, Er2, Er3]; the root key center uses the ciphertext KEY, the parameter ciphertext PARA and the random number Er1 to generate the root key distribution file DOC=(KEY, PARA, Er1), and sends the root key distribution file DOC to the quantum security device terminal.

[0021] Furthermore, the data authentication refers to:

[0022] After receiving the root key distribution file DOC, the quantum security device terminal uses the random number Er1 in the root key distribution file DOC to decrypt the parameter ciphertext PARA to obtain the parameters h (KEY), str1, s1, Kr1, Er2, Er3;

[0023] Then, the quantum-safe device terminal generates an irreducible polynomial p1 with a coefficient of 1 for the highest term, based on the coefficients of each term of the polynomial corresponding to each term of the string str1, excluding the highest term. It then uses the irreducible polynomial p1 and the input random number s1 to generate a hash function H. p1,s1 Next, using the hash function H p1,s1 The hash value of the ciphertext KEY in the root key distribution file DOC is calculated to obtain the third hash value h(KEY)'. The parameter h(KEY) obtained by decryption is compared with the third hash value h(KEY)'. If they match, the data authentication is successful and the next step is performed; otherwise, the data authentication fails and the root key center resends the root key distribution file DOC to the quantum security device terminal.

[0024] Furthermore, the specific process by which the quantum-secure device terminal generates a root key authentication request and initiates root key authentication with the root key center is as follows:

[0025] B1: The quantum-safe device terminal uses the decrypted parameter Er2 to encrypt its hardware code ID to obtain ID⊕Er2, and then generates a root key authentication request and sends it to the root key center. The root key authentication request includes ID⊕Er2.

[0026] B2: The root key center obtains a random number Er2 from its local machine to decrypt ID⊕Er2 in the root key authentication request to obtain ID'. It compares the decrypted ID' with the locally stored hardware code ID. If they match, it uses a random number Er3 to encrypt a random number Kr2, a second hash value h (key), a string str2, and an input random number s2 to obtain ciphertext M=[Kr2, h (key), str2, s2]⊕ER3, and sends the ciphertext M back to the quantum security device terminal. If they do not match, it notifies the quantum security device terminal to re-initiate the root key authentication request.

[0027] B3: The quantum-safe device terminal uses the decrypted parameter Er3 to decrypt the ciphertext M to obtain parameters Kr2, h (key), str2, and s2; it concatenates the decrypted parameters Kr2 and Kr1 into Kr2||Kr1 as the key seed seed'; then, it uses an expansion algorithm to expand the key seed seed' into a key fileseed' of length A;

[0028] The quantum-safe device terminal uses the key fileseed' to decrypt the ciphertext KEY in the root key distribution file DOC to obtain the root key key'; then, based on the coefficients of each term of the polynomial corresponding to each term of the string str2 (excluding the highest term), it generates an irreducible polynomial p2 with a highest term coefficient of 1. The irreducible polynomial p2 and the input random number s2 are then used to generate a hash function H. p2,s2 Next, using the hash function H p2,s2 The hash value of the root key key' is calculated to obtain the fourth hash value h(key)'. The parameter h(key) obtained from decryption is compared with the fourth hash value h(key)'. If they match, the root key authentication is successful, and the quantum security device terminal persistently stores the root key key'; otherwise, the root key authentication fails, and the quantum security device terminal re-initiates the root key authentication request.

[0029] Furthermore, the root key center is provided with an association table, which is used to associate the locally stored hardware code ID with the root key file and store it in the table.

[0030] The present invention also includes a computer device comprising at least a processor and a memory, the processor being configured to execute a computer program stored in the memory to implement the root key acquisition method as described in any of the preceding claims.

[0031] The present invention also includes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the root key acquisition method as described in any of the preceding claims.

[0032] The beneficial effects of this invention are:

[0033] (1) By binding the hardware code ID of the quantum security device terminal with the root key and generating the corresponding root key file locally in the root key center, the uniqueness of the root key and the device association are ensured from the source, effectively preventing the key from being illegally copied or misused.

[0034] (2) The root key is distributed in the form of a file. The quantum security device terminal performs data authentication on the received root key distribution file to ensure that the key is not tampered with during transmission, thereby improving the integrity and reliability of key distribution. After the data authentication is passed, the root key authentication process is further initiated to realize the dual verification of the source and legitimacy of the root key. Only when all authentications are passed is the root key persistently stored in the terminal, which greatly improves the security level of key storage.

[0035] (3) By generating a random number Kr2 in real time when generating the root key distribution file, it is ensured that the random number is only valid for generating the root key distribution file and the authentication request subsequently initiated by the terminal. This achieves the one-time use characteristic of the random number Kr2, effectively avoiding potential security risks caused by random number duplication or leakage, and ensuring the security of the root key. Attached Figure Description

[0036] Figure 1 This is a flowchart illustrating the root key acquisition method of the present invention;

[0037] Figure 2 This is a schematic diagram of the correlation table of the present invention. Detailed Implementation

[0038] The present invention will be further described below with reference to the accompanying drawings and embodiments:

[0039] Existing schemes for distributing root keys to quantum-safe devices suffer from several drawbacks. Traditional key distribution methods based on manual or offline media are inefficient, costly, and ill-suited for the large-scale production and deployment of massive numbers of devices. Furthermore, the physical medium is susceptible to loss, theft, or duplication during transmission, making security heavily reliant on the reliability of personnel management and logistics, hindering secure control. Secondly, online pre-distribution methods, where root keys are remotely injected into devices via the network on the production line, are vulnerable to eavesdropping or man-in-the-middle attacks during network transmission. Moreover, existing schemes lack an effective mechanism for integrated secure binding of device identity, root key, and device hardware information. Therefore, designing an initial root key distribution mechanism suitable for large-scale deployment and ensuring secure and reliable distribution from the root key center to the terminal device has become a key bottleneck restricting the practical application and large-scale deployment of this technology.

[0040] In view of this, this embodiment proposes a root key acquisition method, such as... Figure 1 As shown, the method includes the following steps:

[0041] (1) The quantum-safe device terminal initiates a registration request to the root key center. The registration request includes the hardware code ID of the quantum-safe device terminal and the requested root key size.

[0042] (2) The root key center generates a root key file (file) corresponding to the hardware code ID locally, specifically:

[0043] 1) The root key center generates a root key of size A and four random numbers: Kr1, Er1, Er2, and Er3, based on the root key size A in the registration request;

[0044] 2) Concatenate the root key key and each random number Kr1, Er1, Er2, Er3 to obtain the root key file file;

[0045] 3) Then associate and store the locally stored hardware code ID with the root key file file.

[0046] At this time, as Figure 2 As shown, the root key center can have an association table. This table is used to associate locally stored hardware code IDs with root key files and store them in the table. Since the root key center may serve multiple quantum security device terminals simultaneously, multiple processes may be executing the above steps synchronously. Accordingly, the root key center will generate root key files for different hardware code IDs. Therefore, it is necessary to associate and store the corresponding hardware code IDs with root key files locally.

[0047] Then, based on the root key file, a root key distribution file (DOC) is generated and sent to the quantum security device terminal. The specific process is as follows:

[0048] A1: The root key center generates another random number Kr2, with the same length as random number Kr1, i.e., L(Kr1) = L(Kr2). Then, Kr2||Kr1 is concatenated to form the key seed. Here, the random number Kr2 is generated in real time in response to the instruction to generate the root key distribution file. Unlike the random number generated with the root key in the above steps, which is an unchanging random number corresponding to the key, the random number Kr2 is generated in real time and is only valid for generating the root key distribution file and subsequent terminal authentication requests. This achieves the one-time use characteristic of the random number Kr2, effectively avoiding potential security risks caused by random number duplication or leakage, and ensuring the security of the root key.

[0049] A2: Next, using the expansion algorithm, the key seed is expanded into a key fileseed of length A;

[0050] A3: The root key center uses the key fileseed to encrypt the root key key to obtain the ciphertext KEY = fileseed ⊕ key. Then, it generates a first hash function to perform a hash calculation on the ciphertext KEY to obtain a first hash value h(KEY), and generates a second hash function to perform a hash calculation on the root key key to obtain a second hash value h(key). Among them, the string consisting of the coefficients of each term except the highest term of the irreducible polynomial P1 used to generate the first hash function is denoted as str1 and the input random number is denoted as s1. The string consisting of the coefficients of each term except the highest term of the irreducible polynomial P2 used to generate the second hash function is denoted as str2 and the input random number is denoted as s2.

[0051] A4: The root key center then uses Er1 to encrypt [h(KEY), str1, s1, Kr1, Er2, Er3] to obtain the parameter ciphertext PARA=Er1⊕[h(KEY), str1, s1, Kr1, Er2, Er3]; the root key center uses the ciphertext KEY, the parameter ciphertext PARA and the random number Er1 to generate the root key distribution file DOC=(KEY, PARA, Er1), and sends the root key distribution file DOC to the quantum security device terminal according to its locally stored hardware encoding ID. It should be noted that the root key distribution file DOC is sent to the quantum security device terminal through a trusted channel.

[0052] (3) The quantum security device terminal receives the root key distribution file DOC and performs data authentication. Specifically, after receiving the root key distribution file DOC, the quantum security device terminal uses the random number Er1 in the root key distribution file DOC to decrypt the parameter ciphertext PARA to obtain the parameters h(KEY), str1, s1, Kr1, Er2, Er3.

[0053] Then, the quantum-safe device terminal generates an irreducible polynomial p1 with a coefficient of 1 for the highest term, based on the coefficients of each term of the polynomial corresponding to each term of the string str1, excluding the highest term. It then uses the irreducible polynomial p1 and the input random number s1 to generate a hash function H. p1,s1 Next, using the hash function H p1,s1 The hash value of the ciphertext KEY in the root key distribution file DOC is calculated to obtain a third hash value h(KEY)'. The decrypted parameter h(KEY) is compared with the third hash value h(KEY). If they match, the data authentication is successful, and the next step is performed; otherwise, the data authentication fails, and the root key center resends the root key distribution file DOC to the quantum security device terminal. This step authenticates h(KEY) to ensure that the ciphertext KEY has not been tampered with during transmission. At this point, the root key ciphertext KEY is in a ciphertext state and cannot be used yet. The terminal needs to authenticate with the root key center again to decrypt the ciphertext.

[0054] After data authentication is successful, the quantum secure device terminal generates a root key authentication request and initiates root key authentication with the root key center. Once root key authentication is successful, the quantum secure device terminal persistently stores the root key. The specific process of the quantum secure device terminal generating the root key authentication request and initiating root key authentication with the root key center is as follows:

[0055] B1: The quantum-safe device terminal uses the decrypted parameter Er2 to encrypt its hardware code ID to obtain ID⊕Er2, and then generates a root key authentication request and sends it to the root key center. The root key authentication request includes ID⊕Er2.

[0056] B2: The root key center obtains a random number Er2 from its local machine to decrypt ID⊕Er2 in the root key authentication request to obtain ID'. It compares the decrypted ID' with the locally stored hardware code ID. If they match, it uses a random number Er3 to encrypt a random number Kr2, a second hash value h (key), a string str2, and an input random number s2 to obtain ciphertext M=[Kr2, h (key), str2, s2]⊕ER3, and sends the ciphertext M back to the quantum security device terminal. If they do not match, it notifies the quantum security device terminal to re-initiate the root key authentication request.

[0057] B3: The quantum-safe device terminal uses the decrypted parameter Er3 to decrypt the ciphertext M to obtain parameters Kr2, h(key), str2, and s2; it concatenates the decrypted parameters Kr2 and Kr1 into Kr2||Kr1 as the key seed seed'; then, using the same expansion algorithm as the root key center, it expands the key seed seed' into a key fileseed' of length A;

[0058] The quantum-safe device terminal uses the key fileseed' to decrypt the ciphertext KEY in the root key distribution file DOC to obtain the root key key'; then, based on the coefficients of each term of the polynomial corresponding to each term of the string str2 (excluding the highest term), it generates an irreducible polynomial p2 with a highest term coefficient of 1. The irreducible polynomial p2 and the input random number s2 are then used to generate a hash function H. p2,s2 Next, using the hash function H p2,s2 The hash value of the root key key' is calculated to obtain the fourth hash value h(key)'. The parameter h(key) obtained from decryption is compared with the fourth hash value h(key)'. If they match, the root key authentication is successful, and the quantum security device terminal persistently stores the root key key'; otherwise, the root key authentication fails, and the quantum security device terminal re-initiates the root key authentication request.

[0059] This invention binds the hardware code ID of the quantum security device terminal to the root key and generates the corresponding root key file locally at the root key center. This ensures the uniqueness of the root key and its association with the device from the source, effectively preventing the key from being illegally copied or misused. Moreover, the root key is distributed in file form, and the quantum security device terminal performs data authentication on the received root key distribution file to ensure that the key has not been tampered with during transmission, thus improving the integrity and reliability of key distribution. After the data authentication is successful, a root key authentication process is further initiated to achieve dual verification of the source and legitimacy of the root key. Only when all authentications are successful is the root key persistently stored on the terminal, significantly improving the security level of key storage.

[0060] This invention also provides a computer device, which includes at least a processor and a memory. The memory stores a computer program, and the processor executes the computer program stored in the memory to implement the steps in the root key acquisition method of this invention.

[0061] This invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the root key acquisition method of this invention.

Claims

1. A method for obtaining a root key, characterized in that, The method includes the following steps: (1) The quantum-safe device terminal initiates a registration request to the root key center. The registration request includes the hardware code ID of the quantum-safe device terminal and the requested root key size. (2) The root key center generates a root key file file corresponding to the hardware code ID locally, and generates a root key distribution file DOC based on the root key file file and sends it to the quantum security device terminal; (3) The quantum security device terminal receives the root key distribution file DOC and performs data authentication. After the data authentication is successful, the quantum security device terminal generates a root key authentication request and initiates root key authentication to the root key center. After the root key authentication is successful, the quantum security device terminal persistently stores the root key.

2. The root key acquisition method according to claim 1, characterized in that: The term "generating the root key file corresponding to the hardware code ID" refers to: 1) The root key center generates a root key of size A and four random numbers: Kr1, Er1, Er2, and Er3, based on the root key size A in the registration request; 2) Concatenate the root key key and each random number Kr1, Er1, Er2, Er3 to obtain the root key file file; 3) Then associate and store the locally stored hardware code ID with the root key file file.

3. The root key acquisition method according to claim 2, characterized in that: The specific process of generating a root key distribution file (DOC) based on the root key file (file) and sending it to the quantum security device terminal is as follows: A1: The root key center generates a random number Kr2. The length of random number Kr2 is the same as the length of random number Kr1. Then, Kr2||Kr1 is concatenated to form the key seed. A2: Next, using the expansion algorithm, the key seed is expanded into a key fileseed of length A; A3: The root key center uses the key fileseed to encrypt the root key key to obtain the ciphertext KEY = fileseed ⊕ key. Then, it generates a first hash function to perform a hash calculation on the ciphertext KEY to obtain a first hash value h(KEY), and generates a second hash function to perform a hash calculation on the root key key to obtain a second hash value h(key). Among them, the string consisting of the coefficients of each term except the highest term of the irreducible polynomial P1 used to generate the first hash function is denoted as str1 and the input random number is denoted as s1. The string consisting of the coefficients of each term except the highest term of the irreducible polynomial P2 used to generate the second hash function is denoted as str2 and the input random number is denoted as s2. A4: The root key center then uses Er1 to encrypt [h(KEY), str1, s1, Kr1, Er2, Er3] to obtain the parameter ciphertext PARA=Er1⊕[h(KEY), str1, s1, Kr1, Er2, Er3]; the root key center uses the ciphertext KEY, the parameter ciphertext PARA and the random number Er1 to generate the root key distribution file DOC=(KEY, PARA, Er1), and sends the root key distribution file DOC to the quantum security device terminal.

4. The root key acquisition method according to claim 3, characterized in that: The data authentication refers to: After receiving the root key distribution file DOC, the quantum security device terminal uses the random number Er1 in the root key distribution file DOC to decrypt the parameter ciphertext PARA to obtain the parameters h(KEY), str1, s1, Kr1, Er2, Er3; Then, the quantum-safe device terminal generates an irreducible polynomial p1 with a coefficient of 1 for the highest term, based on the coefficients of each term of the polynomial corresponding to each term of the string str1, excluding the highest term. It then uses the irreducible polynomial p1 and the input random number s1 to generate a hash function H. p1,s1 Next, using the hash function H p1,s1 The hash value of the ciphertext KEY in the root key distribution file DOC is calculated to obtain the third hash value h(KEY)'. The parameter h(KEY) obtained by decryption is compared with the third hash value h(KEY)'. If they match, the data authentication is successful and the next step is performed; otherwise, the data authentication fails and the root key center resends the root key distribution file DOC to the quantum security device terminal.

5. The root key acquisition method according to claim 4, characterized in that: The specific process by which the quantum-secure device terminal generates a root key authentication request and initiates root key authentication with the root key center is as follows: B1: The quantum-safe device terminal uses the decrypted parameter Er2 to encrypt its hardware code ID to obtain ID⊕Er2, and then generates a root key authentication request and sends it to the root key center. The root key authentication request includes ID⊕Er2. B2: The root key center obtains a random number Er2 from its local machine to decrypt ID⊕Er2 in the root key authentication request to obtain ID'. It compares the decrypted ID' with the locally stored hardware code ID. If they match, it uses a random number Er3 to encrypt a random number Kr2, a second hash value h (key), a string str2, and an input random number s2 to obtain ciphertext M=[Kr2, h (key), str2, s2]⊕ER3, and sends the ciphertext M back to the quantum security device terminal. If they do not match, it notifies the quantum security device terminal to re-initiate the root key authentication request. B3: The quantum-safe device terminal uses the decrypted parameter Er3 to decrypt the ciphertext M to obtain parameters Kr2, h (key), str2, and s2; it concatenates the decrypted parameters Kr2 and Kr1 into Kr2||Kr1 as the key seed seed'; then, it uses an expansion algorithm to expand the key seed seed' into a key fileseed' of length A. The quantum-safe device terminal uses the key fileseed' to decrypt the ciphertext KEY in the root key distribution file DOC to obtain the root key key'; then, based on the coefficients of each term of the polynomial corresponding to each term of the string str2 (excluding the highest term), it generates an irreducible polynomial p2 with a highest term coefficient of 1. The irreducible polynomial p2 and the input random number s2 are then used to generate a hash function H. p2,s2 Next, using the hash function H p2,s2 The hash value of the root key key' is calculated to obtain the fourth hash value h(key)'. The parameter h(key) obtained from decryption is compared with the fourth hash value h(key)'. If they match, the root key authentication is successful, and the quantum security device terminal persistently stores the root key key'; otherwise, the root key authentication fails, and the quantum security device terminal re-initiates the root key authentication request.

6. The root key acquisition method according to claim 2, characterized in that: The root key center has an association table, which is used to associate locally stored hardware code IDs with root key files and store them in the table.

7. A computer device, characterized in that: The computer device includes at least a processor and a memory, wherein the processor is used to implement the root key acquisition method as described in any one of claims 1-6 when executing a computer program stored in the memory.

8. A computer-readable storage medium, characterized in that: It stores a computer program that, when executed by a processor, implements the root key acquisition method as described in any one of claims 1-6.