Internet of Vehicles (IoV) has developed into a useful service platform between vehicles and other vehicles, vehicles and roadways, and vehicles and pedestrians as a result of advancements in communication technology. However, along with the intelligent and networked IoV, IoV security issues are increasingly emerging, which often lead to extremely serious consequences. For example, when a vehicle is remotely attacked and maliciously controlled, it can lead to user privacy leakage. Attackers can also control the driving of vehicles through attacks, and there may even be a large number of connected cars being controlled in bulk, ultimately causing major social security incidents. In the Internet of Vehicles, authentication technology is one of the main solutions to address the security issues of the Internet of Vehicles. Many researchers have conducted some research on the authentication technology of vehicular network, but the traditional authentication scheme under the centralized system has problems such as frequent single-point failures and high overhead. When blockchain technology is properly implemented to the vehicle network environment, its security outperforms that of centralized systems due to features like decentralization, tamper-proof, security, and traceability. Because of this, we construct an optimization technique based on the Practical Byzantine Fault Tolerance (PBFT) algorithm in this work and present an efficient IoV decentralized authentication scheme based on the consensus algorithm of blockchain technology. After performance analysis, it is proved that our scheme has better performance and higher security.