# Cross-Platform UAV Swarm Key Management in Denied Environments
## 3 Cross-Platform Key Management of UAV Swarms in Denied Environments
### Private Key Establishment in the Regrouping and Arrival Stage  
In the denied environment, UAVs transported by different platforms vary in their model and load module. Normally, heterogeneous UAVs are reorganized into a full-featured UAV swarm to fulfill specific tasks, as shown in Figure 3.  
For the process of regrouping and private key establishment, this study puts forth a scheme in which the regrouped UAVs select a swarm head as per specific rules; and for the scenario of a cross-platform UAV swarm performing tasks in a denied environment, the improved LEACH algorithm is employed for the swarm head selection in this study. The new swarm selects the swarm head in the order of priority: the priority level of the UAV nodes from the same platform is determined by their ID, and a smaller ID indicates higher priority. Before the swarm head is identified, the UAV node sends its ID information \(UAV\_ID_{j_{i}}\) to other nodes in the same swarm through the global key \(K_{0}\); after receiving the ID information, other nodes compute to identify whether it is the node of the highest priority in the swarm according to the steps of swarm head selection. After that, the swarm head is identified to construct the private key establishment factor. The steps for swarm head selection are as follows:  
Step 1: every UAV node in the swarm broadcasts their ID information \(UAV\_ID_{j_{i}}\);  
Step 2: each UAV node, after receiving the ID information of other nodes in the swarm, determines whether it is the minimal \(j\) (\(j_{\min}\)) in the swarm through comparison;  
Step 3: find the minimal \(i\) from the \(j_{\min}\) in the swarm, which is denoted as \(i_{\min}\). Figure 3: Network model in the arrival stage. Figure 2: UAV swarm network in transport and delivery stage. The legitimate UAV extracts \(\beta_{m^{\prime}t}^{2}\), \(I_{m^{\prime}t}\) and \(b_{j_{i}}\) from the broadcast message \(M_{t}\) it receives at the task stage \(t\), and then calculates \(a=I_{m^{\prime}t}\) mod \(b_{j_{i}}\) and \(a^{\prime}=\varepsilon_{m^{\prime}t}\oplus h\left(ID_{j}\right)\)mod \(b_{j_{i}}\) using \((ID_{j},b_{j})\). If \(a=a^{\prime}\), the message is validated to be a legitimate message in the reorganized swarm, and the key \(G_{m^{\prime}t\_key}\) is constructed for secure communication; if \(a\
eq a^{\prime}\), the message is not validated and will be discarded as an error message. Algorithm 3 shows the specific procedures for key establishment:  
```
1. Initialization :
2. Procedure// Generate broadcast message
3. \(UAV\_ID_{j_{min}t_{min}}\) : \(C\)ernard \((\varepsilon_{m^{\prime}t}\), \(\gamma_{m^{\prime}t})\); //random generation
4. Compute \(S_{m^{\prime}t}^{MK}=h\left(\gamma_{m^{\prime}t},S_{m^{\prime}t}^{NK}\right)\)
5. \(S_{m^{\prime}t}^{NK}=h^{\prime-1}(seed)//compute the local update key
6. Construct \(G_{m\_key}=(S_{m^{\prime}t}^{NK},S_{m^{\prime}t}^{MK})\); //Construct the private key for the m\({}^{\prime}\) swarm
7. Compute \(I_{mtt}\equiv\lfloor\varepsilon_{m}\oplus h\left(ID_{j}\right)\rfloor\)\(\left(mod\ b_{j_{i}}\right)\rfloor\)//validation factor for the m\({}^{\prime}\) swarm
8. Compute \(\alpha_{m^{\prime}t}^{1}\equiv\gamma_{m^{\prime}t}\oplus K_{0}\) mod \(b_{j_{i}}\)
9. \(\beta_{m^{\prime}t}^{2}\equiv\lfloor(\gamma_{m^{\prime}t}\oplus K_{0})/K_{0} \rfloor\)mod \(b_{j_{i}}\)
10. Construct \(M_{m^{\prime}t}=\left\{\alpha_{m^{\prime}t}^{1}\beta_{m^{\prime}t}^{2},I_{m^{ \prime}t},e_{m^{\prime}t},I_{m\_{t}},I_It is necessary to update the key for the UAV swarm to ensure secure communication between the member UAVs. Figure 6 displays the procedures for UAV swarm key update in the denied environment. #### 3.3.1 Broadcast Update

The original swarm head UAV identifies during patrolling changes in the number of UAVs in the swarm and broadcasts to generate a random number \((\varepsilon_{m^{\prime}(t+i)},\gamma_{m^{\prime}(t+i)})\). The legitimate UAV nodes extract \((\varepsilon_{m^{\prime}(t+i)},\gamma_{m^{\prime}(t+i)})\) from the broadcast message to construct a new swarm key.