A survey on energy-aware security mechanisms