A randomized, efficient, and distributed protocol for the detection of node replication attacks in wireless sensor networks