Disclosure of Invention
In view of this, the present invention provides a QKD communication node, and a quantum key resource migration method and apparatus thereof, which can migrate a quantum key to implement resource balanced distribution of a quantum key pool of the QKD communication node in a network.
Based on the above purpose, the present invention provides a quantum key resource migration method, which includes:
after determining the key storage space of the resource surplus and the resource shortage in the local quantum key pool, taking the node corresponding to the key storage space of the resource surplus as a key emigration node, and taking the node corresponding to the key storage space of the resource shortage as a key emigration node;
and after a plurality of quantum keys are removed from the key storage space with the surplus resources, copying the removed quantum keys to the key storage space with the deficient resources, encrypting the removed quantum keys and sending the encrypted quantum keys to the key immigration node for storage.
Preferably, before the step of encrypting the obtained quantum key and sending the encrypted quantum key to the key immigration node for storage, the method further includes:
sending encrypted key emigration and immigration notifications to the key emigration and immigration nodes respectively; and
the step of encrypting the removed quantum key and then sending the encrypted quantum key to the key immigration node for storage specifically comprises the following steps:
encrypting the removed quantum key by using the quantum key in the key storage space corresponding to the key immigration node, and then sending the encrypted quantum key to the key immigration node;
and after receiving the key migration notification, the key migration node determines a sending node of the key migration notification, decrypts the received information by using a quantum key shared by the sending node of the key migration notification in a quantum key pool of the node after receiving information subsequently sent by the node, and stores the quantum key obtained by decryption into a key storage space corresponding to the sending node of the key migration notification.
Preferably, after the sending the encrypted key emigration and immigration notifications to the key emigration and immigration nodes, the method further includes:
and the key emigration node eliminates a plurality of quantum keys from the quantum keys shared by the quantum key pool of the node and the sending node of the key emigration notice according to the received key emigration notice.
The determining of the key storage space with resource surplus and resource shortage in the local quantum key pool specifically includes:
detecting the storage state of each key storage space in a local quantum key pool;
respectively calculating the key upper and lower limit thresholds of each key storage space according to the storage state of each key storage space;
determining the key storage space with the key storage capacity larger than the calculated key upper limit threshold value as the key storage space with the remained resources;
and judging the key storage space with the key storage amount smaller than the calculated key lower limit threshold value as the key storage space with the lack of resources.
Wherein, the calculating the key upper and lower threshold values of each key storage space according to the storage state of each key storage space specifically includes:
respectively calculating the key upper and lower limit thresholds of the key storage space according to the following formula I and II:
t is sxi (formula one)
In the formula I, T is a calculated key upper limit threshold value of a key storage space, S represents a key consumption rate of the key storage space, and I represents an average duration of a key consumption peak period of the key storage space;
m ═ sxf (formula two)
In the second formula, M is a calculated lower key threshold of the key storage space, S represents a key consumption rate of the key storage space, and F represents a time required for generating a new quantum key in the key storage space.
The invention also provides a quantum key resource migration device, comprising:
the key storage state detection module is used for determining the key storage space of resource surplus and resource shortage in the local quantum key pool;
the key migration module is used for taking the node corresponding to the key storage space with the surplus resources as a key migration-out node and taking the node corresponding to the key storage space with the deficient resources as a key migration-in node; and after a plurality of quantum keys are removed from the key storage space with the surplus resources, copying the removed quantum keys to the key storage space with the deficient resources, encrypting the removed quantum keys and sending the encrypted quantum keys to the key immigration node for storage.
The present invention also provides a QKD communication node, comprising: the quantum key resource migration device is described above.
In the technical scheme provided by the invention, after the key storage space with the surplus resources and the deficient resources is determined from the local quantum key pool of the QKD communication node, the node corresponding to the key storage space with the surplus resources is taken as a key emigration node, and the node corresponding to the key storage space with the deficient resources is taken as a key emigration node; and after a plurality of quantum keys are removed from the key storage space with the surplus resources, copying the removed quantum keys to the key storage space with the deficient resources, encrypting the removed quantum keys and sending the encrypted quantum keys to the key immigration node for storage. Therefore, keys in the key storage space with key resources exceeding the current requirement can be migrated to the key storage space with key requirements far lower than the current requirement, resource balanced distribution of quantum key pools of the QKD communication nodes in the network is achieved, quantum key resources between the QKD communication nodes and the nodes with frequent communication are supplemented, quantum keys between the nodes idle compared with communication are not wasted and are migrated to other key storage spaces for utilization, and the use efficiency of the keys is improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to specific embodiments and the accompanying drawings.
It is to be noted that technical terms or scientific terms used in the embodiments of the present invention should have the ordinary meanings as understood by those having ordinary skill in the art to which the present disclosure belongs, unless otherwise defined. The use of "first," "second," and similar terms in this disclosure is not intended to indicate any order, quantity, or importance, but rather is used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that the element or item listed before the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", and the like are used merely to indicate relative positional relationships, and when the absolute position of the object being described is changed, the relative positional relationships may also be changed accordingly.
In the technical scheme of the invention, after key storage spaces of resource surplus and resource deficiency in a local quantum key pool are determined, nodes corresponding to the key storage spaces of the resource surplus are taken as key emigration nodes, and the nodes corresponding to the key storage spaces of the resource deficiency are taken as key emigration nodes; and after a plurality of quantum keys are removed from the key storage space with the surplus resources, copying the removed quantum keys to the key storage space with the deficient resources, encrypting the removed quantum keys and sending the encrypted quantum keys to the key immigration node for storage.
The technical solution of the embodiments of the present invention is described in detail below with reference to the accompanying drawings.
In a QKD network architecture, one QKD communication node can generate a shared quantum key with multiple QKD communication nodes; therefore, a local quantum key pool in a QKD communication node can be divided into a plurality of key storage spaces for storing the shared quantum keys generated by the nodes, that is, each key storage space of the quantum key pool of a QKD communication node corresponds to a node, and is used for storing the shared quantum keys generated by the node corresponding to the key storage space and the QKD communication node to which the quantum key pool belongs.
For example, in the network topology shown in fig. 1, node F may generate a shared quantum key with node a, node B, and node C, respectively; and a corresponding key storage space A, a corresponding key storage space B and a corresponding key storage space C are respectively divided for the node A, the node B and the node C in the quantum key pool of the node F.
The quantum key resource migration method in the QKD communication node provided by the embodiment of the present invention has a specific flow as shown in fig. 2, and includes the following steps:
step S201: the storage state of each key storage space in the local quantum key pool in the QKD communication node is detected.
In the step, the storage state of each key storage space in a local quantum key pool in the QKD communication node is detected; wherein, the storage state of the key storage space may include: a key storage amount of the key storage space, a key consumption rate of the key storage space, an average duration of key consumption peaks of the key storage space, a time required to generate a new quantum key in the key storage space.
Step S202: and determining the key storage space with the surplus resources and the deficient resources in the local quantum key pool according to the detected storage state of the key storage space.
Specifically, the key storage space of resource surplus and resource deficiency in the local quantum key pool can be determined according to the method flow shown in fig. 3, including the following sub-steps:
substep S301: and respectively calculating the key upper limit threshold and the key lower limit threshold of each key storage space according to the storage state of each key storage space.
Specifically, the key upper threshold of the key storage space may be calculated according to the following formula one:
t is sxi (formula one)
In the formula one, T is a calculated key upper limit threshold of the key storage space, S represents a key consumption rate of the key storage space, and I represents an average duration of a key consumption peak period of the key storage space.
For example, for node F in the network topology shown in fig. 1, the storage states of key storage space a, key storage space B, key storage space C and the calculated upper threshold of the key of the node are shown in table 1 below:
TABLE 1
The lower key threshold of the key storage space may be calculated according to the following formula two:
m ═ sxf (formula two)
In the second formula, M is a calculated lower key threshold of the key storage space, S represents a key consumption rate of the key storage space, and F represents a time required for generating a new quantum key in the key storage space.
For example, for node F in the network topology shown in fig. 1, the storage states of the key storage space B, the key storage space C and the calculated lower threshold of the key are shown in table 2 below:
TABLE 2
Substep S302: for each key storage space, judging whether the key storage amount of the key storage space is larger than the key upper limit threshold value of the key storage space, and judging whether the key storage amount of the key storage space is smaller than the key lower limit threshold value of the key storage space.
For example, as for the node F in the network topology shown in fig. 1, according to the calculation results in table 1 and table 2, it can be determined that the key storage amount 50 of the key storage space a is larger than the key upper limit threshold T of 33.39, and the key storage amount 10 of the key storage space C is smaller than the key upper limit threshold M of 15.82.
Substep S303: and determining the key storage space with the key storage capacity larger than the calculated key upper limit threshold as the key storage space with the surplus resources, and determining the key storage space with the key storage capacity smaller than the calculated key lower limit threshold as the key storage space with the shortage of resources.
For example, for a node F in the network topology shown in fig. 1, a key storage space a in the quantum key pool of the node is determined as a resource-remaining key storage space, and a key storage space C in the quantum key pool of the node is determined as a resource-deficient key storage space.
Step S203: and carrying out quantum key migration.
In this step, the node corresponding to the key storage space with the surplus resources is used as a key emigration node, and the node corresponding to the key storage space with the deficient resources is used as a key emigration node; after removing a plurality of quantum keys from the key storage space of the remaining resources, copying the removed quantum keys to the key storage space of the lacking resources, encrypting the removed quantum keys, and sending the encrypted quantum keys to the key immigration node for storage, wherein the specific flow is shown in fig. 4, and the specific flow comprises the following substeps:
substep S401: and taking the node corresponding to the key storage space with the surplus resources as a key emigration node, and taking the node corresponding to the key storage space with the deficient resources as a key emigration node.
For example, for a node F in the network topology shown in fig. 1, a node a corresponding to a key storage space a determined to be resource-surplus in the quantum key pool of the node F is taken as a key emigration node, and a node C corresponding to a key storage space C determined to be resource-deficient is taken as a key emigration node.
Substep S402: and removing a plurality of quantum keys from the residual key storage space of the resources, and sending encrypted key emigration and emigration notifications to the key emigration and emigration nodes.
Specifically, the number of quantum keys shifted out from the remaining key storage space of the resource in this sub-step may be determined according to the following method:
if the difference between the key storage amount in the key storage space with the surplus resources and the key upper limit threshold is larger than the difference between the key storage amount in the key storage space with the deficient resources and the key lower limit threshold, determining the number of the shifted quantum keys according to the difference between the key storage amount in the key storage space with the deficient resources and the key lower limit threshold;
if the difference between the key storage amount in the key storage space with the surplus resources and the key upper limit threshold is less than or equal to the difference between the key storage amount in the key storage space with the deficient resources and the key lower limit threshold, the number of the removed quantum keys is a% of the difference between the key storage amount in the key storage space with the surplus resources and the key upper limit threshold; wherein a can be set to a number between 0 and 100 by those skilled in the art according to practical situations.
In this sub-step, encrypted key emigration and immigration notifications can also be sent to the key emigration and immigration nodes.
For example, for the network topology shown in fig. 1, node F may encrypt the key emigration notification using a shared quantum key generated by node a in the key storage space a, and then send the encrypted key emigration notification to node a serving as the key emigration node; wherein the key emigration notification can indicate the number of emigrated quantum keys.
The node F can also encrypt the key migration notification by using a shared quantum key generated by the node C in the key storage space C, and then send the encrypted key migration notification to the node C serving as the key migration node; and the key immigration notice can indicate the number of immigrated quantum keys.
Substep S403: and copying the removed quantum key to the key storage space with the deficient resources, encrypting the removed quantum key and sending the encrypted quantum key to the key immigration node for storage.
For example, for the network topology shown in fig. 1, the node F may copy the quantum key removed from the key storage space a to the key storage space C, encrypt the removed quantum key with the shared quantum key generated by the node C in the key storage space C, and send the encrypted quantum key to the node C as the key immigration node for storage.
Substep S404: the key immigration node stores the received quantum key according to the key immigration notice; and the key emigration node eliminates a plurality of quantum keys according to the key emigration notice.
Specifically, after receiving the key migration notification, the key migration node determines a sending node of the key migration notification, and after receiving information subsequently sent by the node, decrypts the received information by using a quantum key shared by a quantum key pool of the node and the sending node of the key migration notification, and stores the quantum key obtained by decryption in a key storage space corresponding to the sending node of the key migration notification.
And the key emigration node eliminates a plurality of quantum keys from a key storage space of the quantum key pool of the node corresponding to the sending node of the key emigration notice according to the received key emigration notice.
For example, for the network topology shown in fig. 1, after receiving the key migration notification, the node C serving as the key migration node determines that the sending node of the key migration notification is the node F, and if information subsequently sent by the node F is received, the node C decrypts the received information by using the quantum key shared with the node F in the quantum key pool of the node, so as to obtain a plurality of migrated quantum keys; and the node C stores the quantum key obtained by decryption into a key storage space corresponding to the node F in the local quantum key pool.
For the network topology shown in fig. 1, after determining that a node a serving as a key emigration node is a node F according to the received key emigration notification, removing a plurality of quantum keys from quantum keys shared with the node F in a quantum key pool of the node; the number of removed quantum keys may be determined according to the number of migrated quantum keys indicated in the key migration notification.
It should be noted that the method of the embodiment of the present invention may be executed by a single device, such as a computer or a server. The method of the embodiment can also be applied to a distributed scene and completed by the mutual cooperation of a plurality of devices. In the case of such a distributed scenario, one of the multiple devices may only perform one or more steps of the method according to the embodiment of the present invention, and the multiple devices interact with each other to complete the method.
An internal structural block diagram of a quantum key resource migration apparatus provided in an embodiment of the present invention is shown in fig. 5, and includes: a key storage state detection module 501 and a key migration module 502.
The key storage state detection module 501 is configured to determine a key storage space where resources are left and deficient in a local quantum key pool;
the key migration module 502 is configured to use a node corresponding to the key storage space with the remaining resources as a key migration-out node, and use a node corresponding to the key storage space with the lacking resources as a key migration-in node; and after a plurality of quantum keys are removed from the key storage space with the surplus resources, copying the removed quantum keys to the key storage space with the deficient resources, encrypting the removed quantum keys and sending the encrypted quantum keys to the key immigration node for storage.
Specifically, the key storage state detection module 501 detects the storage state of each key storage space in the local quantum key pool; respectively calculating the key upper and lower limit thresholds of each key storage space according to the storage state of each key storage space; determining the key storage space with the key storage capacity larger than the calculated key upper limit threshold value as the key storage space with the remained resources; and judging the key storage space with the key storage amount smaller than the calculated key lower limit threshold value as the key storage space with the lack of resources.
The key migration module 502 may specifically include the following units: a key migration node determination unit 511, a key migration number determination unit 512, a key migration notification unit 513, a key internal migration unit 514, and a key transmission unit 515.
The key migration node determining unit 511 is configured to use a node corresponding to the key storage space where the resource is left as a key migration node, and use a node corresponding to the key storage space where the resource is lacking as a key migration node;
the key migration number determining unit 512 is configured to determine, if it is determined that a difference between a key storage amount in the key storage space remaining in the resource and a key upper limit threshold is greater than a difference between a key storage amount in the key storage space lacking in the resource and a key lower limit threshold, a number of the removed quantum keys according to the difference between the key storage amount in the key storage space lacking in the resource and the key lower limit threshold; if the difference between the key storage amount in the key storage space with the remained resources and the key upper limit threshold is determined to be less than or equal to the difference between the key storage amount in the key storage space with the lacked resources and the key lower limit threshold, the number of the removed quantum keys is a% of the difference between the key storage amount in the key storage space with the remained resources and the key upper limit threshold; wherein a is a set number between 0 and 100;
the key migration notification unit 512 is configured to send encrypted key migration and key migration notifications to the key migration and key migration nodes; specifically, the key migration/migration notification may indicate the number of migrated quantum keys determined by the key migration number determination unit 512.
The key internal migration unit 514 is configured to copy the removed quantum keys to the key storage space with the missing resources after removing a number of quantum keys from the key storage space with the remaining resources; specifically, the key internal migration unit 514 may, according to the number of migrated quantum keys determined by the key migration number determination unit 512, copy the removed quantum keys to the key storage space with the lack of resources after removing a corresponding number of quantum keys from the key storage space with the remaining resources.
The key sending unit 515 is configured to encrypt the quantum key removed from the remaining key storage space of the resource and send the encrypted quantum key to the key immigration node for storage.
The quantum key distribution device may be disposed in the QKD communication node, and a detailed method for implementing functions of each module in the device may refer to a method detailed in each step in the flow shown in fig. 2, which is not described herein again.
In the technical scheme provided by the invention, after the key storage space with the surplus resources and the deficient resources is determined from the local quantum key pool of the QKD communication node, the node corresponding to the key storage space with the surplus resources is taken as a key emigration node, and the node corresponding to the key storage space with the deficient resources is taken as a key emigration node; and after a plurality of quantum keys are removed from the key storage space with the surplus resources, copying the removed quantum keys to the key storage space with the deficient resources, encrypting the removed quantum keys and sending the encrypted quantum keys to the key immigration node for storage. Therefore, keys in the key storage space with key resources exceeding the current requirement can be migrated to the key storage space with key requirements far lower than the current requirement, resource balanced distribution of quantum key pools of the QKD communication nodes in the network is achieved, quantum key resources between the QKD communication nodes and the nodes with frequent communication are supplemented, quantum keys between the nodes idle compared with communication are not wasted and are migrated to other key storage spaces for utilization, and the use efficiency of the keys is improved.
Computer-or server-readable media of the embodiments, including non-transitory and non-transitory, removable and non-removable media, may implement the information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, 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 technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, is limited to these examples; within the idea of the invention, also features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity.
In addition, well known power/ground connections to Integrated Circuit (IC) chips and other components may or may not be shown within the provided figures for simplicity of illustration and discussion, and so as not to obscure the invention. Furthermore, devices may be shown in block diagram form in order to avoid obscuring the invention, and also in view of the fact that specifics with respect to implementation of such block diagram devices are highly dependent upon the platform within which the present invention is to be implemented (i.e., specifics should be well within purview of one skilled in the art). Where specific details (e.g., circuits) are set forth in order to describe example embodiments of the invention, it should be apparent to one skilled in the art that the invention can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative instead of restrictive.
While the present invention has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic ram (dram)) may use the discussed embodiments.
The embodiments of the invention are intended to embrace all such alternatives, modifications and variances that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, substitutions, improvements and the like that may be made without departing from the spirit and principles of the invention are intended to be included within the scope of the invention.