Security and Privacy of Connected and Automated Vehicles