A method for pairing quantum keys and quantum ciphertext data packets
By adding the network entry code RID and message sequence number MsgID before transmitting quantum ciphertext data packets and quantum keys, and by using a hash linked list storage and timing mechanism, the problem of low decryption efficiency caused by asynchronous data transmission between quantum networks and the Internet is solved, and efficient pairing and decryption of quantum keys and quantum ciphertext data packets is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MATRICTIME DIGITAL TECH CO LTD
- Filing Date
- 2023-04-07
- Publication Date
- 2026-05-26
Smart Images

Figure CN116388981B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of quantum security technology, specifically to a method for pairing quantum keys and quantum ciphertext data packets. Background Technology
[0002] Data communication is the process of exchanging data between computers and between computers and devices. The signal transmission required for data communication necessitates the participation of a communication network. The early development of communication network technology involved online systems, where numerous geographically dispersed computers were connected by a central processing unit (CPU). The CPU was extremely powerful, encompassing functions such as computation, instruction gathering, and storage. The 1990s ushered in the era of interconnection and high-speed networks. Following the construction of the information superhighway in the United States, countries around the world followed suit, establishing their own National Information Infrastructure (NII) projects. Currently, the core of global network and communication technology is the Internet, through which global resources are shared. With the advancement of technology, network communication is becoming increasingly sophisticated and efficient.
[0003] Technology will continue to advance, and with the rapid development of the internet, security is always a concern. In environments where security and privacy are paramount, a more secure communication method is always needed. With the increasing prevalence of quantum computers, access to quantum networks has become a possibility. Data communication always involves the transmission of quantum keys and quantum ciphertext data packets. While quantum ciphertext data packets are transmitted via the internet, quantum keys are transmitted via a quantum network. These two different transmission paths need to be combined at the receiving end, but due to the asynchronous nature of network transmission, the large volume of quantum ciphertext data packets and quantum keys becomes difficult to process, resulting in extremely low decryption efficiency.
[0004] Therefore, in order to solve the problem of asynchronous data transmission between quantum networks and the Internet during data communication, the receiving end has a large number of quantum ciphertext data packets and quantum keys that are difficult to process and have extremely low decryption efficiency, it is necessary to find a reasonable data pairing method. Summary of the Invention
[0005] Purpose of the invention: The purpose of this invention is to provide a pairing method for quantum keys and quantum ciphertext data packets, which solves the problem of asynchronous data transmission between quantum networks and the Internet during data communication, the large number of quantum ciphertext data packets and quantum keys that are difficult to process at the receiving end, and the extremely low decryption efficiency.
[0006] Technical solution: This invention provides a method for pairing quantum keys and quantum ciphertext data packets, comprising the following steps:
[0007] (1) The first terminal performs quantum encryption on L plaintext data packets and L quantum keys one by one to obtain L quantum ciphertext data packets. Then, it assembles identification information on the front end of each quantum ciphertext data packet, and assembles the same identification information on the front end of the quantum keys corresponding to all quantum ciphertext data packets. The assembled L quantum ciphertext data packets are transmitted to the second terminal via the Internet, and the assembled L quantum keys are transmitted to the second terminal via the quantum network.
[0008] (2) The second terminal establishes a hash chain list, stores the assembled L quantum ciphertext data packets and L quantum keys in the hash chain list through identification information, and then performs pairing and decryption.
[0009] Furthermore, the identification information includes the network access code RID and message sequence number MsgID of the first terminal; the message sequence number MsgID is arranged sequentially in the identification information of all quantum ciphertext data packets assembled.
[0010] Furthermore, the message sequence number MsgID of the first quantum ciphertext data packet in the L quantum ciphertext data packets is a randomly obtained positive integer.
[0011] Furthermore, the hash list consists of N vertical slots and a horizontal storage area located after each slot.
[0012] Furthermore, the assembled L quantum ciphertext data packets and L quantum keys are stored in a hash chain using identification information, and then the specific process of pairing and decryption is as follows:
[0013] 1) Compare the message sequence number MsgID in the identifier information of the quantum ciphertext data packet or quantum key assembly with N. If the message sequence number MsgID is less than N, store the quantum ciphertext data packet or quantum key containing the message sequence number MsgID in the storage area corresponding to the message sequence number MsgID in the hash chain. If the message sequence number MsgID is greater than N, take the remainder of the message sequence number MsgID divided by N to obtain the remainder value Q. When the remainder value Q is 0, store the quantum ciphertext data packet or quantum key containing the message sequence number MsgID in the storage area corresponding to the Nth slot in the hash chain. When the remainder value Q is not 0, store the quantum ciphertext data packet or quantum key containing the message sequence number MsgID in the storage area corresponding to the Qth slot in the hash chain.
[0014] 2) After storage is completed, in the same slot storage area, check if there are two data sets with the same network access code RID and message sequence number MsgID of the first terminal. If there are two data sets with the same network access code RID and message sequence number MsgID of the first terminal, these are the assembled quantum ciphertext data packets and quantum keys. The assembled quantum ciphertext data packets and quantum keys are then split into quantum ciphertext data packets and quantum keys, and then paired with quantum keys for quantum decryption to obtain plaintext data packets. If there are no two data sets with the same network access code RID and message sequence number MsgID of the first terminal, then wait for subsequent pairing and decryption.
[0015] Furthermore, when the assembled L quantum ciphertext data packets and L quantum keys are stored in the hash chain using identification information, the stored assembled quantum ciphertext data packets and quantum keys are timed. When the timed duration corresponding to the assembled quantum ciphertext data packets and quantum keys exceeds the predetermined storage duration, they are cleared.
[0016] The beneficial effects of this invention are as follows: By adding an entry code RID and a message sequence number MsgID before transmitting quantum ciphertext data packets and quantum keys, and then classifying and storing them in a hash chain table according to the message sequence number MsgID, this invention finds two data pairs (i.e., the quantum ciphertext data packet and the quantum key) that are identical in both the entry code RID and the message sequence number MsgID of the first terminal. These are then paired and quantum decrypted, thus achieving unique pairing and decryption of the quantum ciphertext data packet and the quantum key. Furthermore, the hash chain table allows for simultaneous data processing in multiple slots, supporting multi-threaded operations, which improves the efficiency of pairing and decryption and saves a significant amount of reading time. Attached Figure Description
[0017] Figure 1 A data transmission diagram in a quantum communication system;
[0018] Figure 2 This refers to the data packet format of the assembled quantum ciphertext data packet and quantum key;
[0019] Figure 3 This is a structural diagram of a hash chain list. Detailed Implementation
[0020] The present invention will be further described below with reference to the accompanying drawings and embodiments:
[0021] Quantum communication systems transmit data simultaneously via quantum networks and the internet. The internet transmits quantum ciphertext data packets, while the quantum network transmits quantum keys. The data transmission process typically involves quantum encryption of the plaintext at the sending end. The quantum key and the resulting quantum ciphertext data packets are transmitted separately to the receiving end, where the receiving end uses the received quantum key to perform quantum decryption to obtain the plaintext. Quantum-safe systems can be deployed across base stations, regions, and even countries. Messages sent to the same terminal device can originate from the same base station, different base stations without crossing boundaries, or different base stations across boundaries. Therefore, as long as the network is operational, a single terminal device can receive information from all other terminal devices within the entire quantum-safe communication system. This results in a continuous stream of messages from multiple sending ends to the receiving end. The receiving end receives a large number of quantum keys and quantum ciphertext data packets at once, creating a chaotic and difficult-to-process situation. Therefore, it is crucial to address the problem of low pairing efficiency caused by the large volume of quantum keys and quantum ciphertext data packets from different terminal devices.
[0022] The method of this invention assigns a unique network entry code (RID) to each terminal device when it connects to a base station in a quantum network. This RID identifies each terminal device. Simultaneously, a unique message sequence number, denoted as MsgID, is assigned to each message sent from this terminal device. When transmitting quantum key and quantum ciphertext data packets at the sending end, the same RID and MsgID are added to this message pair. This allows the receiving end to identify which message from which terminal device. The paired quantum key and quantum ciphertext data packets are referred to as a message pair.
[0023] The present invention will be further described below with reference to the accompanying drawings and embodiments:
[0024] This invention includes a method for pairing quantum keys and quantum ciphertext data packets. The method describes how to achieve efficient pairing of quantum keys and quantum ciphertext data packets, including the following steps:
[0025] (1) The first terminal performs quantum encryption on L plaintext data packets and L quantum keys one-to-one to obtain L quantum ciphertext data packets. Then, it assembles identification information at the front end of each quantum ciphertext data packet, and assembles the same identification information at the front end of the quantum keys corresponding to all quantum ciphertext data packets. The assembled L quantum ciphertext data packets are transmitted to the second terminal via the Internet, and the assembled L quantum keys are transmitted to the second terminal via the quantum network. The identification information includes the network access code RID and message sequence number MsgID of the first terminal. The message sequence number MsgID of the first quantum ciphertext data packet is a randomly obtained positive integer, and the message sequence number MsgID of the other quantum ciphertext data packets is incremented by 1 based on this positive integer. For example, if the randomly obtained positive integer is M, then the message sequence number MsgID of the second quantum ciphertext data packet is M+1, the message sequence number MsgID of the third quantum ciphertext data packet is M+2, and so on, so that the message sequence number MsgID in the identification information assembled by all quantum ciphertext data packets is arranged in order.
[0026] like Figure 1 and Figure 2 As shown, the first terminal sends a message to the second terminal. The plaintext data packet needs to be encrypted into a quantum ciphertext data packet using a quantum key. Before transmitting the quantum key and quantum ciphertext data packet separately, the network entry code RID and message sequence number MsgID need to be appended to the paired quantum ciphertext data packet and quantum key. The network entry code RID and message sequence number MsgID appended to the paired quantum ciphertext data packet and quantum key must be the same. After assembly, the quantum ciphertext data packet is transmitted to the second terminal via the Internet, and the quantum key is transmitted to the second terminal via the quantum network. Simultaneously, other terminals also send messages to the second terminal, sending quantum keys and quantum ciphertext data packets in the same way. Due to network limitations, it is impossible for the same paired quantum ciphertext data packet and quantum key to arrive simultaneously, nor is it guaranteed which arrives first. Thus, the second terminal will receive many scattered quantum key and quantum ciphertext data packets at once. Therefore, the second terminal needs a storage mechanism to receive and match quantum ciphertext data packets and quantum keys.
[0027] (2) The second terminal establishes a hash chain list, stores the assembled L quantum ciphertext data packets and L quantum keys in the hash chain list through identification information, and then performs pairing and decryption.
[0028] like Figure 3The diagram shows the structure of a hash chain, which is established by a second terminal. The hash chain consists of N vertical slots and a horizontal storage area following each slot, forming a hash chain with slots from 1 to N. The storage area following each slot stores the quantum key or quantum ciphertext data packet.
[0029] The assembled L quantum ciphertext data packets and L quantum keys are stored in a hash chain using identification information, and the specific process of pairing and decryption is as follows:
[0030] 1) Compare the message sequence number MsgID in the identifier information of the quantum ciphertext data packet or quantum key assembly with N. If the message sequence number MsgID is less than N, store the quantum ciphertext data packet or quantum key containing the message sequence number MsgID in the storage area corresponding to the message sequence number MsgID in the hash chain. If the message sequence number MsgID is greater than N, take the remainder of the message sequence number MsgID divided by N to obtain the remainder value Q. When the remainder value Q is 0, store the quantum ciphertext data packet or quantum key containing the message sequence number MsgID in the storage area corresponding to the Nth slot in the hash chain. When the remainder value Q is not 0, store the quantum ciphertext data packet or quantum key containing the message sequence number MsgID in the storage area corresponding to the Qth slot in the hash chain.
[0031] When a quantum ciphertext data packet or quantum key is sent, the specific slot in the hash chain is located based on the message sequence number MsgID. For example, if MsgID is 1, then the quantum key or quantum ciphertext data packet will be stored in the storage area corresponding to the first slot. However, since the number of slots is fixed, and the value of MsgID may be relatively large, exceeding N, the slot in the hash chain is located based on the value obtained by taking the remainder between MsgId and N.
[0032] The message sequence number (MsgID) of the first quantum ciphertext data packet in the L quantum ciphertext data packets is a randomly obtained positive integer. This is because if the message sequence numbers on each terminal all start from 1, it's easy for the first few slots of the hash list at the receiving end to become congested. Therefore, to improve processing efficiency, the message sequence number (MsgID) of the first quantum ciphertext data packet on each terminal device is a randomly obtained positive integer. This allows the message sequence number (MsgID) of quantum ciphertext data packets on different terminal devices to be different. Consequently, when storing data on the hash list, according to the above storage method, the data can be distributed across different slots, effectively alleviating storage pressure.
[0033] 2) After storage is completed, in the same slot storage area, check if there are two data sets with the same network access code RID and message sequence number MsgID of the first terminal. If there are two data sets with the same network access code RID and message sequence number MsgID of the first terminal, these are the corresponding quantum ciphertext data packets and quantum keys after assembly. The corresponding quantum ciphertext data packets and quantum keys after assembly are split into quantum ciphertext data packets and quantum keys, and then the quantum ciphertext data packets and quantum keys are paired for quantum decryption to obtain the plaintext data packets. If there are no two data sets with the same network access code RID and message sequence number MsgID of the first terminal, then wait for subsequent pairing and decryption.
[0034] The quantum ciphertext data packets and quantum keys that have completed pairing and decryption are cleared after quantum decryption to free up the slot storage area to store subsequently received quantum ciphertext data packets or quantum keys.
[0035] To further reduce data storage space, when the assembled L quantum ciphertext data packets and L quantum keys are stored in the hash chain using identification information, a timer is applied to the stored quantum ciphertext data packets and quantum keys. If the timer exceeds a predetermined storage duration, the stored quantum ciphertext data packets and quantum keys are removed. The timer is used to filter out invalid data packets. It records the time after the message data packet is stored in the slot storage area. If the timer exceeds the predetermined storage duration, such as 10 seconds or another reasonable time, the message data packet is considered unpairable and is removed from the storage area, thus avoiding the waste of space by invalid data packets. Since the hash chain has multiple slots, message pairing processing can support multi-threaded concurrent operations, greatly improving response efficiency. This invention provides an efficient processing method for the receiving end to pair the correct quantum ciphertext data packets and quantum keys, using a unified method to pair the originally messy quantum ciphertext data packets and quantum keys, improving decryption efficiency and increasing data real-time performance.
[0036] The quantum key and quantum ciphertext data packet pairing scheme proposed in this invention uniquely pairs all messages in the quantum network. This eliminates the need for special processing on the message data packets and a synchronization mechanism at the receiving end, thus avoiding message blocking. The use of hash linked lists in this invention greatly supports multi-threaded concurrency, improving data processing speed. Furthermore, since the quantum key and quantum ciphertext data packets are directly stored in the storage area, once the paired quantum key and quantum ciphertext data packets are obtained, they can be immediately combined for quantum decryption, saving significant reading time and increasing the real-time performance of data response.
Claims
1. A method for pairing quantum keys and quantum ciphertext data packets, characterized in that, Includes the following steps: (1) The first terminal performs quantum encryption on L plaintext data packets and L quantum keys one by one to obtain L quantum ciphertext data packets. Then, it assembles identification information on the front end of each quantum ciphertext data packet, and assembles the same identification information on the front end of the quantum keys corresponding to all quantum ciphertext data packets. The assembled L quantum ciphertext data packets are transmitted to the second terminal via the Internet, and the assembled L quantum keys are transmitted to the second terminal via the quantum network. (2) The second terminal establishes a hash chain list, stores the assembled L quantum ciphertext data packets and L quantum keys in the hash chain list through identification information, and then performs pairing and decryption; The identification information includes the network access code RID and message sequence number MsgID of the first terminal; the message sequence number MsgID is arranged in order in the identification information of all quantum ciphertext data packets assembled. The message sequence number MsgID of the first quantum ciphertext data packet in the L quantum ciphertext data packets is a randomly obtained positive integer; The hash list consists of N vertical slots and a horizontal storage area following each slot. The assembled L quantum ciphertext data packets and L quantum keys are stored in a hash chain using identification information, and then the pairing and decryption process is as follows: 1) Compare the message sequence number MsgID in the identifier information of the quantum ciphertext data packet or quantum key assembly with N. If the message sequence number MsgID is less than N, store the quantum ciphertext data packet or quantum key containing the message sequence number MsgID in the storage area corresponding to the slot of the hash chain. If the message sequence number MsgID is greater than N, take the remainder of the message sequence number MsgID divided by N to obtain the remainder value Q. When the remainder value Q is 0, store the quantum ciphertext data packet or quantum key containing the message sequence number MsgID in the storage area corresponding to the Nth slot of the hash chain. When the remainder value Q is not 0, store the quantum ciphertext data packet or quantum key containing the message sequence number MsgID in the storage area corresponding to the Qth slot of the hash chain. 2) After storage is completed, in the same slot storage area, check if there are two data sets with the same network access code RID and message sequence number MsgID of the first terminal. If there are two data sets with the same network access code RID and message sequence number MsgID of the first terminal, these are the assembled quantum ciphertext data packets and quantum keys. The assembled quantum ciphertext data packets and quantum keys are then split into quantum ciphertext data packets and quantum keys, and then paired with the quantum ciphertext data packets and quantum keys for quantum decryption to obtain the plaintext data packets. If there are no two data sets with the same network access code RID and message sequence number MsgID of the first terminal, then wait for subsequent pairing and decryption.
2. The method for pairing quantum keys and quantum ciphertext data packets according to claim 1, characterized in that: When the assembled L quantum ciphertext data packets and L quantum keys are stored in the hash chain using identification information, the stored assembled quantum ciphertext data packets and quantum keys are timed. When the timed duration of the assembled quantum ciphertext data packets and quantum keys exceeds the predetermined storage duration, they are cleared.