# Key-Recycling Strategies in Quantum-Key-Distribution Networks
## 4 Network Model and Protocol
### QKP Negotiation Mechanism  
In order to ensure the realization of the QKR mechanism, communication among key pools is inevitable. Therefore, based on the QKD-over-optical-network architecture a new QKP negotiation mechanism is proposed. Some possible situations are illustrated in Figure 5, which shows the communication process among the four nodes. Each node contains a key pool, which stores the keys of different source and destiny nodes. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Notations** & **Definitions** & **Notations** & **Definitions** \\ \hline Ser (V\({}_{\text{s-d}}\), R\({}_{\text{sec}}\), t\({}_{\text{s-u}}\), t\({}_{\text{had}}\)) & Data service request & R\({}_{\text{sec}}\) & Encryption level of the service \\ QKD (V\({}_{\text{s-d}}\), t\({}_{\text{s-q}}\) & QKD service request & N\({}_{\text{rank}}\)(k) & The number of keys consumed \\ N\({}_{\text{key-relay}}\), P\({}_{\text{failure}}\), T\({}_{\text{p}}\) & QKD service request & N\({}_{\text{rank}}\)(k) & per unit time when the \\ N\({}_{\text{key-relay}}\), P\({}_{\text{failure}}\), T\({}_{\text{p}}\) & & encryption level is k \\ V\({}_{\text{key-gen}}\) & The number of point-to-point & & The starting time for each data \\ V\({}_{\text{key-gen}}\) & key generations per unit time & t\({}_{\text{s-u}}\)/t\({}_{\text{s-q}}\) & /QKD service \\ K\({}_{\text{qr}}\) & The ratio of the original key to & & \\ K\({}_{\text{qr}}\) & the key to be recycled & t\({}_{\text{hd}}\) & The hold time of the data service \\ Tp & The type of key recycling & N\({}_{\text{key-relay}}\) & Number of keys that QKD \\ N\({}_{\text{key}}\)(i,j) & The current number of key in & N\({}_{\text{key-relay}}\) & service needs to relay \\ N\({}_{\text{key}}\)(i,j) & the QKP & P\({}_{\text{failure}}\) & Probability of failure of QKD \\ V\({}_{\text{s-d}}\) & Pair of source node and & & subprocess \\  & destination node & & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Notations and Definitions. During the key relay process, all relay nodes need to perform three operations when they receive the encrypted key. First, whether there is a transmission error is checked. Then the relay key is decrypted and cached locally. Finally, the key that needs to be relayed is encrypted and forwarded to the next hop node. When the key is successfully relayed to the destiny node, the destiny node performs the following two operations. First, it sends a relay success message to the source node and modifies the source and destiny node information of the successful relayed key. Then it broadcasts the 'delete cache' message to all relay nodes participating in this key-relay process. Information such as the serial number and size of cached keys is included in the 'delete cache' message. This information can be used to locate the key that needs to be deleted. The relay node that receives the broadcast message deletes the corresponding cached key. When a node detects a transmission error, it sends an error message to the previous hop node. The node receiving the error message checks the key-recycling characteristics. Recycling features include whether the QKR mechanism can be used and which QKR algorithm can be used. The node sends control instructions to other nodes to recycle the key according to the obtained recycling characteristics. To meet the information sharing and operation control between key pools, two types of messages are designed as shown in Figure 6. The function of the broadcast message is to delete the cached key in batches, including seven parts, which are source address, destiny address, key group, key serial number, and key size, including destiny address and delete cache. Key group indicates the node pair to which the key belongs. Key serial number indicates the serial number of the key in the key group. Key size indicates the number of keys. When the include destiny address bit is 1, it indicates that all caches from the source node to the destiny node are deleted.