A method, device and root key center for generating quantum security keys and authentication parameters
By generating quantum security keys and authentication parameters, the problem of low key distribution efficiency and insufficient security in quantum security equipment is solved, automatic pairing and safe export of keys between devices are realized, and communication flexibility and encryption are improved. Key distribution efficiency.
Patent Information
- Application Number
- CN202310066655.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-17
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2043-01-17
AI Technical Summary
In existing quantum security communication technology, quantum security equipment requires manual distribution and management of a large number of root keys before leaving the factory, resulting in low key distribution efficiency, insufficient security, and poor communication flexibility.
Provide a method and device for generating quantum security keys and authentication parameters. By obtaining device metadata, the corresponding root key file and authentication parameters are generated, including encryption and decryption random numbers and authentication indexes, to achieve key pairing and communication between devices. , reduce manual intervention and improve key distribution efficiency and security.
It realizes automatic pairing and safe export of keys between devices, reduces storage pressure, improves the flexibility of quantum secure communication and key distribution efficiency, and ensures the security of keys.
Smart Images

Figure CN116032472B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of quantum security technology, and in particular to a method, device and root key center for generating quantum security keys and authentication parameters. Background Art
[0002] In quantum key distribution technology, the random numbers generated by the quantum random number generator have the characteristics of true random numbers. The use of the symmetric key generated by it can prevent attackers from attacking the key from the root. On this basis, with the help of quantum encryption methods, we can achieve high-security encryption of communication data, thereby greatly improving the security of data communication systems. Based on this, with the continuous advancement of quantum computing technology, the importance of quantum secure communication using quantum encryption technology in data security communication is becoming increasingly prominent.
[0003] In the related art, quantum secure communication can be achieved through quantum security devices. Before the quantum security device leaves the factory, it is necessary to manually pre-allocate a large number of factory keys, i.e., root keys, for a certain device ID, and then inject the device ID and the root key corresponding to the device ID into the two quantum security devices that need to communicate, thereby achieving the pairing of the keys in the two quantum security devices. Subsequently, the two quantum security devices can perform quantum communication based on the paired keys. For this method, there are the following problems:
[0004] 1. Before quantum security equipment leaves the factory, root keys need to be manually distributed. When it is necessary to generate root keys corresponding to a large number of device identifiers, not only will the workload of the staff be very large, but it will also be inconvenient to manage the distributed root keys, affecting the efficiency and quality of root key distribution.
[0005] 2. This method requires the staff to charge the paired keys for the two quantum security devices that wish to communicate in advance before the two quantum security devices can communicate with each other. This not only wastes a lot of manpower, physical and other costs, but also is not flexible enough when it is necessary to add a new quantum security device that wishes to communicate or when it is no longer necessary to communicate with a certain quantum security device.
[0006] 3. The injected key may also be subject to security issues such as tampering and eavesdropping, reducing the security of the quantum secure communication process. Summary of the invention
[0007] The present application provides a method, device and root key center for generating quantum security keys and authentication parameters, so as to solve the problems that the efficiency and quality of key distribution cannot be guaranteed, the security of root key after derivation cannot be guaranteed, and the flexibility of quantum security communication between any two quantum security devices is low.
[0008] In a first aspect, the present application provides a device for generating quantum security keys and authentication parameters, the device comprising: an acquisition module, a generation module and a processing module;
[0009] The acquisition module is used to acquire metadata required for generating a key; wherein the metadata includes a device identifier and a root key size;
[0010] The generating module is used to generate corresponding root key files and authentication parameters for the device identification according to the root key size and the preset root key file granularity; wherein the authentication parameters include random numbers to be expanded for encrypting and decrypting each key file, authentication indexes for searching the authentication parameters, a first random number for encrypting the data to be encrypted in the access request, and a second random number for decrypting the data to be decrypted in the access response information, the access request is a message of the quantum security device of the device identification requesting to access the quantum security base station in the quantum security network for the first time, the access response information is a feedback message sent by the quantum security base station to the quantum security device in response to the access request, and after the quantum security base station allows the quantum security device to access, according to the key file of the device identification sent by the root key center, the key sent and received by the quantum security device of the device identification is relayed; wherein the key files include the root key files for quantum encryption and decryption of data; determine the file serial numbers corresponding to the key files respectively, and save the key files;
[0011] The processing module is used to obtain a key generation record based on the device identification, the file serial numbers corresponding to the key files of the device identification, the authentication parameters corresponding to the device identification, and the storage locations corresponding to the key files of the device identification, so as to search for the key files of the device identification and the authentication parameters corresponding to the device identification according to the key generation record.
[0012] In a second aspect, the present application provides a method for generating quantum secure keys and authentication parameters, the method comprising:
[0013] Obtaining metadata required for generating a key; wherein the metadata includes a device identifier and a root key size;
[0014] Generate corresponding root key files and authentication parameters for the device identification according to the root key size and the preset root key file granularity; wherein the authentication parameters include random numbers to be expanded for encrypting and decrypting each key file, an authentication index for searching the authentication parameters, a first random number for encrypting the data to be encrypted in the access request, and a second random number for decrypting the data to be decrypted in the access response information; the access request is a message of the quantum security device of the device identification requesting to access the quantum security base station in the quantum security network for the first time; the access response information is a feedback message sent by the quantum security base station to the quantum security device in response to the access request; after the quantum security base station allows the quantum security device to access, it relays the key sent and received by the quantum security device of the device identification according to the key file of the device identification sent by the root key center; wherein the key files include the root key files for quantum encryption and decryption of data;
[0015] Determine the file serial numbers corresponding to the key files, and save the key files;
[0016] According to the device identifier, the file serial numbers corresponding to the key files of the device identifier, the authentication parameters corresponding to the device identifier and the storage locations corresponding to the key files of the device identifier, a key generation record is obtained to search for the key files of the device identifier and the authentication parameters corresponding to the device identifier according to the key generation record.
[0017] In a third aspect, the present application provides a root key center, which includes at least a processor and a memory, and the processor is used to implement the steps of the method for generating quantum secure keys and authentication parameters as described above when executing a computer program stored in the memory.
[0018] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method for generating quantum secure keys and authentication parameters as described above.
[0019] In a fifth aspect, the present application provides a computer program product, comprising: a computer program code, which, when executed on a computer, enables the computer to execute the steps of the method for generating a quantum secure key and authentication parameters as described above.
[0020] The beneficial effects of this application are as follows:
[0021] 1. When a key file is generated according to metadata, an authentication parameter corresponding to the device identification is also generated. The authentication parameter includes a random number to be expanded for encrypting and decrypting each key file and an authentication index for searching the authentication parameter. The authentication index can accurately index the random number to be expanded corresponding to the device identification. According to the random number to be expanded, the key files of the device identification can be encrypted, exported and injected into the quantum security device, thereby ensuring the security of the key files of the device identification.
[0022] 2. Since the quantum security base station to which the quantum security device identified by the device is connected can obtain the key file of the device identification from the root key center, the key pairing between the quantum security base station and the quantum security device identified by the device is realized. Subsequently, the quantum security base station can be used to relay the key sent and received by the quantum security device identified by the device, thereby realizing quantum security communication between the quantum security device and other quantum security devices. In addition, the quantum security device only needs to pair the key with the quantum security base station to which it is connected, that is, the quantum security device does not need to pair the key with any quantum security device that needs to communicate, so that the quantum security device only needs to save the key file of the device identification, which not only reduces the storage pressure of the quantum security device, but also after any two quantum security devices are connected to the quantum security base station in the quantum security network, the two quantum security devices can realize the key relay through the quantum security network when conducting quantum security communication, which improves the flexibility of quantum security communication, and does not require the staff to pre-fill the keys for the two quantum security devices, reducing the workload of the staff to fill the keys.
[0023] 3. Since the authentication parameter also includes a first random number for encrypting the data to be encrypted in the access request and a second random number for decrypting the data to be decrypted in the access response information, the access request is a message for the quantum security device identified by the device to request the first access to the quantum security base station in the quantum security network, and the access response information is a feedback message sent by the quantum security base station to the quantum security device in response to the access request. The first random number and the second random number can be used to implement the use of ciphertext communication by the quantum security device during the first access to the quantum security base station, thereby ensuring the security of the first access to the quantum security base station.
[0024] 4. After the root key center obtains the metadata required to generate the key, it can accurately generate and distribute the root key file according to the root key size and the preset root key file granularity, and generate the authentication parameters corresponding to the device identification. There is no need to manually distribute the key, which reduces the manpower and material resources consumed in key distribution and improves the efficiency and quality of key distribution.
[0025] 5. After saving each key file, the key generation record can be obtained according to the device identification, the file serial numbers corresponding to the key files of the device identification, and the storage locations corresponding to the key files of the device identification, so that any key file corresponding to the device identification can be quickly and accurately found according to the key generation record, which is convenient for the management of the key files corresponding to each device identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0027] Figure 1 A schematic diagram of a process for generating a quantum secure key provided in an embodiment of the present application;
[0028] Figure 2 A schematic diagram of a specific process for generating quantum secure keys and authentication parameters provided in an embodiment of the present application;
[0029] Figure 3 A schematic diagram of the structure of a device for generating quantum secure keys and authentication parameters provided in an embodiment of the present application;
[0030] Figure 4 A schematic diagram of the structure of a root key center provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
[0032] In order to ensure the efficiency and quality of root key distribution, improve the security of subsequent root key derivation and the flexibility of quantum secure communication between any two quantum secure devices, the embodiments of the present application provide a method, apparatus and root key center for generating quantum secure keys and authentication parameters.
[0033] Embodiment 1:
[0034] Figure 1 A schematic diagram of a process for generating a quantum secure key provided in an embodiment of the present application, the process comprising:
[0035] S101: Obtain metadata required for generating a key; wherein the metadata includes a device identification and a root key size.
[0036] The method for generating quantum security keys and authentication parameters provided in this application is applied to a root key center, which can be a quantum security device, such as a quantum security all-in-one machine, a quantum security computer, etc., or a quantum security server, such as a quantum security business server, a quantum security application server, etc.
[0037] Considering that the quantum security device needs to be charged with a root key before leaving the factory, it is ensured that the quantum security device can perform quantum security communication after leaving the factory. Based on this, in this application, a root key can be generated by a root key center, and the generated root key is assigned to the quantum security device. Exemplarily, the root key center can obtain the metadata required to generate the root key. Among them, the metadata may include a device identifier, such as a device ID, a device factory code, etc., and a root key size. Then, according to the obtained metadata, corresponding processing is performed to generate a root key corresponding to the device identifier.
[0038] It should be noted that the root key is used for quantum encryption and decryption of data.
[0039] In one example, metadata may be input into the root key center by manual input, for example, a staff member may input metadata in a configuration interface displayed on a display corresponding to the root key center.
[0040] In another example, the root key center can also obtain metadata from other devices (e.g., quantum security network management devices, etc.). For example, if other devices receive an acquisition request sent by the root key center, the pre-saved metadata is sent to the root key center. For another example, after other devices obtain the metadata, they can send the metadata to the root key center. Among them, the other device sends the metadata to the root key center in real time, or sends the metadata to the root key center according to a preset period or time point, or sends the metadata to the root key center after receiving a sending instruction, etc.
[0041] S102: Generate corresponding root key files and authentication parameters for the device identification according to the root key size and the preset root key file granularity; wherein the authentication parameters include a random number to be expanded for encrypting and decrypting each key file, an authentication index for searching the authentication parameters, a first random number for encrypting the data to be encrypted in the access request, and a second random number for decrypting the data to be decrypted in the access response information; the access request is a message of the quantum security device of the device identification requesting to access the quantum security base station in the quantum security network for the first time; the access response information is a feedback message sent by the quantum security base station to the quantum security device in response to the access request; after the quantum security base station allows the quantum security device to access, it relays the key sent and received by the quantum security device of the device identification according to the key file of the device identification sent by the root key center; wherein the key files include the root key files for quantum encryption and decryption of data.
[0042] Based on the above embodiment, after the root key center obtains the metadata, it can generate the root key corresponding to the device identification according to the root key size included in the metadata. The root key size can be the total size of the root key corresponding to the device identification. Exemplarily, the root key center can generate each root key file for the device identification according to the root key size included in the metadata and the preset root key file granularity.
[0043] In one example, if the root key center has a key generation function, for example, a random number generator is installed, the root key center can generate a random number through the random number generator. The root key center determines each root key file of the device identification from the generated random number according to the root key size included in the metadata and the preset root key file granularity.
[0044] In another example, if the root key center does not have a key generation function, the root key center can cache the random number generated by the random number generation device. The root key center determines the root key files identified by the device from the cached random number based on the root key size included in the metadata and the preset root key file granularity.
[0045] Considering that each key file generated for the device identification needs to be exported and filled into the quantum security device, each key file may be tampered with, eavesdropped, and other security issues during the export and filling process, thereby affecting the security of the quantum security device filled with the key file. Based on this, in this application, the root key center will also generate corresponding authentication parameters for the device identification, and the authentication parameters include random numbers to be expanded for encrypting and decrypting each key file. Among them, each key file includes each root key file. Subsequently, based on the random number to be expanded corresponding to the device identification, the encryption and decryption keys corresponding to each key file of the device identification can be determined, so that each key file of the device identification can be encrypted according to the encryption and decryption keys corresponding to each key file of the device identification, so as to improve the security of each key file of the device identification.
[0046] In order to facilitate indexing to the authentication parameters corresponding to the device identification, the authentication parameters also include an authentication index.
[0047] If quantum secure communication between two quantum security devices is to be achieved, it is generally necessary for staff to charge paired keys for the two quantum security devices that need to communicate in advance, and the two quantum security devices will subsequently perform quantum encryption and decryption on the communication data based on the paired keys. For this type of quantum secure communication, each quantum security device not only needs to save its own key, but also the key of other quantum security devices that need to communicate, which consumes a large amount of storage resources of the quantum security device. In addition, any two quantum security devices that need to communicate require staff to charge keys in advance, which makes this quantum security communication method costly. For scenarios such as adding other quantum security devices that communicate with the quantum security device and deleting other quantum security devices that communicate with the quantum security device, the flexibility of this quantum security communication method is also relatively low. Based on this, in this application, the quantum security device can access the quantum security base station in the quantum security network. After allowing the quantum security device to access, the quantum security base station can obtain the key file of the quantum security device from the root key center to achieve key pairing with the quantum security device. The subsequent quantum security base station can relay the key sent and received by the quantum security device based on the key file of the quantum security device. In this quantum communication mode, the quantum security device does not need to save the key files of other quantum security devices, which greatly reduces the storage pressure of the quantum security device. After the quantum security device is connected to the quantum security network, it can perform quantum security communication with other quantum security devices connected to the quantum security network, thereby improving the flexibility of quantum security communication.
[0048] In order to improve the security of the quantum security device in the process of first accessing the quantum security base station, in the present application, the authentication parameters generated by the root key center for a certain device identification may also include a first random number for encrypting the data to be encrypted in the access request, and a second random number for decrypting the data to be decrypted in the access response information. Among them, the access request is a message for the quantum security device identified by the device to request the first access to the quantum security base station in the quantum security network, and the access response information is a feedback message sent by the quantum security base station to the quantum security device in response to the access request. Based on the first random number, it can be realized that the message of the subsequent quantum security device requesting access to the quantum security base station is encrypted, thereby improving the security of the access request sent by the quantum security device identified by the device to the quantum security base station. Based on the second random number, it can be realized that the message fed back by the subsequent root key center in response to the access request of the quantum security device is also encrypted, thereby improving the security of the access response information received by the quantum security device identified by the device.
[0049] It should be noted that the authentication parameters are all true random numbers.
[0050] In a possible implementation, if the metadata also includes a quantum secure computing random number size, the key file also includes each quantum secure computing random number file identified by the device; wherein each quantum secure computing random number file is generated according to the quantum secure computing random number size and a preset quantum secure computing random number file granularity, and the quantum secure device identified by the device performs quantum secure computing according to each quantum secure computing random number file after leaving the factory.
[0051] Considering that quantum security devices also need to use random numbers when performing quantum security calculations, such as hash calculations, etc. Therefore, in the present application, the root key center can pre-allocate quantum security computing random numbers for quantum security computing to the quantum security device identified by the device. Exemplarily, the metadata acquired by the root key center may also include the quantum security computing random number size, and the root key center generates the quantum security computing random number corresponding to the device identification according to the quantum security computing random number size. For example, the root key center generates each quantum security computing random number file corresponding to the device identification according to the quantum security computing random number size and the preset quantum security computing random number file granularity. In other words, each key file of the device identification acquired by the root key center may also include each quantum security computing random number file of the device identification.
[0052] The quantum secure computing random number size can be characterized as the total size of the quantum secure computing random number files generated by the device identification, or can be characterized as the size of any quantum secure computing random number file generated by the device identification. The specific generation process is similar to the process of generating the root key file according to the root key size, and will not be repeated here.
[0053] It should be noted that the metadata acquired by the root key center may also include a quantum secure computing random number switch. The root key center determines whether to generate a quantum secure computing random number file for the device identifier based on the quantum secure computing random number switch.
[0054] In a possible implementation, if the metadata also includes an encryption key size, the key file also includes each encryption key file identified by the device; wherein each encryption key file is generated according to the encryption key size and a preset encryption key file granularity, and the quantum security device identified by the device decrypts the received encryption supplementary key according to the encryption key file after leaving the factory.
[0055] The quantum security device will continuously consume the key charged before leaving the factory during the quantum security communication process, so that the quantum security device needs to supplement the key after leaving the factory. In order to ensure the security of the supplemented key, in this application, the supplementary key downloaded by the quantum security device from the key center can be encrypted. After the quantum security device receives the encrypted supplementary key (recorded as the encrypted supplementary key), it decrypts the encrypted supplementary key according to the pre-acquired encryption key, so that the obtained supplementary key is supplemented according to the supplementary key. Among them, the root key center can generate an encryption key file for the quantum security device identified by the device in advance, and charge the encryption key files of the device identification to the quantum security device before the quantum security device identified by the device leaves the factory, so that the quantum security device identified by the device can decrypt the received encryption supplementary key according to the charged encryption key file after leaving the factory. When the encryption key file charged by the quantum security device identified by the device is consumed, the quantum security device can also obtain the key from the key center to supplement the saved encryption key file. Based on this, in the present application, the root key center can also assign an encryption key for the device identifier to decrypt the encrypted supplementary key. Exemplarily, the metadata acquired by the root key center can also include the encryption key size, and the root key center generates the encryption key corresponding to the device identifier based on the encryption key size. For example, the root key center generates each encryption key file of the device identifier based on the encryption key size and the preset encryption key file granularity. In other words, the key files of the device identifier acquired by the root key center can also include each encryption key file of the device identifier.
[0056] The encryption key size can be represented by the total size of the encryption key files generated by the device identification, or by the size of any encryption key file generated by the device identification. The specific generation process is similar to the process of generating the root key file according to the root key size, and will not be repeated here.
[0057] It should be noted that the metadata acquired by the root key center may also include an encryption key switch. The root key center determines whether to generate an encryption key file for the device identifier according to the encryption key switch.
[0058] In the present application, the encryption key file granularity, the root key file granularity, and the quantum secure computing random number file granularity may be completely different, completely the same, or partially the same.
[0059] In one possible implementation, if the metadata also includes the number of key shares, then each key file includes groups of key files whose number is the number of key shares, and each group has corresponding authentication parameters; wherein any group of key files includes at least one key file of each key type, each key type includes a root key, and any two key files of the same key type are different.
[0060] When a quantum security device is connected to a quantum security base station, the quantum security device can verify the key file with the root key center through the quantum security base station. Only after the root key center determines that the key file verification has passed, will the key files of the quantum security device be sent to the quantum security base station. In this process, at least one key file of the quantum security device may be damaged or missing, resulting in failure of the key file verification, and then causing the quantum security base station to be unable to obtain the root key from the root key center. Based on this, in this application, the root key center can assign multiple groups of root keys to the device identification, so that the quantum security device of the device identification can continue to use other groups of key files to verify with the root key center after a group of key files fails to pass the verification, ensuring that the quantum security device can reliably access the quantum security base station. Exemplarily, the metadata obtained by the root key center can also include the number of key copies, and the root key center determines how many groups of key files to generate for the device identification based on the number of key copies.
[0061] In a possible implementation manner, the root key center determines, based on the number of key copies, that several groups of key files are generated for the device identifier, including the following situations:
[0062] Case 1: Any set of key files only includes at least one root key file whose key type is root key.
[0063] After the root key center obtains the metadata, it generates each group of root key files for the device identifier according to the root key size in the metadata and the preset root key file granularity. Any group of root key files includes at least one root key file. The number of groups of the root key files is determined according to the number of key copies in the metadata.
[0064] For example, in the case where the root key size represents the total size of the root key files of all groups, the size of each group of root key files can be determined according to the root key size and the number of key copies. The size of each group of root key files can be the same or different. Then, for each determined size of the root key files, at least one root key file of the group is generated for the device identifier according to the size of the root key files of the group and the preset root key file granularity.
[0065] For another example, when the root key size represents the total size of any group of root key files, the number of root key files in each group can be determined according to the root key size and the preset root key file granularity. Each group of root key files is generated for the device identification according to the number of root key files in each group and the preset root key file granularity. The number of root key groups corresponding to the device identification is the number of key copies.
[0066] Case 2: Any group of key files only includes at least one root key file whose key type is root key and at least one quantum secure computing random number file whose key type is quantum secure computing random number.
[0067] When generating any group of key files, the root key center generates at least one root key file included in the group of key files for the device identifier according to the preset root key file granularity and the root key size in the obtained metadata. And generates at least one quantum safe computing random number file included in the group of key files for the device identifier according to the preset quantum safe computing random number file granularity and the quantum safe computing random number size in the obtained metadata.
[0068] Case 3: any group of key files only includes at least one root key file whose key type is root key and at least one encryption key file whose key type is encryption key.
[0069] When generating any group of key files, the root key center generates at least one root key file included in the group of key files for the device identifier according to the preset root key file granularity and the root key size in the obtained metadata. And generates at least one encryption key file included in the group of key files for the device identifier according to the preset encryption key file granularity and the encryption key size in the obtained metadata.
[0070] Case 4: Any group of key files includes at least one root key file whose key type is root key, at least one quantum secure computing random number file whose key type is quantum secure computing random number, and at least one encryption key file whose key type is encryption key.
[0071] When generating any group of key files, the root key center generates at least one root key file included in the group of key files for the device identifier according to the preset root key file granularity and the root key size in the obtained metadata; generates at least one encryption key file included in the group of key files for the device identifier according to the preset encryption key file granularity and the encryption key size in the obtained metadata; generates at least one quantum safe computing random number file included in the group of key files for the device identifier according to the preset quantum safe computing random number file granularity and the quantum safe computing random number size in the obtained metadata.
[0072] It should be noted that any two key files of the same key type are different.
[0073] If the root key center generates multiple groups of key files corresponding to a certain device identification, the root key center can generate authentication parameters corresponding to each group of key files.
[0074] It should be noted that the length of each data in the authentication parameter is pre-configured, for example, 128 bits, 256 bits, 512 bits, etc., and can be flexibly set according to actual needs, and no specific limitation is made here.
[0075] S103: Determine the file serial numbers corresponding to the key files respectively, and save the key files.
[0076] Based on the above-mentioned embodiments, there is a certain order relationship between the key files obtained. Based on this, after obtaining the key files, the file numbers of the key files can be determined according to the order of the key files, so as to determine the order relationship of the key files through the file numbers corresponding to the key files, thereby facilitating the subsequent export, filling and other processing of the key files in order. After obtaining the key files, the root key center will also save the key files. Among them, the root key center can save the key files locally or in other devices.
[0077] In one possible implementation, the root key center may have generated multiple groups of key files for a certain device identifier. When the root key center determines the file identifier of any group of key files, it can determine the file serial number of each group of key files on a group basis, that is, the file serial number of any group of key files only represents the sequential relationship of the group of key files.
[0078] The file serial numbers of any two key files may be different, or the file serial numbers of any two key files in the same group may be different, or the file serial numbers of any two key files belonging to the same group and of the same key type may be different.
[0079] After each key file is obtained based on the above-mentioned embodiment, each key file can be saved to facilitate subsequent search for each key file identified by the device.
[0080] In one example, after the root key center exports the key file, the exported key file may be tampered with, damaged, and other security issues. Based on this, in this application, after obtaining any key file, the root key center can determine the checksum corresponding to the key file, for example, by using a preset checksum algorithm to determine the checksum corresponding to the key file. Then, when saving the key file, the key file and the checksum corresponding to the key file can be saved accordingly, so that the key file can be tampered with, damaged, and other security issues can be discovered in a timely manner based on the checksum.
[0081] S104: Obtain a key generation record based on the device identifier, the file serial numbers corresponding to the key files of the device identifier, the authentication parameters corresponding to the device identifier, and the storage locations corresponding to the key files of the device identifier, so as to search for the key files of the device identifier and the authentication parameters corresponding to the device identifier according to the key generation record.
[0082] Based on the above embodiment, after the root key center saves each key file, it can obtain the key generation record according to the device identification, the file serial numbers corresponding to the key files of the device identification, the authentication parameters corresponding to the device identification, and the storage locations corresponding to the key files of the device identification.
[0083] For example, according to the correspondence between the device identification and the file serial numbers corresponding to the key files of the device identification, a device identification-file serial number table is generated; according to the correspondence between the device identification and the authentication parameters corresponding to the device identification, a device identification-authentication parameter table is generated; and according to the correspondence between the file serial numbers corresponding to the key files and the storage locations corresponding to the key files, a file serial number-storage location table is generated. The device identification-file serial number table, the device identification-authentication parameter table, and the file serial number-storage location table are determined as the key generation record.
[0084] It should be noted that the device identification-file number table, the device identification-authentication parameter table, and the file number-storage location table of the same device identification can be associated by a pre-generated random number to facilitate search and storage.
[0085] For example, the key generation record is determined based on the correspondence between the device identification, the file serial numbers corresponding to each key file of the device identification, the authentication parameters corresponding to the device identification, and the storage locations corresponding to each key file of the device identification.
[0086] For another example, according to the correspondence between the device identification, the file serial numbers corresponding to the key files of the device identification, and the authentication parameters corresponding to the device identification, a device identification-file serial number-authentication parameter table is generated, and according to the correspondence between the file serial numbers corresponding to the key files and the storage locations corresponding to the key files, a file serial number-storage location table is generated. The device identification-file serial number-authentication parameter table and the file serial number-storage location table are determined as the key generation record.
[0087] In a possible implementation, taking into account that the key files generated by the root key center for a certain device identifier may include key files of multiple key types, the root key center can obtain the key generation record based on the device identifier, the file serial numbers corresponding to the key files of the device identifier, the authentication parameters corresponding to the device identifier, the storage locations of the key files of the device identifier, and the key types corresponding to the key files of the device identifier.
[0088] In another possible implementation, if the metadata further includes auxiliary information, obtaining the key generation record according to the device identifier, the file serial numbers corresponding to the key files of the device identifier, the authentication parameters corresponding to the device identifier, and the storage locations corresponding to the key files of the device identifier include:
[0089] A key generation record is obtained according to the device identification, the auxiliary information, the file serial numbers corresponding to the key files of the device identification, the authentication parameters corresponding to the device identification, and the storage locations corresponding to the key files of the device identification, so as to obtain relevant information of the key files corresponding to the auxiliary information from the key generation record according to the input auxiliary information; wherein the auxiliary information includes one or more of the following: key generation time, metadata import time, device type, batch number of a generation batch in which the key is located, and metadata import status, and the relevant information of the key files includes one or more of the following: the device identification corresponding to the key files, the storage locations of the key files, and the file serial numbers of the key files.
[0090] In order to facilitate the subsequent monitoring and management of the generated key files, in this application, the generated key files can also be found through auxiliary information. Among them, the auxiliary information also includes one or more of the following: key generation time, metadata import time, device type, batch number of the key generation batch, and metadata import status. Optionally, the auxiliary information may also include key export status, key export time, etc. Among them, the metadata import time indicates the time of importing metadata. The metadata import status indicates whether the metadata is successfully imported. In this application, keys can be generated in batches, and all key files identified by any device are in the same batch. When generating key files, the batch number of the batch to which the key is located can be recorded. And for the convenience of query, a key generation record can be generated based on the auxiliary information.
[0091] It should be noted that the device type may include one or more of the following: quantum secure desktop, quantum secure all-in-one machine, and quantum secure notebook. Of course, the device type can also be flexibly set according to the device type of quantum secure device that needs to generate the root key in the actual scenario, and no specific limitation is made here.
[0092] The relevant information of each key file includes one or more of the following: a device identification corresponding to each key file, a storage location of each key file, and a file serial number of each key file.
[0093] For example, if the metadata acquired by the root key center also includes the device type. After the key files of the device identification are acquired based on the above-mentioned embodiment, the key generation record can be obtained according to the device identification, the device type, the authentication parameters corresponding to the device identification, the file serial numbers corresponding to the key files of the device identification, and the storage locations corresponding to the key files of the device identification. Later, when the staff needs to query the key files of a certain device type, they can query the relevant information of the key files generated by the device type from the key generation record according to the device type.
[0094] In another exemplary embodiment, if the metadata obtained by the root key center also includes a batch number. After the key files of the device identification are obtained based on the above embodiment, the key generation record can be obtained according to the batch number, the device identification, the file sequence number of the key files of the device identification, and the storage location of the key files of the device identification. When the staff needs to query the key files of a certain batch number later, they can query the relevant information of the key files generated by the batch number from the key generation record according to the batch number.
[0095] It should be noted that, according to the above auxiliary information, the method of obtaining the key generation record is similar to that in the above embodiment, and the repeated parts are not repeated here.
[0096] In the present application, the key generation record can be obtained based on a variety of auxiliary information. For example, if the metadata obtained by the root key center includes the batch number and the device type. After the key files of the device identification are obtained based on the above-mentioned embodiment, the key generation record can be obtained according to the batch number, the device type, the device identification, the file serial number of each key file of the device identification, and the storage location of each key file of the device identification. Later, when the staff needs to query the key files of a certain batch number and / or a certain device type, the relevant information of each key file that meets the auxiliary information can be queried from the key generation record based on the input auxiliary information.
[0097] In some possible implementations, the root key center may generate multiple groups of key files for the device identification, so the root key center can determine the group identification corresponding to each group of key files, and then obtain the key generation record according to the device identification, the file sequence number of each key file of the device identification, the storage location of each key file of the device identification, and the group identification to which each key file of the device identification belongs. The group identification is used to represent the group to which the key file belongs.
[0098] The group identifier may be identified in the form of numbers, strings, etc., or may be represented in other ways. Any method that can uniquely identify the group key file may be applied to the present application, and no specific limitation is made here.
[0099] After obtaining the key files of the device identification based on the above-mentioned embodiment, the staff can operate the key output interface of the display corresponding to the root key center, and input the screening conditions of the root key files to be exported in the interface, such as device identification, key generation time, etc. Among them, there are many ways for the staff to input the screening conditions, which can be input by text input, voice input, or selection operation input. In the specific implementation process, it can be flexibly set according to actual needs, and no specific limitation is made here. After the root key center obtains the input screening conditions, it can find the key files that meet the screening conditions from the key generation record and display the relevant information of the screened key files in the display interface of the display. The staff can input which key files to be exported to the root key center by single selection or batch selection. According to the received selection operation, the root key center exports the key file selected by the selection operation and the authentication parameters corresponding to the key file to the key distribution machine connected to the root key center, and displays the export progress on the display corresponding to the root key center. After the staff determines that the root key center has completed exporting the key file based on the export progress displayed on the monitor, they can disconnect the key distribution machine from the root key center. Subsequently, the key distribution machine can be used to recharge the quantum security device with key files and authentication parameters.
[0100] The beneficial effects of this application are as follows:
[0101] 1. When a key file is generated according to metadata, an authentication parameter corresponding to the device identification is also generated. The authentication parameter includes a random number to be expanded for encrypting and decrypting each key file and an authentication index for searching the authentication parameter. The authentication index can accurately index the random number to be expanded corresponding to the device identification. According to the random number to be expanded, the key files of the device identification can be encrypted, exported and injected into the quantum security device, thereby ensuring the security of the key files of the device identification.
[0102] 2. Since the quantum security base station to which the quantum security device identified by the device is connected can obtain the key file of the device identification from the root key center, the key pairing between the quantum security base station and the quantum security device identified by the device is realized. Subsequently, the quantum security base station can be used to relay the key sent and received by the quantum security device identified by the device, thereby realizing quantum security communication between the quantum security device and other quantum security devices. In addition, the quantum security device only needs to pair the key with the quantum security base station to which it is connected, that is, the quantum security device does not need to pair the key with any quantum security device that needs to communicate, so that the quantum security device only needs to save the key file of the device identification, which not only reduces the storage pressure of the quantum security device, but also after any two quantum security devices are connected to the quantum security base station in the quantum security network, the two quantum security devices can realize the key relay through the quantum security network when conducting quantum security communication, which improves the flexibility of quantum security communication, and does not require the staff to pre-fill the keys for the two quantum security devices, reducing the workload of the staff to fill the keys.
[0103] 3. Since the authentication parameter also includes a first random number for encrypting the data to be encrypted in the access request and a second random number for decrypting the data to be decrypted in the access response information, the access request is a message for the quantum security device identified by the device to request the first access to the quantum security base station in the quantum security network, and the access response information is a feedback message sent by the quantum security base station to the quantum security device in response to the access request. The first random number and the second random number can be used to implement the use of ciphertext communication by the quantum security device during the first access to the quantum security base station, thereby ensuring the security of the first access to the quantum security base station.
[0104] 4. After the root key center obtains the metadata required to generate the key, it can accurately generate and distribute the root key file according to the root key size and the preset root key file granularity, and generate the authentication parameters corresponding to the device identification. There is no need to manually distribute the key, which reduces the manpower and material resources consumed in key distribution and improves the efficiency and quality of key distribution.
[0105] 5. After saving each key file, the key generation record can be obtained according to the device identification, the file serial numbers corresponding to the key files of the device identification, and the storage locations corresponding to the key files of the device identification, so that any key file corresponding to the device identification can be quickly and accurately found according to the key generation record, which is convenient for the management of the key files corresponding to each device identification.
[0106] Embodiment 2:
[0107] To ensure the security of the key file export or injection process, based on the above embodiment, in the present application, if the metadata also includes the first key expansion algorithm and the second key expansion algorithm corresponding to each group of key files of the device identification, after obtaining the key files, the method further includes:
[0108] For each group of key files, a root key to be expanded is determined according to the random number to be expanded corresponding to the group of key files; the encryption and decryption root keys corresponding to the group of key files are determined according to the first key expansion algorithm corresponding to the group of key files, the root key to be expanded and the number of the group of key files; wherein the second key expansion algorithm corresponding to the group of key files is used to determine the encryption and decryption keys corresponding to the group of key files according to the encryption and decryption root keys corresponding to the group of key files, and the encryption and decryption key corresponding to any key file is used to encrypt the key file;
[0109] The acquiring the key generation record according to the device identification, the file serial numbers respectively corresponding to the key files of the device identification, the authentication parameters corresponding to the device identification, and the storage locations respectively corresponding to the key files of the device identification, comprises:
[0110] The key generation record is obtained according to the device identifier, the file serial numbers corresponding to the key files of the device identifier, the key types corresponding to the key files of the device identifier, the authentication parameters corresponding to the device identifier, the storage locations corresponding to the key files of the device identifier, the group identifier to which the key files of the device identifier belong, the encryption and decryption root keys corresponding to the key files of the device identifier, and the first key expansion algorithm and the second key expansion algorithm corresponding to the group key files of the device identifier.
[0111] Since the key may be tampered with or eavesdropped during the export or filling process, in this application, each key file of the device identifier can be encrypted according to the random number to be expanded in the authentication parameter corresponding to the device identifier. Among them, each key file can be encrypted first and then saved, or each key file can be encrypted when exporting it and then exported.
[0112] Considering that after each encrypted key file and the authentication parameters corresponding to each encrypted key file are exported, security issues such as eavesdropping and interception may occur, so that a third-party device can crack the encryption and decryption keys for encrypting each key file based on the random number to be expanded in the acquired authentication parameters, thereby decrypting the encrypted key files based on the encryption and decryption keys, affecting the security of each key file. In the present application, the random number to be expanded may include a first random number to be expanded for configuring in the quantum security device of the device identification and a second random number to be expanded for configuring locally, that is, when the authentication parameters corresponding to a certain device identification are exported, the second random number to be expanded is not exported, so as to avoid the third-party device from cracking the encryption and decryption keys after obtaining the first random number to be expanded and the second random number to be expanded.
[0113] In one possible implementation, when the root key center generates the authentication parameters corresponding to the device identifier, it may only generate the first random number to be expanded corresponding to the device identifier. Subsequently, when determining to export the key files of the device identifier, it may generate the second random number to be expanded corresponding to the device identifier to avoid security issues such as misleading the second random number to be expanded.
[0114] In one example, the metadata acquired by the root key center may also include a first key expansion algorithm and a second key expansion algorithm. When the root key center acquires the root key files of a certain device identifier, the number of the key files of the device identifier may be determined. According to the number, the number of encryption and decryption keys is determined, for example, the number is determined as the number of encryption and decryption keys, or the encryption and decryption root key is determined according to the number and a preset value. The root key center determines the root key to be expanded according to the random number to be expanded, for example, the random number to be expanded is copied by a preset multiple, the random numbers to be expanded are spliced, and the random numbers obtained after splicing are determined to be the root key to be expanded, etc. According to the preset first key expansion algorithm, the root key to be expanded is expanded, so as to determine the encryption and decryption root key of the number of encryption and decryption keys. For example, the root key to be expanded can be expanded by the first key expansion algorithm to obtain the expanded root key to be expanded, the number of the expanded root key to be expanded is greater than the number of encryption and decryption keys, and the encryption and decryption root key of the number of encryption and decryption keys is determined from the expanded root key to be expanded. The root key center determines the correspondence between the encryption and decryption root keys of the encryption and decryption key quantity and each key file, that is, determines the encryption and decryption root keys corresponding to each key file. For example, the encryption and decryption root keys corresponding to each key file are determined based on the generation order of the encryption and decryption root keys of the encryption and decryption key quantity and the file sequence number of each key file. When encrypting any key file, the root key center can determine the encryption and decryption key with a length equal to the length of the key file based on the encryption and decryption root key corresponding to the key file and the second key expansion algorithm, and encrypt the key file based on the encryption and decryption key.
[0115] In another example, if the root key center generates multiple groups of key files corresponding to a certain device identifier, the root key center can determine the number of key files in the group for each group of key files. According to the number, the number of encryption and decryption keys is determined, and the root key to be expanded is determined according to the random number to be expanded corresponding to the group of key files. According to the first key expansion algorithm corresponding to the group of key files, the root key to be expanded is expanded, so as to determine the encryption and decryption root key of the number of encryption and decryption keys. The root key center determines the corresponding relationship between the encryption and decryption root key of the number of encryption and decryption keys and each key file in the group, that is, determines the encryption and decryption root key corresponding to each key file in the group. For example, according to the generation order of the encryption and decryption root key of the number of encryption and decryption keys and the file sequence number of each key file in the group, the encryption and decryption root key corresponding to each key file in the group is determined. When encrypting any key file in the group, the root key center can determine the encryption and decryption key with a length equal to the length of the key file according to the encryption and decryption root key corresponding to the key file and the second key expansion algorithm corresponding to the group of key files, and encrypt the key file according to the encryption and decryption key.
[0116] The first key expansion algorithm corresponding to each group of key files can be completely the same, partially the same, or completely different, and the second key expansion algorithm corresponding to each group of key files can be completely the same, partially the same, or completely different. The first key expansion algorithm and the second key expansion algorithm corresponding to each group of key files can be pre-configured or obtained by the root key center from metadata, that is, the staff can configure the first key expansion algorithm and the second key expansion algorithm corresponding to each group of key files according to needs.
[0117] In one example, after obtaining the key files of the device identifier and the authentication parameters corresponding to the device identifier, the root key center may save the key files of the device identifier and the authentication parameters corresponding to the device identifier, and subsequently determine the encryption and decryption root keys and encryption and decryption keys corresponding to each key file based on the above-mentioned embodiment when exporting each key file.
[0118] In another example, if the root key center has determined the encryption and decryption root keys corresponding to each key file when saving the key files, the root key center can determine the encryption and decryption keys corresponding to each key file based on the encryption and decryption root keys corresponding to each key file, encrypt each key file based on the encryption and decryption keys corresponding to each key file, and save the encrypted key files. It can also directly save each key file and the encryption and decryption root keys corresponding to each key file, and subsequently when exporting each key file, determine the encryption and decryption keys corresponding to each key file based on the encryption and decryption root keys corresponding to each key file, encrypt each key file based on the encryption and decryption keys corresponding to each key file, and export the encrypted key files.
[0119] To facilitate subsequent queries on the encryption and decryption root keys corresponding to each key file, in the present application, the root key center can obtain the key generation record based on the device identification, the file serial numbers corresponding to the key files of the device identification, the key types corresponding to the key files of the device identification, the authentication parameters corresponding to the device identification, the storage locations corresponding to the key files of the device identification, and the encryption and decryption root keys corresponding to the key files of the device identification.
[0120] In one possible implementation, the root key center may generate multiple groups of key files for a certain device identifier. After the root key obtains the encryption and decryption root keys corresponding to each key file of the device identifier based on the above-mentioned embodiment, it can obtain the key generation record according to the device identifier, the file serial numbers corresponding to each key file of the device identifier, the key types corresponding to each key file of the device identifier, the authentication parameters corresponding to the device identifier, the storage locations corresponding to each key file of the device identifier, the group identifier to which each key file of the device identifier belongs, and the encryption and decryption root keys corresponding to each key file of the device identifier.
[0121] It should be noted that the length of the random number to be expanded is pre-configured, for example, 128 bits, 256 bits, 512 bits, etc.
[0122] Embodiment 3:
[0123] In order to prevent the device identification from being eavesdropped, thereby affecting the security of the key file, based on the above embodiments, in the present application, after obtaining the key files, the method further includes:
[0124] For each group of key files, determine a selected random number corresponding to the group of key files; wherein the selected random number is used to determine a key for encrypting the device identification; determine a device encryption key corresponding to the group of key files according to the parity of the selected random number, a first key expansion algorithm corresponding to the group of key files, and a root key to be expanded; encrypt the device identification according to the device encryption key to obtain an encrypted device identification corresponding to the group of key files;
[0125] The acquiring the key generation record according to the device identification, the file serial numbers respectively corresponding to the key files of the device identification, the authentication parameters corresponding to the device identification, and the storage locations respectively corresponding to the key files of the device identification, comprises:
[0126] The key generation record is obtained according to the device identification, the file serial numbers corresponding to the key files of the device identification, the key types corresponding to the key files of the device identification, the authentication parameters corresponding to the device identification, the storage locations corresponding to the key files of the device identification, the group identification to which the key files of the device identification belong, the encryption and decryption root keys corresponding to the key files of the device identification, and the encryption device identification corresponding to each group identification.
[0127] Considering that after the device identification is exported, it may be stolen by a third-party device, which may affect the security of the first access authentication process of the quantum security device of the device identification, and the security of the subsequent quantum security communication of the quantum security device of the device identification, therefore, in this application, after the root key center generates each key file of the device identification, it can also encrypt the device identification. Exemplarily, a device encryption key for encrypting the device identification can be generated, and then the device encryption key can be used to encrypt the device identification to obtain the encrypted device identification.
[0128] In one example, the random number generated by the root key center may be determined as the device encryption key.
[0129] In another example, the root key center can generate a corresponding selected random number for the device identification. The selected random number is used to determine the device encryption key for encrypting the device identification. The device encryption key is determined based on the parity of the selected random number, the first key expansion algorithm in the above embodiment, and the random number to be expanded. For example, the random number to be expanded is expanded by the first key expansion algorithm to obtain the expanded random number, and the target encryption key is determined from the expanded random number obtained. The number of the expanded random numbers is greater than the number of encryption and decryption keys, and the target encryption key is different from any encryption and decryption root key. Then, the device encryption key is determined based on the target encryption key and the parity of the selected random number. Exemplarily, if the selected random number is an odd number, the key of the first preset length before the target encryption key is determined as the device encryption key; if the selected random number is an even number, the key of the second preset length after the target encryption key is determined as the device encryption key, and the first preset length and the second preset length are both smaller than the length of the target encryption key, for example, the first preset length and the second preset length are both half of the length of the target encryption key; or, if the selected random number is an odd number, the key of the third preset length after the target encryption key is determined as the device encryption key; if the selected random number is an even number, the key of the fourth preset length before the target encryption key is determined as the device encryption key, and the third preset length and the fourth preset length are both smaller than the length of the target encryption key.
[0130] If the root key center generates multiple groups of key files corresponding to a certain device identification, the root key center can determine the selected random number corresponding to each group of key files, and determine the device encryption key corresponding to the group of key files based on the parity of the selected random number, the first key expansion algorithm corresponding to the group of key files, and the random number to be expanded corresponding to the group of key files.
[0131] After obtaining the device encryption key based on the above-mentioned embodiment, the device identification is encrypted according to the device encryption key to obtain the encrypted device identification. Subsequently, the key generation record is obtained according to the device identification, the file sequence numbers corresponding to the key files of the device identification, the key types corresponding to the key files of the device identification, the authentication parameters corresponding to the device identification, the storage locations corresponding to the key files of the device identification, and the encrypted device identification corresponding to the device identification.
[0132] In a possible implementation, if the root key center generates multiple groups of key files corresponding to a certain device identifier, then after the root key center obtains the device encryption key corresponding to any group of key files based on the above-mentioned embodiment, it encrypts the device identifier according to the device encryption key to obtain the encrypted device identifier corresponding to the group of key files. Then the root key center can obtain the key generation record according to the device identifier, the file serial number corresponding to each key file of the device identifier, the key type corresponding to each key file of the device identifier, the authentication parameter corresponding to the device identifier, the storage location corresponding to each key file of the device identifier, the group identifier to which each key file of the device identifier belongs, the encryption and decryption root key corresponding to each key file of the device identifier, and the encryption device identifier corresponding to each group of key files of the device identifier.
[0133] It should be noted that the process of determining the encryption device identification in the above embodiment can be performed before generating the key generation record, or before exporting each key file. If the process of determining the encryption device identification in the above embodiment is performed before exporting each key file, when generating each group of key files and authentication parameters for the device identification, a selection random number corresponding to each group of key files can be generated. When subsequently generating the key generation record, the key generation record can be obtained according to the device identification, the file sequence number corresponding to each key file of the device identification, the key type corresponding to each key file of the device identification, the authentication parameter corresponding to the device identification, the storage location corresponding to each key file of the device identification, the group identification to which each key file of the device identification belongs, and the selection random number corresponding to each group of key files.
[0134] Embodiment 4:
[0135] The following is a description of a method for generating quantum secure keys and authentication parameters provided by the present application through a specific embodiment. Figure 2 A schematic diagram of a specific process for generating quantum secure keys and authentication parameters provided in an embodiment of the present application, the process comprising:
[0136] S201: Import metadata required for key generation.
[0137] Among them, the metadata includes device identification, encryption key size, quantum secure computing random number size, key generation time, metadata import time, number of key copies, root key size, quantum secure computing random number switch and encryption key switch.
[0138] If it is necessary to generate quantum secure computing random numbers, the state of the quantum secure computing random number switch is a state representing the generation of a quantum secure computing random number file; if it is not necessary to generate quantum secure computing random numbers, the state of the quantum secure computing random number switch is a state representing the non-generation of a quantum secure computing random number file.
[0139] If the encryption key needs to be generated, the state of the encryption key switch is a state representing the generation of the encryption key file. If the encryption key does not need to be generated, the state of the encryption key switch is a state representing the non-generation of the encryption key file.
[0140] S202: When generating each group of key files for the device identification according to the number of key copies, at least one root key file included in the group of key files is generated for the device identification according to a preset root key file granularity and a root key size in the obtained metadata; at least one encryption key file included in the group of key files is generated for the device identification according to a preset encryption key file granularity and an encryption key size in the obtained metadata; at least one quantum safe computing random number file included in the group of key files is generated for the device identification according to a preset quantum safe computing random number file granularity and a quantum safe computing random number size in the obtained metadata.
[0141] S203: Generate authentication parameters corresponding to each group of key files for the device identifier.
[0142] Among them, the authentication parameters corresponding to any group of key files include the random number to be expanded for encrypting and decrypting the group of key files, the authentication index used to find the authentication parameters corresponding to the group of key files, the first random number for encrypting the data to be encrypted in the access request, and the second random number for decrypting the data to be decrypted in the access response information.
[0143] It should be noted that the access request is a message for the quantum security device identified by the device to request the first access to the quantum security base station in the quantum security network, and the access response information is a feedback message sent by the quantum security base station to the quantum security device in response to the access request. After the quantum security base station allows the quantum security device to access, it relays the key sent and received by the quantum security device identified by the device according to the key file of the device identified by the root key center.
[0144] S204: For each group of key files, determine a selected random number corresponding to the group of key files.
[0145] The selected random number is used to determine a device encryption key for encrypting the device identification.
[0146] S205: Determine the group identifier corresponding to each group of key files and the file identifier corresponding to each key file of the device identifier, and save each key file of the device identifier.
[0147] S206: Obtain a key generation record based on the device identifier, the file serial numbers corresponding to the key files of the device identifier, the key types corresponding to the key files of the device identifier, the authentication parameters corresponding to the device identifier, the storage locations corresponding to the key files of the device identifier, the group identifiers to which the key files of the device identifier belong, and the selected random numbers corresponding to the key files of each group.
[0148] Embodiment 5:
[0149] The present application also provides a quantum secure key distribution device, Figure 3 A schematic diagram of a device for generating a quantum secure key and authentication parameters provided in an embodiment of the present application, the device comprising: an acquisition module 31, a generation module 32 and a processing module 33;
[0150] The acquisition module 31 is used to acquire metadata required for generating a key; wherein the metadata includes a device identifier and a root key size;
[0151] The generating module 32 is used to generate corresponding root key files and authentication parameters for the device identification according to the root key size and the preset root key file granularity; wherein the authentication parameters include random numbers to be expanded for encrypting and decrypting each key file, authentication indexes for searching the authentication parameters, a first random number for encrypting the data to be encrypted in the access request, and a second random number for decrypting the data to be decrypted in the access response information; the access request is a message of the quantum security device of the device identification requesting to access the quantum security base station in the quantum security network for the first time; the access response information is a feedback message sent by the quantum security base station to the quantum security device in response to the access request; after the quantum security base station allows the quantum security device to access, according to the key file of the device identification sent by the root key center, the key sent and received by the quantum security device of the device identification is relayed; wherein the key files include the root key files for quantum encryption and decryption of data; determine the file serial numbers corresponding to the key files, and save the key files;
[0152] The processing module 33 is used to obtain the key generation record according to the device identifier, the file serial numbers corresponding to the key files of the device identifier, the authentication parameters corresponding to the device identifier, and the storage locations corresponding to the key files of the device identifier, so as to search for the key files of the device identifier and the authentication parameters corresponding to the device identifier according to the key generation record.
[0153] In some possible implementations, if the metadata also includes an encryption key size, the key file also includes each encryption key file identified by the device; wherein each encryption key file is generated according to the encryption key size and a preset encryption key file granularity, and the quantum security device identified by the device decrypts the received encryption supplementary key according to the encryption key file after leaving the factory.
[0154] In some possible implementations, if the metadata also includes a quantum secure computing random number size, the key file also includes each quantum secure computing random number file identified by the device; wherein each quantum secure computing random number file is generated according to the quantum secure computing random number size and a preset quantum secure computing random number file granularity, and the quantum secure device identified by the device performs quantum secure computing according to each quantum secure computing random number file after leaving the factory.
[0155] In certain possible implementations, if the metadata also includes the number of key shares, then each key file includes groups of key files whose number is the number of key shares, and each group has corresponding authentication parameters; wherein any group of key files includes at least one key file of each key type, each key type includes a root key, and any two key files of the same key type are different.
[0156] In some possible implementations, the random number to be expanded includes a first random number to be expanded for configuring in a quantum security device of the device identifier.
[0157] In some possible implementations, the random number to be expanded also includes a second random number to be expanded for local configuration.
[0158] In some possible implementations, the generation module 32 is further used to, if the metadata also includes the first key expansion algorithm and the second key expansion algorithm respectively corresponding to each group of key files of the device identifier, determine the root key to be expanded for each group of key files according to the random number to be expanded corresponding to the group of key files; determine the encryption and decryption root keys respectively corresponding to the group of key files according to the first key expansion algorithm corresponding to the group of key files, the root key to be expanded and the number of the group of key files; wherein the second key expansion algorithm corresponding to the group of key files is used to determine the encryption and decryption keys respectively corresponding to the group of key files according to the encryption and decryption root keys respectively corresponding to the group of key files, and the encryption and decryption keys corresponding to any key file are used to encrypt the key file;
[0159] The processing module 33 is specifically used to obtain the key generation record according to the device identification, the file serial numbers corresponding to the key files of the device identification, the key types corresponding to the key files of the device identification, the authentication parameters corresponding to the device identification, the storage locations corresponding to the key files of the device identification, the group identification to which the key files of the device identification belong, the encryption and decryption root keys corresponding to the key files of the device identification, and the first key expansion algorithm and the second key expansion algorithm corresponding to the group key files of the device identification.
[0160] The beneficial effects of this application are as follows:
[0161] 1. When a key file is generated according to metadata, an authentication parameter corresponding to the device identification is also generated. The authentication parameter includes a random number to be expanded for encrypting and decrypting each key file and an authentication index for searching the authentication parameter. The authentication index can accurately index the random number to be expanded corresponding to the device identification. According to the random number to be expanded, the key files of the device identification can be encrypted, exported and injected into the quantum security device, thereby ensuring the security of the key files of the device identification.
[0162] 2. Since the quantum security base station to which the quantum security device identified by the device is connected can obtain the key file of the device identification from the root key center, the key pairing between the quantum security base station and the quantum security device identified by the device is realized. Subsequently, the quantum security base station can be used to relay the key sent and received by the quantum security device identified by the device, thereby realizing quantum security communication between the quantum security device and other quantum security devices. In addition, the quantum security device only needs to pair the key with the quantum security base station to which it is connected, that is, the quantum security device does not need to pair the key with any quantum security device that needs to communicate, so that the quantum security device only needs to save the key file of the device identification, which not only reduces the storage pressure of the quantum security device, but also after any two quantum security devices are connected to the quantum security base station in the quantum security network, the two quantum security devices can realize the key relay through the quantum security network when conducting quantum security communication, which improves the flexibility of quantum security communication, and does not require the staff to pre-fill the keys for the two quantum security devices, reducing the workload of the staff to fill the keys.
[0163] 3. Since the authentication parameter also includes a first random number for encrypting the data to be encrypted in the access request and a second random number for decrypting the data to be decrypted in the access response information, the access request is a message for the quantum security device identified by the device to request the first access to the quantum security base station in the quantum security network, and the access response information is a feedback message sent by the quantum security base station to the quantum security device in response to the access request. The first random number and the second random number can be used to implement the use of ciphertext communication by the quantum security device during the first access to the quantum security base station, thereby ensuring the security of the first access to the quantum security base station.
[0164] 4. After the root key center obtains the metadata required to generate the key, it can accurately generate and distribute the root key file according to the root key size and the preset root key file granularity, and generate the authentication parameters corresponding to the device identification. There is no need to manually distribute the key, which reduces the manpower and material resources consumed in key distribution and improves the efficiency and quality of key distribution.
[0165] 5. After saving each key file, the key generation record can be obtained according to the device identification, the file serial numbers corresponding to the key files of the device identification, and the storage locations corresponding to the key files of the device identification, so that any key file corresponding to the device identification can be quickly and accurately found according to the key generation record, which is convenient for the management of the key files corresponding to each device identification.
[0166] Embodiment 6:
[0167] Based on the above embodiment, the present application embodiment further provides a root key center, Figure 4 A schematic diagram of the structure of a root key center provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, it includes: a processor 41, a communication interface 42, a memory 43 and a communication bus 44, wherein the processor 41, the communication interface 42, and the memory 43 communicate with each other through the communication bus 44;
[0168] The memory 43 stores a computer program. When the program is executed by the processor 41, the processor 41 performs the following steps:
[0169] Obtaining metadata required for generating a key; wherein the metadata includes a device identifier and a root key size;
[0170] Generate corresponding root key files and authentication parameters for the device identification according to the root key size and the preset root key file granularity; wherein the authentication parameters include random numbers to be expanded for encrypting and decrypting each key file, an authentication index for searching the authentication parameters, a first random number for encrypting the data to be encrypted in the access request, and a second random number for decrypting the data to be decrypted in the access response information; the access request is a message of the quantum security device of the device identification requesting to access the quantum security base station in the quantum security network for the first time; the access response information is a feedback message sent by the quantum security base station to the quantum security device in response to the access request; after the quantum security base station allows the quantum security device to access, it relays the key sent and received by the quantum security device of the device identification according to the key file of the device identification sent by the root key center; wherein the key files include the root key files for quantum encryption and decryption of data;
[0171] Determine the file serial numbers corresponding to the key files, and save the key files;
[0172] According to the device identifier, the file serial numbers corresponding to the key files of the device identifier, the authentication parameters corresponding to the device identifier and the storage locations corresponding to the key files of the device identifier, a key generation record is obtained to search for the key files of the device identifier and the authentication parameters corresponding to the device identifier according to the key generation record.
[0173] Since the principle of solving the problem by the above-mentioned root key center is similar to the method of generating quantum security keys and authentication parameters, the implementation of the above-mentioned root key center can refer to the embodiment of the method, and the repeated parts will not be repeated.
[0174] The communication bus mentioned in the root key center can be a peripheral component interconnect standard (PCI) bus or an extended industry standard architecture (EISA) bus. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface 42 is used for communication between the root key center and other devices. The memory can include a random access memory (RAM) and can also include a non-volatile memory (NVM), such as at least one disk storage. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.
[0175] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (Network Processor, NP), etc.; it can also be a digital signal processing processor (Digital Signal Processing, DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.
[0176] Embodiment 6:
[0177] On the basis of the above embodiments, an embodiment of the present application further provides a computer-readable storage medium, in which a computer program executable by a processor is stored. When the program runs on the processor, the processor implements the following steps when executing:
[0178] Obtaining metadata required for generating a key; wherein the metadata includes a device identifier and a root key size;
[0179] Generate corresponding root key files and authentication parameters for the device identification according to the root key size and the preset root key file granularity; wherein the authentication parameters include random numbers to be expanded for encrypting and decrypting each key file, an authentication index for searching the authentication parameters, a first random number for encrypting the data to be encrypted in the access request, and a second random number for decrypting the data to be decrypted in the access response information; the access request is a message of the quantum security device of the device identification requesting to access the quantum security base station in the quantum security network for the first time; the access response information is a feedback message sent by the quantum security base station to the quantum security device in response to the access request; after the quantum security base station allows the quantum security device to access, it relays the key sent and received by the quantum security device of the device identification according to the key file of the device identification sent by the root key center; wherein the key files include the root key files for quantum encryption and decryption of data;
[0180] Determine the file serial numbers corresponding to the key files, and save the key files;
[0181] According to the device identifier, the file serial numbers corresponding to the key files of the device identifier, the authentication parameters corresponding to the device identifier and the storage locations corresponding to the key files of the device identifier, a key generation record is obtained to search for the key files of the device identifier and the authentication parameters corresponding to the device identifier according to the key generation record.
[0182] Since the principle of solving the problem by the above-mentioned computer-readable storage medium is similar to the method for generating quantum secure keys and authentication parameters, the implementation of the above-mentioned computer-readable storage medium can refer to the embodiment of the method, and the repeated parts will not be repeated.
[0183] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on two or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0184] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each of the processes and / or blocks in the flowcharts and / or block diagrams, as well as the combination of the processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts. Figure 2 A process or multiple processes and / or boxes Figure 2 A device that provides the functions specified in a block or multiple blocks.
[0185] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 2 A process or multiple processes and / or boxes Figure 2 A function specified in one or more boxes.
[0186] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 2 A process or multiple processes and / or boxes Figure 2 A step that specifies a function in one or more boxes.
[0187] 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 device for generating quantum secure keys and authentication parameters, characterized in that: The device comprises: an acquisition module, a generation module and a processing module; The acquisition module is used to acquire metadata required for generating a key; wherein the metadata includes a device identifier and a root key size; The generating module is used to generate corresponding root key files and authentication parameters for the device identification according to the root key size and the preset root key file granularity; wherein the authentication parameters include random numbers to be expanded for encrypting and decrypting each key file, authentication indexes for searching the authentication parameters, a first random number for encrypting the data to be encrypted in the access request, and a second random number for decrypting the data to be decrypted in the access response information, the access request is a message of the quantum security device of the device identification requesting to access the quantum security base station in the quantum security network for the first time, the access response information is a feedback message sent by the quantum security base station to the quantum security device in response to the access request, and after the quantum security base station allows the quantum security device to access, according to the key file of the device identification sent by the root key center, the key sent and received by the quantum security device of the device identification is relayed; wherein the key files include the root key files for quantum encryption and decryption of data; determine the file serial numbers corresponding to the key files respectively, and save the key files; The processing module is used to obtain a key generation record based on the device identification, the file serial numbers corresponding to the key files of the device identification, the authentication parameters corresponding to the device identification, and the storage locations corresponding to the key files of the device identification, so as to search for the key files of the device identification and the authentication parameters corresponding to the device identification according to the key generation record.
2. The device according to claim 1, characterized in that If the metadata also includes an encryption key size, the key file also includes each encryption key file identified by the device; wherein each encryption key file is generated according to the encryption key size and a preset encryption key file granularity, and the quantum security device identified by the device decrypts the received encryption supplementary key according to the encryption key file after leaving the factory.
3. The device according to claim 1, characterized in that If the metadata also includes a quantum secure computing random number size, the key file also includes each quantum secure computing random number file identified by the device; wherein each quantum secure computing random number file is generated according to the quantum secure computing random number size and a preset quantum secure computing random number file granularity, and the quantum secure device identified by the device performs quantum secure computing according to each quantum secure computing random number file after leaving the factory.
4. The device according to any one of claims 1 to 3, characterized in that: If the metadata also includes the number of key shares, then each key file includes groups of key files whose number is the number of key shares, and each group has corresponding authentication parameters; wherein any group of key files includes at least one key file of each key type, each key type includes a root key, and any two key files of the same key type are different.
5. The device according to claim 4, characterized in that The random number to be expanded includes a first random number to be expanded for configuring in the quantum security device of the device identifier.
6. The device according to claim 5, characterized in that The random number to be expanded also includes a second random number to be expanded for local configuration.
7. The device according to claim 6, characterized in that The generating module is further configured to determine the root key to be expanded according to the random number to be expanded corresponding to each group of key files, for each group of key files, if the metadata further includes the first key expansion algorithm and the second key expansion algorithm respectively corresponding to the group of key files identified by the device; Determine the encryption and decryption root keys corresponding to the group of key files according to the first key expansion algorithm corresponding to the group of key files, the root key to be expanded, and the number of the group of key files; wherein the second key expansion algorithm corresponding to the group of key files is used to determine the encryption and decryption keys corresponding to the group of key files according to the encryption and decryption root keys corresponding to the group of key files, and the encryption and decryption key corresponding to any key file is used to encrypt the key file; The processing module is specifically used to obtain the key generation record according to the device identification, the file serial numbers corresponding to the key files of the device identification, the key types corresponding to the key files of the device identification, the authentication parameters corresponding to the device identification, the storage locations corresponding to the key files of the device identification, the group identification to which the key files of the device identification belong, the encryption and decryption root keys corresponding to the key files of the device identification, and the first key expansion algorithm and the second key expansion algorithm corresponding to the group key files of the device identification.
8. The device according to claim 7, characterized in that The generation module is further used to determine, for each group of key files, a selected random number corresponding to the group of key files; wherein the selected random number is used to determine a key for encrypting the device identification; determine a device encryption key corresponding to the group of key files according to the parity of the selected random number, the first key expansion algorithm corresponding to the group of key files, and the root key to be expanded; encrypt the device identification according to the device encryption key to obtain the encrypted device identification corresponding to the group of key files; The processing module is specifically used to obtain the key generation record based on the device identification, the file serial numbers corresponding to the key files of the device identification, the key types corresponding to the key files of the device identification, the authentication parameters corresponding to the device identification, the storage locations corresponding to the key files of the device identification, the group identification to which the key files of the device identification belong, the encryption and decryption root keys corresponding to the key files of the device identification, and the encryption device identification corresponding to each group identification.
9. A method for generating quantum secure keys and authentication parameters, characterized in that: The method comprises: Obtaining metadata required for generating a key; wherein the metadata includes a device identifier and a root key size; Generate corresponding root key files and authentication parameters for the device identification according to the root key size and the preset root key file granularity; wherein the authentication parameters include random numbers to be expanded for encrypting and decrypting each key file, an authentication index for searching the authentication parameters, a first random number for encrypting the data to be encrypted in the access request, and a second random number for decrypting the data to be decrypted in the access response information; the access request is a message of the quantum security device of the device identification requesting to access the quantum security base station in the quantum security network for the first time; the access response information is a feedback message sent by the quantum security base station to the quantum security device in response to the access request; after the quantum security base station allows the quantum security device to access, it relays the key sent and received by the quantum security device of the device identification according to the key file of the device identification sent by the root key center; wherein the key files include the root key files for quantum encryption and decryption of data; Determine the file serial numbers corresponding to the key files, and save the key files; According to the device identifier, the file serial numbers corresponding to the key files of the device identifier, the authentication parameters corresponding to the device identifier and the storage locations corresponding to the key files of the device identifier, a key generation record is obtained to search for the key files of the device identifier and the authentication parameters corresponding to the device identifier according to the key generation record.
10. A root key center, characterized in that: The root key center includes at least a processor and a memory, and the processor is used to implement the steps of the method for generating quantum secure keys and authentication parameters as described in any one of claims 1 to 8 when executing a computer program stored in the memory.
11. A computer-readable storage medium, characterized in that: It stores a computer program, which, when executed by a processor, implements the steps of the method for generating a quantum secure key and authentication parameters as claimed in claim 9.
12. A computer program product, characterized in that The computer program product comprises: a computer program code, which, when executed on a computer, enables the computer to execute the steps of the method for generating a quantum secure key and authentication parameters as claimed in claim 9.
