VANET, or Vehicular Adhoc Network, is widely used in mobile networks that use self-driving, navigation, entertainment, and other emergency applications. It is commonly adopted in the transport system to facilitate communication between the vehicles and crucial points. It is used to control traffic, improve routing efficiency, and better functioning of the transportation systems and controls. It enables communication between the mobile nodes through several base stations. The effectiveness of the VANET is improved through Artificial intelligence techniques. With the wide adoption of VANET networks for better communication, the network is subjected to various security vulnerabilities. This paper proposes a key generation distribution and comparison-based user authentication routing protocol to improve the security of the VANET. The communication metrics of the networks are monitored, and the data obtained are processed through the RNN algorithm. The nodes are authenticated using bilinear mapping, which involves registration, authentication, and verification. The nodes are identified during registration, a private key is assigned for temporary authentication, and the nodes are verified. NS3 is used to simulate the proposed model, where it obtained throughput, PDR, energy efficiency, and packet loss of 99.8, 99.3, 99, and 0.02%, respectively.