# Research of Security Routing Protocol for UAV Communication Network Based on AODV
## 3 Improved Security AODV Routing Protocol
### Secure Routing Scheme Based on ECC
#### 3.2.2 The Process of Routing Discovery  
The routing process of the AODV routing protocol mainly relies on RREQ, RREP, and RERR to control the transmission of messages. This is also the main attack target of malicious nodes against the routing protocol. Therefore, these messages must be protected to prevent attacks such as tampering or forgery by malicious nodes. Figure 3 shows a simple network model for secure route discovery. In the path shown in the figure, the source node is \(S\), the destination node is \(D\), and \(A\) and \(B\) are intermediate nodes. When \(S\) has  
data to send, but it has no route to the destination node or the route has expired, \(S\) randomly selects an integer \(X_{s}\in[2,n-2]\) and calculates \(T_{s}=X_{s}\times G(\text{mod}q)\) to broadcast the route request information. Among them, _Hash_NC_ is the invariant part related to hash information in the message. _RREQ_CF_Hash_ is the hash value calculated by the source node \(S\) according to the hop value and serial number in the routing request information. _RREQ_FF_Sig_s is the signature of the source node \(S\) to the invariant part. _Null_ is the signature of the intermediate node to the invariant part. For the source node, this field is empty. \(E_{k_{d}}(T_{s})\) is the encryption protection of the session key negotiation factor by the source node \(S\) with the public key of the destination node \(D\). When intermediate node \(A\) receives the routing request packet from source node \(S\), it will perform the following processing. Step1: According to _RREQ_CF_Hash_ and _Hash_NC_, verify whether the hop value and serial number are maliciously modified. Step2: Verify the signature _RREQ_FF_Sig_s of the source node with the public key of the source node \(S\). After the verification is successful, the reverse path to the source node is established, and the hop value is increased by 1, which means that the normal processing of RREQ is followed and the corresponding hash operation is performed. The node updates the value of _RREQ_CF_Hash_ field, then signs the message to be forwarded with its own private key, and fills in the _Null_ field. The node continues to broadcast the routing request message. At this time, the format of the routing request message is as follows:  
\[A\rightarrow*:[RREQ,Hash\_NC,RREQ\_CF\_Hash,RREQ\_FF\_Sig_{s},RREQ\_FF\_Sig_{A},E_{k_{ d}}(T_{s})]\]  
After receiving the routing request message, intermediate node \(B\) will perform the following operations:  
Step1: According to _RREQ_CF_Hash_ and _Hash_NC_, verify whether the hop value and serial number are maliciously modified. Step2: Verify the signature _RREQ_FF_Sig_A of the previous hop node \(A\). Step3: Verify the signature _RREQ_FF_Sig_s of the source node with the public key of the source node \(S\). After verification, the reverse path to the source node is also established, the hop value is increased by 1, and the corresponding hash operation is performed. The node updates the value of the _RREQ_CF_Hash_ field, and then resigns the packet to be forwarded with its own private key and  
Figure 3: Simple network model for secure route discovery. replaces the signature \(RREQ\_FF\_SigA\) of the previous hop node. The node continues to broadcast this route request message, the format is as follows:  
\[B\rightarrow\star:[RREQ,Hash\_NC,RREQ\_CF\_Hash,RREQ\_FF\_Sig_{s},RREQ\_FF\_Sig _{B},E_{k_{d}}(T_{s})]\]  
After receiving the routing request packet, the destination node performs the same process, decrypts \(T_{s}\) with its own private key after successful verification, and randomly selects an integer \(X_{d}\in[2,n-2]\) to calculate \(T_{d}=X_{d}\times G(\text{mod}q)\). According to the established reverse path, unicast route replies the message to the previous hop node \(B\). \[D\to B:[RREQ,Hash\_NC,RREQ\_CF\_Hash,RREQ\_FF\_Sig_{d},Null,E_{k_{s}}(T_{d})]\]  
After receiving the message, the intermediate node also performs relevant verification first. The process is the same as the routing request process, which is not described here.