Skip to main content
← Back to Blog

Cybersecurity

HSM Integration for Automotive ECUs: From EVITA Light to Full

By Shreyansh, Founder & CTO, Agnile Technologies·April 30, 2026·11 min read

Key Takeaways

TL;DR — Automotive Hardware Security Modules follow the EVITA three-tier taxonomy: Light (symmetric crypto and MAC for sensors and low-end ECUs), Medium (adds asymmetric crypto and Secure Boot verification for gateways and domain controllers), and Full (full PKI, hardware RNG, and V2X-grade ECDSA at high throughput). Integrating them through the AUTOSAR Crypto Stack — Csm, CryIf, Crypto Driver, and KeyM — demands attention to crypto latency budgets (V2X ECDSA sign typically inside 5 ms), key lifecycle management, and post-quantum readiness, and produces direct evidence for ISO/SAE 21434 WP-10-01 and WP-10-04.

  1. 1.The EVITA project (EU FP7, 2008–2011) defined three Hardware Security Module categories — Light, Medium, Full — that remain the dominant automotive HSM taxonomy.
  2. 2.EVITA Light fits sensors, actuators, and brake/airbag-class ECUs; EVITA Medium fits gateways, domain controllers, and central compute; EVITA Full fits head units, V2X stacks, and large connected ECUs.
  3. 3.AUTOSAR Crypto Stack — Csm to CryIf to Crypto Driver, plus KeyM — is the canonical integration path for HSM services; vendor BSW packages typically supply the Crypto Driver for the silicon's HSM.
  4. 4.Secure Boot chain of trust runs ROM → first-stage bootloader → second-stage → application; the HSM enforces signature verification at each transition.
  5. 5.V2X imposes hard real-time crypto requirements (ECDSA over NIST P-256 under IEEE 1609.2, typically at least 10 messages/second), which is the principal driver toward EVITA Full.
  6. 6.Post-quantum readiness for firmware signing — HSS, XMSS now, with ML-DSA on the horizon — is now a meaningful procurement question given 15–20-year vehicle lifetimes.
  7. 7.Common integration pitfalls — crypto-latency overruns, missing key revocation, sleep/wake state mishandling — are the failure modes that delay programmes, not algorithm choice.

At a Glance

One-Sentence Answer
HSM integration helps protect keys, cryptographic operations, secure boot, secure diagnostics, and in-vehicle communication in automotive ECUs.
Who This Is For
ECU software teams, cybersecurity engineers, AUTOSAR teams, crypto-stack integrators, and platform architects.
Last Reviewed
May 2026
Primary References
EVITA, HSM, AUTOSAR Crypto Stack, ISO/SAE 21434 implementation support.
Practical Use
Use this guide to plan cryptographic architecture, key handling, and HSM-backed security controls in ECUs.

A Hardware Security Module is the trust anchor an automotive ECU is built around. It stores keys that the application core must never see, runs the cryptographic primitives that Secure Boot, Secure Onboard Communication, Secure Flashing, and V2X depend on, and isolates that work behind a hardware boundary the rest of the system cannot reach by accident or by exploit. This post is the architect's view: how the EVITA tiers differ, how the AUTOSAR Crypto Stack maps the application into the HSM, what V2X imposes on the design, and where programmes lose months when integration is treated as an afterthought.

What “HSM” means in automotive (and what it does not)

In the data centre an HSM is a network appliance with a PKCS#11 interface. In a vehicle it is a discrete silicon block on the same die as the application MCU, with its own CPU, its own ROM, its own SRAM, and its own private bus to fused key storage. Three adjacent technologies are routinely confused with the automotive HSM and are not the same thing:

  • SHE (Secure Hardware Extension): the HIS specification widely embedded in automotive MCUs. Functionally similar to EVITA Light, narrower than Medium.
  • TPM (Trusted Platform Module): a TCG-defined module designed for IT platforms. Some automotive head units expose a TPM, but the in-vehicle network does not assume one.
  • TrustZone: an Arm processor mode that isolates a secure world from a normal world on the same core. Useful, but not equivalent to a separate HSM core with its own memory and its own ROM-rooted trust.

The EVITA project in 60 seconds

EVITA (E-safety Vehicle Intrusion proTected Applications) was an EU FP7 research project that ran from 2008 to 2011 and published the architecture deliverables (D2.3, D3.2) that the automotive industry has used as the HSM taxonomy ever since. The project defined three protection profiles tied to the role of the ECU on the vehicle network. Silicon vendors then implemented the tiers (Infineon AURIX, NXP S32, ST Chorus, Renesas RH850, Microchip dsPIC and SAM all expose EVITA-class HSMs as industry references), and AUTOSAR codified how the application accesses them. The split between Classic and Adaptive matters here too: the Crypto Stack lives in both, with different orchestration assumptions on each. See AUTOSAR Classic vs Adaptive for the platform-level split.

EVITA Light, Medium, Full — feature comparison

The table below is the architectural decision aid we use when an ECU's Cybersecurity Goals land on the table for the first time. Match the feature column to the threat the control mitigates; do not over-tier or under-tier.

FeatureEVITA LightEVITA MediumEVITA Full
Symmetric (AES-128, CMAC)
Hardware RNG (NIST SP 800-90A/B/C)
Asymmetric (ECDSA P-256, RSA)
Internal CPU and SRAM
Secure Boot signature verificationsingle imagemulti-stagemulti-stage + measured
V2X-grade ECDSA throughput
Hardware countermeasures (DPA, fault)limited
Typical usesensors, actuators, brake/airbag-class ECUsgateways, domain controllers, central computehead units, V2X stacks, large connected ECUs
EVITA Light/Medium/Full feature comparison — derived from the EVITA project deliverables (D2.3, D3.2). Tiers shown neutrally; specific silicon implementations vary.

AUTOSAR Crypto Stack architecture for HSM access

Application code does not call the HSM directly. It calls into the AUTOSAR Crypto Stack, which routes the request down through four well-defined layers and back up with the result. Each layer is replaceable, which is what makes the stack portable across silicon families.

Csm — application-facing job and primitive API

The Crypto Service Manager is the API the application sees. It exposes job-based and synchronous-primitive interfaces: Csm_Encrypt(), Csm_MacGenerate(), Csm_SignatureVerify(). Csm schedules jobs, enforces key-handle scoping, and returns status without exposing the key material.

CryIf — channels and key-slot routing

The Crypto Interface routes Csm jobs to the right Crypto Driver instance and the right key slot. CryIf is what makes a dual-driver design possible: the application calls Csm without knowing whether the work runs on the HSM driver or the software-fallback driver.

Crypto Driver — vendor-supplied (HSM) and software fallback

The Crypto Driver is where the abstraction stops. Vendor BSW packages typically supply the HSM driver for the silicon's HSM block; a software-fallback driver provides the same primitives without hardware acceleration. The fallback exists for development and for non-key-bearing operations; production keys must live in the HSM.

KeyM — certificates, lifecycle, trusted time

The Key Manager handles certificates, certificate chains, key derivation policies, lifecycle states (provisioned, in-use, revoked), and the trusted-time service that V2X depends on. KeyM is the layer where production-grade programmes spend the most engineering effort.

HSM-host interaction sequence

The diagram below traces a single MAC operation through the stack — the most common HSM interaction in a SecOC-enabled ECU. Every other operation (Secure Boot verification, V2X signing, Secure Flashing) follows the same shape.

  1. 1

    Application calls Csm_MacGenerate(jobId, &in, &out)

    Application core. Job ID references a pre-configured key handle and algorithm (CMAC-AES128).

  2. 2

    Csm enqueues the job, dispatches via CryIf

    Csm chooses sync or async path; CryIf resolves the target Crypto Driver and the key slot.

  3. 3

    Crypto Driver writes mailbox to HSM, signals

    Driver pushes input over the host-HSM bridge (shared memory + interrupt). Application core can yield.

  4. 4

    HSM CPU loads key from internal store, runs CMAC-AES128

    Inside the HSM boundary. Key never leaves; only the MAC and the status code are written back.

  5. 5

    HSM signals completion, Crypto Driver reads MAC

    Interrupt or polled mailbox. Driver checks status and returns to CryIf.

  6. 6

    Csm callback fires, application proceeds with MAC

    Application appends MAC to the SecOC PDU and submits it to the bus.

HSM-host interaction sequence for a SecOC MAC operation through the AUTOSAR Crypto Stack. Steps 1–3 and 5–6 run on the application core; step 4 runs inside the HSM boundary.

Secure Boot chain of trust with HSM

Secure Boot anchors trust in the HSM. The flow at power-on: ROM verifies the first-stage bootloader using a public key the HSM holds; the first-stage bootloader, now trusted, asks the HSM to verify the second-stage; the second-stage asks the HSM to verify the application. Each transition is a discrete signature verification; any failure halts the boot and enters a recovery path. OTA updates traverse the same chain — Secure Flashing produces a signed image that the HSM verifies before the application is allowed to boot. For the full chain-of- trust treatment see our companion post on Secure Boot implementation for automotive ECUs.

Key provisioning lifecycles

Key lifecycle is where most HSM programmes underestimate the work. Five activities have to be specified and tested:

  • Factory PKI ceremony. Per-ECU key diversification at end-of-line, witnessed and logged.
  • OTA re-keying. The protocol that allows a deployed ECU to receive new keys or rotated keys without a service-bay visit.
  • Diversification. No two ECUs of the same part number share the same in-use key; compromise of one does not compromise the fleet.
  • Rotation. Time-bound or event-driven; the HSM must support both in-use and pending key states.
  • Revocation. The path by which a known-bad key is retired across the fleet, including the failure modes when an ECU is offline at revocation time.

V2X-specific HSM requirements

V2X is the load case that pushes ECUs toward EVITA Full. IEEE 1609.2 requires every outgoing message to carry an ECDSA signature over NIST P-256, and the application typically transmits at least 10 messages per second per channel. With certificate validation on inbound traffic the HSM is doing ECDSA verify operations at higher rates than sign operations. The latency budget is tight — a typical V2X ECDSA sign target is under 5 ms — and falls inside the HSM, not the application core. EVITA Medium can sometimes meet it; EVITA Full is the dependable answer. Post-quantum readiness on the V2X channel is an active research area; the production answer for firmware signing today is HSS or XMSS under NIST SP 800-208.

Common integration pitfalls

Across programmes the same handful of pitfalls account for the majority of schedule slip. Almost none of them are about algorithm choice. They are about lifecycle, timing, and the boundary between what runs inside the HSM and what runs outside it.

  • Crypto-latency overruns. Measure on representative silicon during the architecture phase, not at integration. The principal cause of late silicon respins on cybersecurity programmes — and the easiest pitfall to avoid by spending a week with a bring-up board early.
  • Missing key revocation. Provisioning is designed; revocation is forgotten. Both must be specified or the design is incomplete.
  • Sleep/wake state mishandling. The HSM state across ECU sleep cycles is non-trivial; a key handle that is valid before sleep may need re-binding after wake.
  • Secure storage versus secure use. Storing a key in the HSM is not enough if the application loads it into application RAM to use it. Use must remain inside the HSM boundary.
  • Software fallback in production. The fallback driver exists for development. Releasing it in production silently downgrades the security posture and tends to be discovered only when an audit asks for the Crypto Driver provenance.
  • Underspecified diagnostics. The HSM command set returns rich error codes; if the application logs only success or failure, post-mortem of a field incident is impossible. Plan diagnostic capture into the Csm wrapper from day one.
  • Conflating secure storage with secure provisioning. The HSM holds keys safely, but the chain that puts them there at end-of-line is a separate work item. Programmes that design the runtime path and outsource the factory path discover the gap during the first production-line rehearsal.

Mapping HSM evidence to ISO/SAE 21434 Clause 10

Clause 10 expects evidence that cybersecurity controls are implemented and verified. The HSM-backed controls are usually documented under WP-10-01 (cybersecurity controls specification) and WP-10-04 (cybersecurity verification report). The work products are not the device datasheet; they are the design rationale for tier selection, the evidence that latency budgets are met on the chosen silicon, the key- lifecycle specification, and the verification results. For the broader Work Products view see our ISO/SAE 21434 Work Products checklist.

Silicon vendor landscape

The dominant silicon families in production all expose EVITA-class HSMs as industry references — Infineon AURIX, NXP S32, ST Chorus, Renesas RH850, and Microchip dsPIC and SAM are the names you will see in TARA artefacts. They differ in HSM core architecture, throughput, key-slot count, and post-quantum acceleration roadmaps. The integration path — AUTOSAR Crypto Stack down to the vendor BSW Crypto Driver — is the same; the work item is matching the tier and throughput to the ECU's Cybersecurity Goals before the silicon is locked in.

Take-aways

The HSM is the most consequential design decision in an automotive ECU's cybersecurity architecture. Tier selection drives BOM, latency, and what threats can credibly be mitigated — best decided with reference to the active TARA, including the STRIDE decomposition of the ECU's threats and a current Threat Analysis and Risk Assessment. AUTOSAR Crypto Stack integration drives where programme time goes; key lifecycle drives where production programmes get audited. Treat all three as architecture- phase decisions, instrumented with measurement on representative silicon, and the integration phase becomes what it is meant to be — verification rather than discovery.

Agnile Technologies designs and integrates Hardware Security Module-backed cybersecurity architectures across the major automotive silicon families. Reports and work products map directly to ISO/SAE 21434 Clause 10 evidence.

Frequently Asked Questions

Is SHE the same thing as an HSM?

Functionally close. SHE (Secure Hardware Extension) is the HIS specification widely embedded inside automotive MCUs and is broadly equivalent to EVITA Light: symmetric crypto, MAC, key storage, secure boot of one image. EVITA Medium and Full add asymmetric crypto, internal CPU and RAM, and the ability to host more complex protocols. SHE is an HSM by capability; EVITA is the taxonomy that names the tier.

Do I need EVITA Full for every ECU?

No. Match the tier to the function. Sensors and actuators rarely need more than EVITA Light. Gateways, domain controllers, and central compute typically warrant EVITA Medium because they perform Secure Boot verification on multiple stages and may run authenticated diagnostics. EVITA Full is reserved for ECUs that must do PKI work at line rate — head units, V2X stacks, and large connected ECUs.

Can the AUTOSAR software Crypto Driver replace a Hardware Security Module?

For non-safety-critical, non-key-bearing operations during development or simulation, sometimes. For production key protection, Secure Boot, SecOC, and V2X, no. Software-only key storage is in-process and in-memory; any code-execution defect on the application core can read the key. The threat model behind these features assumes the key never leaves an isolated compute boundary, which only a hardware-isolated module provides.

How does an HSM affect Secure Boot?

It anchors the root of trust. The first-stage public key lives in the HSM (or in fuses the HSM reads), and the HSM performs the signature verification at each transition: ROM verifying the first-stage bootloader, the first-stage verifying the second-stage, the second-stage verifying the application. Without an HSM the verification routine and the key both run on the application core, where they are easier to bypass.

What about post-quantum readiness?

Plan firmware-signing roots with stateful hash-based signatures (LMS or XMSS, NIST SP 800-208) now, because vehicles produced today will be on the road in the 2040s. Data-in-transit migration to ML-KEM and ML-DSA can wait for vehicle-suitable implementations. Procurement teams should be asking silicon vendors about HSM acceleration roadmaps for ML-DSA (FIPS 204) and SLH-DSA (FIPS 205, August 2024).

Does ISO/SAE 21434 mandate an HSM?

No, the standard is technology-neutral. But Clause 10 expects evidence of cybersecurity controls implementation, and an HSM-backed key store with hardware Secure Boot is the most defensible such evidence for cryptographic protections. Auditors do not require an HSM by name; they do require that the chosen control offer commensurate assurance against the documented threats.

What is the biggest integration pitfall to plan against?

Crypto latency exceeding the control-loop budget. A V2X message must be signed inside roughly 5 ms; SecOC MAC operations must complete inside the bus cycle; Secure Boot of a multi-megabyte image must finish before the watchdog fires. Programmes that defer crypto-latency measurement until integration test discover the budget overrun on the wrong side of the silicon decision. Measure on representative hardware in the architecture phase.

Need Help Applying This to a Real Programme?

Agnile supports engineering teams from architecture and requirements through implementation, validation, release, and evidence preparation.