Communication and security trade-offs for battery-powered devices: a case study on wearable medical sensor systems