# Secure Trust-Based Blockchain Architecture to Prevent Attacks in VANET
## 4 Proposed Blockchain in VANET
### Design of Proposed Blockchain Architecture  
Blockchain technology is implemented at the MAC layer (layer 2) in the proposed solution to ensure secure and trustworthy communication across the network. Furthermore, the proposed solution also integrates a signatureless public key infrastructure to preserve the privacy of the users in the network. Hence, this study endeavors to improve the security and privacy of users and messages communicated in VANET by tackling malicious attacks that are intended to bring catastrophic impacts on the network and other users. The continuous expansion of data in VANET through the implementation of the above technique has the tendency to affect the lightweight feature of the system over time [36]. However, treating the data in VANET as big data can help solve the complexity of the system. Data aggregation, storage, transmission, and computation are the four essential components that need to be well established in order to preserve the lightweightness of the proposed solution. To support big data, 5G technologies will be sufficient to support the VANET service with the implementation of the proposed architecture. Key performance indicators state that 5G networks are capable of offering a 10 Gb/s data rate, with less than 1 millisecond end-to-end latency [37]. Moreover, the three categories of use cases defined in 5G, enhanced mobile broadband (eMBB), ultra-reliable and low-latency communication (URLLC), and massive machine-type communication (mMTC), are well-characterized key innovations that can give ensured execution to VANET's big data gathering and transmission tasks [38]. Figure 4 shows the system design of the proposed solution, in which a communication occurs between two vehicles. In this study, four different blockchains were considered for the system design--the certificate blockchain (CertBC), revocation blockchain (RevBC), message blockchain (MesBC), and trust blockchain (TrustBC). All of these blockchains are administered by government agencies, such as the law enforcement agency (LEA) and certification authority (CA), because the proposed solution may require legal actions and legal usage of data for investigation. The standard submission regulation is to be set by the government agencies and it is to be adhered by the respective automakers registered in the country for the participation of their vehicles in the VANET.  
Figure 4: Proposed blockchain architecture in VANET.  
There are six phases in the proposed solution: system initialization, system authentication, message rating generation, trust value offset calculation, miner election and block generation, and distributed consensus, as shown in Figure 5. The first phase of the proposed solution begins with a system initialization. This phase is responsible for validating the identity of the nodes and issuing a certificate to them when nodes move into a network. The subsequent phase is system authentication, which acts as a security layer to authenticate nodes before the nodes can begin communicating with each other in the network. Next, message rating generation is concerned with providing a rating on the messages sent by the communicating nodes to ensure their trustworthiness. Following this, the fourth phase is trust value offset calculation, which is required to calculate the trustworthiness of each node in the network. After that, the system conducts a miner election and block generation, which implements the blockchain technology for an efficient tracking of the nodes in the system. The last phase of the proposed solution is the distribution of consensus, which acts as a ledger that is spread around the network.