# Secure Trust-Based Blockchain Architecture to Prevent Attacks in VANET
## 6 Results and Discussion
### Security Analysis  
Compared to the benchmark protocols, the proposed solution performed better in terms of security. The uniqueness of blockchain technology is that once the information is recoded and endorsed in the blockchain, then it is impossible to overwrite, modify, or even delete it from the network. Additionally, no information can be added randomly, which is one unique and important feature of blockchain. Secondly, any of the contents of the blockchain included by the nodes in the system were distributed  
Figure 19: Transmission overhead with denial of service attack. Figure 20: Computational cost of the proposed solution and existing solutions. among the nodes in the network to synchronize and validate without the help of a central control. A single point of failure was not possible with this system and it was much more secure as it provided a trustworthy environment. Moreover, a blockchain environment comes with a privacy protection to the users, whereby a user can be a part of the network without revealing their identity. For example, the user information is kept anonymous while sharing block details to the nodes in the network. In other words, personal information is private and confidential, plus secure. The reason for accurate, reliable, consistent, timely, and widely accessible data in the blockchain system is due to the decentralization of the network. The hash function processes input messages of various sizes and creates output messages of rigid size. The computation for this process includes the message authentication code (MAC), data integrity, and digital signatures. The hash function becomes free from collision when it can project data of random length to strings of rigid length. For the proposed solution's hashing function, sponge construction was adopted, as it features a very lightweight design. The data could have been attacked by malicious attackers and yet did not fall into any single point failures. This is also the reason why the data were accurate and reliable. Any transactions or events that take place in the system will be updated from time to time in the blockchain. So, it is hardly possible to doubt the transparency of the transactions in the network. A consensus mechanism in a blockchain technology is a fault-tolerant mechanism that is advantageous to a single state of network among the distributed multi-node system in achieving the required agreement. The agreement is a list of rules and regulations for all the different participating nodes which will be helpful in deciding their contributions eventually. Some criteria are important in a decentralized blockchain network, such as the security, efficiency, reliability, and real-time information sharing of the publicly shared database to agree upon the participation of a node of a particular consensus and to prove the trustworthiness of the transactions within the network. From the above discussion it can be analyzed that our proposed mechanism can ensure confidentiality, integrity, availability, and non-repudiation. In terms of confidentiality, the use of elliptic curve cryptography encryption for all V2V and V2I communications is capable of mitigating data modification attack, impersonation attack. From an integrity point of view, each communication includes a hash and a timestamp of all other fields contained in the communication. Each block is linked with the previous hash; hence all communications are chained together, making it impossible for Sybil and replay attacks to occur. Last but not least, based on the experiment done, denial of service attacks does not seem to affect VANET, as the trust management algorithm only allows legitimate nodes to participate in the network and isolate possible malicious nodes before they cause irregularities in the network. Moreover, the decentralized nature of the blockchain architecture makes the VANET prone to severe downtime in the case of other external issues, securing the network availability at all times.