## 3 The Proposed Protocol
### The Proposed Scheme
#### 3.3.3 UAV-GCS Authentication Phase  
The following is the specific process of identity authentication:  
1. The UAV generates a random number as its private key \(S_{U_{i}}\), and calculates the public key \(P_{U_{i}}=G\times S_{U_{i}}\).
2. The UAV generates information \(M1=\big{(}ID_{U_{i}},P_{U_{i}},Cert_{U_{i}},t1\big{)}\), and then signs \(M1\), namely \(S1=S(PR(U_{i}),M1)\), calculates \(HMAC\) value, namely \(HM(RK,M1||S1)\).
3. The UAV generates the transmission information: \(\{M1,HMAC\}\).  
Step 2:  
1. When the GCS receives the information from the UAV \(\{M1,HMAC\}\), first verify the freshness of the timestamp \(t1\). If the requirements are met, continuing to the next step, otherwise, the authentication fails.
2. It will calculate \(HM(RK,M1||S1)\), and compare it with the received \(HMAC\) value. If it is the same, continue to the next step, if not, authentication fails.
3. The GCS will check the validity of the certificate and use the public key of the UAV's certificate to verify the signature \(S1\). If correct, the GCS successfully certifies the UAV and will continue; otherwise, the authentication fails.
4. The GCS generates a random number as its private key \(S_{G}\), and calculates the master key \(MK_{GU_{i}}=P_{U_{i}}\cdot S_{G}\); the session key \(SK_{GU_{i}}=MAC(MK_{GU_{i}},SC(G,U_{i})\oplus RK_{GU_{i}}\big{|}\big{|}1)\), the identity authentication key \(AK_{GU_{i}}=MAC(MK_{GU_{i}},SC(G,U_{i})\oplus RK_{GU_{i}}\big{|}\big{|}2)\).
5. Then information \(M2=\big{(}ID_{U_{i}},P_{G},Cert_{G},t2\big{)}\) is generated, and the message \(M2\) is signed, namely \(S2=S(PR(GCS),M2)\);
6. Encrypting the information and calculate \(E(SK_{GU_{i}},MSG)\) and \(HM(AK_{GU_{i}},M2||E(SK_{GU_{i}},MSG))\).
7. Generating the transmission information \(\{M2,HMAC,E(SK_{GU_{i}},MSG)\}\).  
Step 3:  
1. The UAV receives the information from the GCS \(\{M2,HMAC,E(SK_{GU_{i}},MSG)\}\), the freshness of the timestamp \(t3\) should be verified firstly. Judging whether it meets the freshness requirement.
2. It will verify the validity of the certificate and use the certificate public key of the GCS to verify the signature \(S2\). If correct, the UAV successfully certifies the GCS. Will continue; otherwise, the authentication fails.
3. The UAV will compute the master key \(MK_{U_{i}G}=P_{G}\cdot S_{U_{i}G}\), the session key \(SK_{U_{i}G}=MAC(MK_{U_{i}G},RC(G,U_{i})\oplus RK_{U_{i}G}\big{|}1)\), and the identity authentication key \(RK_{U_{i}G}=MAC(MK_{U_{i}G},RC(G,U_{i})\oplus RK_{U_{i}G}\big{|}2)\).
4. The \(HAMC\) value will be calculated and compared to the received \(HAMC\) value. Similarly, the UAV successfully authenticates the GCS.  
After decrypting the encrypted information \(E(SK_{GUI_{i}},MSG)\), the UAV will receive the information sent by the GCS.  
The UAV will generate information \(M3=\big{(}ID_{U_{i}},G,t3\big{)}\), sign the message \(M3\), namely \(S3=(PR(D),M3||MSG)\), and calculate \(HM(AK_{U_{i}G},M3||S3)\). It generates the send information \(\{M3,S3,HMAC\}\).  
Step 4:  
When the GCS receives the message \(\{M3,S3,HMAC\}\), the freshness of the timestamp \(t3\) should be verified firstly.  
It will verify whether the \(HMAC\) value is consistent with the received one.  
If so, will verify the validity of the certificate and use the certificate public key of the UAV to verify the signature.  
If the verification is successfully, it can be judged that the UAV has successfully received the message sent by the GCS. Similarly, the UAV can verify that the GCS has successfully received the information sent by the UAV by signing \(S4=S(PR(G),M4||MSG)\).  
Therefore, multi-key agreement and multi-authentication are used to achieve authentication between the UAV and the GCS, and to generate the master key, through which the secure session key and the authentication key are generated. The authentication process is shown in Figure 2.