Securing body sensor networks and pervasive healthcare systems