A method and system for updating root keys when switching communication networks on a device terminal.
By pre-setting the initial root key encryption key in the quantum-safe device terminal and generating a new root key through an XOR operation, the problem of needing to return the quantum-safe device terminal to the factory for reset when changing the communication network is solved, realizing secure online root key updates and improving the flexibility and security of the device.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MATRICTIME DIGITAL TECH CO LTD
- Filing Date
- 2026-04-13
- Publication Date
- 2026-06-30
AI Technical Summary
In existing technologies, quantum-safe devices need to be returned to the factory to reset the root key when the communication network is changed, which leads to high operating costs, security risks, and key waste.
By pre-setting an initial root key encryption key in the quantum-safe device terminal, and generating a new root key by performing an XOR operation on the initial root key using an updated key, and then performing consistency comparisons in different communication networks, it is ensured that each network uses an independent updated root key, thus achieving a smooth transfer of secure identity.
It enables secure, online, non-return-to-factory root key reset for quantum-safe device terminals across different communication networks, reducing operation and maintenance costs, improving device flexibility and availability, avoiding security risks, and meeting the key evolution requirements in quantum-safe scenarios.
Smart Images

Figure CN122027155B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of key technology, and specifically to a method and system for updating the root key when a device terminal switches communication networks. Background Technology
[0002] With the rapid development of quantum technology, traditional encryption systems face potential threats, leading to the emergence of quantum-secure communication technology. Quantum-secure devices, as crucial carriers for quantum key distribution and management, typically rely on a pre-set root key to authenticate with and encrypt communication with their respective networks. In practical applications, upon initial connection to a communication network, a quantum-secure device performs authentication and other operations to activate the root key, thus establishing a closed and controllable secure trust system.
[0003] However, existing technologies have a significant limitation: the root key and related parameters of quantum secure devices are generated and fixed at the factory. Upon initial connection to a communication network, the root key and related parameters are activated and used. When a quantum secure device needs to deregister from one communication network (e.g., the first communication network) and connect to another independent communication network (e.g., the second communication network) due to business adjustments, the existing mechanism cannot support a smooth transfer of its secure identity. Since different communication networks typically have their own independent and mutually untrusted key management and authentication systems, the root key pre-installed in the original terminal and bound to the first communication network is considered invalid or insecure in the second communication network. Therefore, to ensure that the security boundary of the new communication network is not compromised and to prevent potential identity impersonation or key leakage risks, the only current solution is to require the terminal device to undergo physical "return to the factory," i.e., re-injection of the root key.
[0004] This “replacement of network requires return to factory” model has brought about several prominent problems: (1) High operating costs, involving the logistics of equipment, resulting in a significant increase in time delays and economic burden; (2) Security and leakage risks, the frequent return to factory reset process itself increases the potential threat of key materials being exposed in the transmission and disposal process; (3) Waste of keys, the root key used for encrypted communication with the deregistered communication network has become invalid and can only be discarded, resulting in a great waste.
[0005] Therefore, there is an urgent need for an innovative technical solution that can enable secure, online, and non-return-to-factory root key reset of quantum-safe device terminals across different communication networks while ensuring quantum-level security. This would improve device availability, reduce maintenance costs, and promote quantum-safe interconnection. Summary of the Invention
[0006] Purpose of the Invention: The purpose of this invention is to provide a method and system for updating the root key when switching communication networks in a device terminal, solving the problems of high operating costs and wasted keys caused by the existing "return to factory when changing networks" mode. The quantum-safe device terminal of this invention can use corresponding root keys in various communication networks without returning to the factory to reset the root key. Furthermore, the root key used is not a reused initial root key; it is different in each communication network, further ensuring the security of encrypted communication and reducing the risk of attack.
[0007] Technical solution: The present invention provides a method for a device terminal to switch communication networks and update the root key, the method comprising the following steps:
[0008] (1) The root key generation and storage device generates an initial root key file0 and a root key encryption key key0 for the quantum security device terminal. The initial root key file0 is encrypted using the root key encryption key key0 to obtain the initial root key ciphertext FILE0, and it is pre-stored in the quantum security device terminal.
[0009] (2) When the quantum secure device terminal first accesses the communication network, that is, when it accesses the first communication network, it performs root key authentication with the first network communication device in the first communication network. After the authentication is successful, the quantum secure device terminal and the first network communication device use the key in the initial root key file0 to perform encrypted communication.
[0010] (3) When the quantum security device terminal changes its access communication network, that is, accesses the second communication network, it initiates identity authentication to the second root key operator in the second communication network through the second network communication device in the second communication network. After the identity authentication is successful, the second root key operator requests the root key generation and storage device for the first root key operator information in the first communication network where the first update key key-up1 and the initial root key file0 corresponding to the quantum security device terminal are located.
[0011] (4) The second root key operator receives and establishes a connection with the first root key operator based on the information of the first root key operator, obtains the initial root key file0 from the first root key operator, and performs an update operation on the initial root key file0 using the first update key key-up1 to obtain the first update root key file1;
[0012] (5) The second root key operator sends the first update root key file1 to the second network communication device, and then sends the first update key key-up1 and the method for performing the update operation to the quantum security device terminal via the second network communication device; the quantum security device terminal also performs the update operation to obtain the second update root key file1', and performs a consistency comparison between the local second update root key file1' and the first update root key file1 in the second network communication device. If the comparison is successful, encrypted communication is performed based on the key in the second update root key file1'.
[0013] Furthermore, the root key generation and storage device is provided with an association correspondence table, which is used to associate and store the device identity ID, initial root key file0 and corresponding root key encryption key0 of the quantum security device terminal.
[0014] Furthermore, the specific process of step (2) is as follows:
[0015] 1) When the quantum-safe device terminal accesses the first communication network, the quantum-safe device terminal generates a hash function to perform hash calculation on the initial root key ciphertext FILE0 to obtain the first hash value H1, and then initiates a root key authentication request to the first network communication device. The root key authentication request includes the device identity ID of the quantum-safe device terminal, the first hash value H1, the string str1 composed of the coefficients of each term except the highest term of the irreducible polynomial P1 used to generate the hash function, and the input random number S.
[0016] 2) The first network communication device then sends the root key authentication request to the root key generation and storage device via the first root key operator. The root key generation and storage device first retrieves the associated initial root key file0 and the corresponding root key encryption key key0 through the device identity ID of the quantum security device terminal; then, based on the coefficients of each term of the polynomial corresponding to each term of the string str1 (excluding the highest term), it generates an irreducible polynomial p1 with a highest term coefficient of 1. The irreducible polynomial p1 and the input random number s1 are used to generate a hash function H. p1,s1 Using hash function H p1,s1 The hash value of the ciphertext obtained by encrypting the initial root key file0 with the root key encryption key key0 is calculated to obtain the second hash value H2. The second hash value H2 is compared with the first hash value H1. If they match, the root key generation and storage device sends the locally stored initial root key file0 and the corresponding root key encryption key key0 to the first root key operator, and deletes the initial root key file0 and the root key encryption key key0 locally. The device identity ID of the quantum security device terminal - the root key has been issued to the root key operator is stored.
[0017] 3) After the first root key operator passes the root key authentication request, it forwards the root key encryption key key0 to the quantum security device terminal via the first network communication device. The quantum security device terminal uses the root key encryption key key0 to decrypt the local initial root key ciphertext FILE0 to obtain the initial root key file0. The first root key operator also sends the initial root key file0 to the first network communication device. After receiving it, the first network communication device uses the key in the initial root key file0 to conduct encrypted communication with the quantum security device terminal.
[0018] Furthermore, the specific process by which the second root key operator requests the first update key key-up1 corresponding to the quantum security device terminal from the root key generation and storage device is as follows:
[0019] A1: The second root key operator generates a root key acquisition request carrying the identity ID of the quantum security device terminal and sends the request to the root key generation and storage device;
[0020] A2: The root key generation and storage device uses the quantum security device terminal device identity ID as an index to query the storage information corresponding to the identity ID, which is "the device identity ID of the quantum security device terminal - the root key has been issued to the root key operator". Since it no longer has the initial root key file0 locally, the root key generation and storage device generates the first update key key-up1; wherein, the length of the first update key key-up1 is less than the length of the initial root key file0.
[0021] A3: Then, the root key generation and storage device sends the first root key operator information, which contains the first update key key-up1 and the initial root key file0, to the second root key operator.
[0022] Furthermore, performing the update operation refers to:
[0023] The initial root key file0 is divided into the first to Nth segments according to the length of the first update key key-up1; then, the first to Nth segments are XORed sequentially using the first update key key-up1, and the first to Nth segments after the XOR operation are concatenated to obtain the first update root key file1.
[0024] Furthermore, performing the update operation refers to:
[0025] Extract any number of segments from the initial root key file0 that are the same length as the first update key key-up1, and denote them as the first to the Mth segments. Record the position information of the extracted segments in the initial root key file0.
[0026] Then, the first update key key-up1 is XORed with the first to M segments in sequence, and the XORed first to M segments are used to replace the positions of the original segments, finally obtaining the first update root key file1.
[0027] Furthermore, the specific process of comparing the local second update root key file1' with the first update root key file1 in the second network communication device is as follows:
[0028] B1: The quantum-safe device terminal generates an irreducible polynomial p2 locally and records the string consisting of the coefficients of each term except the highest term in the irreducible polynomial p2, denoted as str2; then, the quantum-safe device terminal obtains the input random number s2 from the second updated root key file1' and records the index of the random number s2, index-s2, and then generates a hash function H based on the irreducible polynomial p2 and the input random number s2. p2,s2 Using hash function H p2,s2 Calculate the hash value of the second updated root key file1' to obtain the third hash value H3;
[0029] B2: The quantum security device terminal obtains the first encryption key k1 and the key index idx1 of the first encryption key k1 from the second update root key file1', and uses the first encryption key k1 to encrypt the third hash value H3, the string str2 and index-s2 to obtain ciphertext M, and sends the ciphertext M and the key index idx1 to the second network communication device.
[0030] B3: The second network communication device determines the first decryption key k1' from the first updated root key file1 based on the key index idx1, decrypts the ciphertext M using the first decryption key k1', obtains the third hash value H3', the string str2', and index-s2', and obtains the input random number s2' from the first updated root key file1 based on the index-s2'; the second network communication device generates an irreducible polynomial p2' 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 str2', and generates a hash function H' using the irreducible polynomial p2' and the input random number s2'. p2,s2 ;
[0031] Next, using the hash function H' p2,s2 Calculate the hash value of the local first update root key file1 to obtain the fourth hash value H4; compare the decrypted third hash value H3' with the fourth hash value H4. If they match, proceed to the next step.
[0032] B4: In response to a successful comparison, the second network communication device sends the successful comparison feedback information to the quantum security device terminal, which then conducts encrypted communication with the second network communication device based on the key in its local second updated root key file1'.
[0033] The present invention also includes a system for a method of switching communication networks for root key updates by a device terminal. The system includes a root key generation and storage device, a first root key operator, a second root key operator, a first network communication device, a second network communication device, and a quantum-secure device terminal. The first root key operator and the first network communication device are located in a first communication network, and the first root key operator is connected to both the first network communication device and the root key generation and storage device. The second key operator and the second network communication device are located in a second communication network, and the second key operator is connected to both the second network communication device and the root key generation and storage device. The quantum-secure device terminal is connected to either the first network communication device or the second network communication device.
[0034] The root key generation and storage device is used to generate an initial root key file0 and a root key encryption key key0 for the quantum security device terminal, encrypt the initial root key file0 with the root key encryption key0 to obtain the initial root key ciphertext FILE0, and store it in the quantum security device terminal; it is also used to generate a first update key key-up1.
[0035] The first root key operator is used to send the initial root key file0 to the first network communication device and the second root key operator.
[0036] The first network communication device is used to perform root key authentication with the quantum security device terminal. After successful authentication, it uses the key in the initial root key file0 to perform encrypted communication with the quantum security device terminal.
[0037] The second root key operator is used to authenticate the quantum security device terminal. After successful authentication, it requests the root key generation and storage device for the first root key operator information corresponding to the quantum security device terminal, namely the first update key key-up1 and the initial root key file0, and establishes a connection with the first root key operator information to obtain the initial root key file0. It is also used to perform an update operation on the initial root key file0 using the first update key key-up1 to obtain the first update root key file1, and send the first update root key file1 to the second network communication device. The first update key key-up1 and the method for performing the update operation are sent to the quantum security device terminal via the second network communication device.
[0038] The second network communication device is used to perform a consistency comparison of the first updated root key file1 with the quantum security device terminal;
[0039] When the quantum-secure device terminal connects to the first network communication device, it performs root key authentication. After successful authentication, it uses the key in the initial root key file0 to perform encrypted communication with the first network communication device. When connecting to the second network communication device, it initiates identity authentication with the second root key operator through the second network communication device. It also performs a consistency comparison with the second updated root key file1'. After successful comparison, it performs encrypted communication with the second network communication device based on the key in the second updated root key file1'.
[0040] The beneficial effects of this invention are:
[0041] (1) By updating the original root key based on the pre-set root key ciphertext, when the terminal is deregistered from one communication network and connected to another independent communication network, the terminal can complete the network switching and subsequent encrypted communication without returning to the factory, which greatly improves the flexibility and availability of the device; it solves the traditional problem that quantum security device terminals must return to the factory to reset the root key when changing communication networks, reduces operation and maintenance costs, reduces service interruption time, and improves the efficiency of device deployment and migration;
[0042] (2) Quantum security device terminals can use the corresponding root key in different communication networks, and the root key in each network is independently updated and generated, rather than simply reusing the initial root key, thereby realizing the "one network, one key" security isolation mechanism; at the same time, by using different root keys in different communication networks, the security risks that may be caused by the use of the same key in multiple networks are effectively avoided, and the overall security level of key management is improved.
[0043] (3) The root key can be securely updated during the switching process, which not only inherits the trust foundation of the initial preset key, but also realizes the security of the key, which meets the key evolution requirements in the quantum security scenario. Attached Figure Description
[0044] Figure 1 A system for updating the root key when the device terminal of this invention switches communication networks;
[0045] Figure 2 The method for updating the root key when the device terminal switches communication networks according to the present invention;
[0046] Figure 3 This is a schematic diagram illustrating the update operation performed by the present invention;
[0047] Figure 4 This is another schematic diagram illustrating the update operation performed by the present invention. Detailed Implementation
[0048] The present invention will be further described below with reference to the accompanying drawings and embodiments:
[0049] Existing quantum-safe devices have their root keys and related parameters pre-generated and fixed at the factory. Upon initial connection to a communication network, these parameters are activated and used. However, when a quantum-safe device needs to deregister from one communication network (e.g., the first network) and connect to another independent network (e.g., the second network) due to business adjustments, the root key pre-installed on the device and bound to the first network is considered invalid or insecure in the second network because different networks typically have their own independent key management systems. Currently, the only solution is to require the device to be physically "returned to the factory," i.e., the root key needs to be re-injected. This "return to the factory upon network change" model leads to problems such as high operational costs and wasted keys. Therefore, an innovative technical solution is urgently needed that can securely, online, and non-return-to-the-factory reset the root key between different communication networks while ensuring quantum-level security. This would improve device availability, reduce maintenance costs, and promote quantum-safe interconnectivity.
[0050] In view of this, this embodiment proposes a system for device terminals to switch communication networks to update root keys, such as... Figure 1 As shown, the system includes a root key generation and storage device 1, a first root key operator 2, a second root key operator 3, a first network communication device 4, a second network communication device 5, and a quantum security device terminal 6. The first root key operator 2 and the first network communication device 4 are located in a first communication network, and the first root key operator 2 is connected to both the first network communication device 4 and the root key generation and storage device 1. The second root key operator 3 and the second network communication device 5 are located in a second communication network, and the second root key operator 3 is connected to both the second network communication device 5 and the root key generation and storage device 1. The quantum security device terminal 6 is connected to either the first network communication device 4 or the second network communication device 5. The first communication network is the initial connection network, and the second communication network is the change connection network. In this system, the quantum security device terminal 6 initially connects to the first communication network, and later, according to business needs, it disconnects from the first communication network and connects to the second communication network. When the quantum security device terminal 6 connects to the first communication network, it has already been pre-loaded with the root key ciphertext FILE0.
[0051] The root key generation and storage device 1 is used to generate an initial root key file0 and a root key encryption key key0 for the quantum security device terminal 6, and then use the root key encryption key key0 to encrypt the initial root key file0 to obtain the initial root key ciphertext FILE0, which is then stored in the quantum security device terminal 6; it is also used to generate the first update key key-up1.
[0052] The first root key operator 2 is used to send the initial root key file0 to the first network communication device 4 and the second root key operator 3.
[0053] The first network communication device 4 is used to perform root key authentication with the quantum security device terminal 6. After successful authentication, it uses the key in the initial root key file0 to perform encrypted communication with the quantum security device terminal 6.
[0054] The second root key operator 3 is used to authenticate the quantum security device terminal 6. After successful authentication, it requests the root key generation and storage device 1 for the information of the first root key operator 2, which contains the first update key key-up1 and the initial root key file0 corresponding to the quantum security device terminal 6, and establishes a connection with the first root key operator 2 information to obtain the initial root key file0. It is also used to perform an update operation on the initial root key file0 using the first update key key-up1 to obtain the first update root key file1, and send the first update root key file1 to the second network communication device 5. The first update key key-up1 and the method for performing the update operation are sent to the quantum security device terminal 6 via the second network communication device 5.
[0055] The second network communication device 5 is used to perform a consistency comparison of the first updated root key file1 with the quantum security device terminal 6;
[0056] When the quantum security device terminal 6 connects to the first network communication device 4, it performs root key authentication. After successful authentication, it uses the key in the initial root key file0 to perform encrypted communication with the first network communication device 4. When it connects to the second network communication device 5, it initiates identity authentication to the second root key operator 3 through the second network communication device 5. It also performs a consistency comparison with the second updated root key file1' with the second network communication device 5. After successful comparison, it performs encrypted communication with the second network communication device 5 based on the key in the second updated root key file1'.
[0057] This invention solves the traditional problem that quantum security device terminal 6 must be returned to the factory to reset the root key when changing the communication network, reducing operation and maintenance costs, reducing service interruption time, and improving the efficiency of device deployment and migration.
[0058] This embodiment also proposes a method for device terminals to switch communication networks to update the root key, such as... Figure 2 As shown, the method includes the following steps:
[0059] (1) The root key generation and storage device generates an initial root key file0 and a root key encryption key key0 for the quantum security device terminal. Then, the root key encryption key key0 is used to encrypt the initial root key file0 to obtain the initial root key ciphertext FILE0, and the initial root key ciphertext FILE0 is pre-stored in the quantum security device terminal. At the same time, the root key generation and storage device has an association correspondence table, which is used to associate the device identity ID of the quantum security device terminal, the initial root key file0 and the corresponding root key encryption key key0 and store them in the table.
[0060] (2) When the quantum-safe device terminal first accesses the communication network, i.e., the first communication network, it performs root key authentication with the first network communication device in the first communication network. After successful authentication, the quantum-safe device terminal and the first network communication device use the key in the initial root key file0 for encrypted communication. The specific process is as follows:
[0061] 1) When the quantum-safe device terminal accesses the first communication network, the quantum-safe device terminal generates a hash function to perform hash calculation on the initial root key ciphertext FILE0 to obtain the first hash value H1, and then initiates a root key authentication request to the first network communication device. The root key authentication request includes the device identity ID of the quantum-safe device terminal, the first hash value H1, the string str1 composed of the coefficients of each term except the highest term of the irreducible polynomial P1 used to generate the hash function, and the input random number S;
[0062] 2) The first network communication device then sends the root key authentication request to the root key generation and storage device via the first root key operator. The root key generation and storage device first retrieves the associated initial root key file0 and the corresponding root key encryption key key0 through the device identity ID of the quantum security device terminal; then, based on the coefficients of each term of the polynomial corresponding to each term of the string str1 (excluding the highest term), it generates an irreducible polynomial p1 with a highest term coefficient of 1. The irreducible polynomial p1 and the input random number s1 are used to generate a hash function H. p1,s1 Using hash function H p1,s1The hash value of the ciphertext obtained by encrypting the initial root key file0 with the root key encryption key key0 is calculated to obtain the second hash value H2. The second hash value H2 is compared with the first hash value H1. If they match, the root key generation and storage device sends the locally stored initial root key file0 and the corresponding root key encryption key key0 to the first root key operator, and deletes the initial root key file0 and the root key encryption key key0 locally. The device identity ID of the quantum security device terminal - the root key has been issued to the root key operator is stored.
[0063] 3) After the first root key operator passes the root key authentication request, it forwards the root key encryption key key0 to the quantum security device terminal via the first network communication device. The quantum security device terminal uses the root key encryption key key0 to decrypt the local initial root key ciphertext FILE0 to obtain the initial root key file0, which can then be used to encrypt data in the first communication network. The first root key operator also sends the initial root key file0 to the first network communication device. After receiving it, the first network communication device uses the key in the initial root key file0 to conduct encrypted communication with the quantum security device terminal in the first communication network. That is, the initial root key file0 serves as the root key used for initial communication with the quantum security device terminal in the first communication network.
[0064] Thus, in the first communication network, the quantum-safe device terminal uses the initial root key file0, and the first network communication device uses the corresponding initial root key file0 for initial communication; at the same time, apart from the first communication network, no other device (including the root key generation and storage device) has file0, ensuring that file0 only serves the first communication network.
[0065] (3) When the quantum security device terminal changes its access communication network, i.e. accesses the second communication network, it initiates identity authentication with the second root key operator in the second communication network through the second network communication device in the second communication network. After the identity authentication is successful, the second root key operator requests the root key generation and storage device for the first root key operator information in the first communication network where the first update key key-up1 and the initial root key file0 corresponding to the quantum security device terminal are located. The root key generation and storage device then sends the first key operator information in the first communication network where the first update key key-up1 and the initial root key file0 are located to the second key operator.
[0066] The specific process by which the second root key operator requests the first update key key-up1 corresponding to the quantum security device terminal from the root key generation and storage device is as follows:
[0067] A1: The second root key operator generates a root key acquisition request carrying the identity ID of the quantum security device terminal and sends the request to the root key generation and storage device;
[0068] A2: The root key generation and storage device uses the quantum security device terminal device identity ID as an index to query the storage information corresponding to the identity ID, which is "the device identity ID of the quantum security device terminal - the root key has been issued to the root key operator". Since it no longer has the initial root key file0 locally, the root key generation and storage device generates the first update key key-up1; wherein, the length of the first update key key-up1 is less than the length of the initial root key file0.
[0069] A3: Then, the root key generation and storage device sends the first root key operator information, which contains the first update key key-up1 and the initial root key file0, to the second root key operator.
[0070] (4) The second root key operator receives and establishes a connection with the first root key operator based on the information of the first root key operator, then obtains the initial root key file0 from the first root key operator, and performs an update operation on the initial root key file0 using the first update key key-up1 to obtain the first update root key file1;
[0071] like Figure 3 As shown, performing an update operation can refer to:
[0072] The initial root key file0 is divided into the first to Nth segments according to the length of the first update key key-up1, such as the first segment, the second segment, and so on. Then, the first to Nth segments are XORed sequentially using the first update key key-up1, and the first to Nth segments after the XOR operation are concatenated to obtain the first update root key file1.
[0073] like Figure 4 As shown, performing an update operation can also refer to:
[0074] Extract any number of segments from the initial root key file0 that are the same length as the first update key key-up1, and denote them as the first to the Mth segments, such as the first segment and the third segment (of course, in actual operation, it will not be just two segments extracted, this is just an example). Record the position information of the extracted segments in the initial root key file0.
[0075] Then, the first update key key-up1 is XORed with the first to Mth segments in sequence, and the XORed results of the first to Mth segments are used to replace the positions of the original segments, finally obtaining the first update root key file1.
[0076] (5) The second root key operator sends the first update root key file1 to the second network communication device, and then sends the first update key key-up1 and the method for performing the update operation to the quantum security device terminal via the second network communication device; the quantum security device terminal also performs the update operation locally to obtain the second update root key file1', and the quantum security device terminal performs a consistency comparison between the local second update root key file1' and the first update root key file1 in the second network communication device. If the comparison is successful, encrypted communication is performed based on the key in the second update root key file1'.
[0077] The specific process of comparing the consistency of the second updated root key file1' with the first updated root key file1 is as follows:
[0078] B1: The quantum-safe device terminal generates an irreducible polynomial p2 locally and records the string consisting of the coefficients of each term except the highest term in the irreducible polynomial p2, denoted as str2; then, the quantum-safe device terminal obtains the input random number s2 from the second updated root key file1' and records the index of the random number s2, index-s2, and then generates a hash function H based on the irreducible polynomial p2 and the input random number s2. p2,s2 Using hash function H p2,s2 Calculate the hash value of the second updated root key file1' to obtain the third hash value H3;
[0079] B2: The quantum security device terminal obtains the first encryption key k1 and the key index idx1 of the first encryption key k1 from the second update root key file1', and uses the first encryption key k1 to encrypt the third hash value H3, the string str2 and index-s2 to obtain ciphertext M, and sends the ciphertext M and the key index idx1 to the second network communication device.
[0080] B3: The second network communication device determines the first decryption key k1' from the first updated root key file1 based on the key index idx1, decrypts the ciphertext M using the first decryption key k1', obtains the third hash value H3', the string str2', and index-s2', and obtains the input random number s2' from the first updated root key file1 based on the index-s2'; the second network communication device generates an irreducible polynomial p2' 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 str2', and generates a hash function H' using the irreducible polynomial p2' and the input random number s2'. p2,s2 ;
[0081] Next, using the hash function H' p2,s2Calculate the hash value of the local first update root key file1 to obtain the fourth hash value H4; compare the decrypted third hash value H3' with the fourth hash value H4. If they match, proceed to the next step.
[0082] B4: In response to a successful comparison, the second network communication device sends the successful comparison feedback information to the quantum security device terminal, which then conducts encrypted communication with the second network communication device based on the key in its local second updated root key file1'.
[0083] If there is a subsequent process of re-deregistering and re-entering another communication network, steps (3) to (5) above can be repeated. In this way, the quantum security device terminal can use the corresponding root key in each communication network without returning to the factory to reset the root key. Moreover, it is not a reused initial root key, and the root key used in each communication network is different. It can be seen that the quantum security device terminal can use the corresponding root key in different communication networks, and the root key in each network is independently updated and generated, rather than simply reusing the initial root key, thereby realizing the "one network, one key" security isolation mechanism; at the same time, by using different root keys in each communication network, the security risks that may be caused by the use of the same key in multiple networks are effectively avoided, and the overall security level of key management is improved.
[0084] In summary, this invention, based on a pre-set root key ciphertext, updates the original root key when a terminal deregisters from one communication network and connects to another independent communication network. This allows the terminal to complete network switching and subsequent encrypted communication without returning to the factory, significantly improving the flexibility and availability of the device. Moreover, the root key can be securely updated during the switching process, inheriting the trusted foundation of the initial pre-set key while ensuring key security, which meets the key evolution requirements in quantum security scenarios.
Claims
1. A method for a device terminal to switch communication networks to update the root key, characterized in that, The method includes the following steps: (1) The root key generation and storage device generates an initial root key file0 and a root key encryption key key0 for the quantum security device terminal. The initial root key file0 is encrypted using the root key encryption key key0 to obtain the initial root key ciphertext FILE0, and it is pre-stored in the quantum security device terminal. (2) When the quantum secure device terminal first accesses the communication network, that is, when it accesses the first communication network, it performs root key authentication with the first network communication device in the first communication network. After the authentication is successful, the quantum secure device terminal and the first network communication device use the key in the initial root key file0 to perform encrypted communication. (3) When the quantum security device terminal changes its access communication network, that is, accesses the second communication network, it initiates identity authentication to the second root key operator in the second communication network through the second network communication device in the second communication network. After the identity authentication is successful, the second root key operator requests the root key generation and storage device for the first root key operator information in the first communication network where the first update key key-up1 and the initial root key file0 corresponding to the quantum security device terminal are located. (4) The second root key operator receives and establishes a connection with the first root key operator based on the information of the first root key operator, obtains the initial root key file0 from the first root key operator, and performs an update operation on the initial root key file0 using the first update key key-up1 to obtain the first update root key file1; (5) The second root key operator sends the first update root key file1 to the second network communication device, and then sends the first update key key-up1 and the method for performing the update operation to the quantum security device terminal via the second network communication device; The quantum-safe device terminal also performs an update operation to obtain the second update root key file1'. It then performs a consistency comparison between the local second update root key file1' and the first update root key file1 in the second network communication device. If the comparison is successful, it performs encrypted communication based on the key in the second update root key file1'. The aforementioned "performing update operation" refers to: The initial root key file0 is divided into the first to Nth segments according to the length of the first update key key-up1; then, the first to Nth segments are XORed sequentially using the first update key key-up1, and the first to Nth segments after the XOR operation are concatenated to obtain the first update root key file1; The execution of the update operation may refer to: Extract any number of segments from the initial root key file0 that are the same length as the first update key key-up1, and denote them as the first to the Mth segments. Record the position information of the extracted segments in the initial root key file0. Then, the first update key key-up1 is XORed with the first to M segments in sequence, and the XORed first to M segments are used to replace the positions of the original segments, finally obtaining the first update root key file1.
2. The method for updating the root key by switching communication networks of a device terminal according to claim 1, characterized in that: The root key generation and storage device is equipped with an association table, which is used to associate and store the device identity ID, initial root key file0, and corresponding root key encryption key0 of the quantum security device terminal.
3. The method for updating the root key by switching communication networks of a device terminal according to claim 2, characterized in that, The specific process of step (2) is as follows: 1) When the quantum-safe device terminal accesses the first communication network, the quantum-safe device terminal generates a hash function to perform hash calculation on the initial root key ciphertext FILE0 to obtain the first hash value H1, and then initiates a root key authentication request to the first network communication device. The root key authentication request includes the device identity ID of the quantum-safe device terminal, the first hash value H1, the string str1 composed of the coefficients of each term except the highest term of the irreducible polynomial P1 used to generate the hash function, and the input random number S. 2) The first network communication device then sends the root key authentication request to the root key generation and storage device via the first root key operator. The root key generation and storage device first retrieves the associated initial root key file0 and the corresponding root key encryption key key0 through the device identity ID of the quantum security device terminal; then, based on the coefficients of each term of the polynomial corresponding to each term of the string str1 (excluding the highest term), it generates an irreducible polynomial p1 with a highest term coefficient of 1. The irreducible polynomial p1 and the input random number s1 are used to generate a hash function H. p1,s1 Using hash function H p1,s1 The hash value of the ciphertext obtained by encrypting the initial root key file0 with the root key encryption key key0 is calculated to obtain the second hash value H2. The second hash value H2 is compared with the first hash value H1. If they match, the root key generation and storage device sends the locally stored initial root key file0 and the corresponding root key encryption key key0 to the first root key operator, and deletes the initial root key file0 and the root key encryption key key0 locally. The device identity ID of the quantum security device terminal - the root key has been issued to the root key operator is stored. 3) After the first root key operator passes the root key authentication request, it forwards the root key encryption key key0 to the quantum security device terminal via the first network communication device. The quantum security device terminal uses the root key encryption key key0 to decrypt the local initial root key ciphertext FILE0 to obtain the initial root key file0. The first root key operator also sends the initial root key file0 to the first network communication device. After receiving it, the first network communication device uses the key in the initial root key file0 to conduct encrypted communication with the quantum security device terminal.
4. The method for updating the root key by switching communication networks of a device terminal according to claim 3, characterized in that, The specific process by which the second root key operator requests the first update key key-up1 corresponding to the quantum security device terminal from the root key generation and storage device is as follows: A1: The second root key operator generates a root key acquisition request carrying the identity ID of the quantum security device terminal and sends the request to the root key generation and storage device; A2: The root key generation and storage device uses the quantum security device terminal device identity ID as an index to query the storage information corresponding to the identity ID, which is "the device identity ID of the quantum security device terminal - the root key has been issued to the root key operator". Since it no longer has the initial root key file0 locally, the root key generation and storage device generates the first update key key-up1; wherein, the length of the first update key key-up1 is less than the length of the initial root key file0. A3: Then, the root key generation and storage device sends the first root key operator information, which contains the first update key key-up1 and the initial root key file0, to the second root key operator.
5. The method for updating the root key by switching communication networks of a device terminal according to claim 1, characterized in that, The specific process of comparing the local second update root key file1' with the first update root key file1 in the second network communication device is as follows: B1: The quantum-safe device terminal generates an irreducible polynomial p2 locally and records the string consisting of the coefficients of each term except the highest term in the irreducible polynomial p2, denoted as str2; then, the quantum-safe device terminal obtains the input random number s2 from the second updated root key file1' and records the index of the random number s2, index-s2, and then generates a hash function H based on the irreducible polynomial p2 and the input random number s2. p2,s2 Using hash function H p2,s2 Calculate the hash value of the second updated root key file1' to obtain the third hash value H3; B2: The quantum security device terminal obtains the first encryption key k1 and the key index idx1 of the first encryption key k1 from the second update root key file1', and uses the first encryption key k1 to encrypt the third hash value H3, the string str2 and index-s2 to obtain ciphertext M, and sends the ciphertext M and the key index idx1 to the second network communication device. B3: The second network communication device determines the first decryption key k1' from the first updated root key file1 based on the key index idx1, decrypts the ciphertext M using the first decryption key k1', obtains the third hash value H3', the string str2', and index-s2', and obtains the input random number s2' from the first updated root key file1 based on the index-s2'; the second network communication device generates an irreducible polynomial p2' 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 str2', and generates a hash function H' using the irreducible polynomial p2' and the input random number s2'. p2,s2 ; Next, using the hash function H' p2,s2 Calculate the hash value of the local first update root key file1 to obtain the fourth hash value H4; compare the decrypted third hash value H3' with the fourth hash value H4. If they match, proceed to the next step. B4: In response to a successful comparison, the second network communication device sends the successful comparison feedback information to the quantum security device terminal, which then conducts encrypted communication with the second network communication device based on the key in its local second updated root key file1'.
6. A system for updating the root key based on the method of switching communication networks of a device terminal according to any one of claims 1 to 5, characterized in that: The system includes a root key generation and storage device, a first root key operator, a second root key operator, a first network communication device, a second network communication device, and a quantum security device terminal. The first root key operator and the first network communication device are located in a first communication network, and the first root key operator is connected to both the first network communication device and the root key generation and storage device. The second key operator and the second network communication device are located in a second communication network, and the second key operator is connected to both the second network communication device and the root key generation and storage device. The quantum security device terminal is connected to either the first network communication device or the second network communication device; The root key generation and storage device is used to generate an initial root key file0 and a root key encryption key key0 for the quantum security device terminal, encrypt the initial root key file0 with the root key encryption key0 to obtain the initial root key ciphertext FILE0, and store it in the quantum security device terminal; it is also used to generate a first update key key-up1. The first root key operator is used to send the initial root key file0 to the first network communication device and the second root key operator. The first network communication device is used to perform root key authentication with the quantum security device terminal. After successful authentication, it uses the key in the initial root key file0 to perform encrypted communication with the quantum security device terminal. The second root key operator is used to authenticate the quantum security device terminal. After successful authentication, it requests the root key generation and storage device for the first root key operator information corresponding to the quantum security device terminal, namely the first update key key-up1 and the initial root key file0, and establishes a connection with the first root key operator information to obtain the initial root key file0. It is also used to perform an update operation on the initial root key file0 using the first update key key-up1 to obtain the first update root key file1, and send the first update root key file1 to the second network communication device. The first update key key-up1 and the method for performing the update operation are sent to the quantum security device terminal via the second network communication device. The second network communication device is used to perform a consistency comparison of the first updated root key file1 with the quantum security device terminal; When the quantum security device terminal connects to the first network communication device, it performs root key authentication. After successful authentication, it communicates with the first network communication device using the key in the initial root key file0. When it connects to the second network communication device, it initiates identity authentication with the second root key operator through the second network communication device. It also performs a consistency comparison with the second network communication device for the second update root key file1'. If the comparison is successful, it performs encrypted communication with the second network communication device based on the key in the second update root key file1'.
Citation Information
Patent Citations
Method and system for accessing quantum security device to base station
CN115276974A
Beidou short message encryption communication system based on quantum key
CN117098123A