[go: up one dir, main page]

HK1233078B - Method, device and system for outputting quantum key and method, device and system for verifying memeory consistency of quantum key - Google Patents

Method, device and system for outputting quantum key and method, device and system for verifying memeory consistency of quantum key Download PDF

Info

Publication number
HK1233078B
HK1233078B HK17106624.2A HK17106624A HK1233078B HK 1233078 B HK1233078 B HK 1233078B HK 17106624 A HK17106624 A HK 17106624A HK 1233078 B HK1233078 B HK 1233078B
Authority
HK
Hong Kong
Prior art keywords
key
quantum
quantum key
devices
verification
Prior art date
Application number
HK17106624.2A
Other languages
Chinese (zh)
Other versions
HK1233078A (en
HK1233078A1 (en
Inventor
付颖芳
刘栓林
Original Assignee
阿里巴巴集团控股有限公司
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of HK1233078A publication Critical patent/HK1233078A/en
Publication of HK1233078A1 publication Critical patent/HK1233078A1/en
Publication of HK1233078B publication Critical patent/HK1233078B/en

Links

Description

量子密钥输出方法、存储一致性验证方法、装置及系统Quantum key output method, storage consistency verification method, device and system

技术领域Technical Field

本申请涉及量子密钥输出技术,具体涉及一种量子密钥输出方法及装置。本申请同时涉及一种量子密钥获取方法及装置、一种量子密钥存储输出方法及装置、一种量子密钥分发存储方法及装置、一种量子密钥输出系统、以及一种用于验证量子密钥存储一致性的方法及装置。This application relates to quantum key output technology, specifically to a quantum key output method and device. This application also relates to a quantum key acquisition method and device, a quantum key storage and output method and device, a quantum key distribution and storage method and device, a quantum key output system, and a method and device for verifying the consistency of quantum key storage.

背景技术Background Art

为了保障数据传输的安全性,发送方数据设备通常采用加密算法进行加密,接收方数据设备则采用对应的解密算法对收到的数据解密。经典密码长久以来能够较好的解决上述数据安全传输问题,但经典密码学的安全性是基于计算复杂度的,随着云计算、量子计算等在计算能力方面的飞速提高,经典密码学面临很大的被破解的风险。而量子密码作为量子力学和密码学的交叉产物,其安全性基于量子力学原理保证(未知量子态的测不准原理、测量坍缩原理、不可克隆原理),与攻击者的计算能力和存储能力无关,可以很好地为数据传输提供安全保障;此外,由于量子密钥属于对称密钥,进行数据加解密操作的计算成本低、执行效率较高,因此成为数据安全传输的理想选择。To ensure the security of data transmission, the sending device typically uses an encryption algorithm to encrypt the data, while the receiving device uses a corresponding decryption algorithm to decrypt the received data. Classical cryptography has long been a good solution to this data security problem, but its security is based on computational complexity. With the rapid advancements in computing power such as cloud computing and quantum computing, classical cryptography faces a significant risk of being cracked. Quantum cryptography, a cross-fertilization of quantum mechanics and cryptography, relies on the principles of quantum mechanics (the uncertainty principle of unknown quantum states, the measurement collapse principle, and the non-cloning principle) to ensure security. It is independent of the attacker's computing and storage capabilities, providing excellent security for data transmission. Furthermore, because quantum keys are symmetric, data encryption and decryption operations are computationally inexpensive and highly efficient, making them an ideal choice for secure data transmission.

请参见图1,其为量子密钥输出系统的示意图。采用量子密钥进行数据保密传输的基本过程是这样的:位于发送方和接收方的量子密钥分发设备,通过量子密钥分发协议协商量子密钥,并根据密钥管理设备的需求,将存储在相同地址区间的量子密钥提供给对应的密钥管理设备;收发双方密钥管理设备采用相同地址区间存储接收到的量子密钥,并根据对应的数据设备的密钥获取请求,将在相同地址区间中存储的量子密钥输出给所述数据设备,发送方数据设备利用获取的量子密钥对待发送数据进行加密传输,接收方数据设备则利用获取的量子密钥对接收到的数据进行解密,从而实现了数据的高效、安全传输。Please see Figure 1, which is a schematic diagram of the quantum key output system. The basic process of using quantum keys for secure data transmission is as follows: the quantum key distribution devices at the sender and receiver negotiate quantum keys through the quantum key distribution protocol and, upon request from the key management device, provide the quantum keys stored in the same address interval to the corresponding key management device. The key management devices on both the sender and receiver use the same address interval to store the received quantum keys and, upon key acquisition request from the corresponding data device, output the quantum keys stored in the same address interval to the data device. The sender's data device uses the acquired quantum key to encrypt the data to be transmitted, while the receiver's data device uses the acquired quantum key to decrypt the received data, thus achieving efficient and secure data transmission.

在实际应用中,上述处理过程存在如下缺陷:In actual applications, the above process has the following defects:

(1)将量子密钥分发设备获取的量子密钥发送并写入对应的量子密钥管理设备时,由于网络丢包以及硬盘数据写入出错等原因,导致收发双方密钥管理设备依据相同存储地址向收发双方数据设备输出的量子密钥可能并不相同,通常也称为不对称或者不一致,从而导致接收方数据设备无法执行正确的解密操作,也就无法获取正确的原始数据;(1) When the quantum key obtained by the quantum key distribution device is sent and written into the corresponding quantum key management device, due to network packet loss and hard disk data writing errors, the quantum keys output by the key management devices of the sender and receiver to the data devices of the sender and receiver based on the same storage address may be different, which is usually also called asymmetry or inconsistency, resulting in the data device of the receiver being unable to perform the correct decryption operation and thus unable to obtain the correct original data;

(2)收发双方数据设备获取量子密钥不一致的次数超过预设阈值时,收发双方量子密钥管理设备通常要通过重启等方式,清空所有已获取的量子密钥,才能消除输出量子密钥不一致的问题,这是对已生成的量子密钥的浪费。(2) When the number of inconsistent quantum keys obtained by the data devices of the sender and receiver exceeds a preset threshold, the quantum key management devices of the sender and receiver usually need to clear all the obtained quantum keys by restarting or other means to eliminate the problem of inconsistent output quantum keys, which is a waste of the generated quantum keys.

发明内容Summary of the Invention

本申请实施例提供一种量子密钥输出方法及装置,以解决现有的收发双方密钥管理设备输出量子密钥不一致的问题。本申请实施例还提供一种量子密钥获取方法及装置、一种量子密钥存储输出方法及装置、一种量子密钥分发存储方法及装置、一种量子密钥输出系统、以及一种用于验证量子密钥存储一致性的方法及装置。The present invention provides a quantum key output method and apparatus to address the problem of inconsistent quantum key output by key management devices on both the sender and receiver sides. The present invention also provides a quantum key acquisition method and apparatus, a quantum key storage and output method and apparatus, a quantum key distribution and storage method and apparatus, a quantum key output system, and a method and apparatus for verifying the consistency of quantum key storage.

本申请提供一种量子密钥输出方法,包括:This application provides a quantum key output method, comprising:

收发双方数据设备分别向各自的密钥管理设备发送密钥获取请求;The data devices of both the sender and receiver send key acquisition requests to their respective key management devices;

收发双方密钥管理设备接收所述密钥获取请求后,将通过一致性验证的量子密钥发送给相应数据设备,供相应数据设备执行数据加解密操作;After receiving the key acquisition request, the key management devices of both the sender and the receiver send the quantum key that has passed the consistency verification to the corresponding data device for the corresponding data device to perform data encryption and decryption operations;

其中,所述一致性验证是指,收发双方密钥管理设备将从各自对应的量子密钥分发设备获取的量子密钥存储在相同地址区间后,验证双方在所述相同地址区间中存储的量子密钥是否相同;若相同,则视为所述的通过一致性验证。The consistency verification means that the key management devices of the sender and receiver store the quantum keys obtained from their respective quantum key distribution devices in the same address interval, and then verify whether the quantum keys stored by both parties in the same address interval are the same; if they are the same, it is deemed that the consistency verification has passed.

可选的,所述方法包括:Optionally, the method includes:

所述与收发双方密钥管理设备对应的量子密钥分发设备,将通过量子密钥分发协议协商获取的量子密钥存储在相同地址区间后,验证双方在所述相同地址区间中存储的量子密钥的一致性,并将通过一致性验证的量子密钥作为可供相应密钥管理设备获取的量子密钥。The quantum key distribution device corresponding to the key management devices of the sender and receiver stores the quantum key obtained through negotiation of the quantum key distribution protocol in the same address interval, verifies the consistency of the quantum keys stored by both parties in the same address interval, and uses the quantum key that passes the consistency verification as the quantum key available for acquisition by the corresponding key management device.

可选的,所述通过一致性验证的量子密钥是在收发双方数据设备发送密钥获取请求之前,预先存储在收发双方密钥管理设备中的;Optionally, the quantum key that has passed consistency verification is pre-stored in key management devices of both the sender and the receiver before the data devices of the sender and the receiver send a key acquisition request;

相应的,在收发双方数据设备分别向各自的密钥管理设备发送密钥获取请求之前,执行下述操作:Accordingly, before the data devices of both the sender and receiver send key acquisition requests to their respective key management devices, the following operations are performed:

收发双方量子密钥分发设备通过量子密钥分发协议协商量子密钥,并采用相同地址区间存储所述量子密钥;The quantum key distribution devices of the sender and receiver negotiate the quantum key through the quantum key distribution protocol and use the same address range to store the quantum key;

收发双方密钥管理设备向各自的量子密钥分发设备发送密钥获取请求;The key management devices of both the sender and receiver send key acquisition requests to their respective quantum key distribution devices;

收发双方量子密钥分发设备将存储在相同地址区间的量子密钥发送给相应的密钥管理设备;The quantum key distribution devices of both the sender and the receiver send the quantum key stored in the same address range to the corresponding key management device;

收发双方密钥管理设备将接收的量子密钥存储在相同地址区间中,并验证双方在所述相同地址区间中存储的量子密钥的一致性;The key management devices of the sender and receiver store the received quantum key in the same address interval and verify the consistency of the quantum keys stored by both parties in the same address interval;

相应的,所述将通过一致性验证的量子密钥发送给相应数据设备,包括:Accordingly, the step of sending the quantum key that has passed consistency verification to the corresponding data device includes:

收发双方密钥管理设备从通过一致性验证的量子密钥中,选取在相同地址区间存储的量子密钥,发送给相应数据设备。The key management devices of the sender and receiver select the quantum key stored in the same address range from the quantum keys that have passed consistency verification and send it to the corresponding data device.

可选的,在执行所述收发双方密钥管理设备向各自的量子密钥分发设备发送密钥获取请求之前,执行下述操作:Optionally, before the key management devices of the sender and receiver send a key acquisition request to their respective quantum key distribution devices, the following operations are performed:

收发双方量子密钥分发设备将可供获取的量子密钥数量通知给各自的密钥管理设备。The quantum key distribution devices of the sender and receiver notify their respective key management devices of the number of quantum keys available.

可选的,在所述收发双方密钥管理设备接收所述密钥获取请求后、在所述将通过一致性验证的量子密钥发送给相应数据设备之前,执行下述操作:Optionally, after the key management devices of the sender and receiver receive the key acquisition request and before sending the quantum key that has passed consistency verification to the corresponding data device, the following operations are performed:

收发双方密钥管理设备分别向各自的量子密钥分发设备发送所述密钥获取请求;The key management devices of the sender and receiver respectively send the key acquisition request to their respective quantum key distribution devices;

收发双方量子密钥分发设备通过量子密钥分发协议协商量子密钥,并采用相同地址区间存储所述量子密钥;The quantum key distribution devices of the sender and receiver negotiate the quantum key through the quantum key distribution protocol and use the same address range to store the quantum key;

收发双方量子密钥分发设备将存储在相同地址区间的量子密钥发送给相应的密钥管理设备;The quantum key distribution devices of both the sender and the receiver send the quantum key stored in the same address range to the corresponding key management device;

收发双方密钥管理设备将接收的量子密钥存储在相同地址区间中,并验证双方在所述相同地址区间中存储的量子密钥的一致性;The key management devices of the sender and receiver store the received quantum key in the same address interval and verify the consistency of the quantum keys stored by both parties in the same address interval;

相应的,所述将通过一致性验证的量子密钥发送给相应数据设备,包括:Accordingly, the step of sending the quantum key that has passed consistency verification to the corresponding data device includes:

收发双方密钥管理设备从通过一致性验证的量子密钥中,选取在相同地址区间存储的量子密钥,发送给相应数据设备。The key management devices of the sender and receiver select the quantum key stored in the same address range from the quantum keys that have passed consistency verification and send it to the corresponding data device.

可选的,当所述收发双方密钥管理设备验证双方在所述相同地址区间中存储的量子密钥不一致时,执行下述操作:Optionally, when the key management devices of the sender and receiver verify that the quantum keys stored by both parties in the same address interval are inconsistent, the following operations are performed:

清除在所述相同地址区间中存储的量子密钥,并转到向各自的量子密钥分发设备发送密钥获取请求的步骤执行。The quantum keys stored in the same address interval are cleared, and the process proceeds to the step of sending key acquisition requests to respective quantum key distribution devices.

可选的,所述收发双方量子密钥分发设备通过量子密钥分发协议协商量子密钥,并采用相同地址区间存储所述量子密钥后,执行下述操作:Optionally, after the quantum key distribution devices of the sender and receiver negotiate the quantum key through the quantum key distribution protocol and use the same address interval to store the quantum key, the following operations are performed:

收发双方量子密钥分发设备验证双方在所述相同地址区间中存储的量子密钥的一致性,并将通过一致性验证的量子密钥作为可发送给密钥管理设备的量子密钥。The quantum key distribution devices of the sender and the receiver verify the consistency of the quantum keys stored in the same address interval by both parties, and use the quantum key that passes the consistency verification as the quantum key that can be sent to the key management device.

可选的,当所述收发双方量子密钥分发设备验证双方在所述相同地址区间中存储的量子密钥不一致时,执行下述操作:Optionally, when the quantum key distribution devices of the sender and receiver verify that the quantum keys stored by both parties in the same address interval are inconsistent, the following operation is performed:

清除在所述相同地址区间中存储的量子密钥,并转到收发双方量子密钥分发设备通过量子密钥分发协议协商量子密钥的步骤执行。The quantum key stored in the same address interval is cleared, and the step of negotiating the quantum key through the quantum key distribution protocol by the quantum key distribution devices of the sender and the receiver is executed.

可选的,所述方法包括:所述收发双方量子密钥分发设备定期执行所述验证双方在所述相同地址区间中存储的量子密钥一致性的操作。Optionally, the method includes: the quantum key distribution devices of the sender and receiver periodically performing the operation of verifying the consistency of the quantum keys stored by both parties in the same address interval.

可选的,所述收发双方量子密钥分发设备验证双方在所述相同地址区间中存储的量子密钥的一致性,以及所述收发双方密钥管理设备验证双方在所述相同地址区间中存储的量子密钥的一致性,分别采用如下方式实现:Optionally, the quantum key distribution devices of the sender and the receiver verify the consistency of the quantum keys stored by both parties in the same address interval, and the key management devices of the sender and the receiver verify the consistency of the quantum keys stored by both parties in the same address interval, respectively, in the following manners:

其中一方设备采用预设散列算法计算在所述地址区间中存储的量子密钥的散列值,并采用双方设备前一次获取的通过一致性验证的量子密钥对所述散列值以及所述地址区间信息加密,并将加密后的信息发送给另一方设备;One of the devices uses a preset hash algorithm to calculate a hash value of the quantum key stored in the address interval, and uses the previously obtained quantum key that has passed consistency verification by both devices to encrypt the hash value and the address interval information, and sends the encrypted information to the other device;

所述另一方设备采用相应的密钥对接收到的信息解密后获取地址区间信息,采用所述预设散列算法计算在本地的相应地址区间中存储的量子密钥的散列值,判断计算得到的散列值与接收的散列值是否相同,若相同则向对方设备返回验证通过应答,否则返回未通过应答。The other party device uses the corresponding key to decrypt the received information and obtain the address interval information, uses the preset hash algorithm to calculate the hash value of the quantum key stored in the local corresponding address interval, and determines whether the calculated hash value is the same as the received hash value. If they are the same, a verification pass response is returned to the other party device, otherwise a failure response is returned.

可选的,在所述收发双方密钥管理设备将量子密钥发送给相应数据设备后,执行下述操作:Optionally, after the key management devices of the sender and receiver send the quantum key to the corresponding data device, the following operations are performed:

收发双方数据设备验证接收的量子密钥的一致性,并将通过一致性验证的量子密钥作为执行数据加解密操作所采用的密钥。The data devices on both the sender and receiver verify the consistency of the received quantum key, and use the quantum key that has passed the consistency verification as the key used to perform data encryption and decryption operations.

可选的,当所述收发双方数据设备验证双方获取的量子密钥不一致时,转到所述收发双方数据设备分别向各自的密钥管理设备发送密钥获取请求的步骤执行。Optionally, when the data devices of the sending and receiving parties verify that the quantum keys obtained by both parties are inconsistent, the step of the data devices of the sending and receiving parties sending key acquisition requests to their respective key management devices is executed.

可选的,所述收发双方数据设备验证获取的量子密钥的一致性,包括:Optionally, the data devices of the sender and receiver verify the consistency of the acquired quantum key, including:

其中一方设备采用预设散列算法计算所述获取的量子密钥的散列值,并采用双方设备前一次获取的通过一致性验证的量子密钥对所述散列值加密,并将加密后的信息发送给另一方设备;One of the devices calculates a hash value of the acquired quantum key using a preset hash algorithm, encrypts the hash value using the previously acquired quantum key that has passed consistency verification, and sends the encrypted information to the other device;

所述另一方设备采用相应的密钥对接收到的信息解密后,采用所述预设散列算法计算本地获取的量子密钥的散列值,判断计算得到的散列值与接收的散列值是否相同,若相同则向对方设备返回验证通过应答,否则返回未通过应答。After the other party device uses the corresponding key to decrypt the received information, it uses the preset hash algorithm to calculate the hash value of the locally obtained quantum key, and determines whether the calculated hash value is the same as the received hash value. If they are the same, a verification pass response is returned to the other party device, otherwise a failure response is returned.

可选的,所述收发双方量子密钥分发设备通过量子密钥分发协议协商获取的量子密钥,具有与其对应的密钥标签序列,所述密钥标签序列中的每个密钥标签是所述量子密钥中不同量子比特的唯一标识;Optionally, the quantum key obtained by the quantum key distribution devices of the sender and receiver through negotiation through a quantum key distribution protocol has a corresponding key tag sequence, and each key tag in the key tag sequence is a unique identifier of a different quantum bit in the quantum key;

相应的,所述收发双方量子密钥分发设备采用相同地址区间存储所述量子密钥后,执行下述操作:建立每个量子比特的存储地址与密钥标签的一一对应关系;Accordingly, after the quantum key distribution devices of the sender and receiver use the same address interval to store the quantum key, the following operations are performed: a one-to-one correspondence between the storage address of each quantum bit and the key label is established;

所述收发双方量子密钥分发设备发送给相应密钥管理设备的信息不仅包括量子密钥,还包括与所述量子密钥对应的密钥标签序列;所述收发双方密钥管理设备将接收的量子密钥存储在相同地址区间后,执行下述操作:建立每个量子比特的存储地址与密钥标签的一一对应关系;The information sent by the quantum key distribution devices of both the sender and the receiver to the corresponding key management device includes not only the quantum key but also the key tag sequence corresponding to the quantum key. After the key management devices of both the sender and the receiver store the received quantum key in the same address interval, they perform the following operations: establish a one-to-one correspondence between the storage address of each quantum bit and the key tag;

所述收发双方量子密钥分发设备验证双方在所述相同地址区间中存储的量子密钥的一致性,以及所述收发双方密钥管理设备验证双方在所述相同地址区间中存储的量子密钥的一致性,分别采用如下方式实现:The quantum key distribution devices of the sender and the receiver verify the consistency of the quantum keys stored by both parties in the same address interval, and the key management devices of the sender and the receiver verify the consistency of the quantum keys stored by both parties in the same address interval, respectively, in the following manners:

其中一方设备采用预设散列算法计算由所述量子密钥的密钥标签序列、与所述量子密钥中每个量子比特的存储地址组成的地址序列拼接而成的字符串的散列值,并采用双方设备前一次获取的、通过一致性验证的量子密钥对所述散列值以及所述地址序列加密、或者对所述散列值以及所述密钥标签序列加密,并将加密后的信息发送给另一方设备;One of the devices uses a preset hash algorithm to calculate a hash value of a string consisting of a key tag sequence of the quantum key and an address sequence consisting of the storage address of each quantum bit in the quantum key, and uses the quantum key previously obtained and consistency-verified by both devices to encrypt the hash value and the address sequence, or to encrypt the hash value and the key tag sequence, and sends the encrypted information to the other device;

所述另一方设备采用相应的密钥解密后,根据提取的地址序列从本地获取对应的密钥标签序列,或者根据提取的密钥标签序列从本地获取对应的地址序列,并采用所述预设散列算法计算由所述密钥标签序列与所述地址序列拼接而成的字符串的散列值,判断计算得到的散列值与接收的散列值是否相同,若相同则向对方设备返回验证通过应答,否则返回未通过应答。After the other party device uses the corresponding key to decrypt, it obtains the corresponding key tag sequence from the local according to the extracted address sequence, or obtains the corresponding address sequence from the local according to the extracted key tag sequence, and uses the preset hash algorithm to calculate the hash value of the string spliced by the key tag sequence and the address sequence, and determines whether the calculated hash value is the same as the received hash value. If they are the same, a verification pass response is returned to the other party device; otherwise, a failure response is returned.

可选的,收发双方密钥管理设备发送给相应数据设备的信息不仅包括量子密钥,还包括所述量子密钥的密钥标签序列;Optionally, the information sent by the key management devices of the sender and receiver to the corresponding data device includes not only the quantum key but also a key tag sequence of the quantum key;

相应的,收发双方数据设备接收各自的密钥管理设备发送的上述信息后,执行下述操作验证收发双方数据设备获取的量子密钥的一致性,并在不一致时转到分别向各自的密钥管理设备发送密钥获取请求的步骤执行:Accordingly, after receiving the above information from their respective key management devices, the data devices of both parties perform the following operations to verify the consistency of the quantum keys obtained by the data devices of both parties, and if there is inconsistency, proceed to the step of sending key acquisition requests to their respective key management devices:

其中一方设备采用预设散列算法计算由所述获取的量子密钥和密钥标签序列拼接而成的字符串的散列值,并采用双方设备前一次获取的、通过一致性验证的量子密钥对所述散列值以及密钥标签序列加密,并将加密后的信息发送给另一方设备;One of the devices uses a preset hash algorithm to calculate a hash value of a string formed by concatenating the obtained quantum key and the key label sequence, encrypts the hash value and the key label sequence using the quantum key previously obtained by both devices and verified for consistency, and sends the encrypted information to the other device;

所述另一方设备采用相应的密钥解密后,根据提取的密钥标签序列从本地获取对应的量子密钥,并采用所述预设散列算法计算由所述量子密钥和密钥标签序列拼接而成的字符串的散列值,判断计算得到的散列值与接收的散列值是否相同,若相同,则向对方设备返回验证通过应答,否则返回未通过应答。After the other party's device uses the corresponding key for decryption, it obtains the corresponding quantum key from the local computer according to the extracted key label sequence, and uses the preset hash algorithm to calculate the hash value of the string composed of the quantum key and the key label sequence, and determines whether the calculated hash value is the same as the received hash value. If they are the same, a verification pass response is returned to the other party's device; otherwise, a failure response is returned.

可选的,所述密钥标签包括:量子比特的时间戳信息,所述时间戳信息是收发双方量子密钥分发设备在协商量子密钥的过程中获取的。Optionally, the key tag includes: timestamp information of the quantum bit, and the timestamp information is obtained by the quantum key distribution devices of the sender and receiver during the process of negotiating the quantum key.

可选的,各个设备之间经由经典信道的交互过程,都是基于HTTPS连接的。Optionally, the interaction between devices via the classic channel is based on HTTPS connection.

可选的,各个设备在进行交互之前,进行双向身份认证,并在认证通过后执行后续交互操作。Optionally, each device performs a two-way identity authentication before interacting with the other device, and performs subsequent interaction operations after the authentication is passed.

相应的,本申请还提供一种量子密钥输出装置,包括:Accordingly, the present application also provides a quantum key output device, comprising:

数据设备密钥请求单元,用于收发双方数据设备分别向各自的密钥管理设备发送密钥获取请求;A data device key request unit, configured for the data devices on both sides of the transmission and reception to send key acquisition requests to their respective key management devices;

管理设备密钥输出单元,用于收发双方密钥管理设备接收所述密钥获取请求后,将从相应量子密钥分发设备获取的、通过收发双方密钥管理设备一致性验证的量子密钥发送给相应数据设备,供相应数据设备执行数据加解密操作。The management device key output unit is used to send the quantum key obtained from the corresponding quantum key distribution device and verified by the key management devices of the sender and receiver to the corresponding data device after receiving the key acquisition request, so that the corresponding data device can perform data encryption and decryption operations.

可选的,所述装置包括:分发设备密钥协商验证单元;Optionally, the apparatus includes: a distribution device key negotiation and verification unit;

所述分发设备密钥协商验证单元,用于与收发双方密钥管理设备对应的量子密钥分发设备,将通过量子密钥分发协议协商获取的量子密钥存储在相同地址区间后,验证双方在所述相同地址区间中存储的量子密钥的一致性,并将通过一致性验证的量子密钥作为可供相应密钥管理设备获取的量子密钥。The distribution device key agreement verification unit is used to verify the consistency of the quantum keys stored by both parties in the same address interval after the quantum key obtained through quantum key distribution protocol negotiation with the key management devices of the sender and receiver is stored in the same address interval, and the quantum key that passes the consistency verification is used as the quantum key available for acquisition by the corresponding key management device.

可选的,所述装置包括分发设备密钥协商单元、管理设备密钥请求单元、分发设备密钥发送单元、以及管理设备密钥验证单元,且上述单元在所述数据设备密钥请求单元工作之前启动:Optionally, the apparatus includes a distribution device key negotiation unit, a management device key request unit, a distribution device key sending unit, and a management device key verification unit, and the above units are started before the data device key request unit operates:

分发设备密钥协商单元,用于收发双方量子密钥分发设备通过量子密钥分发协议协商量子密钥,并采用相同地址区间存储所述量子密钥;A distribution device key negotiation unit, configured for the quantum key distribution devices of both the sender and the receiver to negotiate a quantum key through a quantum key distribution protocol, and to store the quantum key in the same address interval;

管理设备密钥请求单元,用于收发双方密钥管理设备向各自的量子密钥分发设备发送密钥获取请求;The management device key request unit is used to send key acquisition requests from the key management devices of both parties to their respective quantum key distribution devices;

分发设备密钥发送单元,用于收发双方量子密钥分发设备将存储在相同地址区间的量子密钥发送给相应的密钥管理设备;The key sending unit of the distribution device is used to send the quantum key stored in the same address interval from the quantum key distribution devices of both parties to the corresponding key management device;

管理设备密钥验证单元,用于收发双方密钥管理设备将接收的量子密钥存储在相同地址区间中,并验证双方在所述相同地址区间中存储的量子密钥的一致性;A management device key verification unit, configured to ensure that the key management devices of both the sender and the receiver store the received quantum keys in the same address interval and verify the consistency of the quantum keys stored by both parties in the same address interval;

相应的,所述管理设备密钥输出单元具体用于,收发双方密钥管理设备接收所述密钥获取请求后,从通过一致性验证的量子密钥中,选取在相同地址区间存储的量子密钥,发送给相应数据设备。Correspondingly, the key output unit of the management device is specifically configured to, after receiving the key acquisition request, select a quantum key stored in the same address interval from the quantum keys that have passed consistency verification and send it to the corresponding data device.

可选的,所述装置包括:Optionally, the device includes:

管理设备密钥请求转发单元,用于在所述数据设备密钥请求单元接收密钥获取请求后,收发双方密钥管理设备分别向各自的量子密钥分发设备发送所述密钥获取请求;a management device key request forwarding unit, configured to, after the data device key request unit receives the key acquisition request, cause the key management devices of both the sender and receiver to respectively send the key acquisition request to their respective quantum key distribution devices;

分发设备密钥协商单元,用于收发双方量子密钥分发设备通过量子密钥分发协议协商量子密钥,并采用相同地址区间存储所述量子密钥;A distribution device key negotiation unit, configured for the quantum key distribution devices of both the sender and the receiver to negotiate a quantum key through a quantum key distribution protocol, and to store the quantum key in the same address interval;

分发设备密钥发送单元,用于收发双方量子密钥分发设备将存储在相同地址区间的量子密钥发送给相应的密钥管理设备;The key sending unit of the distribution device is used to send the quantum key stored in the same address interval from the quantum key distribution devices of both parties to the corresponding key management device;

管理设备密钥验证单元,用于收发双方密钥管理设备将接收的量子密钥存储在相同地址区间中,并验证双方在所述相同地址区间中存储的量子密钥的一致性;A management device key verification unit, configured to ensure that the key management devices of both the sender and the receiver store the received quantum keys in the same address interval and verify the consistency of the quantum keys stored by both parties in the same address interval;

相应的,所述管理设备密钥输出单元具体用于,收发双方密钥管理设备从通过一致性验证的量子密钥中,选取在相同地址区间存储的量子密钥,发送给相应数据设备。Correspondingly, the management device key output unit is specifically configured to enable the key management devices of both the sender and receiver to select the quantum key stored in the same address interval from the quantum keys that have passed consistency verification and send it to the corresponding data device.

可选的,所述装置包括:Optionally, the device includes:

管理设备密钥清除单元,用于当所述管理设备密钥验证单元的验证结果为:未通过时,收发双方密钥管理设备清除在被验证的相同地址区间中存储的量子密钥,并触发用于收发双方密钥管理设备分别向各自的量子密钥分发设备发送密钥获取请求的单元工作。The management device key clearing unit is used to, when the verification result of the management device key verification unit is: failure, cause the key management devices of the sender and receiver to clear the quantum keys stored in the same verified address interval, and trigger the units for the key management devices of the sender and receiver to send key acquisition requests to their respective quantum key distribution devices.

可选的,所述装置包括:Optionally, the device includes:

分发设备密钥验证单元,用于当所述分发设备密钥协商单元完成量子密钥协商过程、并采用相同地址区间存储所述量子密钥后,收发双方量子密钥分发设备验证双方在所述相同地址区间中存储的量子密钥的一致性,并将通过一致性验证的量子密钥作为可发送给密钥管理设备的量子密钥。The distribution device key verification unit is used to verify the consistency of the quantum keys stored in the same address interval by the quantum key distribution devices of both parties after the distribution device key negotiation unit completes the quantum key negotiation process and uses the same address interval to store the quantum key, and use the quantum key that passes the consistency verification as the quantum key that can be sent to the key management device.

可选的,所述装置包括:Optionally, the device includes:

分发设备密钥清除单元,用于当所述分发设备密钥验证单元的验证结果为:未通过时,收发双方量子密钥分发设备清除在被验证的相同地址区间中存储的量子密钥,并触发所述分发设备密钥协商单元工作。The distribution device key clearing unit is used to, when the verification result of the distribution device key verification unit is: failed, cause the quantum key distribution devices of both the sender and the receiver to clear the quantum keys stored in the same verified address interval and trigger the distribution device key negotiation unit to operate.

可选的,所述分发设备密钥验证单元以及所述管理设备密钥验证单元,各自包括验证请求子单元和验证执行子单元;Optionally, the distribution device key verification unit and the management device key verification unit each include a verification request subunit and a verification execution subunit;

所述验证请求子单元,用于参与验证的一方设备采用预设散列算法计算在所述地址区间中存储的量子密钥的散列值,并采用参与验证的双方设备前一次获取的通过一致性验证的量子密钥对所述散列值以及所述地址区间信息加密,并将加密后的信息发送给参与验证的另一方设备;The verification request subunit is configured to cause a device participating in the verification to calculate a hash value of the quantum key stored in the address interval using a preset hash algorithm, encrypt the hash value and the address interval information using a previously obtained quantum key that has passed consistency verification by both devices participating in the verification, and send the encrypted information to the other device participating in the verification;

所述验证执行子单元,用于所述另一方设备采用相应的密钥对接收到的信息解密后获取地址区间信息,采用所述预设散列算法计算在本地的相应地址区间中存储的量子密钥的散列值,判断计算得到的散列值与接收的散列值是否相同,若相同则向参与验证的对方设备返回验证通过应答,否则返回未通过应答。The verification execution subunit is used for the other party's device to use the corresponding key to decrypt the received information to obtain the address interval information, use the preset hash algorithm to calculate the hash value of the quantum key stored in the local corresponding address interval, and determine whether the calculated hash value is the same as the received hash value. If they are the same, a verification pass response is returned to the other party's device participating in the verification; otherwise, a failure response is returned.

可选的,所述装置包括:Optionally, the device includes:

数据设备密钥验证单元,用于所述管理设备密钥输出单元将量子密钥发送给相应数据设备后,收发双方数据设备验证接收的量子密钥的一致性,并将通过一致性验证的量子密钥作为执行数据加解密操作所采用的密钥。The data device key verification unit is used to verify the consistency of the received quantum key after the management device key output unit sends the quantum key to the corresponding data device, and use the quantum key that passes the consistency verification as the key used to perform data encryption and decryption operations.

可选的,所述分发设备密钥协商单元通过量子密钥分发协议协商获取的量子密钥,具有与其对应的密钥标签序列;相应的,Optionally, the quantum key obtained by the key negotiation unit of the distribution device through the quantum key distribution protocol has a key tag sequence corresponding thereto; accordingly,

所述分发设备密钥协商单元除了包括实现其功能的本体子单元之外,还包括映射关系建立子单元,所述映射关系建立子单元用于,建立每个量子比特的存储地址与密钥标签的一一对应关系;The distribution device key agreement unit includes, in addition to the main body subunit that realizes its functions, a mapping relationship establishment subunit, which is used to establish a one-to-one correspondence between the storage address of each quantum bit and the key label;

所述分发设备密钥发送单元发送给所述管理设备密钥验证单元的信息不仅包括量子密钥,还包括与所述量子密钥对应的密钥标签序列;The information sent by the distribution device key sending unit to the management device key verification unit includes not only the quantum key but also the key tag sequence corresponding to the quantum key;

所述管理设备密钥验证单元除了包括存储子单元、管理设备密钥验证子单元之外,还包括映射关系建立子单元;所述存储子单元,用于收发双方密钥管理设备将接收的量子密钥存储在相同地址区间;所述映射关系建立子单元,用于建立每个量子比特的存储地址与密钥标签的一一对应关系,并触发所述管理设备密钥验证子单元工作;所述管理设备密钥验证子单元,用于验证双方在所述相同地址区间中存储的量子密钥的一致性;The management device key verification unit includes, in addition to a storage subunit and a management device key verification subunit, a mapping relationship establishment subunit; the storage subunit is used for the key management devices of both the sender and the receiver to store the received quantum key in the same address interval; the mapping relationship establishment subunit is used to establish a one-to-one correspondence between the storage address of each quantum bit and the key label, and trigger the management device key verification subunit to operate; the management device key verification subunit is used to verify the consistency of the quantum keys stored by both parties in the same address interval;

所述分发设备密钥验证单元以及所述管理设备密钥验证子单元,各自包括标签验证请求子单元和标签验证执行子单元;The distribution device key verification unit and the management device key verification subunit each include a label verification request subunit and a label verification execution subunit;

所述标签验证请求子单元,用于参与验证的一方设备采用预设散列算法计算由所述量子密钥的密钥标签序列、与所述量子密钥中每个量子比特的存储地址组成的地址序列拼接而成的字符串的散列值,并采用参与验证的双方设备前一次获取的、通过一致性验证的量子密钥对所述散列值以及所述地址序列加密、或者对所述散列值以及所述密钥标签序列加密,并将加密后的信息发送给参与验证的另一方设备;The label verification request subunit is configured to cause a device participating in the verification to use a preset hash algorithm to calculate a hash value of a string consisting of a key label sequence of the quantum key and an address sequence consisting of a storage address of each quantum bit in the quantum key, and to encrypt the hash value and the address sequence, or the hash value and the key label sequence, using a quantum key previously obtained and consistency-verified by both devices participating in the verification, and to send the encrypted information to the other device participating in the verification;

所述标签验证执行子单元,用于所述另一方设备接收所述加密后的信息后,采用相应的密钥解密,根据提取的地址序列从本地获取对应的密钥标签序列,或者根据提取的密钥标签序列从本地获取对应的地址序列,并采用所述预设散列算法计算由所述密钥标签序列与所述地址序列拼接而成的字符串的散列值,判断计算得到的散列值与接收的散列值是否相同,若相同则向参与验证的对方设备返回验证通过应答,否则返回未通过应答。The label verification execution sub-unit is used for, after the other party device receives the encrypted information, to decrypt it using the corresponding key, obtain the corresponding key label sequence from the local according to the extracted address sequence, or obtain the corresponding address sequence from the local according to the extracted key label sequence, and use the preset hash algorithm to calculate the hash value of the string spliced by the key label sequence and the address sequence, to determine whether the calculated hash value is the same as the received hash value, and if so, to return a verification pass response to the other party device participating in the verification, otherwise to return a failure response.

此外,本申请还提供一种量子密钥获取方法,所述方法在利用量子密钥对数据进行加解密的数据设备上实施,包括:In addition, the present application also provides a method for obtaining a quantum key, which is implemented on a data device that encrypts and decrypts data using a quantum key, and includes:

向密钥管理设备发送密钥获取请求;Send a key acquisition request to the key management device;

接收所述密钥管理设备发送的通过一致性验证的量子密钥,作为进行数据加解密所采用的密钥。The quantum key that has passed consistency verification and is sent by the key management device is received as the key used for data encryption and decryption.

可选的,在接收所述密钥管理设备发送的通过一致性验证的量子密钥后,执行下述操作:Optionally, after receiving the quantum key that has passed consistency verification and is sent by the key management device, perform the following operations:

验证获取的量子密钥与对端数据设备获取的量子密钥的一致性,并将通过所述一致性验证的量子密钥作为进行数据加解密所采用的密钥。Verify the consistency of the obtained quantum key with the quantum key obtained by the opposite data device, and use the quantum key that passes the consistency verification as the key used for data encryption and decryption.

可选的,如果获取的量子密钥与对端数据设备获取的量子密钥未通过一致性验证,转到所述向密钥管理设备发送量子密钥获取请求的步骤执行。Optionally, if the obtained quantum key and the quantum key obtained by the peer data device do not pass consistency verification, go to the step of sending a quantum key acquisition request to the key management device.

相应的,本申请还提供一种量子密钥获取装置,所述装置部署在利用量子密钥对数据进行加解密的数据设备上,包括:Accordingly, the present application also provides a quantum key acquisition device, which is deployed on a data device that uses quantum keys to encrypt and decrypt data, including:

密钥获取请求发送单元,用于向密钥管理设备发送密钥获取请求;A key acquisition request sending unit, configured to send a key acquisition request to a key management device;

对称密钥接收单元,用于接收所述密钥管理设备发送的通过一致性验证的量子密钥,作为进行数据加解密所采用的密钥。The symmetric key receiving unit is used to receive the quantum key that has passed consistency verification and is sent by the key management device as the key used for data encryption and decryption.

此外,本申请还提供一种量子密钥存储输出方法,所述方法在向数据设备提供量子密钥的密钥管理设备上实施,包括:In addition, the present application also provides a quantum key storage and output method, which is implemented on a key management device that provides a quantum key to a data device, and includes:

接收数据设备发送的密钥获取请求;Receive a key acquisition request sent by a data device;

按照与对端密钥管理设备协商的相同地址区间,将通过一致性验证的量子密钥发送给所述数据设备。The quantum key that has passed consistency verification is sent to the data device according to the same address range negotiated with the peer key management device.

可选的,所述通过一致性验证的量子密钥是在接收数据设备发送的密钥获取请求之前预先存储的;Optionally, the quantum key that has passed consistency verification is pre-stored before receiving the key acquisition request sent by the data device;

相应的,在接收数据设备发送的密钥获取请求之前,执行下述操作:Accordingly, before receiving the key acquisition request sent by the data device, perform the following operations:

向量子密钥分发设备发送密钥获取请求;Send a key acquisition request to the quantum key distribution device;

接收量子密钥分发设备发送的量子密钥,并采用与所述对端密钥管理设备相同的地址区间存储所述量子密钥;Receive a quantum key sent by a quantum key distribution device, and store the quantum key in the same address range as the peer key management device;

验证在所述地址区间中存储的量子密钥与所述对端密钥管理设备在相同地址区间中存储的量子密钥的一致性,并将通过一致性验证的量子密钥作为可发送给数据设备的量子密钥。Verify the consistency of the quantum key stored in the address interval and the quantum key stored in the same address interval by the peer key management device, and use the quantum key that passes the consistency verification as the quantum key that can be sent to the data device.

可选的,在所述接收数据设备发送的密钥获取请求之后、在所述按照与对端密钥管理设备协商的相同地址区间,将通过一致性验证的量子密钥发送给所述数据设备之前,执行下述操作:Optionally, after receiving the key acquisition request sent by the data device and before sending the quantum key that has passed consistency verification to the data device according to the same address interval negotiated with the peer key management device, the following operation is performed:

向量子密钥分发设备发送所述密钥获取请求;Sending the key acquisition request to the quantum key distribution device;

接收量子密钥分发设备发送的量子密钥,并采用与所述对端密钥管理设备相同的地址区间存储所述量子密钥;Receive a quantum key sent by a quantum key distribution device, and store the quantum key in the same address range as the peer key management device;

验证在所述地址区间中存储的量子密钥与所述对端密钥管理设备在相同地址区间中存储的量子密钥的一致性。Verify the consistency of the quantum key stored in the address interval and the quantum key stored in the same address interval by the peer key management device.

可选的,如果在所述地址区间中存储的量子密钥与所述对端管理设备在相同地址区间中存储的量子密钥未通过一致性验证,执行下述操作:Optionally, if the quantum key stored in the address interval and the quantum key stored in the same address interval of the peer management device fail to pass consistency verification, perform the following operations:

清除在所述地址区间中存储的量子密钥,并转到向量子密钥分发设备发送密钥获取请求的步骤执行。Clear the quantum key stored in the address interval, and proceed to the step of sending a key acquisition request to a quantum key distribution device.

相应的,本申请还提供一种量子密钥存储输出装置,所述装置部署在向数据设备提供量子密钥的密钥管理设备上,包括:Accordingly, the present application also provides a quantum key storage and output device, which is deployed on a key management device that provides quantum keys to data devices, including:

密钥获取请求接收单元,用于接收数据设备发送的密钥获取请求;A key acquisition request receiving unit, configured to receive a key acquisition request sent by a data device;

对称密钥输出单元,用于按照与对端密钥管理设备协商的相同地址区间,将通过一致性验证的量子密钥发送给所述数据设备。The symmetric key output unit is used to send the quantum key that has passed consistency verification to the data device according to the same address range negotiated with the peer key management device.

此外,本申请还提供一种量子密钥分发存储方法,所述方法在量子密钥分发设备上实施,包括:In addition, the present application also provides a quantum key distribution storage method, which is implemented on a quantum key distribution device and includes:

与对端量子密钥分发设备通过量子密钥分发协议协商量子密钥,并将获取的量子密钥存储在与所述对端量子密钥分发设备相同的地址区间中;Negotiating a quantum key with a peer quantum key distribution device through a quantum key distribution protocol, and storing the acquired quantum key in the same address range as that of the peer quantum key distribution device;

验证在所述地址区间中存储的量子密钥与所述对端量子密钥分发设备在相同地址区间中存储的量子密钥的一致性;Verifying the consistency of the quantum key stored in the address interval and the quantum key stored in the same address interval by the peer quantum key distribution device;

根据接收到的来自密钥管理设备的密钥获取请求,按照与所述对端量子密钥分发设备协商的相同地址区间,将通过一致性验证的量子密钥发送给所述密钥管理设备。According to the key acquisition request received from the key management device, the quantum key that has passed the consistency verification is sent to the key management device according to the same address interval negotiated with the peer quantum key distribution device.

可选的,如果在所述地址区间中存储的量子密钥与所述对端量子密钥分发设备在相同地址区间中存储的量子密钥未通过一致性验证,执行下述操作:Optionally, if the quantum key stored in the address interval and the quantum key stored in the same address interval of the peer quantum key distribution device fail to pass consistency verification, perform the following operations:

清除在所述地址区间中存储的量子密钥,并转到所述与对端量子密钥分发设备通过量子密钥分发协议协商量子密钥的步骤执行。Clear the quantum key stored in the address interval, and proceed to the step of negotiating the quantum key with the peer quantum key distribution device through the quantum key distribution protocol.

相应的,本申请还提供一种量子密钥分发存储装置,所述装置部署在量子密钥分发设备上,包括:Accordingly, the present application also provides a quantum key distribution storage device, which is deployed on a quantum key distribution device and includes:

密钥分发存储单元,用于与对端量子密钥分发设备通过量子密钥分发协议协商量子密钥,并将获取的量子密钥存储在与所述对端量子密钥分发设备相同的地址区间中;a key distribution storage unit, configured to negotiate a quantum key with a peer quantum key distribution device through a quantum key distribution protocol, and store the acquired quantum key in the same address interval as that of the peer quantum key distribution device;

密钥验证单元,用于验证在所述地址区间中存储的量子密钥与所述对端量子密钥分发设备在相同地址区间中存储的量子密钥的一致性;a key verification unit, configured to verify the consistency of the quantum key stored in the address interval with the quantum key stored in the same address interval by the peer quantum key distribution device;

对称密钥发送单元,用于根据接收到的来自密钥管理设备的密钥获取请求,按照与所述对端量子密钥分发设备协商的相同地址区间,将通过一致性验证的量子密钥发送给所述密钥管理设备。The symmetric key sending unit is used to send the quantum key that has passed the consistency verification to the key management device according to the same address interval negotiated with the peer quantum key distribution device based on the key acquisition request received from the key management device.

此外,本申请还提供一种量子密钥输出系统,包括:分别部署于收发双方的两个子系统;所述两个子系统分别包括:根据上述任意一项所述的量子密钥获取装置,和根据上述任意一项所述的量子密钥存储输出装置,以及根据上述任意一项所述的量子密钥分发存储装置。In addition, the present application also provides a quantum key output system, comprising: two subsystems deployed at the sender and receiver respectively; the two subsystems respectively include: a quantum key acquisition device according to any one of the above items, and a quantum key storage and output device according to any one of the above items, and a quantum key distribution and storage device according to any one of the above items.

此外,本申请还提供一种用于验证量子密钥存储一致性的方法,所述方法在参与验证的第一设备和第二设备上实施,包括:In addition, the present application also provides a method for verifying the consistency of quantum key storage, which is implemented on a first device and a second device participating in the verification, including:

所述第一设备将通过量子密钥协商过程获取的、表征待验证量子密钥的信息,以及存储所述待验证量子密钥的地址区间信息,发送给所述第二设备;The first device sends, to the second device, information representing the quantum key to be verified, obtained through the quantum key agreement process, and address interval information storing the quantum key to be verified;

所述第二设备通过将接收的信息与本地的相应信息进行比对,判断双方设备与所述地址区间对应的、表征待验证量子密钥的信息是否相同,若相同,向所述第一设备返回验证通过应答,否则返回未通过应答;The second device compares the received information with the local corresponding information to determine whether the information corresponding to the address interval and representing the quantum key to be verified on both devices is the same. If they are the same, the second device returns a verification success response to the first device; otherwise, the second device returns a failure response;

其中,表征待验证量子密钥的信息由与量子密钥比特数对应的子信息单元组成,每个子信息单元是所述待验证量子密钥中不同量子比特的唯一标识,且与被标识量子比特的存储地址一一对应。The information representing the quantum key to be verified is composed of sub-information units corresponding to the number of quantum key bits. Each sub-information unit is a unique identifier of a different quantum bit in the quantum key to be verified, and corresponds one-to-one to the storage address of the identified quantum bit.

可选的,所述表征待验证量子密钥的信息包括:待验证量子密钥本身;Optionally, the information characterizing the quantum key to be verified includes: the quantum key to be verified itself;

相应的,所述第一设备将通过量子密钥协商过程获取的、表征待验证量子密钥的信息,以及存储所述待验证量子密钥的地址区间信息发送给所述第二设备,包括:Accordingly, the first device sends information representing the quantum key to be verified, obtained through the quantum key agreement process, and address interval information storing the quantum key to be verified to the second device, including:

所述第一设备采用预设的散列算法计算所述待验证量子密钥的散列值,并将所述散列值、以及所述地址区间信息发送给所述第二设备;The first device calculates a hash value of the quantum key to be verified using a preset hash algorithm, and sends the hash value and the address range information to the second device;

所述第二设备通过将接收的信息与本地的相应信息进行比对,判断双方设备与所述地址区间对应的、表征待验证量子密钥的信息是否相同,包括:The second device compares the received information with the local corresponding information to determine whether the information representing the quantum key to be verified corresponding to the address interval of the two devices is the same, including:

所述第二设备从接收的信息中提取存储待验证量子密钥的地址区间信息,采用所述预设的散列算法,计算在本地相同地址区间中存储的量子密钥的散列值,判断计算得到的散列值与接收的散列值是否相同,若相同,则判定双方设备与所述地址区间对应的、表征待验证量子密钥的信息是相同的。The second device extracts the address interval information storing the quantum key to be verified from the received information, uses the preset hash algorithm to calculate the hash value of the quantum key stored in the same local address interval, and determines whether the calculated hash value is the same as the received hash value. If they are the same, it is determined that the information corresponding to the address interval and representing the quantum key to be verified of both devices is the same.

可选的,所述表征待验证量子密钥的信息包括:待验证量子密钥的密钥标签序列,所述密钥标签序列中的每个密钥标签即为所述子信息单元;所述存储待验证量子密钥的地址区间信息包括:所述待验证量子密钥中每个量子比特的存储地址组成的地址序列;Optionally, the information characterizing the quantum key to be verified includes: a key tag sequence of the quantum key to be verified, each key tag in the key tag sequence being the sub-information unit; the address interval information storing the quantum key to be verified includes: an address sequence consisting of the storage address of each quantum bit in the quantum key to be verified;

相应的,所述第一设备将通过量子密钥协商过程获取的、表征待验证量子密钥的信息,以及存储所述待验证量子密钥的地址区间信息发送给所述第二设备,包括:Accordingly, the first device sends information representing the quantum key to be verified, obtained through the quantum key agreement process, and address interval information storing the quantum key to be verified to the second device, including:

所述第一设备采用预设散列算法计算由所述密钥标签序列与所述地址序列拼接而成的字符串的散列值,并将所述散列值以及所述地址序列、或者所述散列值以及所述密钥标签序列发送给所述第二设备;The first device calculates a hash value of a string formed by concatenating the key tag sequence and the address sequence using a preset hash algorithm, and sends the hash value and the address sequence, or the hash value and the key tag sequence, to the second device;

所述第二设备通过将接收的信息与本地的相应信息进行比对,判断双方设备与所述地址区间对应的、表征待验证量子密钥的信息是否相同,包括:The second device compares the received information with the local corresponding information to determine whether the information representing the quantum key to be verified corresponding to the address interval of the two devices is the same, including:

所述第二设备根据从接收信息中提取的地址序列从本地获取对应的密钥标签序列,或者根据提取的密钥标签序列从本地获取对应的地址序列,采用所述预设散列算法计算由所述密钥标签序列与所述地址序列拼接而成的字符串的散列值,判断计算得到的散列值与接收的散列值是否相同,若相同,则判定双方设备与所述地址区间对应的、表征待验证量子密钥的信息是相同的。The second device obtains the corresponding key tag sequence locally based on the address sequence extracted from the received information, or obtains the corresponding address sequence locally based on the extracted key tag sequence, and uses the preset hash algorithm to calculate the hash value of a string formed by splicing the key tag sequence and the address sequence, and determines whether the calculated hash value is the same as the received hash value. If they are the same, it is determined that the information corresponding to the address interval of both devices and the information representing the quantum key to be verified is the same.

可选的,所述密钥标签包括:量子比特的时间戳信息。Optionally, the key tag includes: timestamp information of the quantum bit.

可选的,所述方法还包括:Optionally, the method further includes:

所述第一设备采用与所述第二设备预先商定的密钥对待发送信息加密;The first device encrypts the information to be sent using a key pre-agreed between the first device and the second device;

相应的,所述第二设备接收所述第一设备发送的信息后,采用相应密钥解密后,执行后续的比对以及判断操作。Correspondingly, after receiving the information sent by the first device, the second device decrypts it using the corresponding key and performs subsequent comparison and judgment operations.

相应的,本申请还提供一种用于验证量子密钥存储一致性的装置,包括:Accordingly, the present application also provides a device for verifying the consistency of quantum key storage, comprising:

密钥验证请求发送单元,用于第一设备将通过量子密钥协商过程获取的、表征待验证量子密钥的信息,以及存储所述待验证量子密钥的地址区间信息,发送给第二设备;a key verification request sending unit, configured for the first device to send information representing the quantum key to be verified, obtained through the quantum key agreement process, and address interval information storing the quantum key to be verified, to the second device;

密钥验证执行单元,用于所述第二设备通过将接收的信息与本地的相应信息进行比对,判断双方设备与所述地址区间对应的、表征待验证量子密钥的信息是否相同,若相同,向所述第一设备返回验证通过应答,否则返回未通过应答;a key verification execution unit configured to enable the second device to compare the received information with the local corresponding information to determine whether the information corresponding to the address interval and representing the quantum key to be verified on both devices is the same; if so, return a verification success response to the first device; otherwise, return a failure response;

其中,表征待验证量子密钥的信息由与量子密钥比特数对应的子信息单元组成,每个子信息单元是所述待验证量子密钥中不同量子比特的唯一标识,且与被标识量子比特的存储地址一一对应。The information representing the quantum key to be verified is composed of sub-information units corresponding to the number of quantum key bits. Each sub-information unit is a unique identifier of a different quantum bit in the quantum key to be verified, and corresponds one-to-one to the storage address of the identified quantum bit.

与现有技术相比,本申请具有以下优点:Compared with the prior art, this application has the following advantages:

本申请提供的量子密钥输出方法及系统,收发双方数据设备分别向各自的密钥管理设备发送密钥获取请求,收发双方密钥管理设备接收所述密钥获取请求后,将通过一致性验证的量子密钥发送给相应数据设备,供相应数据设备执行数据加解密操作。由于收发双方密钥管理设备对在相同地址区间中存储的量子密钥进行了一致性验证,从而确保量子密钥输出系统输出量子密钥的同步性和有用性,即:向数据设备输出的量子密钥都是相同的、对称的,从而为数据加解密过程的正确执行提供保障。特别是,即使因为网络传输等原因造成数据收发双方获取的量子密钥不对称,也无需通过重新启动等方式清空收发双方量子密钥管理设备已存储的量子密钥,从而避免了对量子密钥资源的浪费。The quantum key output method and system provided by this application are as follows: the data devices of the sender and receiver respectively send key acquisition requests to their respective key management devices. After receiving the key acquisition requests, the key management devices of the sender and receiver send the quantum keys that have passed consistency verification to the corresponding data devices for the corresponding data devices to perform data encryption and decryption operations. Because the key management devices of the sender and receiver perform consistency verification on the quantum keys stored in the same address range, the synchronization and usefulness of the quantum key output by the quantum key output system are ensured, that is, the quantum keys output to the data devices are all identical and symmetrical, thereby providing a guarantee for the correct execution of the data encryption and decryption process. In particular, even if the quantum keys obtained by the data sender and receiver are asymmetric due to network transmission or other reasons, there is no need to clear the quantum keys stored in the quantum key management devices of the sender and receiver by restarting or other means, thereby avoiding the waste of quantum key resources.

本申请提供的用于验证量子密钥存储一致性的方法,参与验证的双方设备通过将双方与相同地址区间对应的、表征待验证量子密钥的信息进行比对,判断出双方设备在相同地址区间存储的量子密钥是否相同,从而为双方设备向外输出对称的量子密钥提供依据,为用户数据的安全、高效传输提供保障。特别是采用基于密钥标签的验证方法,利用了密钥标签可以唯一标识量子比特的特性、以及密钥标签与量子比特存储地址的对应关系,从而不用传输量子密钥就可以实现一致性验证,进一步保障了量子密钥的安全。This application provides a method for verifying the consistency of quantum key storage. The two devices involved in the verification compare the information representing the quantum key to be verified, corresponding to the same address interval. This determines whether the quantum keys stored in the same address interval are identical. This provides a basis for both devices to output symmetric quantum keys, ensuring the secure and efficient transmission of user data. In particular, the key tag-based verification method utilizes the key tag's ability to uniquely identify quantum bits, as well as the correspondence between the key tag and the quantum bit storage address. This allows consistency verification to be achieved without transmitting the quantum key, further ensuring the security of the quantum key.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是本申请实施例提供的量子密钥输出系统的示意图;FIG1 is a schematic diagram of a quantum key output system provided in an embodiment of the present application;

图2是本申请的一种量子密钥输出方法的实施例的流程图;FIG2 is a flow chart of an embodiment of a quantum key output method of the present application;

图3是本申请实施例提供的基于实时获取方式的量子密钥输出方法的处理流程图;FIG3 is a process flow chart of a quantum key output method based on real-time acquisition according to an embodiment of the present application;

图4是本申请实施例提供的基于实时获取方式的各设备间交互流程图;FIG4 is a flowchart of the interaction between devices based on the real-time acquisition method provided in an embodiment of the present application;

图5是本申请实施例提供的基于预获取方式的量子密钥输出方法的处理流程图;FIG5 is a process flow chart of a quantum key output method based on a pre-acquisition method according to an embodiment of the present application;

图6是本申请实施例提供的基于预获取方式的各设备间交互流程图;FIG6 is a flowchart of the interaction between devices based on the pre-acquisition method provided in an embodiment of the present application;

图7是本申请的一种量子密钥输出装置的实施例的示意图;FIG7 is a schematic diagram of an embodiment of a quantum key output device of the present application;

图8是本申请的一种量子密钥获取方法的实施例的流程图;FIG8 is a flow chart of an embodiment of a method for acquiring a quantum key according to the present application;

图9是本申请的一种量子密钥获取装置的实施例的示意图;FIG9 is a schematic diagram of an embodiment of a quantum key acquisition device of the present application;

图10是本申请的一种量子密钥存储输出方法的实施例的流程图;FIG10 is a flowchart of an embodiment of a quantum key storage and output method of the present application;

图11是本申请的一种量子密钥存储输出装置的实施例的示意图;FIG11 is a schematic diagram of an embodiment of a quantum key storage and output device of the present application;

图12是本申请的一种量子密钥分发存储方法的实施例的流程图;FIG12 is a flowchart of an embodiment of a quantum key distribution and storage method of the present application;

图13是本申请的一种量子密钥分发存储装置的实施例的示意图;FIG13 is a schematic diagram of an embodiment of a quantum key distribution storage device of the present application;

图14是本申请的一种量子密钥输出系统的实施例的示意图;FIG14 is a schematic diagram of an embodiment of a quantum key output system of the present application;

图15是本申请的一种用于验证量子密钥存储一致性的方法实施例的流程图;FIG15 is a flowchart of an embodiment of a method for verifying quantum key storage consistency according to the present application;

图16是本申请的一种用于验证量子密钥存储一致性的装置实施例的示意图。FIG16 is a schematic diagram of an embodiment of a device for verifying the consistency of quantum key storage according to the present application.

具体实施方式DETAILED DESCRIPTION

在下面的描述中阐述了很多具体细节以便于充分理解本申请。但是,本申请能够以很多不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本申请内涵的情况下做类似推广,因此,本申请不受下面公开的具体实施的限制。The following description sets forth many specific details to facilitate a thorough understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the scope of the present application. Therefore, the present application is not limited to the specific implementations disclosed below.

在本申请中,分别提供了一种量子密钥输出方法及装置、一种量子密钥获取方法及装置、一种量子密钥存储输出方法及装置、一种量子密钥分发存储方法及装置、一种量子密钥输出系统、以及一种用于验证量子密钥存储一致性的方法及装置,在下面的实施例中逐一进行详细说明。在详细描述实施例之前,先对本技术方案涉及的各种设备以及两种主要处理流程作简要说明。This application provides a quantum key output method and apparatus, a quantum key acquisition method and apparatus, a quantum key storage and output method and apparatus, a quantum key distribution and storage method and apparatus, a quantum key output system, and a method and apparatus for verifying the consistency of quantum key storage. Each of these is described in detail in the following embodiments. Before describing the embodiments in detail, a brief description of the various devices and two main processing flows involved in this technical solution is provided.

请参考图1,其示出了量子密钥输出系统的示意图。从数据加解密传输的角度来看,量子密钥输出系统包括相互对称的两侧,其中一侧包括:量子密钥分发设备QKD-A(Quantum Key Distribution简称QKD)、密钥管理设备QKS-A(Quantum Key System简称QKS)、数据设备A,另一侧包括:量子密钥分发设备QKD-B、密钥管理设备QKS-B、数据设备B。其中每一侧的设备与对侧的同类型设备,互为对端设备,为了便于描述,在本申请中采用了收发双方设备的表述方式,例如,收发双方量子密钥分发设备、收发双方密钥管理设备、收发双方数据设备。Please refer to Figure 1, which shows a schematic diagram of a quantum key output system. From the perspective of data encryption and decryption transmission, the quantum key output system includes two symmetrical sides, one of which includes: a quantum key distribution device QKD-A (Quantum Key Distribution, abbreviated as QKD), a key management device QKS-A (Quantum Key System, abbreviated as QKS), and a data device A, and the other side includes: a quantum key distribution device QKD-B, a key management device QKS-B, and a data device B. The devices on each side and the same type of devices on the opposite side are each other's peer devices. For ease of description, the present application uses the expression of the sending and receiving devices, for example, the sending and receiving quantum key distribution devices, the sending and receiving key management devices, and the sending and receiving data devices.

收发双方QKD设备用于进行量子密钥协商,收发双方QKS设备用于存储从QKD设备获取的量子密钥、并向数据设备输出,收发双方数据设备则用获取的量子密钥分别执行相应的数据加密或者数据解密操作。由于QKD设备与QKS设备之间的网络传输过程存在丢包的可能性、QKS设备自身在存储量子密钥的过程也可能出现错误,导致收发双方QKS设备输出给收发双方数据设备的量子密钥不对称,针对这一问题,本申请的技术方案,在收发双方QKS设备之间进行量子密钥的一致性验证,并将通过一致性验证的量子密钥发送给数据设备,从而从QKS设备的角度保证了输出给收发双方数据设备的量子密钥是对称的。The QKD devices on both sides of the transmission and reception are used to negotiate quantum keys, while the QKS devices on both sides are used to store the quantum keys obtained from the QKD devices and output them to the data devices. The data devices on both sides then use the obtained quantum keys to perform corresponding data encryption or decryption operations. Due to the possibility of packet loss during the network transmission process between the QKD and QKS devices, and the possibility of errors in the QKS device itself when storing the quantum keys, the quantum keys output by the QKS devices on both sides to the data devices on both sides are asymmetric. To address this issue, the technical solution of this application verifies the consistency of the quantum keys between the QKS devices on both sides and sends the quantum keys that have passed the consistency verification to the data devices, thereby ensuring that the quantum keys output to the data devices on both sides are symmetric from the perspective of the QKS devices.

本文后续的描述也是在图1所示架构的基础上展开的。需要说明的是,本示意图是从输出量子密钥的角度进行描述的,在实际实施中,收发双方QKD设备之间,收发双方QKS设备之间、以及收发双方数据设备之间,可以通过有线或者无线等形式的经典信道相连,用于在彼此之间进行协商、数据传输等操作,这部分连接关系并未在图中示出。The subsequent descriptions in this article are also based on the architecture shown in Figure 1. It should be noted that this diagram describes the quantum key output from the perspective of the diagram. In actual implementation, the QKD devices of the sender and receiver, the QKS devices of the sender and receiver, and the data devices of the sender and receiver can be connected through classical channels in the form of wires or wireless to perform operations such as negotiation and data transmission. These connections are not shown in the figure.

请参考图2,其为本申请的一种量子密钥输出方法的实施例的流程图,所述方法包括如下步骤:Please refer to FIG2 , which is a flow chart of an embodiment of a quantum key output method of the present application, wherein the method comprises the following steps:

步骤201、收发双方数据设备分别向各自的密钥管理设备发送密钥获取请求。Step 201: The data devices of both the sender and receiver send key acquisition requests to their respective key management devices.

步骤202、收发双方密钥管理设备接收所述密钥获取请求后,将通过一致性验证的量子密钥发送给相应数据设备,供相应数据设备执行数据加解密操作。Step 202: After receiving the key acquisition request, the key management devices of the sender and receiver send the quantum key that has passed consistency verification to the corresponding data device for the corresponding data device to perform data encryption and decryption operations.

在具体实施上述方法的过程中,数据设备向密钥管理设备获取密钥可以采取实时获取量子密钥方式(简称实时获取方式)、或者预获取量子密钥方式(简称预获取方式)。所述实时获取方式是指,数据设备A与数据设备B向各自的QKS-A设备和QKS-B设备发送获取量子密钥的请求,此时QKS-A设备和QKS-B设备已有预存储的、并且通过一致性验证的量子密钥,可以直接输出给数据设备A和数据设备B。In the specific implementation of the above method, the data device can obtain the key from the key management device in real-time quantum key acquisition (hereinafter referred to as real-time acquisition method) or in pre-acquisition quantum key (hereinafter referred to as pre-acquisition method). The real-time acquisition method means that data device A and data device B send a request to obtain the quantum key to their respective QKS-A device and QKS-B device. At this time, QKS-A device and QKS-B device already have pre-stored quantum keys that have passed consistency verification and can directly output them to data device A and data device B.

所述预获取方式是指,数据设备A与数据设备B向各自的QKS-A设备和QKS-B设备发送获取量子密钥的请求,QKS-A设备和QKS-B设备中无预存储的量子密钥,QKS-A设备和QKS-B设备分别转发请求给QKD-A设备和QKD-B设备,QKD-A设备和QKD-B设备通过量子密钥分发协议为数据设备A和数据设备B协商量子密钥对,并发送给QKS-A设备和QKS-B设备,QKS-A设备和QKS-B设备对存储的量子密钥进行一致性验证,最后再将通过一致性验证的量子密钥发送给数据设备A和数据设备B。The pre-acquisition method means that data device A and data device B send requests to their respective QKS-A device and QKS-B device to obtain quantum keys. There is no pre-stored quantum key in the QKS-A device and QKS-B device. The QKS-A device and QKS-B device forward the requests to the QKD-A device and QKD-B device respectively. The QKD-A device and QKD-B device negotiate a quantum key pair for data device A and data device B through the quantum key distribution protocol, and send it to the QKS-A device and QKS-B device. The QKS-A device and QKS-B device perform consistency verification on the stored quantum key, and finally send the quantum key that passes the consistency verification to data device A and data device B.

上述两种量子密钥获取方式,都可以通过在QKS-A设备和QKS-B设备之间进行量子密钥的一致性验证,实现向数据设备A和数据设备B输出对称量子密钥的目的。下面在本实施例中依次描述这两种实施方式,需要说明的是,在以下描述的实施方式中,所有通过经典信道传输的私密信息,例如:量子密钥信息,都可以采用通信双方商定的密钥加密,例如,可以采用通信双方前一次获取的量子密钥进行加密,对于初次传输则可以采用通信双方预置的共享密钥加密,这一点在下文中不再重复描述。Both of the above-mentioned quantum key acquisition methods can achieve the purpose of outputting symmetric quantum keys to data devices A and B by verifying the consistency of quantum keys between devices QKS-A and QKS-B. These two implementations are described in turn below in this embodiment. It should be noted that in the implementations described below, all private information transmitted via classical channels, such as quantum key information, can be encrypted using a key agreed upon by both communicating parties. For example, it can be encrypted using a quantum key previously acquired by both communicating parties. For initial transmissions, it can be encrypted using a shared key preset by both communicating parties. This point will not be repeated below.

请参考图3,其为本申请实施例提供的基于实时获取方式的量子密钥输出方法的处理流程图,为了便于理解,本实施例还同时提供了基于实时获取方式的各设备间交互流程图,请参考图4。所述方法包括如下步骤:Please refer to Figure 3, which is a flowchart of the process of the quantum key output method based on the real-time acquisition method provided in an embodiment of the present application. For ease of understanding, this embodiment also provides a flowchart of the interaction between various devices based on the real-time acquisition method, please refer to Figure 4. The method includes the following steps:

步骤301、收发双方量子密钥分发设备通过量子密钥分发协议协商量子密钥,并采用相同地址区间存储所述量子密钥。Step 301: The quantum key distribution devices of the sender and receiver negotiate a quantum key through a quantum key distribution protocol and use the same address range to store the quantum key.

QKD-A设备和QKD-B设备通过量子密钥分发协议,例如BB84协议,协商出对称量子密钥(这个过程也称为量子密钥协商过程),并将所述量子密钥存储在各自存储介质的相同地址区间中,所述存储介质包括:缓存、磁盘等。所述相同地址区间,可以由QKD-A设备和QKD-B设备通过协商设定,也可以由双方在上一次执行存储操作所用地址区间的基础上,根据本次协商获取的量子密钥的数量通过累加的方式确定,只要能够保证双方将量子密钥存储在相同地址区间即可。The QKD-A device and the QKD-B device negotiate a symmetric quantum key (also known as quantum key agreement) using a quantum key distribution protocol, such as the BB84 protocol. These devices then store the quantum key in the same address range on their respective storage media, such as caches and disks. This same address range can be set by negotiation between the QKD-A and QKD-B devices, or by accumulating the number of quantum keys obtained in this negotiation based on the address range used in the previous storage operation. This is sufficient as long as both parties can ensure that their quantum keys are stored in the same address range.

考虑到QKD-A设备或者QKD-B设备在存储量子密钥的过程中,也可能出现写数据错误等异常,导致QKD-A设备和QKD-B设备在所述相同地址区间存储的量子密钥不对称,本实施例提供一种优选实施方案:QKD-A设备和QKD-B设备验证双方在所述相同地址区间中存储的量子密钥的一致性,并将通过一致性验证的量子密钥作为可发送给密钥管理设备的量子密钥。Taking into account that the QKD-A device or the QKD-B device may also have anomalies such as data writing errors during the process of storing quantum keys, resulting in asymmetry of the quantum keys stored by the QKD-A device and the QKD-B device in the same address interval, this embodiment provides a preferred implementation scheme: the QKD-A device and the QKD-B device verify the consistency of the quantum keys stored by both parties in the same address interval, and use the quantum key that passes the consistency verification as the quantum key that can be sent to the key management device.

具体实现时,可以通过比较双方在相同地址区间存储的量子密钥的散列值来实现,由于在QKD设备之间、或者在QKS设备之间进行量子密钥一致性验证,可以采用相同的方法,因此关于这部分描述可以参见步骤304中的相关文字说明,此处不进行重复描述。In specific implementation, it can be achieved by comparing the hash values of the quantum keys stored in the same address range of both parties. Since the same method can be used to verify the consistency of quantum keys between QKD devices or between QKS devices, the description of this part can be referred to the relevant text description in step 304, and it will not be repeated here.

进一步地,采用上述验证方式需要在网络上传输量子密钥的散列值,一旦被恶意攻击者截获,量子密钥的安全性存在一定的隐患,基于上述考虑,本实施例对于在QKD设备之间(以及QKS设备之间)验证量子密钥的一致性,提供一种利用密钥标签与存储位置的对应关系进行验证的优选实施方式。Furthermore, the above-mentioned verification method requires transmitting the hash value of the quantum key over the network. Once intercepted by a malicious attacker, the security of the quantum key will be compromised. Based on the above considerations, this embodiment provides a preferred implementation method for verifying the consistency of quantum keys between QKD devices (and between QKS devices) by utilizing the correspondence between key labels and storage locations.

为了实现上述优选实施方式,收发双方QKD设备通过量子密钥分发协议协商获取的量子密钥,具有与其对应的密钥标签序列,所述密钥标签序列中的每个密钥标签是所述量子密钥中不同量子比特的唯一标识;并且,收发双方QKD设备采用相同地址区间存储所述量子密钥后,建立每个量子比特的存储地址与密钥标签的一一对应关系。In order to implement the above-mentioned preferred embodiment, the quantum key obtained by the QKD devices of the sender and the receiver through negotiation through the quantum key distribution protocol has a corresponding key label sequence, and each key label in the key label sequence is a unique identifier of a different quantum bit in the quantum key; and after the QKD devices of the sender and the receiver use the same address interval to store the quantum key, a one-to-one correspondence between the storage address of each quantum bit and the key label is established.

具体实施时,可以采用每个量子比特的时间戳信息作为其密钥标签,每个量子比特的时间戳信息可以在收发双方QKD设备协商量子密钥的过程中获取。例如,利用BB84协议进行的量子密钥协商过程是基于时钟同步的,协商得到的每个量子比特都有与其对应的唯一的时间戳信息,而且每个量子比特的时间戳信息都是不同的,因此本实施例可以采用量子比特的时间戳信息作为其密钥标签。In a specific implementation, the timestamp information of each qubit can be used as its key tag. The timestamp information of each qubit can be obtained during the quantum key negotiation process between the QKD devices of the sender and receiver. For example, the quantum key negotiation process using the BB84 protocol is based on clock synchronization. Each negotiated qubit has a unique timestamp information corresponding to it, and the timestamp information of each qubit is different. Therefore, this embodiment can use the timestamp information of the qubit as its key tag.

由于在QKD设备之间、或者在QKS设备之间进行量子密钥一致性验证,可以采用相同的基于密钥标签的方法,因此关于这部分描述可以参见步骤304中的相关文字说明,此处不进行重复描述。Since the same key tag-based method can be used to verify quantum key consistency between QKD devices or between QKS devices, the description of this part can be found in the relevant text description in step 304 and will not be repeated here.

如果QKD-B设备通过验证发现双方在所述相同地址区间中存储的量子密钥不相同,可以向QKD-A设备返回未通过应答,QKD-A设备和QKD-B设备可以清除在所述相同地址区间中存储的量子密钥,并重新通过量子密钥分发协议协商量子密钥。在具体实施时,QKD-A设备和QKD-B设备也可以不清除在所述相同地址区间中存储的量子密钥,而是用下一次通过量子密钥协商获取的新量子密钥覆盖写入所述相同地址区间,也是可以的。If the QKD-B device finds through verification that the quantum keys stored in the same address interval of both parties are different, it can return a failure response to the QKD-A device. The QKD-A device and the QKD-B device can clear the quantum key stored in the same address interval and re-negotiate the quantum key through the quantum key distribution protocol. In specific implementations, the QKD-A device and the QKD-B device can also not clear the quantum key stored in the same address interval, but instead overwrite the same address interval with a new quantum key obtained through the next quantum key negotiation.

采用上述提供的优选实施方式,由于QKD设备每次存储获取的量子密钥后,都要进行一致性验证,并且将通过一致性验证的量子密钥作为可发送给相应QKS设备的量子密钥,那么如果后续收发双方QKS设备发现从相应QKD设备获取的量子密钥不一致,通常可以认为是由于网络传输异常(例如丢包)造成的,因此收发双方QKS设备可以重新向相应QKD设备获取量子密钥即可,而不必通过重新启动等方式清空QKD-A设备和QKD-B设备中所有已存储的量子密钥,减少对QKD设备已获取的量子密钥的浪费。Using the preferred implementation mode provided above, since the QKD device must perform consistency verification each time it stores the acquired quantum key, and uses the quantum key that passes the consistency verification as the quantum key that can be sent to the corresponding QKS device, then if the subsequent QKS devices of the sender and receiver find that the quantum keys obtained from the corresponding QKD device are inconsistent, it can usually be considered that this is caused by network transmission abnormalities (such as packet loss). Therefore, the QKS devices of the sender and receiver can re-obtain the quantum key from the corresponding QKD device without having to clear all stored quantum keys in the QKD-A device and the QKD-B device by restarting, etc., thereby reducing the waste of the quantum keys already obtained by the QKD device.

为了进一步保障QKD-A设备和QKD-B设备存储的量子密钥的一致性,在具体实施时,可以按照预先设定的间隔时间,定期验证QKD-A设备和QKD-B设备在相同地址区间中存储的量子密钥的一致性。In order to further ensure the consistency of the quantum keys stored in the QKD-A device and the QKD-B device, in specific implementation, the consistency of the quantum keys stored in the same address range of the QKD-A device and the QKD-B device can be regularly verified according to a pre-set interval.

此外,QKD-A设备和QKD-B设备在通过量子密钥协商过程获取量子密钥、并存储在相同的地址区间后,还可以向相应的QKS设备发送通知,告知其目前已存储的量子密钥数量,供QKS设备发送密钥获取请求时参考。In addition, after the QKD-A device and the QKD-B device obtain the quantum key through the quantum key negotiation process and store it in the same address range, they can also send a notification to the corresponding QKS device to inform it of the number of quantum keys currently stored for reference when the QKS device sends a key acquisition request.

步骤302、收发双方密钥管理设备向各自的量子密钥分发设备发送密钥获取请求。Step 302: The key management devices of the sender and receiver send key acquisition requests to their respective quantum key distribution devices.

QKS-A设备和QKS-B设备可以预先协商双方从各自的QKD设备获取量子密钥的长度信息,并向各自的QKD设备发送携带所述长度信息的密钥获取请求。The QKS-A device and the QKS-B device may negotiate in advance that both parties obtain the length information of the quantum key from their respective QKD devices, and send a key acquisition request carrying the length information to their respective QKD devices.

步骤303、收发双方量子密钥分发设备将存储在相同地址区间的量子密钥发送给相应的密钥管理设备。Step 303: The quantum key distribution devices of both the sender and the receiver send the quantum keys stored in the same address range to the corresponding key management devices.

QKD-A设备和QKD-B设备接收密钥获取请求后,根据请求中携带的密钥长度信息,可以通过协商的方式确定为QKS设备提取量子密钥的地址区间,然后按照协商好的相同地址区间提取量子密钥、并发送给相应的密钥管理设备。After receiving the key acquisition request, the QKD-A device and the QKD-B device can determine the address range for extracting the quantum key for the QKS device through negotiation based on the key length information carried in the request, and then extract the quantum key according to the same negotiated address range and send it to the corresponding key management device.

如果在步骤301中,QKD-A设备和QKD-B设备之间进行了量子密钥的一致性验证,那么本步骤中QKD-A设备和QKD-B设备可以通过协商的方式确定为相应QKS设备提取通过一致性验证的量子密钥的地址区间,然后按照协商好的相同地址区间提取量子密钥、并发送给相应的QKS设备。If in step 301, the consistency verification of the quantum key is performed between the QKD-A device and the QKD-B device, then in this step, the QKD-A device and the QKD-B device can determine, through negotiation, the address range for extracting the quantum key that has passed the consistency verification for the corresponding QKS device, and then extract the quantum key according to the same negotiated address range and send it to the corresponding QKS device.

如果QKS-A设备和QKS-B设备在后续步骤304中要通过密钥标签进行量子密钥一致性验证,那么在本步骤中,QKD-A设备和QKD-B设备在向相应的QKS设备发送量子密钥的同时,还可以发送所述量子密钥的密钥标签序列。If the QKS-A device and the QKS-B device are to perform quantum key consistency verification through the key tag in the subsequent step 304, then in this step, the QKD-A device and the QKD-B device may also send the key tag sequence of the quantum key while sending the quantum key to the corresponding QKS device.

步骤304、收发双方密钥管理设备将接收的量子密钥存储在相同地址区间中,并验证双方在所述相同地址区间中存储的量子密钥的一致性。Step 304: The key management devices of the sender and receiver store the received quantum key in the same address interval and verify the consistency of the quantum keys stored by both parties in the same address interval.

QKS-A设备和QKS-B设备将接收的量子密钥存储在相同地址区间中,所述相同地址区间,可以由QKS-A设备和QKS-B设备通过协商设定,也可以由双方在上一次执行存储操作所用地址区间的基础上,根据本次协商获取的量子密钥的数量通过累加的方式确定,只要能够保证双方将获取的量子密钥存储在相同地址区间即可。The QKS-A device and the QKS-B device store the received quantum keys in the same address range. The same address range can be set by the QKS-A device and the QKS-B device through negotiation, or it can be determined by both parties by accumulating the number of quantum keys obtained in this negotiation based on the address range used by the two parties in the last storage operation. As long as it can be ensured that both parties store the obtained quantum keys in the same address range, it will be sufficient.

QKS-A设备和QKS-B设备验证双方在所述相同地址区间中存储的量子密钥的一致性,可以采用多种方式实现,下面列举几种可选的方式。The QKS-A device and the QKS-B device verify the consistency of the quantum keys stored by both parties in the same address range. This can be achieved in a variety of ways, and several optional ways are listed below.

1)通过比较双方在相同地址区间存储的量子密钥的散列值实现一致性验证。1) Consistency verification is achieved by comparing the hash values of the quantum keys stored in the same address range by both parties.

这种方式相对简便,具体实现可以是,QKS-A设备采用预设散列算法计算在所述地址区间中存储的量子密钥的散列值,然后采用双方前一次获取的通过一致性验证的量子密钥对所述散列值以及所述地址区间信息加密,并将加密后的信息发送给对方;QKS-B设备接收QKS-A设备发送的上述信息后,采用相应的密钥解密后获取地址区间信息,采用所述预设散列算法计算在本地的相应地址区间中存储的量子密钥的散列值,判断计算得到的散列值与接收的散列值是否相同,若相同则向QSK-A返回验证通过应答,否则返回未通过应答。This method is relatively simple. The specific implementation can be that the QKS-A device uses a preset hash algorithm to calculate the hash value of the quantum key stored in the address interval, and then uses the quantum key obtained by both parties last time and verified to be consistent to encrypt the hash value and the address interval information, and sends the encrypted information to the other party; after the QKS-B device receives the above information sent by the QKS-A device, it uses the corresponding key to decrypt and obtain the address interval information, and uses the preset hash algorithm to calculate the hash value of the quantum key stored in the corresponding address interval locally, and determines whether the calculated hash value is the same as the received hash value. If they are the same, a verification pass response is returned to QSK-A, otherwise a failure response is returned.

在具体实施时,所述QKS-A设备向QKS-B设备发送的地址区间信息可以包括所述地址区间的首地址和尾地址,也可以包括首地址和区间长度,或者是首地址以及待验证一致性的量子密钥长度,只要QKS-B设备能够根据接收的信息获知具体的地址区间就都是可以的;所述预设散列算法包括SHA-1、SHA-2、或者SHA-3,以及其他可能的散列算法,只要QKS-A设备和QKS-B设备采用相同的散列算法即可;为了保证传输过程的安全性,QKS-A设备采用其与QKS-B设备上一次获取的、通过一致性验证的量子密钥对待发送的信息进行加密,如果是首次进行一致性验证,那么可以采用双方预置的共享密钥加密,相应的QKS-B设备也采用所述预置共享密钥解密。在上面给出的实现方式中,由QKS-A设备发起验证过程,QKS-B设备返回验证应答,在其他实施方式中,也可以由QKS-B设备发起验证过程。上面描述的关于实施方式的各种变更,对于以下描述的另外两种验证方式中的相应内容也是适用的,后续不再赘述。In a specific implementation, the address interval information sent by the QKS-A device to the QKS-B device may include the first and last addresses of the address interval, or the first address and the interval length, or the first address and the length of the quantum key whose consistency is to be verified. As long as the QKS-B device can obtain the specific address interval based on the received information, all of these are acceptable. The preset hash algorithm includes SHA-1, SHA-2, or SHA-3, as well as other possible hash algorithms, as long as the QKS-A device and the QKS-B device use the same hash algorithm. To ensure the security of the transmission process, the QKS-A device uses the quantum key that it and the QKS-B device last obtained and passed the consistency verification to encrypt the information to be sent. If this is the first time consistency verification is performed, the shared key preset by both parties can be used for encryption, and the corresponding QKS-B device also uses the preset shared key for decryption. In the implementation method given above, the QKS-A device initiates the verification process and the QKS-B device returns a verification response. In other implementations, the QKS-B device can also initiate the verification process. The various changes to the implementation methods described above are also applicable to the corresponding contents of the other two verification methods described below, and will not be described in detail later.

2)利用密钥标签与量子比特存储位置的对应关系进行验证的方式一。2) Method 1 of verification using the correspondence between the key tag and the quantum bit storage location.

为了避免待验证量子密钥的散列值在传输过程中被截获带来的安全隐患,本实施例提供利用密钥标签能够唯一标识量子比特的特性、以及密钥标签与存储位置的对应关系进行一致性验证的优选实施方式。采用这种优选实施方式,QKS-A设备和QKS-B设备从各自对应的QKD设备获取的信息不仅包括量子密钥,还包括所述量子密钥的密钥标签序列,所述密钥标签序列中的每个密钥标签是所述量子密钥中不同量子比特的唯一标识。QKS-A设备和QKS-B设备将接收的量子密钥存储在相同地址区间后,建立每个量子比特的存储地址与密钥标签的一一对应关系。In order to avoid the security risks caused by the interception of the hash value of the quantum key to be verified during transmission, this embodiment provides a preferred implementation method for consistency verification using the characteristic of the key tag that can uniquely identify the quantum bit, as well as the correspondence between the key tag and the storage location. Using this preferred implementation method, the information obtained by the QKS-A device and the QKS-B device from their respective corresponding QKD devices includes not only the quantum key, but also the key tag sequence of the quantum key. Each key tag in the key tag sequence is a unique identifier for a different quantum bit in the quantum key. After the QKS-A device and the QKS-B device store the received quantum key in the same address interval, a one-to-one correspondence between the storage address of each quantum bit and the key tag is established.

为了便于描述,QKS-A设备一侧的待验证量子密钥的密钥标签序列记为Lab1,所述待验证量子密钥中每个量子比特的存储地址组成的地址序列记为Locate1,hash()代表预设散列算法,{}内的信息为被加密数据。QKS-A设备和QKS-B设备可以采用如下方式验证双方在所述相同地址区间中存储的量子密钥的一致性:For ease of description, the key label sequence of the quantum key to be verified on QKS-A is denoted as Lab1, the address sequence consisting of the storage address of each qubit in the quantum key to be verified is denoted as Locate1, hash() represents the preset hash algorithm, and the information within {} is the encrypted data. QKS-A and QKS-B can verify the consistency of the quantum keys stored in the same address range on both sides using the following method:

QKS-A设备采用预设散列算法计算Lab1的散列值,并采用双方前一次获取的通过一致性验证的量子密钥对所述散列值、以及Locate1加密,并将加密后的信息发送给QKS-B设备,即QKS-A设备将下列信息发送给QKS-B设备:Verify-A={hash(Lab1),Locate1};QKS-A calculates the hash value of Lab1 using a preset hash algorithm, encrypts the hash value and Locate1 using the previously obtained and verified quantum key, and sends the encrypted information to QKS-B. That is, QKS-A sends the following information to QKS-B: Verify-A = {hash(Lab1), Locate1}.

QKS-B设备采用相应的密钥对接收的信息解密后,获取散列值和地址序列,根据所述地址序列从本地获取对应的密钥标签序列,并采用所述预设散列算法计算所述获取的密钥标签序列的散列值,判断计算得到的散列值与接收的散列值是否相同,若相同则向QKS-A设备返回验证通过应答,否则返回未通过应答。After decrypting the received information using the corresponding key, the QKS-B device obtains the hash value and address sequence, obtains the corresponding key tag sequence from the local according to the address sequence, and calculates the hash value of the obtained key tag sequence using the preset hash algorithm. It determines whether the calculated hash value is the same as the received hash value. If they are the same, it returns a verification pass response to the QKS-A device; otherwise, it returns a failure response.

在具体实施时,也可以对上述方式作一定调整,例如,QKS-A设备可以向QKS-B设备发送Verify-A={hash(Locate1),Lab1},相应的,QKS-B设备根据接收的密钥标签序列从本地获取对应的地址序列,并采用同样的计算散列值以及比对的方式判断是否通过一致性验证。During implementation, the above method may be adjusted. For example, the QKS-A device may send Verify-A = {hash(Locate1), Lab1} to the QKS-B device. Accordingly, the QKS-B device obtains the corresponding address sequence locally based on the received key label sequence, and uses the same hash value calculation and comparison method to determine whether the consistency verification has passed.

3)利用密钥标签与量子比特存储位置的对应关系进行验证的方式二。3) The second verification method is to use the correspondence between the key tag and the quantum bit storage location.

上面提供了利用密钥标签与量子比特存储位置的对应关系进行一致性验证的一种方式,在此提供利用上述对应关系进行一致性验证的另一种方式(仍沿用在上一种方式中约定的描述方式):The above provides a way to verify consistency by using the correspondence between key tags and quantum bit storage locations. Here is another way to verify consistency by using the above correspondence (still using the description method agreed in the previous method):

QKS-A设备采用预设散列算法计算由Lab1和Locate1拼接而成的字符串的散列值,并采用双方前一次获取的通过一致性验证的量子密钥对所述散列值、以及Locate1加密,并将加密后的信息发送给QKS-B设备,即QKS-A设备将下列信息发送给QKS-B设备:Verify-A={hash(Lab1,Locate1),Locate1};QKS-A uses a preset hash algorithm to calculate the hash value of the string formed by splicing Lab1 and Locate1, and encrypts the hash value and Locate1 using the previously obtained and verified quantum key of both parties. The encrypted information is sent to QKS-B. That is, QKS-A sends the following information to QKS-B: Verify-A = {hash(Lab1, Locate1), Locate1};

QKS-B设备采用相应的密钥对接收的信息解密后,获取散列值和地址序列,根据所述地址序列从本地获取对应的密钥标签序列,并采用所述预设散列算法计算由所述密钥标签序列和地址序列拼接而成的字符串的散列值,判断计算得到的散列值与接收的散列值是否相同,若相同则向QKS-A设备返回验证通过应答,否则返回未通过应答。After decrypting the received information using the corresponding key, the QKS-B device obtains the hash value and address sequence, obtains the corresponding key tag sequence from the local computer based on the address sequence, and uses the preset hash algorithm to calculate the hash value of the string composed of the key tag sequence and the address sequence. It determines whether the calculated hash value is the same as the received hash value. If they are the same, a verification pass response is returned to the QKS-A device; otherwise, a verification fail response is returned.

在具体实施时,也可以对上述方式作一定调整,例如,QKS-A设备可以向QKS-B设备发送Verify-A={hash(Lab1,Locate1),Lab1},相应的,QKS-B设备根据接收的密钥标签序列从本地获取对应的地址序列,并采用同样的计算散列值以及比对的方式判断是否通过一致性验证。In specific implementations, the above method can also be adjusted to some extent. For example, the QKS-A device can send Verify-A = {hash(Lab1, Locate1), Lab1} to the QKS-B device. Correspondingly, the QKS-B device obtains the corresponding address sequence from the local device based on the received key label sequence, and uses the same hash value calculation and comparison method to determine whether the consistency verification has passed.

至此,描述了三种验证QKS-A设备和QKS-B设备在相同地址区间中存储的量子密钥一致性的方式,其中第一种方式相对简单,不需要使用密钥标签,但是可能存在一定的安全隐患;第二种和第三种方式相对复杂,利用了密钥标签能够唯一标识量子比特的特性,并且通过建立密钥标签与量子比特存储位置的对应关系,从而不需要在网络上传输量子密钥信息,而是验证双方设备存储量子比特的地址序列以及对应的密钥标签序列是否均相同,如果相同就可以证明双方设备在相同地址区间存储的量子密钥是相同的,即通过一致性验证。So far, three methods have been described to verify the consistency of the quantum keys stored in the same address range of the QKS-A device and the QKS-B device. The first method is relatively simple and does not require the use of key labels, but there may be certain security risks; the second and third methods are relatively complex and utilize the ability of key labels to uniquely identify quantum bits. By establishing a correspondence between key labels and quantum bit storage locations, there is no need to transmit quantum key information on the network. Instead, it verifies whether the address sequence of the quantum bits stored in both devices and the corresponding key label sequence are the same. If they are the same, it can be proved that the quantum keys stored in the same address range of both devices are the same, that is, consistency verification has passed.

如果QKS-A设备和QKS-B设备执行一致性验证后,发现双方在所述相同地址区间中存储的量子密钥不相同,即未通过一致性验证,那么QKS-A设备和QKS-B设备可以清除在所述相同地址区间中存储的量子密钥,并转到步骤302执行,重新向各自的QKD设备获取量子密钥。在具体实施时,QKS-A设备和QKS-B设备也可以不清除在所述相同地址区间中存储的量子密钥,而是用下一次从相应QKD设备获取的新量子密钥覆盖写入所述相同地址区间,也是可以的。If, after performing consistency verification, QKS-A and QKS-B discover that the quantum keys stored in the same address interval are different, i.e., if consistency verification fails, QKS-A and QKS-B may clear the quantum keys stored in the same address interval and proceed to step 302 to re-acquire quantum keys from their respective QKD devices. In a specific implementation, QKS-A and QKS-B may also overwrite the same address interval with a new quantum key to be acquired from the corresponding QKD device, rather than clearing the quantum keys stored in the same address interval.

由于收发双方QKS设备每次存储从相应QKD设备获取的量子密钥后,都要进行一致性验证,并且每次向相应数据设备输出量子密钥时,都是从通过一致性验证的量子密钥中选取,那么如果后续收发双方数据设备发现从相应QKS-A设备获取的量子密钥不一致,通常可以认为是由于网络传输异常(例如丢包)造成的,因此收发双方数据设备重新向相应QKS设备获取量子密钥即可,而不必通过重新启动等方式清空QKS-A设备和QKS-B设备中所有已存储的量子密钥,避免对已获取的量子密钥的浪费。Since the QKS devices of the sender and receiver must perform consistency verification each time they store the quantum key obtained from the corresponding QKD device, and each time they output the quantum key to the corresponding data device, they are selected from the quantum keys that have passed the consistency verification, then if the data devices of the sender and receiver subsequently find that the quantum keys obtained from the corresponding QKS-A device are inconsistent, it can usually be considered that this is caused by network transmission abnormalities (such as packet loss). Therefore, the data devices of the sender and receiver can obtain the quantum key from the corresponding QKS device again, without having to clear all the stored quantum keys in the QKS-A device and QKS-B device by restarting, etc., to avoid wasting the obtained quantum keys.

需要说明的是,本步骤针对QKS-A设备和QKS-B设备提供了三种量子密钥一致性验证方式,这三种方式也可以应用于QKD-A设备和QKD-B设备之间的量子密钥一致性验证。在其他实施方式中,也可以采用不同于上述方式的其他方式,只要能够验证双方设备在相同地址区间存储的量子密钥的一致性,就都不偏离本申请的核心,都在本申请的保护范围之内。It should be noted that this step provides three quantum key consistency verification methods for QKS-A and QKS-B devices. These three methods can also be applied to quantum key consistency verification between QKD-A and QKD-B devices. In other implementations, other methods different from the above methods may also be used. As long as they can verify the consistency of quantum keys stored in the same address range on both devices, they do not deviate from the core of this application and are within the scope of protection of this application.

步骤305、收发双方数据设备分别向各自的密钥管理设备发送密钥获取请求。Step 305: The data devices of both the sender and receiver send key acquisition requests to their respective key management devices.

数据设备A和数据设备B可以预先协商向QKS设备请求获取量子密钥的长度,并向各自的QKS设备发送量子密钥获取请求,所述请求中携带所述长度信息。Data device A and data device B may negotiate in advance to request the QKS device to obtain the length of the quantum key, and send a quantum key acquisition request to their respective QKS devices, where the request carries the length information.

步骤306、收发双方密钥管理设备接收所述密钥获取请求后,从通过一致性验证的量子密钥中,选取在相同地址区间存储的量子密钥,发送给相应数据设备。Step 306: After receiving the key acquisition request, the key management devices of the sender and receiver select a quantum key stored in the same address range from the quantum keys that have passed consistency verification and send it to the corresponding data device.

QKS-A设备和QKS-B设备接收对应的数据设备发送的密钥获取请求后,根据请求中携带的密钥长度信息,可以通过协商的方式确定为数据设备输出通过一致性验证的量子密钥的地址区间,然后将协商好的相同地址区间中的量子密钥发送给相应的数据设备。After the QKS-A and QKS-B devices receive the key acquisition request sent by the corresponding data device, they can determine the address range of the quantum key that has passed consistency verification for the data device through negotiation based on the key length information carried in the request, and then send the negotiated quantum key in the same address range to the corresponding data device.

至此QKS-A设备和QKS-B设备向各自相应的数据设备输出了通过一致性验证的量子密钥,从而数据设备A和数据设备B可以利用接收的量子密钥对需要进行保密传输的数据进行相应的加密、解密操作。At this point, the QKS-A device and the QKS-B device have output the consistency-verified quantum keys to their respective data devices, so that data devices A and B can use the received quantum keys to perform corresponding encryption and decryption operations on the data that needs to be transmitted confidentially.

考虑到QKS设备和对应的数据设备之间传输过程也可能存在丢包的现象,本实施例还提供在数据设备之间进行量子密钥一致性验证的优选实施方式,即,在所述收发双方QKS设备将量子密钥发送给相应数据设备后,数据设备A和数据设备B验证获取的量子密钥的一致性,并将通过一致性验证的量子密钥作为执行数据加解密操作所采用的密钥。Taking into account that packet loss may occur during the transmission process between the QKS device and the corresponding data device, this embodiment also provides a preferred implementation method for performing quantum key consistency verification between data devices, that is, after the QKS devices of the sender and receiver send the quantum key to the corresponding data device, data device A and data device B verify the consistency of the obtained quantum key, and use the quantum key that has passed the consistency verification as the key used to perform data encryption and decryption operations.

数据设备A和数据设备B验证双方获取的量子密钥的一致性,可以采用多种方式实现,下面列举两种可选的方式。Data device A and data device B can verify the consistency of the quantum keys obtained by both parties in a variety of ways. Two optional methods are listed below.

1)通过比较双方获取的量子密钥的散列值实现一致性验证。1) Consistency verification is achieved by comparing the hash values of the quantum keys obtained by both parties.

这种方式相对简便,具体实现可以是,数据设备A采用预设散列算法计算所述获取的量子密钥的散列值,并采用双方前一次获取的通过一致性验证的量子密钥对所述散列值加密,并将加密后的信息发送给数据设备B;数据设备B采用相应的密钥对接收的信息解密后,采用所述预设散列算法计算本地获取的量子密钥的散列值,判断计算得到的散列值与接收的散列值是否相同,若相同则向数据设备A返回验证通过应答,否则返回未通过应答。This method is relatively simple. The specific implementation can be that data device A uses a preset hash algorithm to calculate the hash value of the obtained quantum key, and uses the quantum key previously obtained by both parties and verified to be consistent to encrypt the hash value, and sends the encrypted information to data device B; after data device B uses the corresponding key to decrypt the received information, it uses the preset hash algorithm to calculate the hash value of the locally obtained quantum key, and determines whether the calculated hash value is the same as the received hash value. If they are the same, a verification pass response is returned to data device A, otherwise a failure response is returned.

2)利用量子密钥与密钥标签序列的对应关系实现一致性验证。2) Use the correspondence between the quantum key and the key tag sequence to achieve consistency verification.

采用这种验证方式,收发双方QKS设备发送给相应数据设备的信息不仅包括量子密钥,还包括所述量子密钥的密钥标签序列。为了便于描述,将数据设备A接收的量子密钥记为Key1,对应的密钥标签序列记为Lab1,hash()代表预设散列算法,{}内的信息为被加密数据。数据设备A和数据设备B接收各自的QKS设备发送的量子密钥及密钥标签序列后,执行下述操作实现量子密钥的一致性验证:Using this verification method, the information sent by the QKS devices on both sides to the corresponding data device includes not only the quantum key but also the key tag sequence of the quantum key. For ease of description, the quantum key received by data device A is denoted as Key1, and the corresponding key tag sequence is denoted as Lab1. hash() represents the preset hash algorithm, and the information within {} is the encrypted data. After data device A and data device B receive the quantum key and key tag sequence sent by their respective QKS devices, they perform the following operations to verify the consistency of the quantum key:

数据设备A采用预设散列算法计算由获取的量子密钥Key1和密钥标签序列Lab1拼接而成的字符串的散列值,并采用双方前一次获取的、通过一致性验证的量子密钥对所述散列值、以及密钥标签序列Lab1加密,并将加密后的信息发送给数据设备B,即数据设备A将下列信息发送给数据设备B:Verify-A={hash(Key1,Lab1),Lab1};Data device A uses a preset hash algorithm to calculate the hash value of the string composed of the obtained quantum key Key1 and the key label sequence Lab1, and uses the quantum key previously obtained by both parties and verified to be consistent to encrypt the hash value and the key label sequence Lab1, and sends the encrypted information to data device B. That is, data device A sends the following information to data device B: Verify-A = {hash(Key1, Lab1), Lab1};

数据设备B采用相应的密钥对接收的信息解密后,根据获取的密钥标签序列从本地获取对应的量子密钥,并采用所述预设散列算法计算与所述量子密钥和密钥标签序列拼接而成的字符串的散列值,判断计算得到的散列值与接收的散列值是否相同,若相同,则向数据设备A返回验证通过应答,否则返回未通过应答。After data device B uses the corresponding key to decrypt the received information, it obtains the corresponding quantum key from the local computer according to the obtained key label sequence, and uses the preset hash algorithm to calculate the hash value of the string spliced together with the quantum key and the key label sequence, and determines whether the calculated hash value is the same as the received hash value. If they are the same, a verification pass response is returned to data device A; otherwise, a failure response is returned.

如果数据设备A和数据设备B执行一致性验证后,发现双方获取的量子密钥不相同,即未通过一致性验证,那么数据设备A和数据设备B可以放弃本次获取的量子密钥,转到步骤305执行,再次分别向各自的QKS设备发送密钥获取请求。If data device A and data device B find that the quantum keys obtained by both parties are different after performing consistency verification, that is, they fail the consistency verification, then data device A and data device B can abandon the quantum key obtained this time and go to step 305 to execute, and send key acquisition requests to their respective QKS devices again.

由于QKS设备输出给数据设备的量子密钥都是其存储的、已通过一致性验证的量子密钥,那么如果收发双方数据设备获取的量子密钥不一致,通常是因为网络传输异常(例如丢包)造成的,在这种情况下,没有必要通过重新启动等方式清空QKS-A设备和QKS-B设备中所有已存储的量子密钥,避免对已获取的量子密钥的浪费。Since the quantum keys output by the QKS device to the data device are all quantum keys stored by it and have passed consistency verification, if the quantum keys obtained by the data devices of the sender and receiver are inconsistent, it is usually caused by network transmission abnormalities (such as packet loss). In this case, there is no need to clear all stored quantum keys in the QKS-A device and the QKS-B device by restarting, etc., to avoid wasting the obtained quantum keys.

至此,通过上述步骤301-步骤306对采用实时获取方式实施本申请技术方案的流程进行了详细描述。需要说明的是,为了进一步保障安全性,上述处理流程中所有在经典信道中的数据交互都可以基于HTTPS连接进行,参与交互的各个设备在认证过程中所采用的数字证书均为可信任第三方颁发;在每两个设备进行数据交互之前,还可以预先进行双向身份认证,例如,采用预置数字证书等方式,并在双方都通过对方的身份认证后再开始数据交互过程。Thus, the process of implementing the technical solution of the present application in a real-time acquisition manner has been described in detail through the above steps 301 to 306. It should be noted that, in order to further ensure security, all data interactions in the classic channel in the above processing flow can be carried out based on HTTPS connections, and the digital certificates used by each device participating in the interaction during the authentication process are all issued by a trusted third party; before each two devices interact with each other, two-way identity authentication can also be performed in advance, for example, using a pre-set digital certificate, and the data interaction process can only begin after both parties have passed the other party's identity authentication.

上面描述了采用实时获取方式实施本申请技术方案的流程,下面描述采用预获取方式实施本申请技术方案的流程。请参考图5,其为本申请实施例提供的基于预获取方式的量子密钥输出方法的处理流程图,为了便于理解,本实施例还同时提供了基于预获取方式的各设备间交互流程图,请参考图6。所述方法包括如下步骤:The above describes the process of implementing the technical solution of the present application using a real-time acquisition method. The following describes the process of implementing the technical solution of the present application using a pre-acquisition method. Please refer to Figure 5, which is a processing flow chart of the quantum key output method based on the pre-acquisition method provided in an embodiment of the present application. For ease of understanding, this embodiment also provides a flow chart of the interaction between various devices based on the pre-acquisition method. Please refer to Figure 6. The method includes the following steps:

步骤501、收发双方数据设备分别向各自的密钥管理设备发送密钥获取请求。Step 501: The data devices of both the sender and receiver send key acquisition requests to their respective key management devices.

步骤502、收发双方密钥管理设备分别向各自的量子密钥分发设备发送所述密钥获取请求。Step 502: The key management devices of the sender and receiver respectively send the key acquisition request to their respective quantum key distribution devices.

收发双方QKS设备由于没有预存储通过一致性验证的量子密钥,因此将接收到的请求转发给各自的QKD设备。Since the QKS devices of the sender and receiver do not pre-store quantum keys that have passed consistency verification, they forward the received requests to their respective QKD devices.

步骤503、收发双方量子密钥分发设备通过量子密钥分发协议协商量子密钥,并采用相同地址区间存储所述量子密钥。Step 503: The quantum key distribution devices of the sender and receiver negotiate the quantum key through the quantum key distribution protocol and use the same address range to store the quantum key.

步骤504、收发双方量子密钥分发设备将存储在相同地址区间的量子密钥发送给相应的密钥管理设备。Step 504: The quantum key distribution devices of both the sender and the receiver send the quantum keys stored in the same address range to the corresponding key management devices.

步骤505、收发双方密钥管理设备将接收的量子密钥存储在相同地址区间中,并验证双方在所述相同地址区间中存储的量子密钥的一致性。Step 505: The key management devices of the sender and receiver store the received quantum key in the same address interval and verify the consistency of the quantum keys stored by both parties in the same address interval.

步骤506、收发双方密钥管理设备从通过一致性验证的量子密钥中,选取在相同地址区间存储的量子密钥,发送给相应数据设备。Step 506: The key management devices of both the sender and the receiver select the quantum key stored in the same address range from the quantum keys that have passed consistency verification and send it to the corresponding data device.

参考上面描述的步骤以及图4和图6可以看出,预获取方式与实时获取方式的区别在于,各个设备之间的交互过程有差异。在预获取方式中,收发双方QKS设备并没有像实时获取方式那样预存储经过一致性验证的量子密钥,而是在接收数据设备的密钥获取请求后,向相应的QKD设备获取量子密钥、并进行量子密钥的一致性验证,然后将通过验证的量子密钥发送给数据设备。As can be seen from the steps described above and Figures 4 and 6, the difference between the pre-acquisition method and the real-time acquisition method lies in the different interaction processes between the devices. In the pre-acquisition method, the QKS devices on both the sender and receiver sides do not pre-store a consistency-verified quantum key as in the real-time acquisition method. Instead, upon receiving a key acquisition request from the data device, they obtain the quantum key from the corresponding QKD device, perform consistency verification on the quantum key, and then send the verified quantum key to the data device.

在具体实施本技术方案时,采用预获取方式的核心与实时获取方式是相同的:即收发双方QKS设备要验证双方在相同地址区间中存储的量子密钥的一致性,从而保证向数据设备输出的密钥是对称的。进一步地,收发双方QKD设备之间也可以对存储的量子密钥进行一致性验证,收发双方数据设备之间也可以对接收的量子密钥进行一致性验证。具体的处理过程在上面描述实时获取方式时都进行了详细说明,此处不再赘述,可以参见实时获取方式中的相关描述。When implementing this technical solution, the core of the pre-acquisition method is the same as the real-time acquisition method: the QKS devices on both sides must verify the consistency of the quantum keys stored in the same address range, thereby ensuring that the keys output to the data device are symmetric. Furthermore, the QKD devices on both sides can also verify the consistency of the stored quantum keys, and the data devices on both sides can also verify the consistency of the received quantum keys. The specific processing process is detailed in the real-time acquisition method above and will not be repeated here. Please refer to the relevant description of the real-time acquisition method.

需要说明的是,在具体实施时,不仅可以采用上述实时获取方式或者预获取方式中的任一种方式,也可以将这两种方式结合起来实施,例如,收发双方QKS设备通常可以预存储经过一致性验证的量子密钥,并根据相应数据设备的需求输出量子密钥,当数据设备的量子密钥需求量比较大、收发双方QKS设备判断出没有预存储密钥可输出时,则可以转换到预获取方式继续工作。It should be noted that, in specific implementation, not only can either the real-time acquisition method or the pre-acquisition method be adopted, but the two methods can also be combined for implementation. For example, the QKS devices of the sender and receiver can usually pre-store quantum keys that have been consistency verified, and output quantum keys according to the needs of the corresponding data device. When the data device has a relatively large demand for quantum keys and the QKS devices of the sender and receiver determine that there are no pre-stored keys to output, they can switch to the pre-acquisition mode to continue working.

综上所述,本申请提供的量子密钥输出方法,由于收发双方密钥管理设备对在相同地址区间中存储的量子密钥进行了一致性验证,从而确保量子密钥输出系统输出量子密钥的同步性和有用性,即:向数据设备输出的量子密钥都是相同的、对称的,从而为数据加解密过程的正确执行提供保障。特别是,即使因为网络传输等原因造成数据收发双方获取的量子密钥不对称,也无需通过重新启动等方式清空收发双方量子密钥管理设备已存储的量子密钥,从而避免了对量子密钥资源的浪费。In summary, the quantum key output method provided by this application ensures the synchronization and usefulness of the quantum keys output by the quantum key output system, as the key management devices of both the sender and receiver verify the consistency of the quantum keys stored in the same address range. Specifically, the quantum keys output to the data device are identical and symmetric, thus ensuring the correct execution of the data encryption and decryption process. In particular, even if the quantum keys obtained by the data sender and receiver are asymmetric due to network transmission or other reasons, there is no need to clear the quantum keys stored in the quantum key management devices of the sender and receiver by restarting the device, thus avoiding the waste of quantum key resources.

在上述的实施例中,提供了一种量子密钥输出方法,与之相对应的,本申请还提供一种量子密钥输出装置。请参看图7,其为本申请的一种量子密钥输出装置的实施例示意图。由于装置实施例基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。下述描述的装置实施例仅仅是示意性的。In the above-mentioned embodiments, a quantum key output method is provided. Correspondingly, this application also provides a quantum key output device. Please refer to Figure 7, which is a schematic diagram of an embodiment of a quantum key output device of this application. Since the device embodiment is substantially similar to the method embodiment, the description is relatively brief. For relevant details, please refer to the description of the method embodiment. The device embodiment described below is merely illustrative.

本实施例的一种量子密钥输出装置,包括:数据设备密钥请求单元701,用于收发双方数据设备分别向各自的密钥管理设备发送密钥获取请求;管理设备密钥输出单元702,用于收发双方密钥管理设备接收所述密钥获取请求后,将从相应量子密钥分发设备获取的、通过收发双方密钥管理设备一致性验证的量子密钥发送给相应数据设备,供相应数据设备执行数据加解密操作。A quantum key output device according to this embodiment includes: a data device key request unit 701, configured to send key acquisition requests from the data devices of both the sender and the receiver to their respective key management devices; and a management device key output unit 702, configured to send, after receiving the key acquisition requests, the quantum keys obtained from the corresponding quantum key distribution device and verified by the key management devices of both the sender and the receiver to the corresponding data device, for the corresponding data device to perform data encryption and decryption operations.

可选的,所述装置包括:分发设备密钥协商验证单元;Optionally, the apparatus includes: a distribution device key negotiation and verification unit;

所述分发设备密钥协商验证单元,用于与收发双方密钥管理设备对应的量子密钥分发设备,将通过量子密钥分发协议协商获取的量子密钥存储在相同地址区间后,验证双方在所述相同地址区间中存储的量子密钥的一致性,并将通过一致性验证的量子密钥作为可供相应密钥管理设备获取的量子密钥。The distribution device key agreement verification unit is used to verify the consistency of the quantum keys stored by both parties in the same address interval after the quantum key obtained through quantum key distribution protocol negotiation with the key management devices of the sender and receiver is stored in the same address interval, and the quantum key that passes the consistency verification is used as the quantum key available for acquisition by the corresponding key management device.

可选的,所述装置包括分发设备密钥协商单元、管理设备密钥请求单元、分发设备密钥发送单元、以及管理设备密钥验证单元,且上述单元在所述数据设备密钥请求单元工作之前启动:Optionally, the apparatus includes a distribution device key negotiation unit, a management device key request unit, a distribution device key sending unit, and a management device key verification unit, and the above units are started before the data device key request unit operates:

分发设备密钥协商单元,用于收发双方量子密钥分发设备通过量子密钥分发协议协商量子密钥,并采用相同地址区间存储所述量子密钥;A distribution device key negotiation unit, configured for the quantum key distribution devices of both the sender and the receiver to negotiate a quantum key through a quantum key distribution protocol, and to store the quantum key in the same address interval;

管理设备密钥请求单元,用于收发双方密钥管理设备向各自的量子密钥分发设备发送密钥获取请求;The management device key request unit is used to send key acquisition requests from the key management devices of both parties to their respective quantum key distribution devices;

分发设备密钥发送单元,用于收发双方量子密钥分发设备将存储在相同地址区间的量子密钥发送给相应的密钥管理设备;The key sending unit of the distribution device is used to send the quantum key stored in the same address interval from the quantum key distribution devices of both parties to the corresponding key management device;

管理设备密钥验证单元,用于收发双方密钥管理设备将接收的量子密钥存储在相同地址区间中,并验证双方在所述相同地址区间中存储的量子密钥的一致性;A management device key verification unit, configured to ensure that the key management devices of both the sender and the receiver store the received quantum keys in the same address interval and verify the consistency of the quantum keys stored by both parties in the same address interval;

相应的,所述管理设备密钥输出单元具体用于,收发双方密钥管理设备接收所述密钥获取请求后,从通过一致性验证的量子密钥中,选取在相同地址区间存储的量子密钥,发送给相应数据设备。Correspondingly, the key output unit of the management device is specifically configured to, after receiving the key acquisition request, select a quantum key stored in the same address interval from the quantum keys that have passed consistency verification and send it to the corresponding data device.

可选的,所述装置包括:Optionally, the device includes:

管理设备密钥请求转发单元,用于在所述数据设备密钥请求单元接收密钥获取请求后,收发双方密钥管理设备分别向各自的量子密钥分发设备发送所述密钥获取请求;a management device key request forwarding unit, configured to, after the data device key request unit receives the key acquisition request, cause the key management devices of both the sender and receiver to respectively send the key acquisition request to their respective quantum key distribution devices;

分发设备密钥协商单元,用于收发双方量子密钥分发设备通过量子密钥分发协议协商量子密钥,并采用相同地址区间存储所述量子密钥;A distribution device key negotiation unit, configured for the quantum key distribution devices of both the sender and the receiver to negotiate a quantum key through a quantum key distribution protocol, and to store the quantum key in the same address interval;

分发设备密钥发送单元,用于收发双方量子密钥分发设备将存储在相同地址区间的量子密钥发送给相应的密钥管理设备;The key sending unit of the distribution device is used to send the quantum key stored in the same address interval from the quantum key distribution devices of both parties to the corresponding key management device;

管理设备密钥验证单元,用于收发双方密钥管理设备将接收的量子密钥存储在相同地址区间中,并验证双方在所述相同地址区间中存储的量子密钥的一致性;A management device key verification unit, configured to ensure that the key management devices of both the sender and the receiver store the received quantum keys in the same address interval and verify the consistency of the quantum keys stored by both parties in the same address interval;

相应的,所述管理设备密钥输出单元具体用于,收发双方密钥管理设备从通过一致性验证的量子密钥中,选取在相同地址区间存储的量子密钥,发送给相应数据设备。Correspondingly, the management device key output unit is specifically configured to enable the key management devices of both the sender and receiver to select the quantum key stored in the same address interval from the quantum keys that have passed consistency verification and send it to the corresponding data device.

可选的,所述装置包括:Optionally, the device includes:

管理设备密钥清除单元,用于当所述管理设备密钥验证单元的验证结果为:未通过时,收发双方密钥管理设备清除在被验证的相同地址区间中存储的量子密钥,并触发用于收发双方密钥管理设备分别向各自的量子密钥分发设备发送密钥获取请求的单元工作。The management device key clearing unit is used to, when the verification result of the management device key verification unit is: failure, cause the key management devices of the sender and receiver to clear the quantum keys stored in the same verified address interval, and trigger the units for the key management devices of the sender and receiver to send key acquisition requests to their respective quantum key distribution devices.

可选的,所述装置包括:Optionally, the device includes:

分发设备密钥验证单元,用于当所述分发设备密钥协商单元完成量子密钥协商过程、并采用相同地址区间存储所述量子密钥后,收发双方量子密钥分发设备验证双方在所述相同地址区间中存储的量子密钥的一致性,并将通过一致性验证的量子密钥作为可发送给密钥管理设备的量子密钥。The distribution device key verification unit is used to verify the consistency of the quantum keys stored in the same address interval by the quantum key distribution devices of both parties after the distribution device key negotiation unit completes the quantum key negotiation process and uses the same address interval to store the quantum key, and use the quantum key that passes the consistency verification as the quantum key that can be sent to the key management device.

可选的,所述装置包括:Optionally, the device includes:

分发设备密钥清除单元,用于当所述分发设备密钥验证单元的验证结果为:未通过时,收发双方量子密钥分发设备清除在被验证的相同地址区间中存储的量子密钥,并触发所述分发设备密钥协商单元工作。The distribution device key clearing unit is used to, when the verification result of the distribution device key verification unit is: failed, cause the quantum key distribution devices of both the sender and the receiver to clear the quantum keys stored in the same verified address interval and trigger the distribution device key negotiation unit to operate.

可选的,所述分发设备密钥验证单元以及所述管理设备密钥验证单元,各自包括验证请求子单元和验证执行子单元;Optionally, the distribution device key verification unit and the management device key verification unit each include a verification request subunit and a verification execution subunit;

所述验证请求子单元,用于参与验证的一方设备采用预设散列算法计算在所述地址区间中存储的量子密钥的散列值,并采用参与验证的双方设备前一次获取的通过一致性验证的量子密钥对所述散列值以及所述地址区间信息加密,并将加密后的信息发送给参与验证的另一方设备;The verification request subunit is configured to cause a device participating in the verification to calculate a hash value of the quantum key stored in the address interval using a preset hash algorithm, encrypt the hash value and the address interval information using a previously obtained quantum key that has passed consistency verification by both devices participating in the verification, and send the encrypted information to the other device participating in the verification;

所述验证执行子单元,用于所述另一方设备采用相应的密钥对接收到的信息解密后获取地址区间信息,采用所述预设散列算法计算在本地的相应地址区间中存储的量子密钥的散列值,判断计算得到的散列值与接收的散列值是否相同,若相同则向参与验证的对方设备返回验证通过应答,否则返回未通过应答。The verification execution subunit is used for the other party's device to use the corresponding key to decrypt the received information to obtain the address interval information, use the preset hash algorithm to calculate the hash value of the quantum key stored in the local corresponding address interval, and determine whether the calculated hash value is the same as the received hash value. If they are the same, a verification pass response is returned to the other party's device participating in the verification; otherwise, a failure response is returned.

可选的,所述装置包括:Optionally, the device includes:

数据设备密钥验证单元,用于所述管理设备密钥输出单元将量子密钥发送给相应数据设备后,收发双方数据设备验证接收的量子密钥的一致性,并将通过一致性验证的量子密钥作为执行数据加解密操作所采用的密钥。The data device key verification unit is used to verify the consistency of the received quantum key after the management device key output unit sends the quantum key to the corresponding data device, and use the quantum key that passes the consistency verification as the key used to perform data encryption and decryption operations.

可选的,所述分发设备密钥协商单元通过量子密钥分发协议协商获取的量子密钥,具有与其对应的密钥标签序列;相应的,Optionally, the quantum key obtained by the key negotiation unit of the distribution device through the quantum key distribution protocol has a key tag sequence corresponding thereto; accordingly,

所述分发设备密钥协商单元除了包括实现其功能的本体子单元之外,还包括映射关系建立子单元,所述映射关系建立子单元用于,建立每个量子比特的存储地址与密钥标签的一一对应关系;The distribution device key agreement unit includes, in addition to the main body subunit that realizes its functions, a mapping relationship establishment subunit, which is used to establish a one-to-one correspondence between the storage address of each quantum bit and the key label;

所述分发设备密钥发送单元发送给所述管理设备密钥验证单元的信息不仅包括量子密钥,还包括与所述量子密钥对应的密钥标签序列;The information sent by the distribution device key sending unit to the management device key verification unit includes not only the quantum key but also the key tag sequence corresponding to the quantum key;

所述管理设备密钥验证单元除了包括存储子单元、管理设备密钥验证子单元之外,还包括映射关系建立子单元;所述存储子单元,用于收发双方密钥管理设备将接收的量子密钥存储在相同地址区间;所述映射关系建立子单元,用于建立每个量子比特的存储地址与密钥标签的一一对应关系,并触发所述管理设备密钥验证子单元工作;所述管理设备密钥验证子单元,用于验证双方在所述相同地址区间中存储的量子密钥的一致性;The management device key verification unit includes, in addition to a storage subunit and a management device key verification subunit, a mapping relationship establishment subunit; the storage subunit is used for the key management devices of both the sender and the receiver to store the received quantum key in the same address interval; the mapping relationship establishment subunit is used to establish a one-to-one correspondence between the storage address of each quantum bit and the key label, and trigger the management device key verification subunit to operate; the management device key verification subunit is used to verify the consistency of the quantum keys stored by both parties in the same address interval;

所述分发设备密钥验证单元以及所述管理设备密钥验证子单元,各自包括标签验证请求子单元和标签验证执行子单元;The distribution device key verification unit and the management device key verification subunit each include a label verification request subunit and a label verification execution subunit;

所述标签验证请求子单元,用于参与验证的一方设备采用预设散列算法计算由所述量子密钥的密钥标签序列、与所述量子密钥中每个量子比特的存储地址组成的地址序列拼接而成的字符串的散列值,并采用参与验证的双方设备前一次获取的、通过一致性验证的量子密钥对所述散列值以及所述地址序列加密、或者对所述散列值以及所述密钥标签序列加密,并将加密后的信息发送给参与验证的另一方设备;The label verification request subunit is configured to cause a device participating in the verification to use a preset hash algorithm to calculate a hash value of a string consisting of a key label sequence of the quantum key and an address sequence consisting of a storage address of each quantum bit in the quantum key, and to encrypt the hash value and the address sequence, or the hash value and the key label sequence, using a quantum key previously obtained and consistency-verified by both devices participating in the verification, and to send the encrypted information to the other device participating in the verification;

所述标签验证执行子单元,用于所述另一方设备接收所述加密后的信息后,采用相应的密钥解密,根据提取的地址序列从本地获取对应的密钥标签序列,或者根据提取的密钥标签序列从本地获取对应的地址序列,并采用所述预设散列算法计算由所述密钥标签序列与所述地址序列拼接而成的字符串的散列值,判断计算得到的散列值与接收的散列值是否相同,若相同则向参与验证的对方设备返回验证通过应答,否则返回未通过应答。The label verification execution sub-unit is used for, after the other party device receives the encrypted information, to decrypt it using the corresponding key, obtain the corresponding key label sequence from the local according to the extracted address sequence, or obtain the corresponding address sequence from the local according to the extracted key label sequence, and use the preset hash algorithm to calculate the hash value of the string spliced by the key label sequence and the address sequence, to determine whether the calculated hash value is the same as the received hash value, and if so, to return a verification pass response to the other party device participating in the verification, otherwise to return a failure response.

此外,本申请还提供一种量子密钥获取方法,所述方法在利用量子密钥对数据进行加解密的数据设备上实施。请参考图8,其为本申请提供的一种量子密钥获取方法的实施例的流程图,本实施例与第一实施例内容相同的部分不再赘述,下面重点描述不同之处。本申请提供的一种量子密钥获取方法包括:In addition, the present application also provides a method for obtaining a quantum key, which is implemented on a data device that uses a quantum key to encrypt and decrypt data. Please refer to Figure 8, which is a flow chart of an embodiment of a method for obtaining a quantum key provided by the present application. The parts of this embodiment that are identical to the first embodiment are not repeated here, and the differences are described below. The method for obtaining a quantum key provided by the present application includes:

步骤801、向密钥管理设备发送密钥获取请求。Step 801: Send a key acquisition request to a key management device.

步骤802、接收所述密钥管理设备发送的通过一致性验证的量子密钥,作为进行数据加解密所采用的密钥。Step 802: Receive the quantum key that has passed consistency verification and is sent by the key management device as the key used for data encryption and decryption.

在接收所述密钥管理设备发送的通过一致性验证的量子密钥后,可以进一步验证获取的量子密钥与对端数据设备获取的量子密钥的一致性,并将通过所述一致性验证的量子密钥作为进行数据加解密所采用的密钥。After receiving the quantum key that has passed consistency verification sent by the key management device, the consistency of the obtained quantum key and the quantum key obtained by the opposite data device can be further verified, and the quantum key that has passed the consistency verification can be used as the key used for data encryption and decryption.

如果通过上述验证过程发现获取的量子密钥与对端数据设备获取的量子密钥不一致时,可以转到步骤801执行,重新向密钥管理设备发送量子密钥获取请求。If it is found through the above verification process that the obtained quantum key is inconsistent with the quantum key obtained by the peer data device, the process can go to step 801 and resend the quantum key acquisition request to the key management device.

在上述的实施例中,提供了一种量子密钥获取方法,与之相对应的,本申请还提供一种量子密钥获取装置。请参看图9,其为本申请的一种量子密钥获取装置的实施例示意图。下述描述的装置实施例仅仅是示意性的。In the above-mentioned embodiment, a quantum key acquisition method is provided. Accordingly, the present application also provides a quantum key acquisition device. Please refer to Figure 9, which is a schematic diagram of an embodiment of a quantum key acquisition device of the present application. The device embodiment described below is merely illustrative.

本实施例的一种量子密钥获取装置,所述装置部署在利用量子密钥对数据进行加解密的数据设备上,包括:密钥获取请求发送单元901,用于向密钥管理设备发送量子密钥获取请求;对称密钥接收单元902,用于接收所述密钥管理设备发送的通过一致性验证的量子密钥,作为进行数据加解密所采用的密钥。A quantum key acquisition device according to this embodiment is deployed on a data device that uses quantum keys to encrypt and decrypt data, and includes: a key acquisition request sending unit 901, configured to send a quantum key acquisition request to a key management device; and a symmetric key receiving unit 902, configured to receive a quantum key sent by the key management device that has passed consistency verification as a key used for data encryption and decryption.

此外,本申请还提供一种量子密钥存储输出方法,所述方法在向数据设备提供量子密钥的密钥管理设备上实施。请参考图10,其为本申请提供的一种量子密钥存储输出方法的实施例的流程图,本实施例与第一实施例内容相同的部分不再赘述,下面重点描述不同之处。本申请提供的一种量子密钥存储输出方法包括:In addition, the present application also provides a quantum key storage and output method, which is implemented on a key management device that provides quantum keys to data devices. Please refer to Figure 10, which is a flowchart of an embodiment of a quantum key storage and output method provided by the present application. The parts of this embodiment that are the same as the first embodiment are not repeated here, and the differences are described below. The quantum key storage and output method provided by the present application includes:

步骤1001、接收数据设备发送的密钥获取请求。Step 1001: Receive a key acquisition request sent by a data device.

如果采用实时获取量子密钥的方式,那么在本步骤之前执行下述操作:If real-time quantum key acquisition is used, perform the following operations before this step:

1)向量子密钥分发设备发送密钥获取请求;1) Send a key acquisition request to the quantum key distribution device;

2)接收量子密钥分发设备发送的量子密钥,并采用与所述对端密钥管理设备相同的地址区间存储所述量子密钥;2) receiving a quantum key sent by a quantum key distribution device and storing the quantum key in the same address range as the peer key management device;

3)验证在所述地址区间中存储的量子密钥与所述对端密钥管理设备在相同地址区间中存储的量子密钥的一致性,并将通过一致性验证的量子密钥作为可发送给数据设备的量子密钥。3) Verifying the consistency of the quantum key stored in the address interval and the quantum key stored in the same address interval by the peer key management device, and using the quantum key that passes the consistency verification as the quantum key that can be sent to the data device.

步骤1002、按照与对端密钥管理设备协商的相同地址区间,将通过一致性验证的量子密钥发送给所述数据设备。Step 1002: Send the quantum key that has passed consistency verification to the data device according to the same address range negotiated with the peer key management device.

如果采用预获取量子密钥的方式,那么在步骤1001之后、在本步骤之前执行下述操作:If the method of pre-acquiring the quantum key is adopted, then the following operations are performed after step 1001 and before this step:

1)向量子密钥分发设备发送所述密钥获取请求;1) sending the key acquisition request to the quantum key distribution device;

2)接收量子密钥分发设备发送的量子密钥,并采用与所述对端密钥管理设备相同的地址区间存储所述量子密钥;2) receiving a quantum key sent by a quantum key distribution device and storing the quantum key in the same address range as the peer key management device;

3)验证在所述地址区间中存储的量子密钥与所述对端密钥管理设备在相同地址区间中存储的量子密钥的一致性。3) Verifying the consistency of the quantum key stored in the address interval and the quantum key stored in the same address interval by the peer key management device.

不管采用实时获取方式还是预获取方式,如果执行一致性验证后发现在所述地址区间中存储的量子密钥与所述对端管理设备在相同地址区间中存储的量子密钥不一致,可以清除在所述地址区间中存储的量子密钥,重新向量子密钥分发设备发送密钥获取请求。Regardless of whether the real-time acquisition method or the pre-acquisition method is adopted, if it is found after consistency verification that the quantum key stored in the address interval is inconsistent with the quantum key stored in the same address interval of the peer management device, the quantum key stored in the address interval can be cleared and a key acquisition request can be resent to the quantum key distribution device.

在上述的实施例中,提供了一种量子密钥存储输出方法,与之相对应的,本申请还提供一种量子密钥存储输出装置。请参看图11,其为本申请的一种量子密钥存储输出装置的实施例示意图。下述描述的装置实施例仅仅是示意性的。In the above-mentioned embodiments, a quantum key storage and output method is provided. Accordingly, this application also provides a quantum key storage and output device. Please refer to Figure 11, which is a schematic diagram of an embodiment of a quantum key storage and output device of this application. The device embodiment described below is merely illustrative.

本实施例的一种量子密钥存储输出装置,所述装置部署在向数据设备提供量子密钥的密钥管理设备上,包括:密钥获取请求接收单元1101,用于接收数据设备发送的密钥获取请求;对称密钥输出单元1102,用于按照与对端密钥管理设备协商的相同地址区间,将通过一致性验证的量子密钥发送给所述数据设备。A quantum key storage and output device according to this embodiment is deployed on a key management device that provides quantum keys to data devices, and includes: a key acquisition request receiving unit 1101, configured to receive a key acquisition request sent by a data device; and a symmetric key output unit 1102, configured to send a quantum key that has passed consistency verification to the data device according to the same address range negotiated with the peer key management device.

此外,本申请还提供一种量子密钥分发存储方法,所述方法在量子密钥分发设备上实施。请参考图12,其为本申请提供的一种量子密钥分发存储方法的实施例的流程图,本实施例与第一实施例内容相同的部分不再赘述,下面重点描述不同之处。本申请提供的一种量子密钥分发存储方法包括:In addition, the present application also provides a quantum key distribution and storage method, which is implemented on a quantum key distribution device. Please refer to Figure 12, which is a flowchart of an embodiment of a quantum key distribution and storage method provided by the present application. The parts of this embodiment that are the same as the first embodiment are not repeated here, and the differences are described below. The quantum key distribution and storage method provided by the present application includes:

步骤1201、与对端量子密钥分发设备通过量子密钥分发协议协商量子密钥,并将获取的量子密钥存储在与所述对端量子密钥分发设备相同的地址区间中。Step 1201: negotiate a quantum key with a peer quantum key distribution device through a quantum key distribution protocol, and store the acquired quantum key in the same address range as that of the peer quantum key distribution device.

步骤1202、验证在所述地址区间中存储的量子密钥与所述对端量子密钥分发设备在相同地址区间中存储的量子密钥的一致性。Step 1202: Verify the consistency of the quantum key stored in the address interval and the quantum key stored in the same address interval by the peer quantum key distribution device.

步骤1203、根据接收到的来自密钥管理设备的量子密钥获取请求,按照与所述对端量子密钥分发设备协商的相同地址区间,将通过一致性验证的量子密钥发送给所述密钥管理设备。Step 1203: Based on the quantum key acquisition request received from the key management device, the quantum key that has passed consistency verification is sent to the key management device according to the same address range negotiated with the peer quantum key distribution device.

如果在步骤1202中执行一致性验证后发现,在所述地址区间中存储的量子密钥与所述对端量子密钥分发设备在相同地址区间中存储的量子密钥不一致,则可以清除在所述地址区间中存储的量子密钥,并转到步骤1201执行。If, after consistency verification is performed in step 1202, it is found that the quantum key stored in the address interval is inconsistent with the quantum key stored in the same address interval by the peer quantum key distribution device, the quantum key stored in the address interval can be cleared and the process proceeds to step 1201 for execution.

需要说明的是,如果采用实时获取量子密钥的方式,所述来自密钥管理设备的密钥获取请求,可以是在步骤1202之后接收到的;如果采用预获取方式,所述请求可以是在步骤1201之前接收到的。It should be noted that if a real-time quantum key acquisition method is adopted, the key acquisition request from the key management device may be received after step 1202; if a pre-acquisition method is adopted, the request may be received before step 1201.

在上述的实施例中,提供了一种量子密钥分发存储方法,与之相对应的,本申请还提供一种量子密钥分发存储装置。请参看图13,其为本申请的一种量子密钥分发存储装置的实施例示意图。下述描述的装置实施例仅仅是示意性的。In the above-mentioned embodiments, a quantum key distribution storage method is provided. Accordingly, this application also provides a quantum key distribution storage device. Please refer to Figure 13, which is a schematic diagram of an embodiment of a quantum key distribution storage device of this application. The device embodiment described below is merely illustrative.

本实施例的一种量子密钥分发存储装置,所述装置在量子密钥分发设备上实施,包括:密钥分发存储单元1301,用于与对端量子密钥分发设备通过量子密钥分发协议协商量子密钥,并将获取的量子密钥存储在与所述对端量子密钥分发设备相同的地址区间中;密钥验证单元1302,用于验证在所述地址区间中存储的量子密钥与所述对端量子密钥分发设备在相同地址区间中存储的量子密钥的一致性;对称密钥发送单元1303,用于根据接收到的来自密钥管理设备的密钥获取请求,按照与所述对端量子密钥分发设备协商的相同地址区间,将通过一致性验证的量子密钥发送给所述密钥管理设备。A quantum key distribution storage device according to this embodiment is implemented on a quantum key distribution device, including: a key distribution storage unit 1301, configured to negotiate a quantum key with a peer quantum key distribution device through a quantum key distribution protocol, and store the acquired quantum key in the same address interval as that of the peer quantum key distribution device; a key verification unit 1302, configured to verify the consistency of the quantum key stored in the address interval with the quantum key stored in the same address interval by the peer quantum key distribution device; and a symmetric key sending unit 1303, configured to send the quantum key that has passed consistency verification to the key management device in accordance with the same address interval negotiated with the peer quantum key distribution device, based on a key acquisition request received from the key management device.

此外,本申请还提供一种量子密钥输出系统。请参考图14,其为本申请提供的一种量子密钥输出系统的实施例的示意图。本申请提供的一种量子密钥输出系统包括:分别部署于收发双方的两个子系统,其中一个子系统包括:量子密钥获取装置1401-1、量子密钥存储输出装置1402-1、以及量子密钥分发存储装置1403-1,另一个子系统包括:量子密钥获取装置1401-2、量子密钥存储输出装置1402-2、以及量子密钥分发存储装置1403-2。In addition, this application also provides a quantum key output system. Please refer to Figure 14, which is a schematic diagram of an embodiment of a quantum key output system provided by this application. The quantum key output system provided by this application includes: two subsystems deployed at the sender and receiver, respectively, one of which includes: a quantum key acquisition device 1401-1, a quantum key storage and output device 1402-1, and a quantum key distribution storage device 1403-1; the other subsystem includes: a quantum key acquisition device 1401-2, a quantum key storage and output device 1402-2, and a quantum key distribution storage device 1403-2.

所述量子密钥输出系统可以采用实时获取量子密钥的工作方式,也可以采用预获取量子密钥的工作方式。采用这两种工作方式时,各设备之间的交互流程,在关于量子密钥输出方法的实施例中已经做过详细描述,此处不再赘述。The quantum key output system can operate in either a real-time quantum key acquisition mode or a pre-acquisition mode. The interaction between the devices in these two modes has been described in detail in the embodiments of the quantum key output method and will not be repeated here.

此外,本申请还提供一种用于验证量子密钥存储一致性的方法,所述方法在参与验证的第一设备和第二设备上实施。请参考图15,其为本申请提供的一种用于验证量子密钥存储一致性的方法实施例的流程图,本实施例与第一实施例内容相同的部分不再赘述,下面重点描述不同之处。本申请提供的一种用于验证量子密钥存储一致性的方法包括:In addition, the present application also provides a method for verifying the consistency of quantum key storage, which is implemented on a first device and a second device involved in the verification. Please refer to Figure 15, which is a flowchart of an embodiment of a method for verifying the consistency of quantum key storage provided by the present application. The parts of this embodiment that are the same as the first embodiment are not repeated here, and the differences are described below. The method for verifying the consistency of quantum key storage provided by the present application includes:

步骤1501:第一设备将通过量子密钥协商过程获取的、表征待验证量子密钥的信息,以及存储所述待验证量子密钥的地址区间信息,发送给第二设备。Step 1501: The first device sends information representing the quantum key to be verified, obtained through the quantum key agreement process, and address range information storing the quantum key to be verified, to the second device.

所述表征待验证量子密钥的信息由与量子密钥比特数对应的子信息单元组成,每个子信息单元是所述待验证量子密钥中不同量子比特的唯一标识,且与被标识量子比特的存储地址一一对应。The information characterizing the quantum key to be verified is composed of sub-information units corresponding to the number of quantum key bits. Each sub-information unit is a unique identifier of a different quantum bit in the quantum key to be verified, and has a one-to-one correspondence with the storage address of the identified quantum bit.

所述表征待验证量子密钥的信息可以包括:待验证量子密钥本身,所述量子密钥中的每个量子比特即为所述子信息单元。采用这种方式时,所述第一设备可以采用预设的散列算法计算所述待验证量子密钥的散列值,并将所述散列值、以及所述地址区间信息发送给所述第二设备。The information representing the quantum key to be verified may include the quantum key to be verified, with each qubit in the quantum key serving as the sub-information unit. In this manner, the first device may calculate a hash value of the quantum key to be verified using a preset hash algorithm and transmit the hash value and the address range information to the second device.

所述表征待验证量子密钥的信息还可以包括:待验证量子密钥的密钥标签序列,所述密钥标签序列中的每个密钥标签即为所述子信息单元;所述存储待验证量子密钥的地址区间信息包括:所述待验证量子密钥中每个量子比特的存储地址组成的地址序列。采用这种方式时,所述第一设备可以采用预设散列算法计算由所述密钥标签序列与所述地址序列拼接而成的字符串的散列值,并将所述散列值以及所述地址序列、或者所述散列值以及所述密钥标签序列发送给参与验证的所述第二设备。The information representing the quantum key to be verified may also include: a key tag sequence of the quantum key to be verified, where each key tag in the key tag sequence is the sub-information unit; and the address range information storing the quantum key to be verified includes: an address sequence consisting of the storage address of each quantum bit in the quantum key to be verified. When using this method, the first device can use a preset hash algorithm to calculate a hash value of a string composed of the key tag sequence and the address sequence, and send the hash value and the address sequence, or the hash value and the key tag sequence, to the second device participating in the verification.

在具体实施时,可以采用量子比特的时间戳信息作为所述密钥标签。During specific implementation, the timestamp information of the quantum bit can be used as the key tag.

步骤1502:第二设备通过将接收的信息与本地的相应信息进行比对,判断双方设备与所述地址区间对应的、表征待验证量子密钥的信息是否相同,若相同,向第一设备返回验证通过应答,否则返回未通过应答。Step 1502: The second device compares the received information with the local corresponding information to determine whether the information corresponding to the address interval and representing the quantum key to be verified on both devices is the same. If they are the same, a verification success response is returned to the first device; otherwise, a failure response is returned.

当所述表征待验证量子密钥的信息为待验证量子密钥本身时,所述第二设备可以从接收的信息中提取存储待验证量子密钥的地址区间信息,采用所述预设的散列算法,计算在本地相同地址区间中存储的量子密钥的散列值,用计算得到的散列值与接收的散列值进行比较,若相同,则判定双方设备与所述地址区间对应的、表征待验证量子密钥的信息是相同的,向所述第一设备返回验证通过应答,否则返回未通过应答。When the information representing the quantum key to be verified is the quantum key to be verified itself, the second device can extract the address interval information storing the quantum key to be verified from the received information, use the preset hash algorithm to calculate the hash value of the quantum key stored in the same local address interval, and compare the calculated hash value with the received hash value. If they are the same, it is determined that the information representing the quantum key to be verified corresponding to the address interval of both devices is the same, and a verification success response is returned to the first device; otherwise, a failure response is returned.

当所述表征待验证量子密钥的信息为待验证量子密钥的密钥标签序列时,所述第二设备可以根据从接收信息中提取的地址序列从本地获取对应的密钥标签序列,或者根据提取的密钥标签序列从本地获取对应的地址序列,采用所述预设散列算法计算由所述密钥标签序列与所述地址序列拼接而成的字符串的散列值;判断计算得到的散列值与接收的散列值是否相同,若相同,则判定双方设备与所述地址区间对应的、表征待验证量子密钥的信息是相同的,向所述第一设备返回验证通过应答,否则返回未通过应答。When the information representing the quantum key to be verified is a key tag sequence of the quantum key to be verified, the second device may obtain the corresponding key tag sequence locally based on the address sequence extracted from the received information, or obtain the corresponding address sequence locally based on the extracted key tag sequence, and use the preset hash algorithm to calculate a hash value of a string formed by splicing the key tag sequence and the address sequence; determine whether the calculated hash value is the same as the received hash value; if so, determine that the information corresponding to the address interval and representing the quantum key to be verified of both devices is the same, and return a verification success response to the first device; otherwise, return a failure response.

需要说明的是,本申请提供的用于验证量子密钥存储一致性的方法可以在需要进行量子密钥存储一致性验证的双方设备上实施,所述双方设备可以是收发双方量子密钥分发设备,也可以是收发双方密钥管理设备。It should be noted that the method for verifying the consistency of quantum key storage provided in this application can be implemented on the devices of both parties that need to perform quantum key storage consistency verification. The devices of both parties can be quantum key distribution devices of the sender and receiver, or key management devices of the sender and receiver.

此外,在执行上述步骤1501时,所述第一设备可以采用与所述第二设备预先商定的密钥对待发送信息加密;相应的,在执行步骤1502时,所述第二设备接收所述第一设备发送的信息后,采用相应密钥解密后,执行后续的比对以及判断操作。In addition, when executing the above step 1501, the first device can use the key pre-agreed with the second device to encrypt the information to be sent; accordingly, when executing step 1502, after the second device receives the information sent by the first device, it uses the corresponding key to decrypt it and performs subsequent comparison and judgment operations.

通过上面的描述可以看出,本申请提供的用于验证量子密钥存储一致性的方法,参与验证的双方设备通过将双方与相同地址区间对应的、表征待验证量子密钥的信息进行比对,判断双方在相同地址区间存储的量子密钥是否相同,从而为双方向外输出对称的量子密钥提供依据,为用户数据的安全、高效传输提供保障。特别是采用基于密钥标签的验证方法,利用了密钥标签可以唯一标识量子比特的特性、以及密钥标签与量子比特存储地址的对应关系,从而不用传输量子密钥就可以实现一致性验证,进一步保障了量子密钥的安全。As can be seen from the above description, the method for verifying quantum key storage consistency provided by this application involves the two devices participating in the verification comparing the information corresponding to the same address interval and representing the quantum key to be verified. This determines whether the quantum keys stored in the same address interval are the same, thereby providing a basis for both parties to output symmetric quantum keys, ensuring the secure and efficient transmission of user data. In particular, the key tag-based verification method utilizes the characteristic that key tags can uniquely identify quantum bits, as well as the corresponding relationship between key tags and quantum bit storage addresses, thereby achieving consistency verification without transmitting quantum keys, further ensuring the security of quantum keys.

在上述的实施例中,提供了一种用于验证量子密钥存储一致性的方法,与之相对应的,本申请还提供一种用于验证量子密钥存储一致性的装置。请参看图16,其为本申请的一种用于验证量子密钥存储一致性的装置的实施例示意图。下述描述的装置实施例仅仅是示意性的。In the above-mentioned embodiment, a method for verifying the consistency of quantum key storage is provided. Accordingly, this application also provides an apparatus for verifying the consistency of quantum key storage. Please refer to Figure 16, which is a schematic diagram of an embodiment of the apparatus for verifying the consistency of quantum key storage in this application. The apparatus embodiment described below is merely illustrative.

本实施例的一种用于验证量子密钥存储一致性的装置,包括:密钥验证请求发送单元1601,用于第一设备将通过量子密钥协商过程获取的、表征待验证量子密钥的信息,以及存储所述待验证量子密钥的地址区间信息,发送给第二设备;密钥验证执行单元1602,用于所述第二设备通过将接收的信息与本地的相应信息进行比对,判断双方设备与所述地址区间对应的、表征待验证量子密钥的信息是否相同,若相同,向所述第一设备返回验证通过应答,否则返回未通过应答。An apparatus for verifying quantum key storage consistency according to this embodiment includes: a key verification request sending unit 1601, configured for a first device to send information representing a quantum key to be verified, obtained through a quantum key agreement process, and address interval information storing the quantum key to be verified, to a second device; and a key verification execution unit 1602, configured for the second device to compare the received information with local corresponding information to determine whether the information representing the quantum key to be verified corresponding to the address interval on both devices is identical; if so, returning a verification success response to the first device; otherwise, returning a failure response.

本申请虽然以较佳实施例公开如上,但其并不是用来限定本申请,任何本领域技术人员在不脱离本申请的精神和范围内,都可以做出可能的变动和修改,因此本申请的保护范围应当以本申请权利要求所界定的范围为准。Although the present application is disclosed as above with the preferred embodiments, it is not intended to limit the present application. Any person skilled in the art may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.

在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.

内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and/or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

1、计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括非暂存电脑可读媒体(transitory media),如调制的数据信号和载波。1. Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include non-transitory media such as modulated data signals and carrier waves.

2、本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。2. 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 take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

Claims (37)

1.一种量子密钥输出方法,其特征在于,包括:1. A quantum key output method, characterized in that it includes: 收发双方数据设备分别向各自的密钥管理设备发送密钥获取请求;Both the transmitting and receiving data devices send key acquisition requests to their respective key management devices. 收发双方密钥管理设备QKS接收所述密钥获取请求后,将通过一致性验证的量子密钥发送给相应数据设备,供相应数据设备执行数据加解密操作;After receiving the key acquisition request, the QKS key management device of both the sender and receiver will send the quantum key that has passed the consistency verification to the corresponding data device for the corresponding data device to perform data encryption and decryption operations; 其中,所述一致性验证是指,收发双方密钥管理设备将从各自对应的量子密钥分发设备QKD获取的量子密钥存储在相同地址区间后,验证双方在所述相同地址区间中存储的量子密钥是否相同;若相同,则视为所述的通过一致性验证;The consistency verification refers to the process whereby the key management devices of both the sender and receiver store the quantum keys obtained from their respective quantum key distribution devices (QKD) in the same address range, and then verify whether the quantum keys stored in the same address range are the same. If they are the same, then the consistency verification is considered to have passed. 所述收发双方密钥管理设备发送给相应数据设备的通过一致性验证的量子密钥是按照下述方式获得:The quantum key that has passed consistency verification and is sent by the key management devices of both the sender and receiver to the corresponding data devices is obtained in the following manner: 收发双方密钥管理设备分别向各自对应的量子密钥分发设备发送所述密钥获取请求,所述各自对应的量子密钥分发设备称为收发双方量子密钥分发设备;The key management devices of both the sender and receiver send the key acquisition request to their respective corresponding quantum key distribution devices, which are referred to as the sender and receiver quantum key distribution devices. 所述收发双方量子密钥分发设备通过量子密钥分发协议协商量子密钥,并采用相同地址区间存储所述量子密钥,验证双方在所述相同地址区间中存储的量子密钥的一致性,并将通过一致性验证的量子密钥作为可供相应的收发双方密钥管理设备获取的量子密钥;The quantum key distribution devices of the sender and receiver negotiate quantum keys through a quantum key distribution protocol and store the quantum keys in the same address range. They verify the consistency of the quantum keys stored in the same address range by both parties and use the quantum keys that pass the consistency verification as quantum keys that can be obtained by the corresponding key management devices of the sender and receiver. 所述收发双方量子密钥分发设备将存储在相同地址区间的并通过一致性验证的量子密钥发送给相应的收发双方密钥管理设备;The quantum key distribution devices of the sender and receiver will send the quantum keys stored in the same address range and verified for consistency to the corresponding key management devices of the sender and receiver. 所述收发双方密钥管理设备将接收的量子密钥存储在相同地址区间中,并验证双方在所述相同地址区间中存储的量子密钥的一致性;The key management devices for both the sender and receiver store the received quantum keys in the same address range and verify the consistency of the quantum keys stored by both parties in the same address range. 相应的,所述将通过一致性验证的量子密钥发送给相应数据设备,包括:Accordingly, the step of sending the quantum key that has passed consistency verification to the corresponding data device includes: 所述收发双方密钥管理设备从通过一致性验证的量子密钥中,选取在相同地址区间存储的量子密钥,发送给相应数据设备。The key management devices of both the sender and receiver select quantum keys stored in the same address range from the quantum keys that have passed consistency verification and send them to the corresponding data devices. 2.根据权利要求1所述的量子密钥输出方法,其特征在于,所述通过一致性验证的量子密钥是在收发双方数据设备发送密钥获取请求之前,预先存储在所述收发双方密钥管理设备中的。2. The quantum key output method according to claim 1, wherein the quantum key that has passed the consistency verification is pre-stored in the key management device of the sender and receiver before the data devices of both parties send a key acquisition request. 3.根据权利要求2所述的量子密钥输出方法,其特征在于,在执行所述收发双方密钥管理设备向各自的量子密钥分发设备发送密钥获取请求之前,执行下述操作:3. The quantum key output method according to claim 2, characterized in that, before the key management devices of both the sender and receiver send key acquisition requests to their respective quantum key distribution devices, the following operations are performed: 收发双方量子密钥分发设备将可供获取的量子密钥数量通知给各自的密钥管理设备。The quantum key distribution devices of both the sender and receiver notify their respective key management devices of the number of available quantum keys. 4.根据权利要求1所述的量子密钥输出方法,其特征在于,所述通过一致性验证的量子密钥是在所述收发双方密钥管理设备接收所述密钥获取请求后、在所述将通过一致性验证的量子密钥发送给相应数据设备之前存储在所述收发双方密钥管理设备中的。4. The quantum key output method according to claim 1, wherein the quantum key that has passed the consistency verification is stored in the key management device of the sender and receiver after the key management device of the sender and receiver receives the key acquisition request and before the quantum key that has passed the consistency verification is sent to the corresponding data device. 5.根据权利要求1所述的量子密钥输出方法,其特征在于,当所述收发双方密钥管理设备验证双方在所述相同地址区间中存储的量子密钥不一致时,执行下述操作:5. The quantum key output method according to claim 1, characterized in that, when the key management devices of the sender and receiver verify that the quantum keys stored by both parties in the same address range are inconsistent, the following operation is performed: 清除在所述相同地址区间中存储的量子密钥,并转到向各自的量子密钥分发设备发送密钥获取请求的步骤执行。The quantum keys stored in the same address range are cleared, and the process proceeds to the step of sending key acquisition requests to the respective quantum key distribution devices. 6.根据权利要求1所述的量子密钥输出方法,其特征在于,当所述收发双方量子密钥分发设备验证双方在所述相同地址区间中存储的量子密钥不一致时,执行下述操作:6. The quantum key output method according to claim 1, characterized in that, when the quantum key distribution devices of the transmitting and receiving parties verify that the quantum keys stored by both parties in the same address range are inconsistent, the following operation is performed: 清除在所述相同地址区间中存储的量子密钥,并转到收发双方量子密钥分发设备通过量子密钥分发协议协商量子密钥的步骤执行。The quantum key stored in the same address range is cleared, and the process proceeds to the step of negotiating the quantum key through the quantum key distribution protocol between the sending and receiving quantum key distribution devices. 7.根据权利要求1所述的量子密钥输出方法,其特征在于,包括:所述收发双方量子密钥分发设备定期执行所述验证双方在所述相同地址区间中存储的量子密钥一致性的操作。7. The quantum key output method according to claim 1, characterized in that it includes: the quantum key distribution devices of the sending and receiving parties periodically performing the operation of verifying the consistency of the quantum keys stored by both parties in the same address range. 8.根据权利要求1所述的量子密钥输出方法,其特征在于,所述收发双方量子密钥分发设备验证双方在所述相同地址区间中存储的量子密钥的一致性,以及所述收发双方密钥管理设备验证双方在所述相同地址区间中存储的量子密钥的一致性,分别采用如下方式实现:8. The quantum key output method according to claim 1, characterized in that the quantum key distribution device of the sending and receiving parties verifies the consistency of the quantum keys stored by both parties in the same address range, and the key management device of the sending and receiving parties verifies the consistency of the quantum keys stored by both parties in the same address range, respectively, are implemented in the following ways: 其中一方设备采用预设散列算法计算在所述地址区间中存储的量子密钥的散列值,并采用双方设备前一次获取的通过一致性验证的量子密钥对所述散列值以及所述地址区间信息加密,并将加密后的信息发送给另一方设备;One device uses a preset hash algorithm to calculate the hash value of the quantum key stored in the address range, and uses the quantum key that both devices previously obtained and passed the consistency verification to encrypt the hash value and the address range information, and sends the encrypted information to the other device. 所述另一方设备采用相应的密钥对接收到的信息解密后获取地址区间信息,采用所述预设散列算法计算在本地的相应地址区间中存储的量子密钥的散列值,判断计算得到的散列值与接收的散列值是否相同,若相同则向对方设备返回验证通过应答,否则返回未通过应答。The other device decrypts the received information using the corresponding key to obtain the address range information, calculates the hash value of the quantum key stored in the corresponding address range locally using the preset hash algorithm, and determines whether the calculated hash value is the same as the received hash value. If they are the same, it returns a verification success response to the other device; otherwise, it returns a failure response. 9.根据权利要求1所述的量子密钥输出方法,其特征在于,在所述收发双方密钥管理设备将量子密钥发送给相应数据设备后,执行下述操作:9. The quantum key output method according to claim 1, characterized in that, after the key management devices of both the sender and receiver send the quantum key to the corresponding data device, the following operation is performed: 收发双方数据设备验证接收的量子密钥的一致性,并将通过一致性验证的量子密钥作为执行数据加解密操作所采用的密钥。The sending and receiving data devices verify the consistency of the received quantum key and use the quantum key that has passed the consistency verification as the key used to perform data encryption and decryption operations. 10.根据权利要求9所述的量子密钥输出方法,其特征在于,当所述收发双方数据设备验证双方获取的量子密钥不一致时,转到所述收发双方数据设备分别向各自的密钥管理设备发送密钥获取请求的步骤执行。10. The quantum key output method according to claim 9, characterized in that, when the data devices of the transmitting and receiving parties verify that the quantum keys obtained by both parties are inconsistent, the process proceeds to the step of the data devices of the transmitting and receiving parties respectively sending key acquisition requests to their respective key management devices. 11.根据权利要求9所述的量子密钥输出方法,其特征在于,所述收发双方数据设备验证获取的量子密钥的一致性,包括:11. The quantum key output method according to claim 9, characterized in that the verification of the consistency of the obtained quantum key by the data devices of both the sender and receiver includes: 其中一方设备采用预设散列算法计算所述获取的量子密钥的散列值,并采用双方设备前一次获取的通过一致性验证的量子密钥对所述散列值加密,并将加密后的信息发送给另一方设备;One device uses a preset hash algorithm to calculate the hash value of the acquired quantum key, encrypts the hash value using the quantum key that was previously acquired by both devices and passed the consistency verification, and sends the encrypted information to the other device. 所述另一方设备采用相应的密钥对接收到的信息解密后,采用所述预设散列算法计算本地获取的量子密钥的散列值,判断计算得到的散列值与接收的散列值是否相同,若相同则向对方设备返回验证通过应答,否则返回未通过应答。After the other device decrypts the received information using the corresponding key, it calculates the hash value of the locally acquired quantum key using the preset hash algorithm, and determines whether the calculated hash value is the same as the received hash value. If they are the same, it returns a verification success response to the other device; otherwise, it returns a failure response. 12.根据权利要求1所述的量子密钥输出方法,其特征在于,所述收发双方量子密钥分发设备通过量子密钥分发协议协商获取的量子密钥,具有与其对应的密钥标签序列,所述密钥标签序列中的每个密钥标签是所述量子密钥中不同量子比特的唯一标识;12. The quantum key output method according to claim 1, wherein the quantum key obtained by the quantum key distribution devices of the sender and receiver through the quantum key distribution protocol has a corresponding key tag sequence, and each key tag in the key tag sequence is a unique identifier for different qubits in the quantum key; 相应的,所述收发双方量子密钥分发设备采用相同地址区间存储所述量子密钥后,执行下述操作:建立每个量子比特的存储地址与密钥标签的一一对应关系;Accordingly, after the quantum key distribution devices of the sender and receiver use the same address range to store the quantum key, they perform the following operation: establish a one-to-one correspondence between the storage address of each quantum bit and the key tag; 所述收发双方量子密钥分发设备发送给相应密钥管理设备的信息不仅包括量子密钥,还包括与所述量子密钥对应的密钥标签序列;所述收发双方密钥管理设备将接收的量子密钥存储在相同地址区间后,执行下述操作:建立每个量子比特的存储地址与密钥标签的一一对应关系;The information sent by the quantum key distribution devices of the sender and receiver to the corresponding key management devices includes not only the quantum key, but also the key tag sequence corresponding to the quantum key; after storing the received quantum key in the same address range, the key management devices of the sender and receiver perform the following operation: establish a one-to-one correspondence between the storage address of each quantum bit and the key tag; 所述收发双方量子密钥分发设备验证双方在所述相同地址区间中存储的量子密钥的一致性,以及所述收发双方密钥管理设备验证双方在所述相同地址区间中存储的量子密钥的一致性,分别采用如下方式实现:The quantum key distribution devices of the sending and receiving parties verify the consistency of the quantum keys stored by both parties in the same address range, and the key management devices of the sending and receiving parties verify the consistency of the quantum keys stored by both parties in the same address range, respectively, in the following ways: 其中一方设备采用预设散列算法计算由所述量子密钥的密钥标签序列、与所述量子密钥中每个量子比特的存储地址组成的地址序列拼接而成的字符串的散列值,并采用双方设备前一次获取的、通过一致性验证的量子密钥对所述散列值以及所述地址序列加密、或者对所述散列值以及所述密钥标签序列加密,并将加密后的信息发送给另一方设备;One device uses a preset hash algorithm to calculate the hash value of a string formed by concatenating the key tag sequence of the quantum key and the address sequence consisting of the storage address of each quantum bit in the quantum key. It then uses the quantum key previously obtained by both devices and verified for consistency to encrypt the hash value and the address sequence, or encrypts the hash value and the key tag sequence, and sends the encrypted information to the other device. 所述另一方设备采用相应的密钥解密后,根据提取的地址序列从本地获取对应的密钥标签序列,或者根据提取的密钥标签序列从本地获取对应的地址序列,并采用所述预设散列算法计算由所述密钥标签序列与所述地址序列拼接而成的字符串的散列值,判断计算得到的散列值与接收的散列值是否相同,若相同则向对方设备返回验证通过应答,否则返回未通过应答。After the other device decrypts the string using the corresponding key, it retrieves the corresponding key tag sequence from the local machine based on the extracted address sequence, or retrieves the corresponding address sequence from the local machine based on the extracted key tag sequence. It then uses the preset hash algorithm to calculate the hash value of the string formed by concatenating the key tag sequence and the address sequence. It then determines whether the calculated hash value is the same as the received hash value. If they are the same, it returns a verification success response to the other device; otherwise, it returns a failure response. 13.根据权利要求12所述的量子密钥输出方法,其特征在于,收发双方密钥管理设备发送给相应数据设备的信息不仅包括量子密钥,还包括所述量子密钥的密钥标签序列;13. The quantum key output method according to claim 12, wherein the information sent by the key management devices of both the sender and receiver to the corresponding data devices includes not only the quantum key, but also the key tag sequence of the quantum key; 相应的,收发双方数据设备接收各自的密钥管理设备发送的上述信息后,执行下述操作验证收发双方数据设备获取的量子密钥的一致性,并在不一致时转到分别向各自的密钥管理设备发送密钥获取请求的步骤执行:Accordingly, after receiving the aforementioned information from their respective key management devices, the transmitting and receiving data devices perform the following operations to verify the consistency of the quantum keys obtained by the transmitting and receiving data devices, and if there is a discrepancy, proceed to the step of sending key acquisition requests to their respective key management devices respectively: 其中一方设备采用预设散列算法计算由所述获取的量子密钥和密钥标签序列拼接而成的字符串的散列值,并采用双方设备前一次获取的、通过一致性验证的量子密钥对所述散列值以及密钥标签序列加密,并将加密后的信息发送给另一方设备;One device uses a preset hash algorithm to calculate the hash value of the string formed by concatenating the acquired quantum key and key tag sequence, and uses the quantum key previously acquired by both devices and verified for consistency to encrypt the hash value and key tag sequence, and sends the encrypted information to the other device. 所述另一方设备采用相应的密钥解密后,根据提取的密钥标签序列从本地获取对应的量子密钥,并采用所述预设散列算法计算由所述量子密钥和密钥标签序列拼接而成的字符串的散列值,判断计算得到的散列值与接收的散列值是否相同,若相同,则向对方设备返回验证通过应答,否则返回未通过应答。After the other device decrypts the data using the corresponding key, it obtains the corresponding quantum key from the local device based on the extracted key tag sequence, and uses the preset hash algorithm to calculate the hash value of the string formed by concatenating the quantum key and the key tag sequence. It then determines whether the calculated hash value is the same as the received hash value. If they are the same, it returns a verification success response to the other device; otherwise, it returns a failure response. 14.根据权利要求12所述的量子密钥输出方法,其特征在于,所述密钥标签包括:量子比特的时间戳信息,所述时间戳信息是收发双方量子密钥分发设备在协商量子密钥的过程中获取的。14. The quantum key output method according to claim 12, wherein the key tag includes: timestamp information of the quantum bit, the timestamp information being obtained by the quantum key distribution devices of both the sender and receiver during the process of negotiating the quantum key. 15.根据权利要求1所述的量子密钥输出方法,其特征在于,各个设备之间经由经典信道的交互过程,都是基于HTTPS连接的。15. The quantum key output method according to claim 1, wherein the interaction process between the devices via classical channels is based on HTTPS connections. 16.根据权利要求1所述的量子密钥输出方法,其特征在于,各个设备在进行交互之前,进行双向身份认证,并在认证通过后执行后续交互操作。16. The quantum key output method according to claim 1, characterized in that each device performs two-way authentication before interacting, and performs subsequent interaction operations after successful authentication. 17.一种量子密钥输出装置,其特征在于,包括:17. A quantum key output device, characterized in that it comprises: 数据设备密钥请求单元,用于收发双方数据设备分别向各自的密钥管理设备发送密钥获取请求;The data device key request unit is used for the data devices of both the transmitting and receiving parties to send key acquisition requests to their respective key management devices. 管理设备密钥输出单元,用于收发双方密钥管理设备接收所述密钥获取请求后,将从相应量子密钥分发设备获取的、通过收发双方密钥管理设备一致性验证的量子密钥发送给相应数据设备,供相应数据设备执行数据加解密操作;The management device key output unit is used to send the quantum key obtained from the corresponding quantum key distribution device and verified by the key management devices of both the sender and receiver after receiving the key acquisition request to the corresponding data device, so that the corresponding data device can perform data encryption and decryption operations. 其中,所述装置还包括分发设备密钥协商单元、分发设备密钥验证单元、分发设备密钥发送单元、以及管理设备密钥验证单元;The device further includes a distribution device key negotiation unit, a distribution device key verification unit, a distribution device key sending unit, and a management device key verification unit; 所述分发设备密钥协商单元,用于收发双方量子密钥分发设备通过量子密钥分发协议协商量子密钥,并采用相同地址区间存储所述量子密钥;The key negotiation unit of the distribution device is used for the quantum key distribution devices of the sending and receiving parties to negotiate the quantum key through the quantum key distribution protocol and to store the quantum key in the same address range; 所述分发设备密钥验证单元,用于当所述分发设备密钥协商单元完成量子密钥协商过程、并采用相同地址区间存储所述量子密钥后,收发双方量子密钥分发设备验证双方在所述相同地址区间中存储的量子密钥的一致性,并将通过一致性验证的量子密钥作为可发送给密钥管理设备的量子密钥;The distribution device key verification unit is used to verify the consistency of the quantum keys stored in the same address range by both parties after the distribution device key negotiation unit completes the quantum key negotiation process and stores the quantum keys in the same address range, and to use the quantum key that has passed the consistency verification as the quantum key that can be sent to the key management device. 所述分发设备密钥发送单元,用于收发双方量子密钥分发设备将存储在相同地址区间的量子密钥发送给相应的密钥管理设备;The key sending unit of the distribution device is used for the quantum key distribution devices of both the sender and receiver to send the quantum keys stored in the same address range to the corresponding key management devices. 所述管理设备密钥验证单元,用于收发双方密钥管理设备将接收的量子密钥存储在相同地址区间中,并验证双方在所述相同地址区间中存储的量子密钥的一致性。The management device key verification unit is used to verify the consistency of the quantum keys stored by both the sending and receiving key management devices in the same address range. 18.根据权利要求17所述的量子密钥输出装置,其特征在于,所述装置还包括:管理设备密钥请求单元;18. The quantum key output device according to claim 17, wherein the device further comprises: a management device key request unit; 所述管理设备密钥请求单元,用于收发双方密钥管理设备向各自的量子密钥分发设备发送密钥获取请求;The management device key request unit is used to send a key acquisition request from the key management devices of both the sender and receiver to their respective quantum key distribution devices. 相应的,所述管理设备密钥输出单元具体用于,收发双方密钥管理设备接收所述密钥获取请求后,从通过一致性验证的量子密钥中,选取在相同地址区间存储的量子密钥,发送给相应数据设备;Accordingly, the key output unit of the management device is specifically used to, after receiving the key acquisition request, select the quantum key stored in the same address range from the quantum keys that have passed the consistency verification and send it to the corresponding data device. 其中,所述分发设备密钥协商单元、分发设备密钥验证单元、管理设备密钥请求单元、分发设备密钥发送单元以及管理设备密钥验证单元在所述数据设备密钥请求单元工作之前启动。The distribution device key negotiation unit, distribution device key verification unit, management device key request unit, distribution device key sending unit, and management device key verification unit are started before the data device key request unit operates. 19.根据权利要求17所述的量子密钥输出装置,其特征在于,所述装置还包括:管理设备密钥请求转发单元;所述管理设备密钥请求转发单元,用于在所述数据设备密钥请求单元接收密钥获取请求后,收发双方密钥管理设备分别向各自的量子密钥分发设备发送所述密钥获取请求;相应的,所述管理设备密钥输出单元具体用于,收发双方密钥管理设备从通过一致性验证的量子密钥中,选取在相同地址区间存储的量子密钥,发送给相应数据设备;19. The quantum key output device according to claim 17, characterized in that the device further comprises: a management device key request forwarding unit; the management device key request forwarding unit is configured to, after the data device key request unit receives the key acquisition request, send the key acquisition request from the transceiver key management devices to their respective quantum key distribution devices; correspondingly, the management device key output unit is specifically configured to, from the quantum keys that have passed consistency verification, select quantum keys stored in the same address range and send them to the corresponding data devices; 其中,所述管理设备密钥请求转发单元、分发设备密钥协商单元、分发设备密钥验证单元、分发设备密钥发送单元、以及管理设备密钥验证单元在所述数据设备密钥请求单元工作之后、所述管理设备密钥输出单元工作之前启动。The management device key request forwarding unit, the distribution device key negotiation unit, the distribution device key verification unit, the distribution device key sending unit, and the management device key verification unit are started after the data device key request unit works and before the management device key output unit works. 20.根据权利要求19所述的量子密钥输出装置,其特征在于,所述装置还包括:20. The quantum key output device according to claim 19, characterized in that the device further comprises: 管理设备密钥清除单元,用于当所述管理设备密钥验证单元的验证结果为未通过时,收发双方密钥管理设备清除在被验证的相同地址区间中存储的量子密钥,并触发用于收发双方密钥管理设备分别向各自的量子密钥分发设备发送密钥获取请求的单元工作。The management device key clearing unit is used to clear the quantum key stored in the same address range of the verified entity when the verification result of the management device key verification unit is unsuccessful, and to trigger the unit for the key management devices of both the sender and receiver to send key acquisition requests to their respective quantum key distribution devices. 21.根据权利要求17所述的量子密钥输出装置,其特征在于,所述装置还包括:21. The quantum key output device according to claim 17, characterized in that the device further comprises: 分发设备密钥清除单元,用于当所述分发设备密钥验证单元的验证结果为未通过时,收发双方量子密钥分发设备清除在被验证的相同地址区间中存储的量子密钥,并触发所述分发设备密钥协商单元工作。The distribution device key clearing unit is used to clear the quantum key stored in the same address range being verified by both the sending and receiving quantum key distribution devices when the verification result of the distribution device key verification unit is unsuccessful, and to trigger the operation of the distribution device key negotiation unit. 22.根据权利要求17所述的量子密钥输出装置,其特征在于,所述分发设备密钥验证单元以及所述管理设备密钥验证单元,各自包括验证请求子单元和验证执行子单元;22. The quantum key output device according to claim 17, wherein the distribution device key verification unit and the management device key verification unit each include a verification request subunit and a verification execution subunit; 所述验证请求子单元,用于参与验证的一方设备采用预设散列算法计算在所述地址区间中存储的量子密钥的散列值,并采用参与验证的双方设备前一次获取的通过一致性验证的量子密钥对所述散列值以及所述地址区间信息加密,并将加密后的信息发送给参与验证的另一方设备;The verification request subunit is used by one of the devices participating in the verification to calculate the hash value of the quantum key stored in the address range using a preset hash algorithm, and to encrypt the hash value and the address range information using the quantum key that has passed the consistency verification previously obtained by both devices participating in the verification, and then send the encrypted information to the other device participating in the verification. 所述验证执行子单元,用于所述另一方设备采用相应的密钥对接收到的信息解密后获取地址区间信息,采用所述预设散列算法计算在本地的相应地址区间中存储的量子密钥的散列值,判断计算得到的散列值与接收的散列值是否相同,若相同则向参与验证的对方设备返回验证通过应答,否则返回未通过应答。The verification execution subunit is used to decrypt the received information using the corresponding key to obtain the address range information, calculate the hash value of the quantum key stored in the corresponding address range locally using the preset hash algorithm, and determine whether the calculated hash value is the same as the received hash value. If they are the same, a verification pass response is returned to the participating verification device; otherwise, a failure response is returned. 23.根据权利要求17所述的量子密钥输出装置,其特征在于,还包括:23. The quantum key output device according to claim 17, characterized in that it further comprises: 数据设备密钥验证单元,用于所述管理设备密钥输出单元将量子密钥发送给相应数据设备后,收发双方数据设备验证接收的量子密钥的一致性,并将通过一致性验证的量子密钥作为执行数据加解密操作所采用的密钥。The data device key verification unit is used to verify the consistency of the received quantum key after the management device key output unit sends the quantum key to the corresponding data device, and to use the quantum key that has passed the consistency verification as the key used to perform data encryption and decryption operations. 24.根据权利要求17所述的量子密钥输出装置,其特征在于,所述分发设备密钥协商单元通过量子密钥分发协议协商获取的量子密钥,具有与其对应的密钥标签序列;相应的,24. The quantum key output device according to claim 17, characterized in that the quantum key obtained by the key negotiation unit of the distribution device through the quantum key distribution protocol has a corresponding key tag sequence; accordingly, 所述分发设备密钥协商单元除了包括实现其功能的本体子单元之外,还包括映射关系建立子单元,所述映射关系建立子单元用于,建立每个量子比特的存储地址与密钥标签的一一对应关系;In addition to the main body subunit that implements its function, the key negotiation unit of the distribution device also includes a mapping relationship establishment subunit, which is used to establish a one-to-one correspondence between the storage address of each quantum bit and the key tag. 所述分发设备密钥发送单元发送给所述管理设备密钥验证单元的信息不仅包括量子密钥,还包括与所述量子密钥对应的密钥标签序列;The information sent by the distribution device key sending unit to the management device key verification unit includes not only the quantum key, but also the key tag sequence corresponding to the quantum key; 所述管理设备密钥验证单元除了包括存储子单元、管理设备密钥验证子单元之外,还包括映射关系建立子单元;所述存储子单元,用于收发双方密钥管理设备将接收的量子密钥存储在相同地址区间;所述映射关系建立子单元,用于建立每个量子比特的存储地址与密钥标签的一一对应关系,并触发所述管理设备密钥验证子单元工作;所述管理设备密钥验证子单元,用于验证双方在所述相同地址区间中存储的量子密钥的一致性;The management device key verification unit includes a storage subunit, a management device key verification subunit, and a mapping relationship establishment subunit. The storage subunit is used for both the sending and receiving key management devices to store the received quantum keys in the same address range. The mapping relationship establishment subunit is used to establish a one-to-one correspondence between the storage address of each quantum bit and the key tag, and to trigger the operation of the management device key verification subunit. The management device key verification subunit is used to verify the consistency of the quantum keys stored by both parties in the same address range. 所述分发设备密钥验证单元以及所述管理设备密钥验证子单元,各自包括标签验证请求子单元和标签验证执行子单元;The distribution device key verification unit and the management device key verification subunit each include a tag verification request subunit and a tag verification execution subunit; 所述标签验证请求子单元,用于参与验证的一方设备采用预设散列算法计算由所述量子密钥的密钥标签序列、与所述量子密钥中每个量子比特的存储地址组成的地址序列拼接而成的字符串的散列值,并采用参与验证的双方设备前一次获取的、通过一致性验证的量子密钥对所述散列值以及所述地址序列加密、或者对所述散列值以及所述密钥标签序列加密,并将加密后的信息发送给参与验证的另一方设备;The tag verification request subunit is used by one of the devices participating in the verification to calculate the hash value of a string formed by concatenating the key tag sequence of the quantum key and the address sequence composed of the storage address of each quantum bit in the quantum key using a preset hash algorithm. The hash value and the address sequence are then encrypted using the quantum key previously obtained by both devices participating in the verification and which has passed consistency verification, or the hash value and the key tag sequence are encrypted. The encrypted information is then sent to the other device participating in the verification. 所述标签验证执行子单元,用于所述另一方设备接收所述加密后的信息后,采用相应的密钥解密,根据提取的地址序列从本地获取对应的密钥标签序列,或者根据提取的密钥标签序列从本地获取对应的地址序列,并采用所述预设散列算法计算由所述密钥标签序列与所述地址序列拼接而成的字符串的散列值,判断计算得到的散列值与接收的散列值是否相同,若相同则向参与验证的对方设备返回验证通过应答,否则返回未通过应答。The tag verification execution subunit is used to decrypt the encrypted information using the corresponding key after the other device receives it, obtain the corresponding key tag sequence from the local machine based on the extracted address sequence, or obtain the corresponding address sequence from the local machine based on the extracted key tag sequence, and calculate the hash value of the string formed by concatenating the key tag sequence and the address sequence using the preset hash algorithm. It then determines whether the calculated hash value is the same as the received hash value. If they are the same, it returns a verification success response to the other device participating in the verification; otherwise, it returns a failure response. 25.一种量子密钥获取方法,其特征在于,所述方法在利用量子密钥对数据进行加解密的数据设备上实施,包括:25. A quantum key acquisition method, characterized in that the method is implemented on a data device that uses quantum keys to encrypt and decrypt data, comprising: 向密钥管理设备发送密钥获取请求;Send a key acquisition request to the key management device; 接收所述密钥管理设备发送的通过一致性验证的量子密钥,作为进行数据加解密所采用的密钥;The quantum key that has passed consistency verification is received from the key management device and used as the key for data encryption and decryption; 其中,所述密钥管理设备发送的通过一致性验证的量子密钥是按照下述方式获得:The quantum key that has passed consistency verification and is sent by the key management device is obtained in the following manner: 收发双方密钥管理设备分别向各自对应的量子密钥分发设备发送所述密钥获取请求,所述各自对应的量子密钥分发设备称为收发双方量子密钥分发设备;The key management devices of both the sender and receiver send the key acquisition request to their respective corresponding quantum key distribution devices, which are referred to as the sender and receiver quantum key distribution devices. 所述收发双方量子密钥分发设备通过量子密钥分发协议协商量子密钥,并采用相同地址区间存储所述量子密钥,验证双方在所述相同地址区间中存储的量子密钥的一致性,并将通过一致性验证的量子密钥作为可供相应的收发双方密钥管理设备获取的量子密钥;The quantum key distribution devices of the sender and receiver negotiate quantum keys through a quantum key distribution protocol and store the quantum keys in the same address range. They verify the consistency of the quantum keys stored in the same address range by both parties and use the quantum keys that pass the consistency verification as quantum keys that can be obtained by the corresponding key management devices of the sender and receiver. 所述收发双方量子密钥分发设备将存储在相同地址区间的并通过一致性验证的量子密钥发送给相应的收发双方密钥管理设备;The quantum key distribution devices of the sender and receiver will send the quantum keys stored in the same address range and verified for consistency to the corresponding key management devices of the sender and receiver. 所述收发双方密钥管理设备将接收的量子密钥存储在相同地址区间中,并验证双方在所述相同地址区间中存储的量子密钥的一致性;The key management devices for both the sender and receiver store the received quantum keys in the same address range and verify the consistency of the quantum keys stored by both parties in the same address range. 所述收发双方密钥管理设备从通过一致性验证的量子密钥中,选取在相同地址区间存储的量子密钥,发送给相应数据设备。The key management devices of both the sender and receiver select quantum keys stored in the same address range from the quantum keys that have passed consistency verification and send them to the corresponding data devices. 26.根据权利要求25所述的量子密钥获取方法,其特征在于,在接收所述密钥管理设备发送的通过一致性验证的量子密钥后,执行下述操作:26. The quantum key acquisition method according to claim 25, characterized in that, after receiving the quantum key that has passed consistency verification sent by the key management device, the following operation is performed: 验证获取的量子密钥与对端数据设备获取的量子密钥的一致性,并将通过所述一致性验证的量子密钥作为进行数据加解密所采用的密钥。The consistency between the obtained quantum key and the quantum key obtained by the peer data device is verified, and the quantum key that passes the consistency verification is used as the key for data encryption and decryption. 27.根据权利要求26所述的量子密钥获取方法,其特征在于,如果获取的量子密钥与对端数据设备获取的量子密钥未通过一致性验证,转到所述向密钥管理设备发送量子密钥获取请求的步骤执行。27. The quantum key acquisition method according to claim 26, characterized in that, if the acquired quantum key and the quantum key acquired by the peer data device fail to pass the consistency verification, the process proceeds to the step of sending a quantum key acquisition request to the key management device. 28.一种量子密钥获取装置,其特征在于,所述装置部署在利用量子密钥对数据进行加解密的数据设备上,包括:28. A quantum key acquisition device, characterized in that the device is deployed on a data device that uses quantum keys to encrypt and decrypt data, comprising: 密钥获取请求发送单元,用于向密钥管理设备发送密钥获取请求;The key acquisition request sending unit is used to send a key acquisition request to the key management device; 对称密钥接收单元,用于接收所述密钥管理设备发送的通过一致性验证的量子密钥,作为进行数据加解密所采用的密钥;A symmetric key receiving unit is used to receive the quantum key that has passed consistency verification sent by the key management device, as the key used for data encryption and decryption; 其中,所述密钥管理设备发送的通过一致性验证的量子密钥是按照下述方式获得:The quantum key that has passed consistency verification and is sent by the key management device is obtained in the following manner: 收发双方密钥管理设备分别向各自对应的量子密钥分发设备发送所述密钥获取请求,所述各自对应的量子密钥分发设备称为收发双方量子密钥分发设备;The key management devices of both the sender and receiver send the key acquisition request to their respective corresponding quantum key distribution devices, which are referred to as the sender and receiver quantum key distribution devices. 所述收发双方量子密钥分发设备通过量子密钥分发协议协商量子密钥,并采用相同地址区间存储所述量子密钥,验证双方在所述相同地址区间中存储的量子密钥的一致性,并将通过一致性验证的量子密钥作为可供相应的收发双方密钥管理设备获取的量子密钥;The quantum key distribution devices of the sender and receiver negotiate quantum keys through a quantum key distribution protocol and store the quantum keys in the same address range. They verify the consistency of the quantum keys stored in the same address range by both parties and use the quantum keys that pass the consistency verification as quantum keys that can be obtained by the corresponding key management devices of the sender and receiver. 所述收发双方量子密钥分发设备将存储在相同地址区间的并通过一致性验证的量子密钥发送给相应的收发双方密钥管理设备;The quantum key distribution devices of the sender and receiver will send the quantum keys stored in the same address range and verified for consistency to the corresponding key management devices of the sender and receiver. 所述收发双方密钥管理设备将接收的量子密钥存储在相同地址区间中,并验证双方在所述相同地址区间中存储的量子密钥的一致性;The key management devices for both the sender and receiver store the received quantum keys in the same address range and verify the consistency of the quantum keys stored by both parties in the same address range. 所述收发双方密钥管理设备从通过一致性验证的量子密钥中,选取在相同地址区间存储的量子密钥,发送给相应数据设备。The key management devices of both the sender and receiver select quantum keys stored in the same address range from the quantum keys that have passed consistency verification and send them to the corresponding data devices. 29.一种量子密钥存储输出方法,其特征在于,所述方法在向数据设备提供量子密钥的密钥管理设备上实施,包括:29. A quantum key storage and output method, characterized in that the method is implemented on a key management device that provides quantum keys to data devices, comprising: 接收数据设备发送的密钥获取请求;Receive key acquisition requests sent by data devices; 按照与对端密钥管理设备协商的相同地址区间,将通过一致性验证的量子密钥发送给所述数据设备;The quantum key that has passed consistency verification is sent to the data device according to the same address range negotiated with the peer key management device; 其中,发送给所述数据设备的通过一致性验证的量子密钥是按照下述方式获得:The quantum key that has passed consistency verification and is sent to the data device is obtained in the following manner: 向量子密钥分发设备发送密钥获取请求;Send a key acquisition request to the quantum key distribution device; 接收所述量子密钥分发设备发送的量子密钥,并采用与所述对端密钥管理设备相同的地址区间存储所述量子密钥;The quantum key is received from the quantum key distribution device and stored in the same address range as the peer key management device. 验证在所述地址区间中存储的量子密钥与所述对端密钥管理设备在相同地址区间中存储的量子密钥的一致性,并将通过一致性验证的量子密钥作为可发送给数据设备的量子密钥;Verify the consistency between the quantum key stored in the address range and the quantum key stored in the same address range by the peer key management device, and use the quantum key that passes the consistency verification as the quantum key that can be sent to the data device; 其中,量子密钥分发设备与对端量子密钥分发设备通过量子密钥分发协议协商量子密钥,并将获取的量子密钥存储在与所述对端量子密钥分发设备相同的地址区间中;验证在所述地址区间中存储的量子密钥与所述对端量子密钥分发设备在相同地址区间中存储的量子密钥的一致性;根据接收到的密钥获取请求,按照与所述对端量子密钥分发设备协商的相同地址区间,将通过一致性验证的量子密钥发送给所述密钥管理设备。The process involves a quantum key distribution device negotiating a quantum key with a peer quantum key distribution device via a quantum key distribution protocol, and storing the acquired quantum key in the same address range as the peer quantum key distribution device. The consistency between the quantum key stored in the address range and the quantum key stored in the same address range by the peer quantum key distribution device is verified. Based on a received key acquisition request, the quantum key that has passed consistency verification is sent to the key management device according to the same address range negotiated with the peer quantum key distribution device. 30.根据权利要求29所述的量子密钥存储输出方法,其特征在于,所述通过一致性验证的量子密钥是在接收数据设备发送的密钥获取请求之前预先存储的。30. The quantum key storage and output method according to claim 29, wherein the quantum key that has passed the consistency verification is pre-stored before receiving the key acquisition request sent by the data receiving device. 31.根据权利要求29所述的量子密钥存储输出方法,其特征在于,所述通过一致性验证的量子密钥是在所述接收数据设备发送的密钥获取请求之后、在所述按照与对端密钥管理设备协商的相同地址区间,将通过一致性验证的量子密钥发送给所述数据设备之前存储的。31. The quantum key storage and output method according to claim 29, wherein the quantum key that has passed the consistency verification is stored after the key acquisition request sent by the receiving data device and before the quantum key that has passed the consistency verification is sent to the data device according to the same address range negotiated with the peer key management device. 32.根据权利要求30或31所述的量子密钥存储输出方法,其特征在于,如果在所述地址区间中存储的量子密钥与所述对端密钥管理设备在相同地址区间中存储的量子密钥未通过一致性验证,执行下述操作:32. The quantum key storage and output method according to claim 30 or 31, characterized in that, if the quantum key stored in the address range and the quantum key stored in the same address range by the peer key management device fail the consistency verification, the following operation is performed: 清除在所述地址区间中存储的量子密钥,并转到向量子密钥分发设备发送密钥获取请求的步骤执行。The quantum key stored in the address range is cleared, and the process proceeds to the step of sending a key acquisition request to the quantum key distribution device. 33.一种量子密钥存储输出装置,其特征在于,所述装置部署在向数据设备提供量子密钥的密钥管理设备上,包括:33. A quantum key storage and output device, characterized in that the device is deployed on a key management device that provides quantum keys to data devices, comprising: 密钥获取请求接收单元,用于接收数据设备发送的密钥获取请求;A key acquisition request receiving unit is used to receive key acquisition requests sent by the data device; 对称密钥输出单元,用于按照与对端密钥管理设备协商的相同地址区间,将通过一致性验证的量子密钥发送给所述数据设备,其中,发送给所述数据设备的通过一致性验证的量子密钥是按照下述方式获得:A symmetric key output unit is used to send a consensus-verified quantum key to the data device according to the same address range negotiated with the peer key management device, wherein the consensus-verified quantum key sent to the data device is obtained in the following manner: 向量子密钥分发设备发送密钥获取请求;Send a key acquisition request to the quantum key distribution device; 接收所述量子密钥分发设备发送的量子密钥,并采用与所述对端密钥管理设备相同的地址区间存储所述量子密钥;The quantum key is received from the quantum key distribution device and stored in the same address range as the peer key management device. 验证在所述地址区间中存储的量子密钥与所述对端密钥管理设备在相同地址区间中存储的量子密钥的一致性,并将通过一致性验证的量子密钥作为可发送给数据设备的量子密钥;Verify the consistency between the quantum key stored in the address range and the quantum key stored in the same address range by the peer key management device, and use the quantum key that passes the consistency verification as the quantum key that can be sent to the data device; 其中,量子密钥分发设备与对端量子密钥分发设备通过量子密钥分发协议协商量子密钥,并将获取的量子密钥存储在与所述对端量子密钥分发设备相同的地址区间中;验证在所述地址区间中存储的量子密钥与所述对端量子密钥分发设备在相同地址区间中存储的量子密钥的一致性;根据接收到的密钥获取请求,按照与所述对端量子密钥分发设备协商的相同地址区间,将通过一致性验证的量子密钥发送给所述密钥管理设备。The process involves a quantum key distribution device negotiating a quantum key with a peer quantum key distribution device via a quantum key distribution protocol, and storing the acquired quantum key in the same address range as the peer quantum key distribution device. The consistency between the quantum key stored in the address range and the quantum key stored in the same address range by the peer quantum key distribution device is verified. Based on a received key acquisition request, the quantum key that has passed consistency verification is sent to the key management device according to the same address range negotiated with the peer quantum key distribution device. 34.一种量子密钥分发存储方法,其特征在于,所述方法在量子密钥分发设备上实施,包括:34. A quantum key distribution storage method, characterized in that the method is implemented on a quantum key distribution device, comprising: 与对端量子密钥分发设备通过量子密钥分发协议协商量子密钥,并将获取的量子密钥存储在与所述对端量子密钥分发设备相同的地址区间中;The quantum key is negotiated with the peer quantum key distribution device through a quantum key distribution protocol, and the obtained quantum key is stored in the same address range as the peer quantum key distribution device; 验证在所述地址区间中存储的量子密钥与所述对端量子密钥分发设备在相同地址区间中存储的量子密钥的一致性;Verify the consistency between the quantum key stored in the address range and the quantum key stored in the same address range by the peer quantum key distribution device; 根据接收到的来自密钥管理设备的密钥获取请求,按照与所述对端量子密钥分发设备协商的相同地址区间,将通过一致性验证的量子密钥发送给所述密钥管理设备;Based on the key acquisition request received from the key management device, the quantum key that has passed the consistency verification is sent to the key management device according to the same address range negotiated with the peer quantum key distribution device; 其中,密钥管理设备采用与对端密钥管理设备相同的地址区间存储所述量子密钥;验证在所述地址区间中存储的量子密钥与所述对端量子密钥管理设备在相同地址区间中存储的量子密钥的一致性,并将通过一致性验证的量子密钥发送给相应数据设备。The key management device stores the quantum key in the same address range as the peer key management device; verifies the consistency between the quantum key stored in the address range and the quantum key stored in the same address range by the peer quantum key management device, and sends the quantum key that has passed the consistency verification to the corresponding data device. 35.根据权利要求34所述的量子密钥分发存储方法,其特征在于,如果在所述地址区间中存储的量子密钥与所述对端量子密钥分发设备在相同地址区间中存储的量子密钥未通过一致性验证,执行下述操作:35. The quantum key distribution and storage method according to claim 34, characterized in that, if the quantum key stored in the address range and the quantum key stored in the same address range by the peer quantum key distribution device fail the consistency verification, the following operation is performed: 清除在所述地址区间中存储的量子密钥,并转到所述与对端量子密钥分发设备通过量子密钥分发协议协商量子密钥的步骤执行。The quantum key stored in the address range is cleared, and the process proceeds to the step of negotiating the quantum key with the peer quantum key distribution device via the quantum key distribution protocol. 36.一种量子密钥分发存储装置,其特征在于,所述装置部署在量子密钥分发设备上,包括:36. A quantum key distribution storage device, characterized in that the device is deployed on a quantum key distribution device, comprising: 密钥分发存储单元,用于与对端量子密钥分发设备通过量子密钥分发协议协商量子密钥,并将获取的量子密钥存储在与所述对端量子密钥分发设备相同的地址区间中;A key distribution storage unit is used to negotiate a quantum key with a peer quantum key distribution device through a quantum key distribution protocol, and to store the obtained quantum key in the same address range as the peer quantum key distribution device; 密钥验证单元,用于验证在所述地址区间中存储的量子密钥与所述对端量子密钥分发设备在相同地址区间中存储的量子密钥的一致性;A key verification unit is used to verify the consistency between the quantum key stored in the address range and the quantum key stored in the same address range by the peer quantum key distribution device. 对称密钥发送单元,用于根据接收到的来自密钥管理设备的密钥获取请求,按照与所述对端量子密钥分发设备协商的相同地址区间,将通过一致性验证的量子密钥发送给所述密钥管理设备;其中,密钥管理设备采用与对端密钥管理设备相同的地址区间存储所述量子密钥;验证在所述地址区间中存储的量子密钥与所述对端量子密钥管理设备在相同地址区间中存储的量子密钥的一致性,并将通过一致性验证的量子密钥发送给相应数据设备。A symmetric key transmission unit is configured to send a quantum key that has passed consistency verification to the key management device according to a key acquisition request received from the key management device and within the same address range negotiated with the peer quantum key distribution device; wherein the key management device stores the quantum key in the same address range as the peer key management device; verifies the consistency between the quantum key stored in the address range and the quantum key stored in the same address range by the peer quantum key management device, and sends the quantum key that has passed consistency verification to the corresponding data device. 37.一种量子密钥输出系统,其特征在于,包括:分别部署于收发双方的两个子系统;所述两个子系统分别包括:如权利要求28所述的量子密钥获取装置、如权利要求33所述的量子密钥存储输出装置、以及如权利要求36所述的量子密钥分发存储装置。37. A quantum key output system, characterized in that it comprises: two subsystems respectively deployed on the transmitting and receiving sides; the two subsystems respectively comprise: the quantum key acquisition device as described in claim 28, the quantum key storage and output device as described in claim 33, and the quantum key distribution and storage device as described in claim 36.
HK17106624.2A 2017-07-03 Method, device and system for outputting quantum key and method, device and system for verifying memeory consistency of quantum key HK1233078B (en)

Publications (3)

Publication Number Publication Date
HK1233078A HK1233078A (en) 2018-01-19
HK1233078A1 HK1233078A1 (en) 2018-01-19
HK1233078B true HK1233078B (en) 2021-02-26

Family

ID=

Similar Documents

Publication Publication Date Title
TWI683566B (en) Quantum key output method, storage consistency verification method, device and system
TWI721122B (en) Data secure transmission method, client and server method, device and system
CN106411521B (en) Identity authentication method, device and system for quantum key distribution process
CN104660602B (en) A kind of quantum key transfer control method and system
CN104160674B (en) Content center network
US12010216B2 (en) Computer-implemented system and method for highly secure, high speed encryption and transmission of data
US10050781B2 (en) Method, apparatus, terminal device and system for generating shared key
JP4944886B2 (en) Cryptographic authentication and / or shared encryption key configuration using signature keys encrypted with non-one-time pad cryptography, including but not limited to technology with improved security against malleable attacks
CN103036872B (en) The encryption and decryption method of transfer of data, equipment and system
WO2018127118A1 (en) Identity authentication method and device
WO2017032242A1 (en) Key generation method and apparatus
CN104023013A (en) Data transmission method, server side and client
CN108347404A (en) A kind of identity identifying method and device
US11528127B2 (en) Computer-implemented system and method for highly secure, high speed encryption and transmission of data
CN111192050A (en) Digital asset private key storage and extraction method and device
CN114142995B (en) Key security distribution method and device for blockchain relay communication network
CN112822016B (en) Method for data authorization on block chain and block chain network
HK1233078B (en) Method, device and system for outputting quantum key and method, device and system for verifying memeory consistency of quantum key
CN109922042B (en) Subkey management method and system for lost equipment
CN108429717B (en) A kind of identity authentication method and device
CN121056140B (en) Method and system for fusing quantum key one-time pad in TLS recording layer
HK1233078A (en) Method, device and system for outputting quantum key and method, device and system for verifying memeory consistency of quantum key
HK1233078A1 (en) Method, device and system for outputting quantum key and method, device and system for verifying memeory consistency of quantum key
HK1233792B (en) Authentication method, device and system for quantum key distribution process
HK1233792A (en) Authentication method, device and system for quantum key distribution process