With the rapid development of the Internet of Vehicles, the increase in vehicle functional requirements has led to the continuous increase in complex electronic systems, and the in-vehicle network is extremely vulnerable to network attacks. The controller area network (CAN) bus is the most representative in-vehicle bus technology in intra-vehicular networks (IVNs) for its flexibility. Although the current framework to protect the safety of CAN has been proposed, the safety communication mechanism between electronic control units (ECUs) in the vehicle network is still weak. A large number of communication protocols focus on the addition of safety mechanisms, and there is a lack of general protocol formal modeling and security assessment. In addition, many protocols are designed without considering key updates and transmission, ECUs maintenance, etc. In this work, we propose an efficient in-vehicle authentication and key transmission scheme. This scheme is a certificateless framework based on identity cryptography, which can not only ensure the security of the in-vehicle network but also meet the real-time requirements between ECUs. Moreover, this scheme can reduce the complexity of key management for centralized key generators. To evaluate the security of this scheme, we adopt a protocol model detection method based on the combination of the colored Petri net (CPN) and the Dolev–Yao attack model to formally evaluate the proposed protocol. The evaluation results show that the proposed scheme can effectively prevent three types of man-in-the-middle attacks.