Privacy and security in cyber-physical systems