A Secure and Efficient Authentication Mechanism Applied to Cognitive Radio Networks