A novel protocol for detection of cloning attack and sinkhole attack in wireless medical sensor networks