Authenticating devices in communication system is an important and challenging task. With many diverse devices getting connected to communicate, establishing authentication of such devices among themselves (or with a central server) is essential to overcome possible attacks in the communication channel and by adversaries. In this paper, an authentication protocol is proposed based on linear error correcting codes, pseudo random numbers and cyclic redundancy check function. General protocol is provided in this paper and can be used for any specific linear error correcting codes defined over finite field. The proposed protocol is resistant against replay attack, man-in-the-middle and impersonation kind of attacks. One of the advantages of the proposed protocol is that it can be incorporated within the framework of any communication system that uses linear error correction system to achieve reliability or can be implemented independently to achieve security in terms of authentication. © 2018, Springer International Publishing AG, part of Springer Nature.