Balancing transparency, efficiency and security in pervasive systems