There is a potential risk of privacy issues due to the disclosure of sensitive information about vehicles in Vehicular ad hoc networks (VANETs), including their real identities and driving trajectories. Anonymous authentication is an effective method to solve the above problems. Ring signature, a cryptographic primitive, offers the ability to create anonymous authentication schemes wherein the verifier can verify the signer’s legitimacy without having knowledge of their actual identity. Researchers have proposed several schemes that aim to protect privacy and maintain anonymity using ring signatures. However, a major drawback of most of these schemes is the linear correlation between the length of the signature and the number of ring members. Our proposed solution involves the construction of a certificateless anonymous authentication scheme that utilizes ring signature with a significantly reduced signature size, which follows a logarithmic relationship with the number of ring members. Through our analysis and comparison, it can be concluded that the privacy information of vehicles is well protected in our scheme, and the communication cost is significantly reduced compared with the existing protocols.