# Quantum-Key-Distribution (QKD) Networks Enabled by Software-Defined Networks (SDN)
## 5 Three-Use Cases in QKD Networks
### Resource Allocation in the Networks  
QKD networks have multi-dimensional resources, including wavelength resources in existing fiber links and secret-key resources in QKPs. During the provisioning of secret-key services, not only secret keys need to be constantly consumed, but also a certain number of wavelength resources need to be occupied. Especially in the case when the number of wavelengths in the network is limited, it is necessary to meet security demands of communication and further improve the wavelength utilization. Thus, how to construct multi-dimensional resources in QKD networks is a necessary problem for the optimization of wavelength utilization. From the perspective of secret-key generation, it is necessary to consider the multi-dimensional resources of optical fiber. In other words, quantum channel and optical channel need to occupy multiple wavelengths, but subject to the entire network's constraints in terms of wavelength utilization for other services. In addition, the quality of secret-key resources is also affected by global secret-key rates and key pool running time.  
In order to solve the above problems, this section establishes a multi-dimensional resource model in QKD networks, designing a strategy for routing and resources allocation of secret-key provisioning services in QKD networks. Since there is a risk that keys will be leaked in the both sides of the communication, secret keys need to be constantly updated to enhance the security. As shown in Figure 5, it shows a specific flowchart for the strategy which mainly includes two steps, i.e., the allocation of secret-key (step 1) and wavelength resources (step 2). For the secret-key allocation, when the requests of services with security demands arrive, the controller will find the corresponding QKP in the nodes given in the requests (step 1.1). The controller randomly selects or first hits a pair of secret keys in the QKP, and sends a secret-key allocation request to the QKP corresponding to the source and destination nodes to inform the station (Step 1.2). If the QKP is empty, this is indicating no resources are available for the allocation and the security requirement of the service will be blocked. Also, for the secret-key update, a certain number of time slices will be allocated for secret-key update periods and the status of QKP will also be updated. For the time-slice allocation, the shortest path from the source to the destination node is calculated based on topology using the shortest path algorithm (step 2.1). Then, allocating time slices based on the first hit algorithm on the calculated path. If time-slice resource is not available, this means that the update will be blocked. Then, the next service will be executed and the status of wavelength occupation in the network will also be updated (step 2.2).  
To verify the feasibility of the proposed strategy, we conducted a simulation with the performances of blocking probability and time-slot utilization under different update periods. As shown in Figure 6a,b, it is obvious that bigger traffic loads will lead higher blocking probability and wavelength utilziation, this is because a limited number of wavelengths can be occuppied. Also, as the update period becomes bigger, the blocking probability and time-slot utilization become lower. More secret keys can be generated by QKD process by occupying more wavelength resources, while bigger secret-key rate developed in the future allows less wavelength occupation and quick secret-key generation.  
Figure 5: The flowchart for routing and resources allocation of secret-key provisioning services.