Energy-efficient encryption for the internet of things