A decentralized security framework for data aggregation and access control in smart grids