Energy-efficient and decentralized access control: a framework for embedded systems and mobility