A method for authenticating a quantum security terminal accessing a quantum security network
Through multi-party verification between the quantum security terminal and the base station, the identity authentication and key file consistency of the quantum security terminal are ensured, which solves the problem of the lack of security authentication mechanism in the existing technology and achieves the effect of secure access to the base station. .
Patent Information
- Application Number
- CN202310087005.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-30
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2043-01-30
AI Technical Summary
Existing quantum security terminals lack mature security authentication mechanisms when accessing base stations and are vulnerable to malicious attacks, resulting in threats to the quantum security network and user terminals.
The quantum security terminal sends an access request message to the base station, carrying the root key index and encrypted data. The base station and the root key server perform identity authentication and ensure the consistency and correctness of the key file through multi-party verification to achieve secure access. .
It effectively ensures the security and key file consistency during the identity authentication process of the quantum security terminal, improves the security during the information transmission process, and prevents malicious attacks.
Smart Images

Figure CN116074839B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security technology, and in particular to an authentication method for a quantum security terminal to access a quantum security network. Background Art
[0002] Traditional information security is achieved through encryption algorithms that rely on computational complexity. However, with the rapid development of computing power, traditional encryption algorithms that rely on computational complexity face increasing security risks.
[0003] As society attaches more and more importance to the security of communications, quantum secure communication technology has received attention from all parties. It can perfectly overcome the potential security risks of traditional communication technology and ensure the absolute security and reliability of the communication process.
[0004] Quantum secure communication is the first quantum information technology to be put into practical use and industrialized. At present, there are many quantum security terminals on the market for ensuring information security. Quantum security terminals can perform quantum encryption on data during use to ensure that the data they send is highly secure. When multiple quantum security terminals need to interact, they need to communicate with the base station in a network to transmit data and relay keys. How to authenticate the quantum security terminal before it accesses the base station to ensure the legitimacy of its identity? At present, there is no mature method and system specifically for quantum security terminals to securely access the base station. If the quantum security terminal is deployed in an untrusted environment, it is vulnerable to attacks by malicious users, posing a serious threat to the quantum security network and user terminals. Therefore, in the networking process of the quantum security terminal, a safe and complete authentication mechanism needs to be designed to ensure its security. Summary of the invention
[0005] In order to solve the above problems, the present invention discloses an authentication method for a quantum security terminal to access a quantum security network.
[0006] The present application provides a method for authenticating a quantum security terminal accessing a quantum security network, the method comprising:
[0007] The quantum security terminal sends an access request message to the base station, and carries a root key index and first encrypted data in the access request message, wherein the encrypted information in the first encrypted data includes a device ID corresponding to the quantum security terminal and a first hash value corresponding to a root key ciphertext file pre-injected in the quantum security terminal;
[0008] The base station receives an access request message, generates an authentication request message according to the access request message, and sends the authentication request message to a root key server, wherein the authentication request message includes a root key index and first encrypted data;
[0009] The root key server decrypts the first encrypted data to obtain the device ID and the first hash value, and performs identity authentication on the quantum security terminal according to the device ID and the first hash value; and when the identity authentication is legal, searches for the corresponding root key plaintext file according to the root key index, calculates the second hash value corresponding to the root key plaintext file, and then searches for the decryption parameter of the pre-annotated root key ciphertext file according to the root key index, encrypts the second hash value and the decryption parameter to form the second encrypted data, and returns an authentication response message to the base station, carrying the device ID and the second encrypted data in the authentication response message;
[0010] When the identity authentication of the quantum security terminal is legal, the base station allocates a network access ID to the quantum security terminal, generates an access response message based on the authentication response message, and sends the access response message to the quantum security terminal, wherein the access response message carries the network access ID and the second encrypted data;
[0011] The quantum security terminal decrypts the received second encrypted data to obtain a second hash value and a decryption parameter, decrypts the pre-annotated root key ciphertext file according to the decryption parameter to obtain a root key plaintext file, calculates the hash value of the decrypted root key ciphertext file, and compares it with the second hash value, generates a target index corresponding to the root key plaintext file when the comparison result is consistent, and then encrypts the target index and the device ID corresponding to the quantum security terminal to obtain third encrypted data, and sends an access command message carrying the third encrypted data to the base station;
[0012] The base station generates a key request message based on the access command message, and sends the root key request message to the root key server, where the root key request message carries the third encrypted data and the root key index;
[0013] The root key server receives the root key request message, searches for and determines the root key generation record according to the root key index, decrypts the third encrypted data to obtain the device ID and the target index, verifies whether the decrypted device ID is consistent with the root key generation record, and after verification, obtains the file location information corresponding to the target index through the root key generation record, and then returns a root key response message to the base station, and carries the file location information of the root key file corresponding to the target index in the root key response message;
[0014] The base station receives the root key response message, downloads the root key file from the root key server according to the file location information in the root key response message, and returns an access completion message to the quantum security terminal after the base station completes the download;
[0015] The quantum security terminal receives the access completion message and performs a key consistency check with the base station. If the key consistency check passes, the process ends. Otherwise, according to the preset request number threshold, the pre-injected root key ciphertext file is used again to execute the access request process.
[0016] In the above scheme, the root key server and the quantum security terminal are both preset with a first key, and the first encrypted data is obtained by encrypting the device ID and the first hash value with the first key;
[0017] The root key server searches for a root key generation record according to a root key index in the authentication request message, obtains a first key for decrypting first encrypted data according to the root key generation record, and decrypts the first encrypted data to obtain a device ID and a first hash value.
[0018] In the above solution, the root key server and the quantum security terminal are both preset with a second key, and the second encrypted data is obtained by encrypting the second hash value and the decryption parameter with the second key;
[0019] The quantum security terminal decrypts the second encrypted data using a preset second key to obtain a second Hash value and a decryption parameter.
[0020] In the above scheme, the decryption parameters include a first key extension parameter and a second key extension parameter; the first key extension parameter is stored in the root key server, and the second key extension parameter is stored in the quantum security terminal;
[0021] The method for the quantum security terminal to decrypt the pre-injected root key ciphertext file includes:
[0022] The root key server searches for a root key generation record according to a root key index, obtains a first key extension parameter through the root key generation record, and generates second encrypted data carrying the first key extension parameter;
[0023] The quantum security terminal decrypts the received second encrypted data to obtain a first key extension parameter, and expands the second key extension parameter in the quantum security terminal and the received first key extension parameter according to a preset first expansion rule to obtain an extended key for decrypting a root key ciphertext file.
[0024] In the above solution, the method for the quantum security terminal to encrypt the third encrypted data includes:
[0025] The quantum security terminal decrypts the received second encrypted data to obtain a first key extension parameter, expands the second key extension parameter in the quantum security terminal and the received first key extension parameter according to a preset second expansion rule to obtain a transmission key for encrypting a device ID and a target index, and uses the transmission key to encrypt the device ID and the target index to obtain third encrypted data.
[0026] In the above solution, the root key server also stores a second key extension parameter;
[0027] The method for decrypting the third encrypted data by the root key server includes:
[0028] The root key server expands the first key expansion parameter and the second key expansion parameter according to a preset second expansion rule to obtain a transmission key; and decrypts the third encrypted data using the transmission key to obtain a device ID and a target index.
[0029] In the above scheme, when the root key ciphertext files pre-injected in the quantum security terminal include multiple, the method for the quantum security terminal to decrypt the pre-injected root key ciphertext files includes:
[0030] The quantum security terminal expands the first key extension parameter and the second key extension parameter to N extended keys according to a preset third extension rule, where N is the number of pre-annotated root key ciphertext files, and then obtains an extended key for decrypting each pre-annotated root key ciphertext file according to a preset key correspondence relationship.
[0031] In the above scheme, the quantum security terminal is preset with multiple pre-injected root key groups, and each pre-injected root key group contains one or more root key ciphertext files;
[0032] When sending an access request message, the quantum security terminal selects one of the unauthenticated root key groups for access authentication, and uses the hash value of the first root key ciphertext file in the root key group as the first hash value;
[0033] When the root key server generates an authentication response message, the hash value of the first root key plaintext file in the found key group is used as the second hash value.
[0034] In the above scheme, the number of root key ciphertext files in each root key group in the quantum security terminal is an even number, and the even number of root key ciphertext files are divided into an uplink root key ciphertext file and a downlink root key ciphertext file arranged in pairs;
[0035] The quantum security terminal obtains a first hash value by calculating a hash value of a first uplink root key ciphertext file and a downlink root key ciphertext file in the root key group;
[0036] The root key server obtains the second hash value by calculating the combined hash value of the first upstream root key plaintext file and the downstream root key plaintext file in the found key group.
[0037] In the above scheme, the method for the root key server to authenticate the quantum security terminal specifically includes:
[0038] The root key server decrypts the first encrypted data to obtain the device ID and the first hash value; searches for the root key generation record according to the root key index in the authentication request message, searches for and obtains the root key ciphertext file corresponding to the root key index based on the root key generation record, calculates and verifies whether the hash value of the found root key ciphertext file is the same as the first hash value; if the hash values are the same and the device ID in the received first encrypted data matches the device ID in the root key generation record, the identity authentication is successful, otherwise, the identity authentication fails.
[0039] In the above scheme, when the identity authentication of the quantum security terminal is legal, the base station also generates an authentication request message according to the received authentication response message, and sends the authentication request message to the user center server. The authentication request message contains the device ID in the authentication response message and the network access ID assigned by the base station to the quantum security terminal;
[0040] The user center server authenticates the quantum security terminal according to the device ID, and records the network access ID in the authentication request message after the authentication is passed.
[0041] In the authentication method of the present application, the root key server authenticates the quantum security terminal by verifying whether the hash value of the root key ciphertext file in the quantum security terminal is consistent with that in the quantum security terminal, and whether the device ID of the quantum security terminal is consistent with the generation record of the root key server; after the identity authentication is passed, the quantum security terminal decrypts the root key plaintext file according to the received decryption parameters, performs a hash check on the root key plaintext file to verify the correctness of its decryption, and generates a target index corresponding to the successfully verified root key plaintext file, and sends the target index and device ID to the base station; the base station constructs a root key request message based on the received target index and device ID, and sends the root key plaintext file to the base station. The server sends a root key request message to request the key. The root key server performs authentication again based on the device ID in the message, and only allows the base station to download the root key file corresponding to the target index after the authentication is passed; the above process requires multi-party verification. If one party fails the verification, the authentication access fails, which ensures the security of the quantum security terminal authentication process; the verification is based on the root key ciphertext file and the root key plaintext file, which effectively ensures the consistency and correctness of the key file during the access process; in addition, during the authentication process, the message content transmitted between the quantum security terminal, the base station and the root key server is encrypted, which further improves the security of the information transmission process. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of a method for a quantum security terminal to obtain an access base station IP in Example 2 of the present application;
[0043] Figure 2 This is a schematic diagram of the method of steps 105-110 in Example 2 of the present application;
[0044] Figure 3 This is a schematic diagram of the method of steps 110-116 in Example 2 of the present application;
[0045] Figure 4 This is a schematic diagram of the method of steps 117-124 in Example 2 of the present application;
[0046] Figure 5 This is a schematic diagram of the authentication method for a quantum security terminal to access a base station in Example 1 of the present application. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solutions and advantages of this application clearer, the following is a further detailed description of this application with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0048] Embodiment 1: A method for authenticating a quantum security terminal accessing a quantum security network, wherein, in order to ensure normal communication during use of the quantum security terminal, one or more root key groups are pre-injected into the quantum security terminal, each root key group contains one or more root key files for encrypting data transmitted by the quantum security terminal, and in order to ensure the security of the root key files during distribution to the quantum security terminal, the root key files pre-injected into the root key group in the quantum security terminal are encrypted root key ciphertext files; and the file header of each separate root key ciphertext file carries attribute information corresponding to the file, and the attribute information includes the file type, group ID, total number of files, number of type files, type file sequence number, and group selection random number R corresponding to the root key ciphertext file g ; Each root key ciphertext file in each root key group has a corresponding file number, where the file number is odd as the uplink root key of the quantum security terminal, and the file number is even as the downlink root key of the quantum security terminal;
[0049] In addition, the quantum security terminal also stores root key parameter data corresponding to each root key group, which includes: device ID (denoted as DID) corresponding to the root key, type identification, and authentication information corresponding to each root key group file; the authentication information includes: root key index I1 corresponding to the root key group, second key expansion parameter, first key and second key; wherein the type identification is used to indicate the key expansion algorithm and the decryption key expansion algorithm;
[0050] See also Figure 5 The authentication method for a quantum security terminal to access a base station in this embodiment includes:
[0051] The quantum security terminal sends an access request message to the base station, and carries a root key index and first encrypted data in the access request message, wherein the encrypted information in the first encrypted data includes a device ID corresponding to the quantum security terminal and a first hash value corresponding to a root key ciphertext file pre-injected in the quantum security terminal;
[0052] The base station receives an access request message, generates an authentication request message according to the access request message, and sends the authentication request message to a root key server, wherein the authentication request message includes a root key index and first encrypted data;
[0053] The root key server decrypts the first encrypted data to obtain a device ID and a first hash value, and performs identity authentication on the quantum security terminal according to the device ID and the first hash value;
[0054] Specifically, the first key may be preset in both the root key server and the quantum security terminal, and the first encrypted data is obtained by encrypting the device ID and the first hash value with the first key; that is, the root key server and the quantum security terminal share the first key, and the root key server uses the preset first key to decrypt the first encrypted data;
[0055] In a possible example, the root key server searches for a root key generation record through a root key index in an authentication request message, obtains a first key for decrypting first encrypted data according to the root key generation record, and decrypts the first encrypted data to obtain a device ID and a first hash value.
[0056] When the identity authentication is legal, the root key server searches for the corresponding root key plaintext file according to the root key index, calculates the second hash value corresponding to the root key plaintext file, searches for the decryption parameter of the pre-annotated root key ciphertext file according to the root key index, encrypts the second hash value and the decryption parameter to form the second encrypted data, and returns an authentication response message to the base station, carrying the device ID and the second encrypted data in the authentication response message;
[0057] The method for the root key server to authenticate the quantum security terminal specifically includes:
[0058] The root key server decrypts the first encrypted data to obtain the device ID and the first hash value; searches for the root key generation record according to the root key index in the authentication request message, searches for and obtains the root key ciphertext file corresponding to the root key index based on the root key generation record, calculates and verifies whether the hash value of the found root key ciphertext file is the same as the first hash value; if the hash values are the same and the device ID in the received first encrypted data matches the device ID in the root key generation record, the identity authentication is successful, otherwise, the identity authentication fails.
[0059] When the identity authentication of the quantum security terminal is legal, the base station allocates a network access ID to the quantum security terminal, generates an access response message based on the authentication response message, and sends the access response message to the quantum security terminal, wherein the access response message carries the network access ID and the second encrypted data;
[0060] The quantum security terminal decrypts the received second encrypted data to obtain a second hash value and a decryption parameter, decrypts the pre-annotated root key ciphertext file according to the decryption parameter to obtain a root key plaintext file, calculates the hash value of the decrypted root key ciphertext file, and compares it with the second hash value, generates a target index corresponding to the root key plaintext file when the comparison result is consistent, and then encrypts the target index and the device ID corresponding to the quantum security terminal to obtain third encrypted data, and sends an access command message carrying the third encrypted data to the base station;
[0061] In a possible example, the root key server and the quantum security terminal are both preset with a second key, and the second encrypted data is obtained by encrypting a second hash value and a decryption parameter using the second key; the quantum security terminal decrypts the second encrypted data using the preset second key to obtain a second hash value and a decryption parameter.
[0062] In this embodiment, the decryption parameters include a first key extension parameter and a second key extension parameter; the first key extension parameter is stored in the root key server, and the second key extension parameter is stored in the quantum security terminal;
[0063] The method for the quantum security terminal to decrypt the pre-injected root key ciphertext file includes:
[0064] The root key server searches for a root key generation record according to a root key index, obtains a first key extension parameter through the root key generation record, and generates second encrypted data carrying the first key extension parameter;
[0065] The quantum security terminal decrypts the received second encrypted data to obtain a first key extension parameter, and expands the second key extension parameter in the quantum security terminal and the received first key extension parameter according to a preset first expansion rule to obtain an extended key for decrypting a root key ciphertext file.
[0066] The base station generates a key request message based on the access command message, and sends the root key request message to the root key server, where the root key request message carries the third encrypted data and the root key index;
[0067] The root key server receives the root key request message, searches for and determines the root key generation record according to the root key index, decrypts the third encrypted data to obtain the device ID and the target index, verifies whether the decrypted device ID is consistent with the root key generation record, and after verification, obtains the file location information corresponding to the target index through the root key generation record, and then returns a root key response message to the base station, and carries the file location information of the root key file corresponding to the target index in the root key response message;
[0068] The base station receives the root key response message, downloads the root key file from the root key server according to the file location information in the root key response message, and returns an access completion message to the quantum security terminal after the base station completes the download;
[0069] The quantum security terminal receives the access completion message and performs a key consistency check with the base station. If the key consistency check passes, the process ends. Otherwise, according to the preset request number threshold, the pre-injected root key ciphertext file is used again to execute the access request process.
[0070] In a possible example, the method for the quantum security terminal to encrypt the third encrypted data includes:
[0071] The quantum security terminal decrypts the received second encrypted data to obtain a first key extension parameter, expands the second key extension parameter in the quantum security terminal and the received first key extension parameter according to a preset second expansion rule to obtain a transmission key for encrypting a device ID and a target index, and uses the transmission key to encrypt the device ID and the target index to obtain third encrypted data.
[0072] The root key server also stores a second key extension parameter;
[0073] The method for decrypting the third encrypted data by the root key server includes:
[0074] The root key server expands the first key expansion parameter and the second key expansion parameter according to a preset second expansion rule to obtain a transmission key; and decrypts the third encrypted data using the transmission key to obtain a device ID and a target index.
[0075] In the above authentication method, the root key server authenticates the quantum security terminal by verifying whether the hash value of the root key ciphertext file in the quantum security terminal is consistent with that in the quantum security terminal, and whether the device ID of the quantum security terminal is consistent with the generation record of the root key server; after the identity authentication is passed, the quantum security terminal decrypts the root key plaintext file according to the received decryption parameters, performs a hash check on the root key plaintext file to verify the correctness of its decryption, and generates a target index corresponding to the successfully verified root key plaintext file, and sends the target index and device ID to the base station; the base station constructs a root key request message based on the received target index and device ID, and sends it to the root key server The server sends a root key request message to request the key. The root key server performs authentication again based on the device ID in the message, and only allows the base station to download the root key file corresponding to the target index after the authentication is passed; the above process requires multi-party verification. If one party fails the verification, the authentication access fails, which ensures the security of the quantum security terminal authentication process; the verification is based on the root key ciphertext file and the root key plaintext file, which effectively ensures the consistency and correctness of the key file during the access process; in addition, during the authentication process, the message content transmitted between the quantum security terminal, the base station and the root key server is encrypted, which further improves the security of the information transmission process.
[0076] When the quantum security terminal includes multiple root key ciphertext files pre-injected therein, the method for the quantum security terminal to decrypt the pre-injected root key ciphertext files includes:
[0077] The quantum security terminal expands the first key extension parameter and the second key extension parameter to N extended keys according to a preset third extension rule, where N is the number of pre-annotated root key ciphertext files, and then obtains an extended key for decrypting each pre-annotated root key ciphertext file according to a preset key correspondence relationship.
[0078] The quantum security terminal is preset with multiple pre-injected root key groups, and each pre-injected root key group contains one or more root key ciphertext files;
[0079] When sending an access request message, the quantum security terminal selects one of the unauthenticated root key groups for access authentication, and uses the hash value of the first root key ciphertext file in the root key group as the first hash value;
[0080] The number of root key ciphertext files in each root key group in the quantum security terminal is an even number, and the even number of root key ciphertext files are divided into an uplink root key ciphertext file and a downlink root key ciphertext file arranged in pairs;
[0081] The quantum security terminal obtains a first hash value by calculating a hash value of a first uplink root key ciphertext file and a downlink root key ciphertext file in the root key group;
[0082] The root key server obtains the second hash value by calculating the combined hash value of the first upstream root key plaintext file and the downstream root key plaintext file in the found key group.
[0083] When the identity authentication of the quantum security terminal is legal, the base station also generates an authentication request message according to the received authentication response message, and sends the authentication request message to the user center server, wherein the authentication request message includes the device ID in the authentication response message and the network access ID assigned by the base station to the quantum security terminal; the device ID of the quantum security terminal is verified again by the user center server to ensure the security of its identity;
[0084] The user center server authenticates the quantum security terminal according to the device ID, and records the network access ID in the authentication request message after the authentication is passed, so as to know which base station the quantum security device is currently connected to later.
[0085] In a possible example, the first key, the second key, the first key extension parameter, and the second key extension parameter used for encryption are all true random numbers generated by a true random number generator to ensure their randomness and non-repeatability;
[0086] Embodiment 2: The quantum security terminal is pre-injected with a root key when it leaves the factory. The root key is generated by a root key server according to the interface configuration or imported device information.
[0087] When the root key is generated: the root key server generates root key information for the device according to the imported device information, where the root key information includes the root key file and the generation record corresponding to the root key;
[0088] The root key generated by the root key server is one or more root key groups. Each root key group is identified by the group ID when it is generated. At the same time, the corresponding group selection random number R is generated for each root key group based on the device ID and group ID. g ;
[0089] Each root key group may include multiple root key files, the number of which is determined according to the file size granularity. The root key files are numbered from 1, and the file sequence is 1...n. In this embodiment, the number of root key files in each root key group is an even number, and the files with odd numbers are used as upstream root keys, and the files with even numbers are used as downstream root keys. After each root key file is generated, its corresponding hash value H is calculated. k ;
[0090] The root key server generates a corresponding generation record for the root key group based on the device ID;
[0091] The build record includes:
[0092] The root key server generates a first key extension parameter, a second key extension parameter, a first key, and a second key according to a preset length;
[0093] And the device ID ciphertext information Ir obtained by encrypting the device ID.
[0094] The root key server simultaneously establishes a generation record table and a file record table, wherein the generation record table is based on the generation record when the above-mentioned root key file is generated, and the file record table is used to find and locate the file from the generation record table. The two tables are associated through the association index R, which is a one-to-many relationship.
[0095] When the root key is output: the root key group and its corresponding root key parameter data are exported from the root key server, wherein the root key parameter data includes: the device ID (recorded as DID) corresponding to the root key group, the type identifier, and the authentication information corresponding to the root key group; wherein the authentication information includes: the index corresponding to the root key group (recorded as the root key index I1), the second key extension parameter, the first key and the second key; the type identifier is used to indicate the expansion algorithm of the encryption key and the expansion algorithm of the decryption key;
[0096] When exporting the root key: the exported file uses the DID as the directory and the group ID as the subdirectory;
[0097] The root key files in each exported root key group carry the hash value H corresponding to the file. k , and each root key file is encrypted by a different extended key to obtain a root key ciphertext file; in addition, the file header of each root key ciphertext file also carries corresponding attribute information, which includes the file type, group ID, total number of files, number of type files, type file sequence number, group selection random number R corresponding to the root key file g ; The attribute information is not encrypted;
[0098] The method of obtaining the extended key includes:
[0099] S1, concatenate the first key extension parameter and the second key extension parameter to form an initial key K0;
[0100] S2, according to the number of key files N, the initial key is expanded to form the file encryption root key K corresponding to the N key files in each root key group. c ;
[0101] S3, obtain the file encryption root key K corresponding to the ciphertext file c According to the preset root key expansion algorithm and the length of the key file, the file encryption root key K c The key file is expanded to form the extended key corresponding to the key file.
[0102] In a possible example, the first key extension parameter and the second key extension parameter are 128-bit random numbers respectively, which are concatenated in step S1 to form a 256-bit initial key K0; in step S2, they are expanded to form N corresponding file encryption root keys K c For example, the number of key files N=5, which are A1, A2, A3, A4, and A5 respectively, then K1, K2, K3, K4, and K5, 5 corresponding file encryption root keys are first expanded accordingly, and the specific key expansion algorithm can use, for example, the key expansion algorithm of AES; when encrypting each key file, the above-mentioned expanded file encryption root key is further expanded based on the file length of the key file to be encrypted to form an encryption key consistent with the length of the key file; for example, the length of key file A1 is 256 bits, and the length of the expanded file encryption root key K1 is 128 bits; when encrypting key file A1, the corresponding file encryption root key K1 is first taken out, and then based on the preset root key expansion algorithm and the length of the key file A1, the file encryption root key K1 is expanded to an expanded key file of 256 bits, so as to encrypt the key file A1.
[0103] From the above root key generation and export process, it can be seen that the root key file in the root key group pre-injected in the quantum security terminal is the encrypted root key ciphertext file; at the same time, the file header of each individual root key ciphertext file carries the attribute information corresponding to the file, which includes the file type, group ID, total number of files, number of type files, type file sequence number, group selection random number R corresponding to the root key ciphertext file g ; The root key ciphertext files in each root key group are numbered according to the parity of the file number. The file numbered with an odd number is used as the uplink root key of the quantum security terminal, and the file numbered with an even number is used as the downlink root key of the quantum security terminal;
[0104] At the same time, the quantum security terminal also stores the root key parameter data corresponding to each root key group, wherein the root key parameter data includes: the device ID corresponding to the root key (recorded as DID), the type identifier, and the authentication information corresponding to each root key group file; the authentication information includes: the root key index I1 corresponding to the root key group, the second key expansion parameter, the first key and the second key; the type identifier is used to indicate the key expansion algorithm and the decryption key expansion algorithm;
[0105] For the specific certification process, please refer to the attached Figure 1-4 The relevant steps:
[0106] 101. The quantum security terminal sends a domain name resolution request to the domain name resolution server;
[0107] 102. The domain name resolution server returns a domain name resolution response message to the quantum security terminal according to the domain name resolution request, and carries the IP address of the base station external network server in the message;
[0108] 103. The quantum security terminal sends a request to access the base station IP to the base station external network server according to the returned base station external network server IP address;
[0109] 104. The base station external network server returns the access base station IP address to the quantum security terminal according to the access base station IP request;
[0110] The above steps 101-105 are only used as an example. In the actual authentication process, the base station IP address can also be obtained in other ways.
[0111] 105. The quantum security terminal selects a group of unauthenticated root key groups; if there are multiple root key groups, they are selected in order of group ID numbers of the root key groups;
[0112] Obtain the corresponding group ID from the file header of the root key ciphertext file to be authenticated, and determine the authentication information and device ID corresponding to the root key ciphertext file from the root key parameter data according to the group ID;
[0113] Calculate the hash value H1 of the first uplink root key ciphertext file and the downlink root key ciphertext file in the root key group; where the number of root key files in each root key group is an even number, the file numbered with an odd number is used as the uplink root key, and the file numbered with an even number is used as the downlink root key;
[0114] Construct an access request message according to the hash value H1 and the device ID and the root key index I1 in the authentication information, and encrypt the device ID and the hash value H1 in the access request message by using the first key in the authentication information;
[0115] Send an access request message to the access base station according to the access base station IP address, wherein the access request message includes a root key index I1, an encrypted device ID and a hash value H1;
[0116] 106. The access base station receives the access request message. If it is determined to be the first access, the access base station selects the corresponding root key server according to the preset configuration, generates an authentication request message, carries the root key index I1, the encrypted device ID and the hash value H1 in the authentication request message, and sends the authentication request message to the root key server;
[0117] 107. The root key server receives the authentication request message, searches for the generation record of the root key according to the root key index I1 in the authentication request message, obtains the second key extension parameter, the first key, and the second key through the generation record of the root key, and takes out the first key, decrypts the encrypted content in the authentication request message to obtain the device ID and the hash value H1;
[0118] Based on the root key generation record, obtain and calculate the combined hash value H2 of the first uplink root key ciphertext file and the downlink root key ciphertext file of the corresponding root key group, and authenticate the quantum security terminal by verifying whether the hash value H2 is the same as the hash value H1, and whether the received device ID is consistent with the record in the root key generation record; if the hash value verification is successful and the device ID is consistent, the authentication is successful, otherwise the authentication fails; dual verification of device ID and file hash value is used here to ensure the reliability of identity authentication, and the message transmission is transmitted in an encrypted manner, which further improves security;
[0119] When the authentication is successful, the combined hash value H3 of the first uplink root key plaintext file and the downlink root key plaintext file in the root key group is obtained and calculated according to the root key generation record, and the hash value H3 and the second key extension parameter are encrypted by the second key to generate an authentication response message indicating that the authentication is successful, and the authentication response message carries: the device ID, the encrypted hash value H3 and the second key extension parameter;
[0120] When the authentication fails, generating an authentication response message indicating the authentication failure;
[0121] Returning the authentication response message to the access base station;
[0122] 108. The access base station receives the authentication response message. If the authentication response message indicates that the authentication is successful, a network access ID is allocated to the quantum security terminal according to the device ID in the message, and an authentication request message is generated. The device ID and the network access ID are carried in the authentication request message, and the authentication request message is sent to the authentication center; otherwise, an authentication response message indicating that the authentication failed is forwarded to the quantum security terminal;
[0123] 109. The authentication center receives the authentication request message and determines whether the authentication is successful based on the device ID in the authentication request message; if the authentication is successful, the quantum security terminal is allowed to access, and its network access ID is recorded, and an authentication response message is generated to indicate that the authentication is successful; otherwise, an authentication response message is generated to indicate that the authentication fails;
[0124] Return an authentication response message to the access base station; the authentication center may be an authentication server; the authentication center authenticates the quantum security terminal again according to the device ID in the authentication request message to ensure the security of its identity;
[0125] 110. The access base station receives the authentication response message. If the message indicates that the authentication is successful, an access response message is generated according to the encrypted hash value H3 and the second key extension parameter sent by the root key server, and the network access ID, the authentication result, the encrypted hash value H3 and the second key extension parameter are carried in the message; otherwise, an access response message indicating that the authentication failed is returned to the quantum security terminal, and the corresponding reason value is carried in the access response message;
[0126] Sending an access response message to the quantum security terminal;
[0127] 111. The quantum security terminal receives an access response message. If the access response message indicates that the authentication is successful, the encrypted content of the message is decrypted according to the second key in the root key parameter data to obtain a hash value H3 and a second key extension parameter. The second key extension parameter is concatenated with the first key extension parameter in the quantum security terminal and extended according to a preset key extension algorithm. The process may specifically refer to the method for obtaining the extended key in the root key derivation process described above. The key for decrypting each root key ciphertext file in the root key group is obtained, and the root key plaintext file is obtained after the root key ciphertext file is decrypted.
[0128] Calculate the combined hash value H4 of the first uplink root key plaintext file and the downlink root key plaintext file in the root key group, and verify whether the hash value H4 is the same as the hash value H3 to verify whether the decrypted root key plaintext file is correct;
[0129] The access response message is also transmitted in an encrypted manner, ensuring the security of the message transmission process; in addition, the key to decrypting the root key ciphertext file needs to rely on the second key extension parameter provided by the root key server, so the root key file can only be correctly decrypted after the previous identity authentication is successful;
[0130] At the same time, according to the hash value h carried in the plaintext file of each root key o, perform hash verification on each root key plaintext file. If one of the first uplink root key plaintext file and the downlink root key plaintext file, that is, the file numbered 1 or 2, fails to be verified, the access fails. When a file that fails to be verified is encountered during the verification process, the verification is stopped. The continuous file numbers of the root key plaintext files that have been successfully verified are obtained, and the index corresponding to the root key plaintext file that has been successfully verified is generated, which is recorded as the target key index I2. This process is used to ensure the correctness of the root key plaintext file obtained after decryption.
[0131] If the verification is successful, an access command message indicating that the verification is successful is generated, and the access command message carries the network ID, the encrypted device ID and the target key index I2; otherwise, an access command message indicating that the verification fails is generated; wherein the key for encrypting the device ID and the target key index I2 may be a key shared by the quantum security terminal and the root key server, for example, a third key is recorded in both the root key parameter data of the quantum security terminal and the generation record of the root key server;
[0132] Returning an access command message to the access base station;
[0133] When the access response message received by the quantum security terminal indicates that the access has failed, the root key group is used to execute the access request process again according to the preset number of requests;
[0134] If the authentication fails, the next key group is selected for access authentication. The number of authentications for each key group is determined according to the preset value, and so on, until all root keys are tried. If no root key is successfully authenticated, the process ends;
[0135] 112. The access base station receives the access command message. If the access command message indicates that the verification is successful, the access base station matches the user according to the network access ID in the message, obtains the root key index I1 during the access request, generates a root key request message, and sends the root key request message to the root key server; the root key request message includes the root key index I1, the encrypted device ID and the target key index I2; the ciphertext information formed by the encrypted device ID corresponds to the device ID ciphertext information Ir obtained by encrypting the device ID in the record generated by the root key server, and the two can use the same encryption key and encryption method;
[0136] If the match fails, an access message indicating access failure is returned to the quantum security terminal;
[0137] 113. The root key server receives the root key request message, matches the root key generation record according to the root key index I1 in the message and the encrypted device ID, and compares the encrypted device ID with the device ID ciphertext information Ir obtained by encrypting the device ID in the aforementioned root key server generation record to perform identity authentication, thereby avoiding exposure of the device ID plaintext during the message transmission process, thereby further improving the security of the authentication process;
[0138] If the match is successful, the decryption key is obtained according to the generation record, the encrypted content in the root key request message is decrypted to obtain the device ID and the target key index I2, the decrypted device ID is compared with the device ID recorded in the generation record, and when the two match, a root key response message indicating success is generated, and the root key file location information corresponding to the target key index I2 is carried in the message, and when the verification fails, a root key response message indicating failure is sent to the base station;
[0139] If the match fails, a root key response message indicating the failure is directly returned to the base station;
[0140] When matching the root key generation record above, the encrypted device ID should match the device ID ciphertext information Ir in the generation record;
[0141] 114. The base station receives the root key response message. If the root key response message indicates success, the base station downloads the corresponding root key file from the root key server according to the file location information in the root key response message, and after the hash verification of the downloaded root key file is successful, the base station sends an access completion message indicating successful access to the quantum security terminal; when all the hash verifications of the downloaded root key files fail, the base station sends an access completion message indicating a failed access to the quantum security terminal;
[0142] If the root key response message indicates a failure, sending a message indicating access failure to the quantum security terminal;
[0143] 115. The quantum security terminal receives the access completion message. If the access completion message indicates that the access is successful, a key consistency check is performed with the base station. After the key consistency check passes, the process ends.
[0144] If the access completion message indicates a failure, or the key consistency check fails, the access request process is executed again using the root key group until the number of requests for the root key of this group reaches the preset request number threshold; when all access requests for the root key group fail, the next root key group is selected to execute the access request process, and so on, until all root key groups are tried. If there is no successful root key group, the process ends.
[0145] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for authenticating a quantum security terminal accessing a quantum security network, characterized in that: The method comprises: The quantum security terminal sends an access request message to the base station, and carries a root key index and first encrypted data in the access request message, wherein the encrypted information in the first encrypted data includes a device ID corresponding to the quantum security terminal and a first hash value corresponding to a root key ciphertext file pre-injected in the quantum security terminal; The base station receives an access request message, generates an authentication request message according to the access request message, and sends the authentication request message to a root key server, wherein the authentication request message includes a root key index and first encrypted data; The root key server decrypts the first encrypted data to obtain the device ID and the first hash value, and performs identity authentication on the quantum security terminal according to the device ID and the first hash value; and when the identity authentication is legal, searches for the corresponding root key plaintext file according to the root key index, calculates the second hash value corresponding to the root key plaintext file, and then searches for the decryption parameter of the pre-annotated root key ciphertext file according to the root key index, encrypts the second hash value and the decryption parameter to form the second encrypted data, and returns an authentication response message to the base station, carrying the device ID and the second encrypted data in the authentication response message; When the identity authentication of the quantum security terminal is legal, the base station allocates a network access ID to the quantum security terminal, generates an access response message based on the authentication response message, and sends the access response message to the quantum security terminal, wherein the access response message carries the network access ID and the second encrypted data; The quantum security terminal decrypts the received second encrypted data to obtain a second hash value and a decryption parameter, decrypts the pre-annotated root key ciphertext file according to the decryption parameter to obtain a root key plaintext file, calculates the hash value of the decrypted root key ciphertext file, and compares it with the second hash value, generates a target index corresponding to the root key plaintext file when the comparison result is consistent, and then encrypts the target index and the device ID corresponding to the quantum security terminal to obtain third encrypted data, and sends an access command message carrying the third encrypted data to the base station; The base station generates a key request message based on the access command message, and sends the root key request message to the root key server, where the root key request message carries the third encrypted data and the root key index; The root key server receives the root key request message, searches for and determines the root key generation record according to the root key index, decrypts the third encrypted data to obtain the device ID and the target index, verifies whether the decrypted device ID is consistent with the root key generation record, and after verification, obtains the file location information corresponding to the target index through the root key generation record, and then returns a root key response message to the base station, and carries the file location information of the root key file corresponding to the target index in the root key response message; The base station receives the root key response message, downloads the root key file from the root key server according to the file location information in the root key response message, and returns an access completion message to the quantum security terminal after the base station completes the download; The quantum security terminal receives the access completion message and performs a key consistency check with the base station. If the key consistency check passes, the process ends. Otherwise, according to the preset request number threshold, the pre-injected root key ciphertext file is used again to execute the access request process.
2. The authentication method for quantum security terminal accessing quantum security network according to claim 1 is characterized in that: The root key server and the quantum security terminal are both preset with a first key, and the first encrypted data is obtained by encrypting the device ID and the first hash value with the first key; The root key server searches for a root key generation record according to a root key index in the authentication request message, obtains a first key for decrypting first encrypted data according to the root key generation record, and decrypts the first encrypted data to obtain a device ID and a first hash value.
3. The authentication method for quantum security terminal accessing quantum security network according to claim 2 is characterized in that: The root key server and the quantum security terminal are both preset with a second key, and the second encrypted data is obtained by encrypting a second hash value and a decryption parameter with the second key; The quantum security terminal decrypts the second encrypted data using a preset second key to obtain a second Hash value and a decryption parameter.
4. The authentication method for quantum security terminal accessing quantum security network according to claim 3 is characterized in that: The decryption parameters include a first key extension parameter and a second key extension parameter; the first key extension parameter is stored in the root key server, and the second key extension parameter is stored in the quantum security terminal; The method for the quantum security terminal to decrypt the pre-injected root key ciphertext file includes: The root key server searches for a root key generation record according to a root key index, obtains a first key extension parameter through the root key generation record, and generates second encrypted data carrying the first key extension parameter; The quantum security terminal decrypts the received second encrypted data to obtain a first key extension parameter, and expands the second key extension parameter in the quantum security terminal and the received first key extension parameter according to a preset first expansion rule to obtain an extended key for decrypting a root key ciphertext file.
5. The authentication method for quantum security terminal accessing quantum security network according to claim 4 is characterized in that: The method for encrypting the third encrypted data by the quantum security terminal includes: The quantum security terminal decrypts the received second encrypted data to obtain a first key extension parameter, expands the second key extension parameter in the quantum security terminal and the received first key extension parameter according to a preset second expansion rule to obtain a transmission key for encrypting a device ID and a target index, and uses the transmission key to encrypt the device ID and the target index to obtain third encrypted data.
6. The authentication method for quantum security terminal accessing quantum security network according to claim 5 is characterized in that: The root key server also stores a second key extension parameter; The method for decrypting the third encrypted data by the root key server includes: The root key server expands the first key expansion parameter and the second key expansion parameter according to a preset second expansion rule to obtain a transmission key; The third encrypted data is decrypted using the transmission key to obtain the device ID and the target index.
7. The authentication method for quantum security terminal accessing quantum security network according to claim 6 is characterized in that: When the root key ciphertext files pre-injected in the quantum security terminal include multiple, the method for the quantum security terminal to decrypt the pre-injected root key ciphertext files includes: The quantum security terminal expands the first key extension parameter and the second key extension parameter to N extended keys according to a preset third extension rule, where N is the number of pre-annotated root key ciphertext files, and then obtains an extended key for decrypting each pre-annotated root key ciphertext file according to a preset key correspondence relationship.
8. The authentication method for quantum security terminal accessing quantum security network according to claim 7 is characterized in that: The quantum security terminal is preset with multiple pre-injected root key groups, and each pre-injected root key group contains one or more root key ciphertext files; When sending an access request message, the quantum security terminal selects one of the unauthenticated root key groups for access authentication, and uses the hash value of the first root key ciphertext file in the root key group as the first hash value; When the root key server generates an authentication response message, the hash value of the first root key plaintext file in the found key group is used as the second hash value.
9. The authentication method for quantum security terminal accessing quantum security network according to claim 8, characterized in that: The number of root key ciphertext files in each root key group in the quantum security terminal is an even number, and the even number of root key ciphertext files are divided into an uplink root key ciphertext file and a downlink root key ciphertext file arranged in pairs; The quantum security terminal obtains a first hash value by calculating a hash value of a first uplink root key ciphertext file and a downlink root key ciphertext file in the root key group; The root key server obtains the second hash value by calculating the combined hash value of the first upstream root key plaintext file and the downstream root key plaintext file in the found key group.
10. The authentication method for a quantum security terminal to access a quantum security network according to any one of claims 1 to 9, characterized in that: The method for the root key server to authenticate the quantum security terminal specifically includes: The root key server decrypts the first encrypted data to obtain the device ID and the first hash value; searches for the root key generation record according to the root key index in the authentication request message, searches for and obtains the root key ciphertext file corresponding to the root key index based on the root key generation record, calculates and verifies whether the hash value of the found root key ciphertext file is the same as the first hash value; if the hash values are the same and the device ID in the received first encrypted data matches the device ID in the root key generation record, the identity authentication is successful, otherwise, the identity authentication fails.
11. The authentication method for quantum security terminal accessing quantum security network according to claim 10 is characterized in that: When the identity authentication of the quantum security terminal is legal, the base station also generates an authentication request message according to the received authentication response message, and sends the authentication request message to the user center server, wherein the authentication request message includes the device ID in the authentication response message and the network access ID assigned by the base station to the quantum security terminal; The user center server authenticates the quantum security terminal according to the device ID, and records the network access ID in the authentication request message after the authentication is passed.
