# Blockchain-Based Authentication in Internet of Vehicles: A Survey
## 4 Blockchain-Based Authentication Schemes in Vehicular Networks
### Public Blockchain-Based Authentication Protocols
Once the mutual authentication succeeds, a key exchange mechanism takes place between the vehicle and its corresponding RSU in order to agree on a shared session key for securing the subsequent communication. The DB-KMM provides an automatic public key management including update and revocation via the smart contract. For the update process, when a vehicle sends a key update request containing its ID, old public key, and validity period to the VSP, the VSP triggers the smart contract to generate a new public/private key and a new validity period for the requesting vehicle. The VSP then forms a new transaction containing the vehicle ID, new public key, and validity period and sends it to the BN. The RSUs forming the blockchain network perform the consensus on the received transaction and if the mining succeeds, the updated transaction is added to the blockchain, and the new public key is transferred to the requesting vehicle. Lastly, when a malicious behavior is noticed on some vehicle, the VSP initiates a revocation transaction to the BN and triggers the smart contract to remove the vehicle's identity and public key from the blockchain. The performance of the proposed DB-KMM is tested in terms of the end-to-end packet latency and the packet loss ratio using OMNeT++ and Veins simulators and the results prove that it greatly improves the cost of public key management compared to the traditional PKI management. Further, security analysis shows that the scheme can resist DoS attack, public key tampering attack, internal attacks, as well as collusion attacks. The authors in [127] extended the conventional blockchain by introducing two novel data structures called the Merkle Patricia Tree (MPT) and the Chronological Merkle Tree (CMT) and then proposed a Blockchain-based Privacy Preserving Authentication scheme (BPPA) based on this extended blockchain. The system model includes the following entities: certificate, certificate authority, Law Enforcement Authority (LEA), RSUs, and vehicles. The certificate includes the public key, the expiry date, the timestamp, and the encrypted mapping between the vehicle's real identity and its certificates. The certificate authority issues two types of transactions: the issuance transaction which includes the issued certificate, the timestamp and the signatures of the trusted authorities, and the revocation transaction which contains the revoked certificate. The LEA is responsible for the registration of vehicles and monitoring their behavior. Additionally, it concatenates and organizes the transactions received from the certificate authority to generate a block and transfers the block to all the RSUs for verification. When a certificate issuance transaction or a certificate revocation transaction is broadcasted by the certificate authority, a leaf node is inserted into or removed from the MPT, respectively, and the root of the MPT is updated. The transaction and the corresponding root of MPT are recorded chronologically in the CMT. The root of CMT is considered as the transaction root whereas the root of MPT is taken as the certificate root. The transaction root and the certificate root are then written immutably in the blockchain. The significance of this extended blockchain being developed is represented by two aspects. First, it provides a simplified authentication technique whether a certain certificate is in the MPT or not. Given the certificate root and a record containing the nodes along the path, the authenticator can compute a hash using the given record. If the hash value is equal to the certificate root in the blockchain, it is proven that the certificate exists in the MPT. Second, it provides transparency within the activities of the authorities by using transactions roots; since, if the transaction root is given, it can be verified when a certain certificate is issued or revoked.