# Towards Mitigating Jellyfish Attacks Based on Honesty Metrics in V2X Autonomous Networks
## 4 Secure and Efficient Routing Protocol for Jellyfish Attack Prevention in V2X (SecE-V2X)  
Secure and efficient routing protocol for Jellyfish attack prevention in vehicle-to-everything (SecE-V2X) is a secured routing protocol based on the greedy perimeter stateless protocol (GPSR) by choosing the trusted next forwarding node from the current node's neighbors to defend the network against different Jellyfish attack categories.  
Nodes acquire data utilized in the decision process when communicating with their neighbors' by recording the packet loss rate, delay, and packet reordering of each neighbor node, after which they then calculate their Honesty and store it locally in their table of neighbors. Table 3 is an example of a node neighbors' table.  
In addition to the GPSR beacon that is broadcasted periodically, the proposed protocol broadcasts an Honesty beacon message containing the updated information after any neighbor node Honesty update. Figure 4 depicts the Honesty update beacon structure in our proposed strategy.  
When a node decides to send data to a destination, it first chooses the optimal forwarding node with the best Honesty value based on information stored in its neighbors' table and then sends the data to that node. The chosen node then transmits the received data to the next node in the same way, and the procedure is continued until the destination is reached. In this manner, the malicious nodes will be isolated from participating in the routing process. The selected relay node is shown in Figure 5 based on the proposed next-hop selection method. Despite not being the closest to the destination (D) in this instance, the source (S) chooses node 3. As seen in Table, compared to other neighbors of (S), node 3 has a higher value of Honesty.  
The overall Honesty value of a node is calculated by the communication behavior of packet delivery between nodes which is represented in the packet loss rate, delay, packet reordering, and confidence of the node. The Honesty value is set in a range from 0 to 1,  
Figure 4: The Honesty beacon format in SecE-V2X.  
Figure 5: Choosing the next hop in the SecE-V2X protocol.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Node-Id** & **Position Information (\(\chi\),y)** & **Overall-Honesty** & **Timestamp** \\ \hline
1 & 6218.79, 2363.39 & 0.75 & 22.75 \\
2 & 6552.16, 2286.45 & 0.63 & 23.87 \\
3 & 6536.72, 2181.74 & 0.86 & 23.42 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Table 3: Node neighbors’ table in SecE-V2X.  
where 0 is completely dishonest and 1 is completely honest. Because the network has a dynamic topology and is self-organizing, nodes will join and leave the network at random. As a result, node Honesty must be updated in real time. This value changes at any given time according to the transactions between nodes. An overview of the entire work of the proposed protocol is presented in Figure 6. The presentation of the Honesty variables as well as the technique of next-hop selection employed in the proposed protocol take up the remainder of this section.  
Figure 6: The flow chart of the entire working of the proposed protocol.  
As a result, SecE-V2X's message complexity is equal to N*M, where N is the number of nodes, since each needs to initially broadcast a beacon, and M is the number of neighbors, since each vehicle calculates the Honesty value and sends this value to its neighbors. Additionally, because a node must wait for \(\mathfrak{g}\) time units before broadcasting the beacon again, the algorithm's time complexity is equal to the timer duration, \(\mathfrak{g}\).