# Authentication-Based Secure Data Dissemination Protocol and Framework for 5G-Enabled VANET
## 4 System Model for A-MAC
### Validation Level
#### 4.3.2 Message Validation  
To make sure the safety of transmitting data, the communication entity is required to be validated before it is prepared to transmit data. It is again a three-step messaging process namely _request message_, _reply message_ and _communication units_. Figure 4: Vehicle authentication process in A-MAC protocol. **Request Message**  
Precisely, while vehicle \(\varrho_{1}\) requests to transmit data to vehicle \(\varrho_{2}\), it first sends a request message to the vehicles and marks the delivery time request. In similar fashion, vehicle \(\varrho_{1}\) generates a random number \(h_{\varrho_{2}}\). Subsequently, the vehicles separate the factors as of OBU and the value of factor \(\varphi_{\varrho_{0}}\) is computed. The vehicles \(\varrho_{0}\) use generate factors \(\zeta_{\varrho_{0}}\), \(\varphi_{\varrho_{0}}\) and \(\theta_{TA}\) to calculate the security key of TA, as shown in the following Equation. \[\theta_{TA}=h(\zeta_{\varrho_{0}}\parallel\varphi_{\varrho_{0}})\oplus\tau_{ TA} \tag{5}\]  
The vehicles \(\varrho_{0}\) compute the following factors. \[T_{\varrho_{0}}=h(\theta_{TA}\parallel S_{tx})\oplus\zeta_{\varrho_{0}} \tag{6}\]  
\[S_{\varrho_{0}}=T_{\varrho_{0}}\oplus\zeta_{\varrho_{0}}\oplus\theta_{TA} \tag{7}\]  
\[\mu_{\varrho_{0}}=Rqst\oplus T_{\varrho_{0}}\oplus\theta_{TA}\oplus S_{tx} \tag{8}\]  
where \(S_{tx}\) is the timestamp for the request. **Reply message**  
Vehicle \(\varrho_{2}\) first calculates the timestamp of the received factors \(\{T_{\varrho_{0}},\mu_{\varrho_{0}}\wedge S_{tx}\}\), which is denoted as \(S_{rx}\). Subsequently, \(S_{rx}\) is retrieved from \(S_{tx}\) which is separated from \(\{T_{\varrho_{0}},\mu_{\varrho_{0}}\wedge S_{tx}\}\). If \(S_{rx}\) is extremely late, the following disparity must hold. \[S_{rx}-S_{tx}\geq\alpha S_{1} \tag{9}\]  
where \(\alpha S_{1}\) is the system factor. While disparity holds, it has received factors \(\{T_{\varrho_{0}},\mu_{\varrho_{0}}\wedge S_{tx}\}\) are expired. Vehicle \(\varrho_{2}\) is instantaneously halted communicating through vehicle \(\varrho_{1}\). Then, it should go for the next step. Vehicle \(\varrho_{2}\) recalculates the factors \(h_{\varrho_{1}}\) are provided with the help of following relations. \[\tilde{h_{\varrho_{1}}}=T_{\varrho_{0}}\oplus h \tag{10}\]  
Correspondingly, vehicle \(\varrho_{2}\) recalculates \(\tilde{S_{\varrho_{0}}}\), as shown in the following Equation. \[\tilde{S_{\varrho_{0}}}=h_{\varrho_{1}}^{\ast}\oplus T_{\varrho_{0}}\oplus \theta_{TA} \tag{11}\]  
Subsequently, the vehicle \(\varrho_{2}\) excerpts request message from Equation (8), which is provided by the following equations. \[Rqst=\mu_{\varrho_{0}}\oplus T_{\varrho_{0}}\oplus\theta_{TA}\oplus S_{tx} \tag{12}\]  
Next, finding these factors, vehicle \(\varrho_{2}\) compute two new factors \(F_{\varrho_{2}}\) and \(L_{\varrho_{2}}\) provided by the following equations. \[F_{\varrho_{2}}=h(h_{\varrho_{1}}\parallel\alpha\tilde{S_{1}}\parallel\theta_ {TA}) \tag{13}\]  
\[\theta_{TA}=h(\zeta_{\varrho_{0}}\parallel\varphi_{\varrho_{0}})\oplus\tau_{ TA} \tag{5}\]0  
Finally, vehicle \(\varrho_{2}\) communicates the applicable factors to the vehicle \(\varrho_{1}\). When received, vehicle \(\varrho_{1}\) sends an acknowledgement message to vehicle \(\varrho_{2}\). For the security of the channel, a reply message is encoded which is provided by:  
\[\theta_{TA}=h(\zeta_{\varrho_{0}}\parallel\varphi_{\varrho_{0}})\oplus\tau_{ TA} \tag{5}\]1  
In the end, the vehicle \(\varrho_{2}\) communicates factors \(\{L_{\varrho_{2}},Reply\}\) to the vehicles. This protocol proposes to decrease the operation time of the authentication process. Recalling Equation (15), the pieces of data needed? to the encoder are reply messages and the key \(F_{\theta_{2}}\). Using Reply and \(F_{\theta_{2}}\) as input to the protocol, the encoder EN-reply is generated. **Communication units**  
The exchange of control bits (sent, replay) among the vehicles enables to get each other's information.