## 5 Implementation of Proposed Scheme in FANET
### Initialization and Registration  
In this sub algorithm, the KGC selects a hyper elliptic curve (C), a divisor (\(\mathcal{D}\)), the hash function (\(\mathcal{A}\)), and then computes \(\vartheta\) from {1, 2,..., \(n-1\)} and the size of \(n=2^{80}\). After the above process, the KGC determines the master public key using \(\mathcal{Y}=\vartheta\mathcal{D}\). Then, it publishes the set of selected parameters, {C, \(\mathcal{D}\), \(\mathcal{Y}\), \(n=2^{80}\)}. * _Partial Private Key Generation for RMEC-UAV:_ In order to set the partial private key for _RMEC-UAV_ with identity \(\mathcal{J}\mathcal{D}_{\rm rv}\), the KGC performs the following sub steps: 1. It selects \(X_{\rm rv}\) from {1, 2,..., \(n-1\)}; 2. It computes \(a_{\rm rv}=X_{\rm rv}\). \(\mathcal{D}\) and \(\beta_{\rm rv}=X_{\rm rv}+\vartheta\). \(\alpha_{\rm rv}\); 3. It computes \(\delta_{\rm rv}=\beta_{\rm rv}\). \(\mathcal{D}\); 4. It sends (\(\beta_{\rm rv}\), \(\delta_{\rm rv}\)) to the _RMEC-UAV_. The _RMEC-UAV_ can verify the pair (\(\beta_{\rm rv}\), \(\delta_{\rm rv}\)), such as \(\beta_{\rm rv}\mathcal{D}=a_{\rm rv}+a_{\rm rv}\).\(\mathcal{Y}=a_{\rm rv}+a_{\rm rv}\).\(\mathcal{Y}=X\mathcal{D}+a_{\rm rv}\).\(\vartheta\mathcal{D}=\mathcal{D}\) (\(X+a_{\rm rv}\). \(\vartheta\)) = \(\mathcal{D}\) (\(\beta_{\rm rv}\)) = \(\beta_{\rm rv}\mathcal{D}\). * _Secret Value Setting for RMEC-UAV:_ The _RMEC-UAV_ selects \(\mathcal{E}_{\rm rv}\) from {1, 2,..., \(n-1\)} and keeps it as their secret value. * _Private Key Setting for RMEC-UAV:_ The _RMEC-UAV_ sets the private key as \(\sigma_{\rm rv}=\mathcal{E}_{\rm rv}\), \(\beta_{\rm rv}\mathcal{D}\). \begin{table}
\begin{tabular}{c c c} \hline \hline
**S.NO** & **Symbol** & **Definition** \\ \hline
1 & C & Means hyperelliptic curve with genus 2, which is the generalized form elliptic curve requiring 80 bit key \\ \hline
3 & \(\mathcal{D}\) & A divisor, which is a finite formal sum of points on hyperelliptic curve \\ \hline
4 & \(\vartheta\) & Master secret key which is generated by KGC for producing partial private key \\ \hline
5 & \(\mathcal{Y}\) & The master public key of KGC \\ \hline
6 & N & Randomly generated number and the size of N as \(n=2^{80}\) \\ \hline
7 & \(\mathcal{A}\) & One-way hash function, which means that it has the property of irreversibility \\ \hline
8 & \(\sigma_{\rm r}=\mathcal{E}_{\rm r}\), \(\beta_{\rm r}\mathcal{D}\) & Private key of requester \\ \hline
9 & \(\sigma_{\rm s}=\mathcal{E}_{\rm s}\), \(\beta_{\rm s}\mathcal{D}\) & Private key of signer \\ \hline
10 & \(\mathrm{Ns}\) & A fresh nonce that is used for anti-replay attack \\ \hline
11 & \(\mathcal{J}\mathcal{D}_{\rm u}\) & Identities for sender and receiver \\ \hline
12 & \(m\) & Plain-text (message) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Notations used in proposed algorithm. * _Public Key Generation for RMEC-UAV:_ The RMEC-UAV computes \(\chi_{\text{\tiny{TV}}}=\sigma_{\text{\tiny{TV}}}.\mathcal{D}\) and sets their public key as \(\mathcal{B}_{\text{\tiny{TV}}}=\textless_{\chi_{\text{\tiny{TV}}}}\), \(\delta_{\text{\tiny{TV}}}\)\(>\). * _Partial Private Key Setting for BS/IoT:_ In order to set the partial private key for _BS/IoT_ with identity \(\mathcal{J}\mathcal{D}_{\text{\tiny{BI}}}\), the KGC performs the following sub steps: 1. It selects \(X_{\text{\tiny{BI}}}\) from {1, 2,..., \(n-1\)}; 2. It computes \(\alpha_{\text{\tiny{BI}}}=X_{\text{\tiny{BI}}}\). \(\mathcal{D}\) and \(\beta_{\text{\tiny{BI}}}=X_{\text{\tiny{BI}}}+\partial\). \(\alpha_{\text{\tiny{BI}}}\); 3. It computes \(\delta_{\text{\tiny{BI}}}=\beta_{\text{\tiny{BI}}}\). \(\mathcal{D}\); 4. It sends (\(\beta_{\text{\tiny{BI}}}\), \(\delta_{\text{\tiny{BI}}}\)) to _BS/IoT_. The _RMEC-UAV_ can verify the pair (\(\beta_{\text{\tiny{BI}}}\), \(\delta_{\text{\tiny{BI}}}\)), such as \(\beta_{\text{\tiny{BI}}}.\mathcal{D}=\alpha_{\text{\tiny{BI}}}+\alpha_{\text{ \tiny{BI}}}.\gamma=\alpha_{\text{\tiny{BI}}}+\alpha_{\text{\tiny{BI}}}.\gamma=X.\mathcal{D}+\alpha_{\text{\tiny{BI}}}.