A secure authentication and key management scheme for wireless sensor networks