Cognitive radio networks are intelligent networks that can sense the environment and adapt the communication parameters accordingly. These networks find their applications in co-existence of different wireless networks, interference mitigation, and dynamic spectrum access. Unlike traditional wireless networks, cognitive radio networks additionally have their own set of unique security threats and challenges, such as selfish misbehaviours, self-coexistence, license user emulation and attacks on spectrum managers; accordingly the security protocols developed for these networks must have abilities to counter these attacks. This paper presents a novel cognitive authentication protocol, called CoG-Auth, aimed to provide security in cognitive radio networks against threats to self co-existence. CoG-Auth does not require presence of any resource enriched base stations or centralised certification authorities, thus enabling it to be applicable to both infrastructure and ad hoc cognitive radio networks. The CoG-Auth design employs key hierarchy; such as temporary keys, partial keys and session keys to fulfil the fundamental requirements of security. CoG-Auth is compared with IEEE 802.16e standard PKMv2 for performance analysis; it is shown that CoG-Auth is secure, more efficient, less computational intensive, and performs better in terms of authentication time, successful authentication and transmission rate.