# Secure Cognitive Radio Vehicular Ad Hoc Networks Using Blockchain Technology in Smart Cities
## 1 Introduction  
The world is advancing, and technology is taking over everything in our daily lives; everything has evolved from kitchen appliances to smart home systems, from normal video games to virtual reality games, and from manual to self-driving cars. As the world's population is increasing, we need more ways to manage the processes of our daily lives. The increasing population has caused people buy cars to facilitate their family's transport needs, and this extensive work culture caused people rely on the roads for their commute to work. In efforts to improve the travel experience, research is being conducted to help vehicles communicate while on the roads. The vehicular ad hoc network (VANET) is a growing technology that allows vehicles to communicate with each other, forming vehicle-to-vehicle (V2V) communications and communication with roadside units (RSUs), resulting in vehicle-to-roadside (V2R) communications using dedicated short-range communication (DSRC) technology. Vehicles exchange messages with each other or with RSUs using an onboard unit (OBU). This exchange of messages should be secure to avoid any miscommunication in such a highly dynamic environment. Miscommunication has the potential to cause road accidents. V2V technology involves the exchange of messages on a periodic basis. If incorrect data are included in this exchange of information, there is a risk of serious hazards. For instance,vehicles that are malicious and share incorrect information with other vehicles can cause road accidents and traffic misdirection. Despite there being many realistic scenarios to demonstrate this, driving in foggy weather is more critical due to its challenging environment. Driving in this weather can be regulated by creating secure VANETs to prevent a large number of road accidents worldwide. If this mode of security is not put in place, any malicious vehicle could mislead other vehicles and cause more road accidents. Misinformation may occur when the road patch has low visibility conditions but the corrupted data indicate clear weather. As a consequence, all vehicles that are already moving at a constant speed and maintaining a safe distance from each other could increase their speed, potentially leading to collisions. Moreover, any vehicle forwarding information that is beneficial to other vehicles on the road requires that its privacy not be compromised. To prevent privacy breaches, every vehicle requires secure and authentic communications, which can only be achieved by encrypting the communication. To ensure authentication, every participating node has a public and private key pair stored in a secure database. For a decade, blockchain has been an emerging technology that offers a distributed database made up of blocks of data interconnected as a chain [1]. It is famous for its decentralized and tamper-proof qualities. A peer-to-peer network manages the blockchain, with each node having a distinct public key. The public key is used to broadcast all transactions, and the node records them to form a block [2]. Forming a block requires periodic messaging in vehicles, which is critical when using the DSRC band due to its spectrum scarcity issue. Cognitive radio (CR) technology has been employed in vehicles that form a cognitive radio vehicular ad hoc network (CR-VANET) [3], allowing them to locate idle channels and establish a link between any source and destination. In CR-VANET, secondary vehicles periodically sense the channel and, when they find it free, utilize it for communication, keeping the primary user's (PU) activity safe. To consider delivering information-aware messages while ensuring security using blockchain technology, we introduce a novel method of cognitive vehicular communication. This proposed method has the PU monitor its channel activity, and when it becomes idle, it allows secondary nodes to use its free spectrum, provided they are authentic.