Security and Privacy for Smart Cyber-Physical Systems