Automotive cybersecurity: Foundations for next-generation vehicles