A quantum secure root key access method and system

By pre-allocating multiple sets of root keys to the terminal and using hash calculation for authentication, the quantum-safe method simplifies the root key access process, solves the network instability problem caused by complex interactions in existing technologies, improves the access success rate and system efficiency, and realizes quantum-safe terminal device access.

CN122457249APending Publication Date: 2026-07-24MATRICTIME DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610629600.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-09
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

In existing technologies, the terminal root key access process is complex, relies on multiple interactions leading to network quality instability, increases system resource consumption and development difficulty, and makes it difficult to maintain efficient and secure access in wireless networks.

Method used

A quantum-safe root key access method is adopted, which pre-allocates multiple sets of root key plaintext and ciphertext to the terminal, constructs a solidified file, and uses hash calculation and irreducible polynomial to generate hash values ​​for authentication, simplifying the interaction process and improving fault tolerance and security.

Benefits of technology

It significantly improves the success rate of root key access, reduces the number of interactive messages, reduces dependence on network transmission, enhances system operating efficiency and security, resists quantum computing attacks, and ensures normal online operation of terminal devices and business continuity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122457249A_ABST
    Figure CN122457249A_ABST
Patent Text Reader

Abstract

The application discloses a kind of quantum security root key access method and system, the method comprises: terminal sends equipment code to root key center and control center via aggregation security gateway, root key center allocates n groups of root key plaintext and corresponding root key ciphertext for the equipment code of terminal, constructs solidification file, and is stored in local correspondence;Control center allocates network access code for equipment code, and is stored in local correspondence;Terminal obtains a group of root key ciphertext and its child solidification file;Terminal is requested to execute root key access authentication operation to root key center, respectively via aggregation security gateway to the group of root key ciphertext, to control center and executes the matching operation of network access code, when root key access authentication operation and the matching operation of network access code are all passed, aggregation security gateway obtains corresponding group of root key plaintext from root key center, obtains network access code from control center, and informs terminal to obtain and store the group of root key plaintext.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication security and key management technology, and in particular to a quantum-secure root key access method and system. Background Technology

[0002] In the fields of communication networks and information security, terminal devices typically require authentication and key negotiation when accessing a system. The root key, as the core secret and anchor of trust between the terminal and the network, is fundamental to the secure and efficient access of subsequent session key derivation, data encryption, and integrity protection. Especially in large-scale terminal deployment scenarios such as the Internet of Things (IoT), connected vehicles, and industrial control, the correct distribution and storage of the root key directly affects the security and availability of the entire system.

[0003] Currently, the process of accessing the terminal root key generally employs a complex multi-round interaction procedure. A typical existing implementation is as follows: Figure 1 As shown: The terminal obtains the device code DID, multiple sets of root key information (including index, extended seed Kr1, encryption / decryption keys, etc.), and multiple sets of root key ciphertext from the number distribution system. After connecting to the aggregated security gateway, the terminal initiates an access request based on the fixed key. The aggregated security gateway interacts with the root key center and the command and control center successively to verify the root key. If the verification is successful, it returns the extended seed Kr2 and the network access code RID. After the terminal decrypts and successfully compares the information, it sends the successfully verified index to the aggregated security gateway. The aggregated security gateway first downloads the first two root keys corresponding to the successfully verified index, and notifies the terminal after successful download; then it downloads the remaining root keys in sequence, confirming with the terminal after each one is completed, until all are successful or one fails. It can be seen that completing a complete root key access requires at least multiple signaling interactions between the terminal, intermediate network elements, and key management centers (including the root key center and the command and control center), involving multiple request-confirmation mechanisms. The patent application number 2023100719447, entitled "A Method and System for Processing Root Key File Requests", also mentions that the quantum security terminal obtains the root key after about three rounds of interaction.

[0004] However, the aforementioned complex process has significant drawbacks in real-world network environments. Firstly, instability such as frame loss, sudden latency, and intermittent link disconnections are common in wireless or edge networks. Because this process is highly dependent on signaling order and integrity, the loss, timeout, or disorder of any message can cause the entire access process to terminate abnormally, forcing the terminal to re-initiate access, thus significantly reducing the access success rate. Secondly, the introduction of multiple message types increases the complexity of the protocol stack's state machine. The terminal, intermediate network elements, and key management center need to maintain more message processing logic and timeout retransmission mechanisms, increasing both development and debugging difficulty and system resource consumption. Furthermore, with the surge in the number of terminals, the signaling storms caused by this process will further burden the core network elements, hindering horizontal system scalability.

[0005] To address the aforementioned issues, some existing technologies attempt to optimize by simplifying signaling or merging message fields, but most still retain the core multiple confirmation interactions, failing to fundamentally resolve the strong dependence on network quality. Other solutions introduce caching or pre-delivery mechanisms, but these may introduce additional security risks or storage overhead.

[0006] Therefore, how to simplify the root key access process, reduce the number of necessary interaction messages, lower the requirements for network transmission reliability, and reduce the implementation complexity of terminals, intermediate network elements, and key management centers while ensuring security has become an urgent technical problem to be solved in this field. Summary of the Invention

[0007] Purpose of the invention: This application provides a quantum-secure root key access method and system to solve the problems mentioned in the background art.

[0008] Technical Solution: This invention provides a quantum-secure root key access method, wherein the participants in the method include a root key center, a command and control center, an aggregated security gateway, and a terminal; the method includes:

[0009] Step 1: The terminal sends its Device ID (DID) to the Root Key Center and Command and Control Center via the aggregated security gateway. The Root Key Center assigns n sets of root key plaintext and corresponding root key ciphertext to the terminal's Device ID (DID), constructs a fixed file, and stores it locally. The Command and Control Center assigns the corresponding Network Access Code (RID) to the Device ID (DID) and stores it locally.

[0010] Step 2: The terminal obtains one set of root key ciphertext and its sub-ciphertext from n sets of root key ciphertext and their solidified files;

[0011] Step 3: For the encrypted root key, the terminal requests root key access authentication from the root key center and network access code (RID) matching from the command and control center via the aggregated security gateway. When both root key access authentication and network access code (RID) matching are successful, the aggregated security gateway obtains a set of root key plaintext corresponding to the encrypted root key from the root key center, obtains the network access code (RID) from the command and control center, and notifies the terminal to obtain and store the encrypted root key.

[0012] As an improvement of the present invention, the root key center allocates n sets of root key plaintext and corresponding root key ciphertext to the terminal's device code DID, constructs a fixed file, and stores it locally. The specific process is as follows:

[0013] Step 1-1: The root key center allocates n sets of root key plaintext P1 to root key plaintext Pn for the received device code DID, and selects ciphertext seed keys ExpKey1 to ciphertext seed keys ExpKeyn from the local root key encryption key file; and expands the ciphertext seed keys ExpKey1 to ciphertext seed keys ExpKeyn into root key encryption keys Key1 to root key encryption keys Keyn respectively according to the local expansion function KDF.

[0014] Step 1-2: The root key center uses root key encryption keys Key1 to root key encryption keys Keyn to perform encryption operations on root key plaintext P1 to root key plaintext Pn respectively, to obtain root key ciphertext E1 to root key ciphertext En.

[0015] Steps 1-3: The root key center generates a fixed-length message encryption key EncKey and message decryption key DecKey for each set of root key plaintext and its corresponding root key ciphertext;

[0016] Steps 1-4: The root key center constructs a sub-fixed file for each set of root key plaintext and its corresponding root key ciphertext. The sub-fixed file for the i-th set of root key plaintext and root key includes the sub-fixed file indexi, the ciphertext seed key ExpKeyi, the message encryption key EncKeyi, and the corresponding message decryption key DecKeyi, where 1≤i≤n. The root key center concatenates the n sub-fixed files, using the terminal's device code DID as the file header, to form the terminal's fixed file, which is then stored locally.

[0017] As an improvement to the present invention, the specific process of step 3 is as follows:

[0018] Step 3-1: The terminal performs a decryption operation on the i-th root key ciphertext Ei obtained in step 2, where 1≤i≤n, based on the sub-fixed file, to obtain the corresponding root key plaintext Pi;

[0019] Step 3-2: The terminal calculates the first hash value H1 of the root key plaintext Pi and the root key ciphertext Ei, constructs a transmission message mesi based on the first hash value H1 and encrypts it, constructs a root key access request message req1 based on the encrypted transmission message ciphertext MESi, and sends it to the root key center via the aggregated security gateway to request the root key center to perform the root key access authentication operation.

[0020] Step 3-3: The root key center performs the root key access authentication operation, and constructs a root key access response message resp1 based on the authentication result and sends it to the aggregated security gateway;

[0021] Steps 3-4: The aggregated security gateway requests the access code RID of the device code DID from the command and control center based on the root key access response message resp1 corresponding to the successful authentication result. Based on the acquisition result of the access code RID, the gateway constructs a root key access response message resp2 and sends it to the terminal. The terminal determines whether to acquire and store the root key plaintext and the access code RID based on the root key access response message resp2.

[0022] As an improvement to the present invention, the specific process of step 3-1 is as follows:

[0023] The terminal reads the i-th sub-file containing the i-th root key ciphertext Ei, uses the local extension function KDF to perform an extension operation on the ciphertext seed key ExpKeyi in the i-th sub-file to obtain the root key decryption key Keyi, and uses the root key decryption key Keyi to perform a decryption operation on the root key ciphertext Ei to obtain the root key plaintext Pi.

[0024] As an improvement to the present invention, the specific process of step 3-2 is as follows:

[0025] Step 3-2-1: The terminal calculates the first hash value H1 of the root key plaintext Pi and the root key ciphertext Ei, and records the first hash value parameter string str1 and the input random number s1;

[0026] Step 3-2-2: The terminal concatenates its device code DID, first hash value H1, first hash value parameter string str1 and input random number s1 to construct the transmission message mesi=[DID, (H1, str1, s1)]. The terminal uses the message encryption key EncKeyi in the i-th sub-file to encrypt the transmission message mesi to obtain the ciphertext MESi= mesi⊕EncKeyi.

[0027] Step 3-2-3: The terminal obtains the index indexi from the i-th sub-file, concatenates the index indexi with the ciphertext MESi of the transmission message, and constructs the root key access request message req1=[indexi, MESi];

[0028] Step 3-2-4: The terminal sends the root key access request message req1 to the root key center via the aggregated security gateway, requesting the root key center to perform the root key access authentication operation.

[0029] As an improvement of the present invention, the specific process of step 3-2-1 is as follows:

[0030] The terminal generates an irreducible polynomial p1(x) locally and obtains an input random number s1 from the local machine. The string consisting of the coefficients of each term in the irreducible polynomial p1(x), excluding the highest term, is denoted as str1. The terminal uses the irreducible polynomial p1(x) and the input random number s1 to generate the first hash function h. p1,s1 Input the root key plaintext Pi and root key ciphertext Ei into the first hash function h p1,s1 The first hash value H1=h is obtained. p1,s1 (Pi, Ei); Record the string str1 and the input random number s1 as the first hash value parameter.

[0031] As an improvement to the present invention, the specific process of step 3-3 is as follows:

[0032] Step 3-3-1: The root key center addresses the corresponding sub-fixed file and the local root key plaintext Pi and root key ciphertext Ei according to the index indexi in the root key access request message req1. It obtains the corresponding message decryption key DecKeyi from the corresponding sub-fixed file and decrypts the transmitted message ciphertext MESi to obtain the device code DID', hash value H1', ​​hash value parameter string str1', and input random number s1'.

[0033] Step 3-3-2: The root key center calculates the second hash value H2 of the local root key plaintext Pi and root key ciphertext Ei:

[0034] A second hash function h is generated based on the string str1' and the input random number s1'. p1’,s1’ The local root key plaintext Pi and root key ciphertext Ei are input into the second hash function h. p1’,s1’ Calculate the second hash value H2=h p1’,s1’ (Pi, Ei);

[0035] Step 3-3-3: The root key center performs root key access authentication:

[0036] (1) Compare the calculated second hash value H2 with the received hash value H1';

[0037] (2) Compare the device code DID' with the device code DID stored locally;

[0038] Step 3-3-4: The root key center constructs a root key access response message resp1 based on the authentication result and sends it to the aggregated security gateway.

[0039] If (1) and (2) are consistent, the access authentication is successful. The root key center constructs a root key access response message resp1 with an error code of 0 for the group root key ciphertext Ei, carrying the device code DID and index indexi, and sends it to the aggregated security gateway.

[0040] If at least one of (1) and (2) is inconsistent, the access authentication fails. The root key center constructs a root key access response message resp1 with a non-zero error code, carrying the device code DID and index indexi, and sends it to the aggregated security gateway.

[0041] As an improvement to the present invention, the specific process of steps 3-4 is as follows:

[0042] Step 3-4-1: The aggregated security gateway receives the root key access response message resp1 from the root key center and checks the error codes within it.

[0043] If the error code is non-zero, the aggregated security gateway sends a root key access response message resp1 with a non-zero error code to the terminal, and the terminal ends the root key access process.

[0044] If the error code is 0, the aggregated security gateway sends the device code DID to the command and control center to request the network access code RID corresponding to the device code DID;

[0045] Step 3-4-2: In response to the network access code RID acquisition request from the aggregated security gateway, the command and control center performs a matching operation on the network access code RID locally, addressing the network access code RID assigned to the device code DID:

[0046] If the RID matching fails, the command and control center sends the error code of RID matching failure to the aggregated security gateway. The aggregated security gateway constructs a root key access response message resp2 with the error code of RID matching failure and sends it to the terminal to notify the terminal to end the root key access process.

[0047] If the network access code RID matches successfully, the command and control center sends the network access code RID to the aggregated security gateway. The aggregated security gateway then requests the corresponding root key plaintext Pi from the root key center based on the index indexi.

[0048] If the download fails, the aggregated security gateway constructs a root key access response message resp2 with the error code Pi indicating that the root key plaintext download failed, and sends it to the terminal to notify the terminal to end the root key access process.

[0049] If the download is successful, the aggregated security gateway sends a root key access response message resp2, which contains an error code of 0 and an access code RID, to the terminal.

[0050] Step 3-4-3: The terminal receives the root key access response message resp2 and checks whether the error code is non-zero.

[0051] If the error code is not 0, then depending on the error code type, determine whether to replace the root key ciphertext with a new set and execute the root key access process, or to execute the root key access process again using the same set of root key ciphertext, or to terminate the root key access process.

[0052] If the error code is 0, the root key access process is successful. The decrypted root key plaintext Pi is stored, and the network access code RID in the root key access response message resp2 is recorded.

[0053] As an improvement of the present invention, a quantum-safe root key access system is also provided for executing the quantum-safe root key access method as described above, including a root key center, a command and control center, an aggregated security gateway, and a terminal, wherein the aggregated security gateway is communicatively connected to the root key center, the command and control center, and the terminal respectively.

[0054] The root key center is used to allocate n sets of root key plaintext and corresponding root key ciphertext to the terminal's device code DID, construct a solidified file and store it locally, perform root key access authentication operation, and construct a root key access response message resp1 to send to the aggregated security gateway.

[0055] The command and control center is used to assign the corresponding network access code RID to the device code DID and store it locally, and to perform the network access code RID matching operation;

[0056] The aggregated security gateway is used to forward the device code DID to the root key center and the command and control center, forward the root key access authentication operation request to the root key center, forward the network access code RID matching operation request to the command and control center, and construct the root key access response message resp2 to send to the terminal;

[0057] The terminal is used to obtain the root key ciphertext, request the root key center to perform root key access authentication operation based on the root key ciphertext, request the command and control center to perform network access code RID matching operation, and determine whether to obtain and store the root key plaintext and network access code RID based on the root key access response message resp2.

[0058] Beneficial effects:

[0059] 1. The root key center pre-allocates multiple sets of root key plaintext and corresponding root key ciphertext to each terminal. This design allows the terminal to have multiple optional key groups in the subsequent root key access process. When the access process of a certain key group fails due to network abnormality or other reasons, the terminal can automatically switch to other key groups to retry the access without having to apply for a new root key from the root key center, thereby significantly improving the fault tolerance and success rate of root key access.

[0060] 2. This invention binds and stores the relevant data of each set of root key plaintext and ciphertext by pre-constructing a fixed file, and establishes corresponding index information. This fixed file mechanism ensures the consistency and integrity of the root key data on the one hand, and provides the root key center's authentication process with fast addressing capability on the other hand. It can directly locate the target data according to the index, greatly shorten the search time, and improve the processing efficiency of the key management center.

[0061] 3. This invention significantly simplifies the root key access process, and significantly reduces the number of interaction messages and interaction rounds between the terminal, intermediate network elements and key management center (including the root key center and command and control center); the simplification of the interaction process directly reduces the probability of process failure due to any message abnormality, while also reducing the protocol processing burden on the terminal and each network element, and improving the overall system's operating efficiency and reliability.

[0062] 4. The authentication process of this invention is based on the hash calculation value of each group of root key plaintext and corresponding root key ciphertext. By utilizing the one-wayness and collision resistance of the hash function, the authentication mechanism has the ability to resist quantum computing attacks and its security can reach the level of quantum security. It can effectively resist the threat of future quantum computers to traditional public key cryptosystems and provide long-term and reliable security for root key access and subsequent terminal authentication.

[0063] 5. This invention effectively reduces the dependence on network transmission quality. Even in environments such as wireless networks and edge networks where frame loss, latency, or link jitter are prone to occur, the simplified process and fewer messages greatly avoid the interruption of the root key access process caused by network frame loss and other problems. This prevents communication service delays or interruptions caused by repeated retries due to access failures, and ensures the normal online status of terminal devices and the continuity of services. Attached Figure Description

[0064] 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.

[0065] Figure 1 This is a schematic diagram of the current root key access process;

[0066] Figure 2 This is a diagram illustrating the connections between the parties involved in this application;

[0067] Figure 3 This is a flowchart illustrating the method described in this application;

[0068] Figure 4 This is a schematic diagram of the structure of the sub-fixed file of this application;

[0069] Figure 5 This is a schematic diagram of the structure of the solidified document in this application;

[0070] Figure 6 This is a flowchart illustrating steps 3-4 of this application. Detailed Implementation

[0071] 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.

[0072] In view of the problems mentioned in the background art, the present invention provides a quantum-secure root key access system, the system comprising a root key center, a command and control center, an aggregated security gateway, and a terminal, wherein, as... Figure 2 As shown, in the system of this invention: the aggregated security gateway is communicatively connected to the root key center, the command and control center, and the terminal respectively; wherein, the root key center is used to allocate n sets of root key plaintext and corresponding root key ciphertext to the terminal's device code DID, construct a fixed file and store it locally, perform root key access authentication operation, and construct a root key access response message resp1 to send to the aggregated security gateway; the command and control center is used to allocate the corresponding network access code RID to the device code DID and store it locally, and perform a network access code RID matching operation; the aggregated security gateway is used to forward the device code DID to the root key center and the command and control center, forward the root key access authentication operation request to the root key center, forward the network access code RID matching operation request to the command and control center, and construct a root key access response message resp2 to send to the terminal; the terminal is used to obtain the root key ciphertext, request the root key center to perform the root key access authentication operation based on the root key ciphertext, request the command and control center to perform the network access code RID matching operation, and determine whether to obtain and store the root key plaintext and the network access code RID based on the root key access response message resp2.

[0073] Based on the quantum-secure root key access system described above, such as Figure 3 As shown, the present invention also provides a quantum-secure root key access method, the method comprising the following steps:

[0074] Step 1: The terminal sends its Device ID (DID) to the Root Key Center and the Command and Control Center via the aggregated security gateway. The Root Key Center assigns n sets of root key plaintext and corresponding root key ciphertext to the terminal's Device ID (DID), constructs a fixed file, and stores it locally. The Command and Control Center assigns the corresponding Network Access Code (RID) to the Device ID (DID) and stores it locally. Where n ≥ 1.

[0075] Specifically, the process of step 1 includes:

[0076] Step 1-1: The root key center allocates n sets of root key plaintext P1 to root key plaintext Pn for the received device code DID, and selects ciphertext seed keys ExpKey1 to ciphertext seed keys ExpKeyn from the local root key encryption key file; the root key center expands the ciphertext seed keys ExpKey1 to ciphertext seed keys ExpKeyn into root key encryption keys Key1 to root key encryption keys Keyn respectively according to the local expansion function KDF; wherein, each set of root key plaintext is a single file, and the size can be set.

[0077] Step 1-2: The root key center uses root key encryption keys Key1 to root key encryption keys Keyn to perform encryption operations on root key plaintext P1 to root key plaintext Pn respectively, to obtain root key ciphertext E1 to root key ciphertext En.

[0078] Steps 1-3: The root key center generates a fixed-length (e.g., 256 bits) message encryption key EncKey and message decryption key DecKey for each set of root key plaintext and its corresponding root key ciphertext, which are used to perform encryption and decryption operations on subsequent authentication messages, etc. It should be noted that for symmetric encryption operations, the message encryption key EncKey and the corresponding message decryption key DecKey are the same.

[0079] Steps 1-4: Subsequently, the root key center constructs a sub-stabilized file for each set of root key plaintext and its corresponding root key ciphertext. Specifically, the sub-stabilized file for the i-th set of root key plaintext and root key includes the sub-stabilized file index indexi, the ciphertext seed key ExpKeyi, the message encryption key EncKeyi, and the corresponding message decryption key DecKeyi, where 1 ≤ i ≤ n; For example... Figure 3As shown, the data in each sub-file forms a one-to-one correspondence, that is, the index indexi, the ciphertext seed key ExpKeyi, the message encryption key EncKeyi, and the message decryption key DecKeyi are all interconnected and can be used to access other data; for example... Figure 4 As shown, each set of root key plaintext and its corresponding root key ciphertext also form a one-to-one correspondence with its sub-fixed files; the root key center concatenates the n sub-fixed files and uses the terminal's device code (DID) in plaintext form as the file header to form the terminal's fixed file, as shown below. Figure 5 As shown. Similarly, Figure 5 It can also be seen that the n sets of root key plaintexts and corresponding root key ciphertexts assigned to the terminal's device code DID, as well as the hardened file, form a one-to-one correspondence and are stored locally.

[0080] Steps 1-5: The command and control center assigns the corresponding network access code RID to the received device code DID, and forms a one-to-one correspondence, which is then stored locally.

[0081] In this invention, the root key center pre-configures several sets of root key plaintext and their corresponding ciphertext for each terminal. Thus, when a terminal subsequently performs root key access, it has multiple key alternatives. If the access process for one set of keys fails due to network anomalies or other faults, the terminal can directly switch to another set of keys to re-initiate access without needing to request a new root key from the root key center again. This mechanism significantly enhances the fault tolerance capability of root key access and effectively improves the access success rate. The command and control center assigns a corresponding network access code (RID) to each terminal based on the received device ID (DID). The network access code (RID) is used to further bind the identities of each terminal during subsequent network communication, thereby enhancing the uniqueness of the terminal's identity and the overall security of the system.

[0082] Step 2: The terminal obtains one set of root key ciphertext and its sub-ciphertext from n sets of root key ciphertext and their solidified files.

[0083] It should be understood that the acquisition of the root key ciphertext and its sub-files described above can be done offline or online. Offline acquisition can be, for example, via a USB flash drive from the root key center. Online acquisition can be, for example, the root key center encrypting and distributing the data to the terminal via an aggregated security gateway. The key used by the aggregated security gateway for encryption and distribution can be a pre-set or negotiated key. The specific decryption process on the terminal will not be elaborated here. The terminal accesses the root key center offline or online, using its own device code DID as an index, and selects any one set of root key ciphertext (e.g., root key ciphertext Ei, 1≤i≤n) and its sub-files from the corresponding n sets of root key ciphertexts and their sub-files to retrieve them locally.

[0084] When this step is completed, the terminal should store root key ciphertext E1 to root key ciphertext En and the corresponding hard files.

[0085] Step 3: For the set of root key ciphertext, the terminal requests the root key access authentication operation from the root key center and the network access code RID matching operation from the command and control center via the aggregated security gateway. When both the root key access authentication operation and the network access code RID matching operation are successful, the aggregated security gateway obtains a set of root key plaintext corresponding to the set of root key ciphertext from the root key center, obtains the network access code RID from the command and control center, and notifies the terminal to obtain and store the set of root key plaintext.

[0086] Taking the i-th root key ciphertext Ei (1≤i≤n) as an example, the following steps will be explained in detail:

[0087] Step 3-1: The terminal performs a decryption operation on the i-th root key ciphertext Ei obtained in step 2 based on the sub-fixed file to obtain the corresponding root key plaintext Pi;

[0088] Specifically, the terminal reads the i-th sub-file of the root key ciphertext Ei, and uses the local extension function KDF to perform an extension operation on the ciphertext seed key ExpKeyi in the i-th sub-file to obtain the root key decryption key Keyi. The root key decryption key Keyi is then used to perform a decryption operation on the root key ciphertext Ei to obtain the root key plaintext Pi. It should be noted that the terminal's local extension function KDF is the same as the root key center's local extension function KDF.

[0089] As described above, this invention pre-constructs a fixed file, binding and storing the associated data corresponding to each set of root key plaintext and its ciphertext, and establishing index entries for each set of data. This fixed file ensures the consistency and integrity of root key data during storage and use, and provides the root key center with efficient and rapid location capabilities during subsequent authentication operations. Specifically, it allows direct retrieval of target data (such as the ciphertext seed key ExpKey, the message encryption key EncKey and its corresponding message decryption key DecKey, as well as the corresponding root key plaintext P and its corresponding root key ciphertext E) based on the index, thereby significantly reducing search time and effectively improving the processing efficiency of the key management center.

[0090] Step 3-2: The terminal calculates the first hash value H1 of the root key plaintext Pi and the root key ciphertext Ei, constructs a transmission message mesi based on the first hash value H1 and encrypts it, constructs a root key access request message req1 based on the encrypted transmission message ciphertext MESi, and sends it to the root key center via the aggregated security gateway to request the root key center to perform the root key access authentication operation.

[0091] Specifically, step 3-2 includes:

[0092] Step 3-2-1: The terminal calculates the first hash value H1 of the root key plaintext Pi and the root key ciphertext Ei, and records the first hash value parameter string str1 and the input random number s1;

[0093] The calculation process is as follows:

[0094] The terminal generates an irreducible polynomial p1(x) locally and obtains an input random number s1 from the local machine. The string consisting of the coefficients of each term in the irreducible polynomial p1(x), excluding the highest term, is denoted as str1. The terminal uses the irreducible polynomial p1(x) and the input random number s1 to generate the first hash function h. p1,s1 Input the root key ciphertext Pi and the root key plaintext Ei into the first hash function h p1,s1 The first hash value H1=h is obtained. p1,s1 (Pi, Ei); Record the string str1 and the input random number s1 as the first hash value parameter.

[0095] Step 3-2-2: The terminal concatenates its device code DID, first hash value H1, first hash value parameter string str1 and input random number s1 to construct the transmission message mesi=[DID, (H1, str1, s1)]. The terminal uses the message encryption key EncKeyi in the i-th sub-file to encrypt the transmission message mesi to obtain the ciphertext MESi= mesi⊕EncKeyi.

[0096] Step 3-2-3: The terminal obtains the index indexi from the i-th sub-file, concatenates the index indexi with the ciphertext MESi of the transmission message, and constructs the root key access request message req1=[indexi, MESi];

[0097] Step 3-2-4: The terminal sends the root key access request message req1 to the root key center via the aggregated security gateway, requesting the root key center to perform the root key access authentication operation.

[0098] Step 3-3: The root key center performs the root key access authentication operation, and constructs a root key access response message resp1 based on the authentication result and sends it to the aggregated security gateway;

[0099] Step 3-3-1: The root key center addresses the corresponding sub-fixed file and the local root key plaintext Pi and root key ciphertext Ei based on the index indexi in the root key access request message req1. It obtains the corresponding message decryption key DecKeyi from the corresponding sub-fixed file and decrypts the transmitted message ciphertext MESi to obtain the device code DID', hash value H1', ​​hash value parameter string str1', and input random number s1'.

[0100] Step 3-3-2: The root key center calculates the second hash value H2 of the local root key plaintext Pi and root key ciphertext Ei:

[0101] A second hash function h is generated based on the string str1' and the input random number s1'. p1’,s1’ The local root key plaintext Pi and root key ciphertext Ei are input into the second hash function h. p1’,s1’ Calculate the second hash value H2=h p1’,s1’ (Pi, Ei);

[0102] Step 3-3-3: The root key center performs root key access authentication:

[0103] (1) Compare the calculated second hash value H2 with the received hash value H1';

[0104] (2) Compare the device code DID' with the device code DID stored locally;

[0105] Step 3-3-4: The root key center constructs a root key access response message resp1 based on the authentication result and sends it to the aggregated security gateway.

[0106] If (1) and (2) are consistent, the access authentication is successful, indicating that the root key ciphertext Ei obtained by the terminal has not been tampered with. The root key center constructs a root key access response message resp1 with an error code of 0 for the root key ciphertext Ei, carrying the device code DID and index indexi, and sends it to the aggregated security gateway.

[0107] If at least one of (1) and (2) is inconsistent, the access authentication fails, indicating that the root key ciphertext Ei obtained by the terminal is inconsistent with the root key ciphertext Ei stored locally in the root key center, or has been tampered with. The root key center needs to construct a root key access response message resp1 with a non-zero error code, carrying the device code DID and index indexi, and send it to the aggregated security gateway.

[0108] Steps 3-4: The aggregated security gateway requests the access code RID of the device code DID from the command and control center based on the root key access response message resp1 corresponding to the authentication result of passing (i.e., error code 0). Based on the acquisition result of the access code RID, the gateway constructs a root key access response message resp2 and sends it to the terminal. The terminal determines whether to acquire and store the root key plaintext and the access code RID based on the root key access response message resp2.

[0109] like Figure 6 As shown, the specific process of this step includes:

[0110] Step 3-4-1: The aggregated security gateway receives the root key access response message resp1 from the root key center and checks the error codes within it.

[0111] If the error code is not 0, the aggregated security gateway sends a root key access response message resp1 with a non-zero error code to the terminal, informing the terminal that there is an error in the root key ciphertext Ei obtained by the terminal, and the terminal should discard the root key ciphertext Ei and end the root key access process.

[0112] If the error code is 0, the aggregated security gateway sends the device code DID to the command and control center to request the network access code RID corresponding to the device code DID.

[0113] Step 3-4-2: In response to the network access code RID acquisition request from the aggregated security gateway, the command and control center performs a matching operation on the network access code RID locally, addressing the network access code RID assigned to the device code DID:

[0114] If the network access code RID fails to match, the command and control center sends an error code indicating the failure to match the network access code RID to the aggregated security gateway. The aggregated security gateway then constructs a root key access response message resp2 with the error code indicating the failure to match the network access code RID and sends it to the terminal, notifying the terminal to end the root key access process.

[0115] Situations where network access code (RID) matching fails include: In step 1, an error occurs during the process of the command and control center assigning the corresponding network access code (RID) to the device code (DID). For example, the command and control center fails to assign the corresponding network access code (RID) to the device code (DID) or does not perform the assignment operation; there is a problem in the communication process between the terminal and the command and control center via the aggregated security gateway, resulting in packet loss, and the device code (DID) does not arrive completely at the command and control center, preventing the command and control center from performing the assignment operation; previously assigned network access code (RID) has not been used for a long time, and in order to clear the local inventory, the command and control center has updated its local database, deleting all old network access code (RID). If the old device code (DID) is then used for matching, the corresponding network access code (RID) cannot be obtained, resulting in a matching failure.

[0116] If the network access code RID matches successfully, the command and control center sends the network access code RID to the aggregated security gateway. The aggregated security gateway requests the root key center to download the corresponding root key plaintext Pi based on the index indexi. If the download fails due to network errors, the aggregated security gateway also needs to construct a root key access response message resp2 with the corresponding error code (e.g., root key plaintext Pi download failed) and send it to the terminal to notify the terminal to end the root key access process. If the download is successful, the aggregated security gateway constructs a root key access response message resp2 with error code 0 and the network access code RID and sends it to the terminal. It should be noted that communication between the aggregated security gateway, the root key center, and the command and control center can use intranet communication. In the embodiments of the present invention, the aggregated security gateway also needs to download and store the corresponding root key plaintext locally. The purpose is that in the subsequent mutual authentication and communication process between terminals, the aggregated security gateway can provide a trusted verification basis for third parties based on the locally synchronized root key plaintext, thereby serving as auxiliary proof of the authentication results between terminals and the key source for encryption and decryption operations.

[0117] Step 3-4-3: The terminal receives the root key access response message resp2 and checks whether the error code is non-zero.

[0118] If the error code is not 0, then depending on the error code type, determine whether to replace the root key ciphertext with a new set and execute the root key access process, or to execute the root key access process again using the same set of root key ciphertext, or to directly terminate the root key access process.

[0119] If the error code is 0, the access is successful. Store the decrypted root key plaintext Pi and record the network access code RID in the root key access response message resp2.

[0120] In embodiments of the present invention, the error code types include, for example: root key service error, device code DID error, which corresponds to directly terminating the root key access process; message parsing error, which corresponds to re-executing the root key access process using the same set of root key ciphertext; or, index error, root key ciphertext, hardened file, sub-hardened file not found, etc., which corresponds to replacing the root key ciphertext with a new set of root key ciphertext to execute the root key access process; etc.

[0121] In this invention, the root key center pre-allocates multiple sets of root key plaintext and ciphertext for each terminal. Terminals can automatically switch to other key sets for retrying when access fails, eliminating the need for re-application and improving fault tolerance and success rate. By pre-building and fixing files, binding and storing key data for each set and establishing an index, data consistency is ensured while providing rapid location capabilities, shortening search time. Simultaneously, the access process is significantly simplified, reducing the number of interactions between terminals, intermediate network elements, and the key management center, lowering the probability of process failure and protocol burden. The authentication process is based on the hash calculation value of the key, possessing resistance to quantum attacks and achieving quantum security levels. Furthermore, the streamlined process effectively reduces dependence on network transmission quality, avoiding interruptions and repeated retries due to frame loss, ensuring communication continuity.

Claims

1. A quantum-safe root key access method, characterized in that, The participants in the method include a root key center, a command and control center, an aggregated security gateway, and terminals; the method includes: Step 1: The terminal sends its Device ID (DID) to the Root Key Center and Command and Control Center via the aggregated security gateway. The Root Key Center assigns n sets of root key plaintext and corresponding root key ciphertext to the terminal's Device ID (DID), constructs a fixed file, and stores it locally. The Command and Control Center assigns the corresponding Network Access Code (RID) to the Device ID (DID) and stores it locally. Step 2: The terminal obtains one set of root key ciphertext and its sub-ciphertext from n sets of root key ciphertext and their solidified files; Step 3: For the encrypted root key, the terminal requests root key access authentication from the root key center and network access code (RID) matching from the command and control center via the aggregated security gateway. When both root key access authentication and network access code (RID) matching are successful, the aggregated security gateway obtains a set of root key plaintext corresponding to the encrypted root key from the root key center, obtains the network access code (RID) from the command and control center, and notifies the terminal to obtain and store the encrypted root key.

2. The quantum-secure root key access method according to claim 1, characterized in that, The root key center assigns n sets of root key plaintext and corresponding root key ciphertext to the terminal's device code DID, constructs a fixed file, and stores it locally. The specific process is as follows: Step 1-1: The root key center allocates n sets of root key plaintext P1 to root key plaintext Pn for the received device code DID, and selects ciphertext seed keys ExpKey1 to ciphertext seed keys ExpKeyn from the local root key encryption key file; and expands the ciphertext seed keys ExpKey1 to ciphertext seed keys ExpKeyn into root key encryption keys Key1 to root key encryption keys Keyn respectively according to the local expansion function KDF. Step 1-2: The root key center uses root key encryption keys Key1 to root key encryption keys Keyn to perform encryption operations on root key plaintext P1 to root key plaintext Pn respectively, to obtain root key ciphertext E1 to root key ciphertext En. Steps 1-3: The root key center generates a fixed-length message encryption key EncKey and message decryption key DecKey for each set of root key plaintext and its corresponding root key ciphertext; Steps 1-4: The root key center constructs a sub-fixed file for each set of root key plaintext and its corresponding root key ciphertext. The sub-fixed file for the i-th set of root key plaintext and root key includes the sub-fixed file indexi, the ciphertext seed key ExpKeyi, the message encryption key EncKeyi, and the corresponding message decryption key DecKeyi, where 1≤i≤n. The root key center concatenates the n sub-fixed files, using the terminal's device code DID as the file header, to form the terminal's fixed file, which is then stored locally.

3. The quantum-secure root key access method according to claim 2, characterized in that, The specific process of step 3 is as follows: Step 3-1: The terminal performs a decryption operation on the i-th root key ciphertext Ei obtained in step 2, where 1≤i≤n, based on the sub-fixed file, to obtain the corresponding root key plaintext Pi; Step 3-2: The terminal calculates the first hash value H1 of the root key plaintext Pi and the root key ciphertext Ei, constructs a transmission message mesi based on the first hash value H1 and encrypts it, constructs a root key access request message req1 based on the encrypted transmission message ciphertext MESi, and sends it to the root key center via the aggregated security gateway to request the root key center to perform the root key access authentication operation. Step 3-3: The root key center performs the root key access authentication operation, and constructs a root key access response message resp1 based on the authentication result and sends it to the aggregated security gateway; Steps 3-4: The aggregated security gateway requests the access code RID of the device code DID from the command and control center based on the root key access response message resp1 corresponding to the successful authentication result. Based on the acquisition result of the access code RID, the gateway constructs a root key access response message resp2 and sends it to the terminal. The terminal determines whether to acquire and store the root key plaintext and the access code RID based on the root key access response message resp2.

4. The quantum-secure root key access method according to claim 3, characterized in that, The specific process of step 3-1 is as follows: The terminal reads the i-th sub-file containing the i-th root key ciphertext Ei, uses the local extension function KDF to perform an extension operation on the ciphertext seed key ExpKeyi in the i-th sub-file to obtain the root key decryption key Keyi, and uses the root key decryption key Keyi to perform a decryption operation on the root key ciphertext Ei to obtain the root key plaintext Pi.

5. The quantum-secure root key access method according to claim 3, characterized in that, The specific process of step 3-2 is as follows: Step 3-2-1: The terminal calculates the first hash value H1 of the root key plaintext Pi and the root key ciphertext Ei, and records the first hash value parameter string str1 and the input random number s1; Step 3-2-2: The terminal concatenates its device code DID, first hash value H1, first hash value parameter string str1 and input random number s1 to construct the transmission message mesi=[DID, (H1, str1, s1)]. The terminal uses the message encryption key EncKeyi in the i-th sub-file to encrypt the transmission message mesi to obtain the ciphertext MESi= mesi⊕EncKeyi. Step 3-2-3: The terminal obtains the index indexi from the i-th sub-file, concatenates the index indexi with the ciphertext MESi of the transmission message, and constructs the root key access request message req1=[indexi, MESi]; Step 3-2-4: The terminal sends the root key access request message req1 to the root key center via the aggregated security gateway, requesting the root key center to perform the root key access authentication operation.

6. The quantum-secure root key access method according to claim 5, characterized in that, The specific process of step 3-2-1 is as follows: The terminal generates an irreducible polynomial p1(x) locally and obtains an input random number s1 from the local machine. The string consisting of the coefficients of each term in the irreducible polynomial p1(x), excluding the highest term, is denoted as str1. The terminal uses the irreducible polynomial p1(x) and the input random number s1 to generate the first hash function h. p1,s1 Input the root key plaintext Pi and root key ciphertext Ei into the first hash function h p1,s1 The first hash value H1=h is obtained. p1,s1 (Pi, Ei); Record the string str1 and the input random number s1 as the first hash value parameter.

7. The quantum-secure root key access method according to claim 5, characterized in that, The specific process of step 3-3 is as follows: Step 3-3-1: The root key center addresses the corresponding sub-fixed file and the local root key plaintext Pi and root key ciphertext Ei according to the index indexi in the root key access request message req1. It obtains the corresponding message decryption key DecKeyi from the corresponding sub-fixed file and decrypts the transmitted message ciphertext MESi to obtain the device code DID', hash value H1', ​​hash value parameter string str1', and input random number s1'. Step 3-3-2: The root key center calculates the second hash value H2 of the local root key plaintext Pi and root key ciphertext Ei: A second hash function h is generated based on the string str1' and the input random number s1'. p1’,s1’ The local root key plaintext Pi and root key ciphertext Ei are input into the second hash function h. p1’,s1’ Calculate the second hash value H2=h p1’,s1’ (Pi, Ei); Step 3-3-3: The root key center performs root key access authentication: (1) Compare the calculated second hash value H2 with the received hash value H1'; (2) Compare the device code DID' with the device code DID stored locally; Step 3-3-4: The root key center constructs a root key access response message resp1 based on the authentication result and sends it to the aggregated security gateway. If (1) and (2) are consistent, the access authentication is successful. The root key center constructs a root key access response message resp1 with an error code of 0 for the group root key ciphertext Ei, carrying the device code DID and index indexi, and sends it to the aggregated security gateway. If at least one of (1) and (2) is inconsistent, the access authentication fails. The root key center constructs a root key access response message resp1 with a non-zero error code, carrying the device code DID and index indexi, and sends it to the aggregated security gateway.

8. The quantum-secure root key access method according to claim 7, characterized in that, The specific process of steps 3-4 is as follows: Step 3-4-1: The aggregated security gateway receives the root key access response message resp1 from the root key center and checks the error codes within it. If the error code is non-zero, the aggregated security gateway sends a root key access response message resp1 with a non-zero error code to the terminal, and the terminal ends the root key access process. If the error code is 0, the aggregated security gateway sends the device code DID to the command and control center to request the network access code RID corresponding to the device code DID; Step 3-4-2: In response to the network access code RID acquisition request from the aggregated security gateway, the command and control center performs a matching operation on the network access code RID locally, addressing the network access code RID assigned to the device code DID: If the RID matching fails, the command and control center sends the error code of RID matching failure to the aggregated security gateway. The aggregated security gateway constructs a root key access response message resp2 with the error code of RID matching failure and sends it to the terminal to notify the terminal to end the root key access process. If the network access code RID matches successfully, the command and control center sends the network access code RID to the aggregated security gateway. The aggregated security gateway then requests the corresponding root key plaintext Pi from the root key center based on the index indexi. If the download fails, the aggregated security gateway constructs a root key access response message resp2 with the error code Pi indicating that the root key plaintext download failed, and sends it to the terminal to notify the terminal to end the root key access process. If the download is successful, the aggregated security gateway sends a root key access response message resp2, which contains an error code of 0 and an access code RID, to the terminal. Step 3-4-3: The terminal receives the root key access response message resp2 and checks whether the error code is non-zero. If the error code is not 0, then depending on the error code type, determine whether to replace the root key ciphertext with a new set and execute the root key access process, or to execute the root key access process again using the same set of root key ciphertext, or to terminate the root key access process. If the error code is 0, the root key access process is successful. The decrypted root key plaintext Pi is stored, and the network access code RID in the root key access response message resp2 is recorded.

9. A quantum-safe root key access system, used to execute the quantum-safe root key access method as described in any one of claims 1 to 8, characterized in that, It includes a root key center, a command and control center, an aggregated security gateway, and a terminal, wherein the aggregated security gateway is communicatively connected to the root key center, the command and control center, and the terminal respectively; The root key center is used to allocate n sets of root key plaintext and corresponding root key ciphertext to the terminal's device code DID, construct a solidified file and store it locally, perform root key access authentication operation, and construct a root key access response message resp1 to send to the aggregated security gateway. The command and control center is used to assign the corresponding network access code RID to the device code DID and store it locally, and to perform the network access code RID matching operation; The aggregated security gateway is used to forward the device code DID to the root key center and the command and control center, forward the root key access authentication operation request to the root key center, forward the network access code RID matching operation request to the command and control center, and construct the root key access response message resp2 to send to the terminal; The terminal is used to obtain the root key ciphertext, request the root key center to perform root key access authentication operation based on the root key ciphertext, request the command and control center to perform network access code RID matching operation, and determine whether to obtain and store the root key plaintext and network access code RID based on the root key access response message resp2.