Automotive Safety Trends:
The focus on safety has also increased due to the adoption of a zonal architecture compared to the traditional domain architecture. In a domain architecture, electronic control units (ECUs) with similar functions are interconnected in a subnetwork, resulting in numerous independent domains. These domains are divided into propulsion and transmission, body control, climate control, and so on, and each can be developed to meet a different level of safety depending on its relevance to the vehicle. In contrast, in the zonal concept, ECUs are connected to a local zone controller and gateways. In a zonal architecture, the functions of several domain controllers are concentrated in a centralized controller. This concentration reduces system cost and complexity, which is why zonal architecture is increasingly being chosen over domain architecture. One drawback of the zonal architecture is that it requires ECUs from different domains to share the communication network, which means that all ECUs in the zonal architecture must adopt higher levels of security.

Figure 1. Domain architecture versus zonal architecture.
To address automotive security, public bodies and international standardization institutions require manufacturers to adopt new standards such as ISO/SAE 21434 and regulations such as UNECE (United Nations Economic Commission for Europe) WP.29 R155/R156, as well as similar regulations applicable in specific geographic areas.
ISO 21434 is a relatively recent cybersecurity standard in the automotive industry. It focuses on engineering and process requirements throughout the product lifecycle and includes organizational policies, product development processes, and the management of security issues during the product lifecycle. For vehicles to comply with cybersecurity standards, this standard must be adopted throughout the supply chain, by manufacturers themselves, as well as by direct suppliers and providers of software and semiconductor components.
UNECE R155 and R156 are cybersecurity regulations that have been adopted by 65 countries to date. Car manufacturers must implement them to market their vehicles in these countries and since July 2024 compliance is mandatory for all new vehicles in production.
The UNECE regulation refers to the engineering specifications of ISO 21434 and requires the implementation of a Cybersecurity Management System (CSMS). This system must cover the entire lifecycle of the vehicle, from development to end-of-life. Throughout this time, the CSMS requires monitoring for cyber threats and implementing a process to mitigate them. In some cases, the mitigation technique may consist of timely firmware patching in a vulnerable ECU. Therefore, over-the-air firmware updates have become necessary in all vehicles to comply with UNECE regulations. The ECU's embedded system must incorporate secure boot, secure firmware updates, and secure communication to ensure robust over-the-air firmware updates.
One example of an application requiring over-the-air update capability and a high level of authentication is wireless charging of personal devices in the vehicle's cabin. The Wireless Power Consortium (WPC), which manages the Qi® wireless charging specifications, is concerned about malicious chargers that damage phones and other devices. Qi 1.3 and the more recent Qi 2.0 require wireless chargers to cryptographically authenticate themselves for high-power charging. To enable this authentication, Qi-compliant wireless chargers must have Product Unit Certificates embedded in the device hardware. These certificates are public key certificates that manufacturers can obtain from WPC-authorized Certificate Authorities. Chargers also need to incorporate high-security CC EAL (Common Criteria Evaluation Assurance Level) or JIL (Joint Interpretation Library) hardware capable of ECC signature-based authentication, secure key storage, and secure storage of the X.509 certificate.
Software and Hardware Security:
The secure boot function is paramount for establishing the root of trust in the ECU, as the secure bootloader ensures that the firmware running on the device is authentic and has not been tampered with during or after factory production. Therefore, the bootloader is responsible for ensuring that the firmware used is genuine from the manufacturer or direct supplier. The memory segment of the controllers that stores the secure bootloader must be immutable (or unmodifiable), so it should be write-protected and programmable only once during initial factory programming. In the boot sequence, the real-time digital signal controller runs the secure bootloader to verify the authenticity and integrity of the application images. Both authenticity and integrity can be verified using the Elliptic Curve Digital Signature Algorithm (ECDSA) and hash algorithms. Figure 2B outlines the steps for creating an application with a signed image, and Figure 2C shows the process for verifying the application using an embedded real-time digital signal controller. Figure 2C shows the use of the SHA-256 hash function to obtain a synthesis and verify the step using ECDSA and the ECDSA P-256 algorithm.

Figure 2. Secure boot process, firmware update, and controller memory map.
The secure firmware update function can be an immutable section of the real-time digital signal controller and is responsible for interacting with the central gateway over the vehicle network to receive the new application image. Because the application image incorporates the node's functional IP address, designers must consider using encryption and node authentication via the communication interface to avoid exposing the firmware image. Figure 2A shows the memory map for a controller with a firmware update function; it typically requires three application sections: one for the currently active image, one for downloading the new image, and a factory reset section to store the default image as a recovery mechanism in case of failure. The firmware update must also verify authenticity and integrity, as well as the secure boot process, and needs to implement an update policy so that the firmware can only be updated to a newer version. The firmware update must also implement a system recovery method that is beneficial in certain situations, for example when the active application image or the downloaded application fails an authenticity check.
To implement these security features, the recommended technique is to use an external Hardware Security Module (HSM) in conjunction with a secure microcontroller or digital signal controller (DSC), or a microcontroller/DSC with an integrated HSM in the same package. A microcontroller/DSC with an integrated HSM is advantageous when a small footprint is required. Embedded security solutions using the dsPIC33 DSC, for example, support both internal and external HSMs; both are widely accepted by automotive manufacturers. HSMs serve as a security enclave when the secure key storage area and cryptographic modules are separate from the main microcontroller/DSC system. This reduces security risk compared to a microcontroller that stores keys in its internal memory. The secure microcontroller/DSC complements an external HSM with features such as immutable secure boot memory, one-time programmable Flash memory, and the ability to disable debug mode access. An ECU platform based on an HSM and a family of secure microcontrollers is better suited because it allows for selecting the appropriate microcontroller based on memory and function requirements.
Development with an external or integrated HSM demands a detailed understanding of security and a thorough analysis of the numerous configuration settings to meet the specific security requirements of each application and the desired security profiles. Therefore, it is important to begin development with a tool ecosystem that offers rapid hardware prototyping and graphical configurators. Another important aspect is programming keys and secret data into the HSM during the production stage securely without exposing sensitive information. This concern has been alleviated by some HSM semiconductor suppliers who offer secure HSM delivery. These devices greatly simplify production.
Modern ECUs have been developed according to the AUTOSAR (Automotive Open System Architecture). Therefore, security development requires an HSM and a secure microcontroller/DSC compatible with the AUTOSAR software components available on the market. AUTOSAR supports security implementation through various functional blocks.
Figure 3 shows a conceptual diagram of the AUTOSAR architecture. At the bottom is a DSC, or physical microcontroller, and at the top is the Basic Software (BSW). The BSW is further divided into the service layer, the ECU abstraction layer, and the microcontroller abstraction layer (MCAL). Above this is the Run-Time Environment (RTE) layer, which provides a standardized interface for an application to access the underlying layers. It also facilitates communication between the upper-level application components, programs the BSW, and manages BSW resources and instances. At the top, the application layer is segmented into the AUTOSAR Software Components (SW-C). The application layer consists of many software components, each of which contributes a specific function to the ECU.
The BSW has a standard interface for using security features such as cryptographic peripherals, trust anchors, and HSM modules. The AUTOSAR architecture divides the cryptography implementation into three layers: a service layer, a hardware abstraction layer, and MCAL. The service layer contains the Crypto Service Manager (CSM). Application components interact with the CSM to access the underlying cryptographic library, the HSM, and to program cryptographic functions.
The Crypto Stack can be configured to use hardware cryptographic functions available in the DSC or external cryptographic devices such as an external auxiliary HSM. The AUTOSAR stack can incorporate the use of an external HSM through MCAL's Serial Peripheral Interface (SPI) and the appropriate cryptographic driver from the HSM vendor.
The main security function is provided by the Crypto Stack, which has access to cryptographic primitives and key management. AUTOSAR supports three secure communication protocols: SecOC (Secure Onboard Communication), TLS (Transport Layer Security), and IPsec (Internet Protocol Security). SecOC is an open standard defined by the AUTOSAR organization and is preferred for secure communication between ECUs. It can be used over a CAN, Ethernet, or LIN network. AUTOSAR's BSW incorporates secure diagnostics and intrusion detection. Additional functions, such as secure firmware updates, can be implemented in the Crypto Stack.

Figure 3. Cryptographic functions of AUTOSAR.
Conclusion:
The trend in the connected car market is generating privacy and security concerns for public bodies, car manufacturers, and drivers. Therefore, new regulations require cars to incorporate cybersecurity to protect data privacy and improve security. Cybersecurity encompasses the entire supply chain, from car manufacturers to component suppliers. Designers can use an HSM module along with a secure microcontroller/DSC or a microcontroller/DSC with an integrated HSM in a single package. Furthermore, an ecosystem of rapid prototyping tools, libraries, and graphical configurators for HSMs facilitates development. The availability of AUTOSAR libraries and support also reduces engineering effort. The ideal ecosystem for a DSC or microcontroller in a car needs to be fully compliant with AUTOSAR, ISO 26262 functional security, additional functional security certification, and security libraries. Consult the DSC dsPIC33 automotive ecosystem for more information on AUTOSAR, automotive cybersecurity, and functional safety with ISO 26262.

Author: Nelson Alexander, Chief Engineer and Product Marketing Manager at Microchip Technology.
