# PQC on Automotive ECUs: AUTOSAR and ISO 21434

**Source**: https://quantumsequrity.com/blog/pqc-automotive-ecu
**Category**: Hardware & Embedded

---

[← Back to Blog](../../blog) Hardware & Embedded

# PQC on Automotive ECUs: AUTOSAR and ISO 21434

12 min read

A modern car has somewhere between 70 and 150 electronic control units (ECUs), small computers running everything from the windshield wipers to the autonomous driving stack. They communicate over CAN, CAN-FD, FlexRay, LIN, automotive Ethernet, and increasingly PCIe. The cryptography on these networks has evolved significantly over the last decade: from no security at all in the 2000s, to MAC-protected CAN messages today, to fully cryptographically authenticated firmware updates and over-the-air communication in modern vehicles.

Now post-quantum cryptography arrives, and the automotive industry has to figure out how to add ML-KEM and ML-DSA to a stack that was already a tight fit for ECC. The constraints are tight, the lifetime of a vehicle is long (15-20 years), and the regulatory environment around automotive cybersecurity (ISO 21434, UNECE WP.29) requires demonstrable security throughout that lifetime.

This article walks through the cryptographic landscape inside a modern car, what AUTOSAR and ISO 21434 require, and how PQC fits into automotive ECUs.

## What an Automotive ECU Looks Like

Automotive ECUs vary widely in capability. At the low end, a body control module might be a 16-bit microcontroller (NXP S12, Renesas RH850, Infineon TC2xx) with 128-512 KB of flash and 16-64 KB of RAM. At the high end, an autonomous driving compute module might be a multi-core Cortex-A78AE or a dedicated AI accelerator with gigabytes of memory. Most ECUs fall somewhere in the middle: 32-bit microcontrollers (Cortex-M3/M4/M7 class) with 1-4 MB of flash and 256-512 KB of RAM.

Many ECUs include a Hardware Security Module (HSM), which is a cryptographic accelerator block on the same chip. Common HSM specifications include EVITA Light/Medium/Full and Secure Hardware Extension (SHE). These provide AES, hash, and (in fuller variants) ECC support.

The HSM is critical for automotive cryptography because it isolates keys from the main ECU firmware. The main firmware can request crypto operations from the HSM, but the keys themselves never leave the HSM's secure domain. This is the architecture that PQC migration has to fit into.

## CAN, CAN-FD, and Automotive Ethernet

The Controller Area Network (CAN) is the dominant in-vehicle network. Standard CAN supports 1 Mbps with 8-byte payloads. CAN-FD extends this to 5 Mbps with 64-byte payloads. Automotive Ethernet (typically 100BASE-T1 or 1000BASE-T1) is used for higher-bandwidth applications like cameras and infotainment.

For cryptographic authentication on CAN, the most common approach is Secure Onboard Communication (SecOC), which is part of AUTOSAR. SecOC adds a freshness value (rolling counter) and a truncated MAC (typically 24-32 bits of MAC truncated from a full HMAC or CMAC). The MAC is symmetric, so it survives Grover's algorithm with reasonable security parameter.

The PQC question for CAN messages is not really about the MAC. It is about how the symmetric keys for SecOC are distributed in the first place. Currently, those keys come from a key exchange between ECUs, often using ECDH or RSA. ECC and RSA are quantum-vulnerable. So the key exchange layer needs to migrate to PQC.

CAN-FD's larger payloads make some PQC operations more practical. Sending an ML-KEM-768 ciphertext (1088 bytes) over CAN-FD at 64 bytes per frame takes 17 frames. Over standard CAN at 8 bytes per frame, it takes 136 frames. The fragmentation overhead is non-trivial but not impossible.

Automotive Ethernet handles PQC much more easily because frame sizes are much larger and bandwidth is plentiful. PQC handshakes over automotive Ethernet are essentially the same as PQC handshakes anywhere else.

For background on the CAN bus context, see our [PQC automotive V2X CAN bus](../../blog/pqc-automotive-v2x-can-bus) article.

## AUTOSAR Cryptographic Architecture

AUTOSAR (AUTomotive Open System ARchitecture) is the dominant software architecture standard for automotive ECUs. Its cryptography stack consists of:

- **Crypto Service Manager (CSM)**: high-level API exposed to applications.
- **Crypto Interface (CRYIF)**: protocol-translation layer between CSM and the lower-level driver.
- **Crypto Driver (CRYPTO_xxx)**: hardware-specific driver, often interfacing directly with the HSM.
- **Key Manager (KEYM)**: manages key storage and lifecycle.

Adding PQC to this stack is a matter of extending the API and the drivers. AUTOSAR has been working on PQC support, with preliminary specifications appearing in the 23-09 or 24-x AUTOSAR releases. The API includes ML-KEM key encapsulation and ML-DSA signing, alongside existing AES, ECC, and hash interfaces.

The hard part is implementation. Existing HSMs were designed for AES and ECC. They do not have hardware support for lattice arithmetic. Software ML-KEM and ML-DSA inside the HSM (or an HSM extension) is the realistic short-term path. Future HSM generations will include dedicated PQC accelerators. Production silicon with PQC HSM acceleration is expected in 2027-2030 model years.

For a deeper discussion of HSM architectures, see our discussions in [PQC on FPGA](pqc-on-fpga.md) and [PQC on ASIC](pqc-on-asic.md) articles.

## ISO 21434: Automotive Cybersecurity Engineering

ISO 21434 (published 2021, updated 2025) is the international standard for automotive cybersecurity. It defines a process for managing cybersecurity throughout the vehicle lifecycle: concept, development, production, operation, and decommissioning.

The standard does not mandate specific cryptographic algorithms. Instead, it requires a Threat Analysis and Risk Assessment (TARA) to identify threats and a Cybersecurity Plan to address them. Manufacturers are expected to keep up with the cryptographic state of the art and to migrate when current algorithms are no longer adequate.

For PQC migration, ISO 21434 implies that automakers must:

- Identify which systems use quantum-vulnerable cryptography (essentially all of them)
- Assess the risk of harvest-now-decrypt-later attacks against vehicles that ship today
- Plan a migration to post-quantum cryptography over the vehicle's lifetime
- Demonstrate that the migration is achievable through over-the-air updates or scheduled service

This is a significant undertaking. A vehicle sold in 2026 might still be on the road in 2046, well past the expected timeline for cryptographically relevant quantum computers. The cryptography in that vehicle has to either be post-quantum from day one or be upgradable over the air.

For the broader threat model, see our [harvest now decrypt later](../../blog/harvest-now-decrypt-later) article.

## V2X and Roadside Units

Vehicle-to-Everything (V2X) communication, also known as Cellular V2X (C-V2X) or DSRC, lets vehicles communicate with other vehicles and with roadside infrastructure. The cryptographic stack for V2X is specified in IEEE 1609.2 and ETSI ITS standards. It uses ECDSA for message signatures and ECDH for some key agreements.

V2X has tight latency budgets. A V2X safety message has to be received and verified in milliseconds. ECDSA verification takes roughly 100-500 microseconds on automotive ECUs. ML-DSA verification takes 10-30 milliseconds, which is closer to the latency budget limit. Whether ML-DSA verification is fast enough for V2X safety messages is an open question.

There is active work on PQC V2X profiles. Likely outcomes are hybrid signatures (ECDSA plus ML-DSA, accepting the latency hit) for transitional periods, with a long-term migration to dedicated PQC-V2X profiles. ETSI and IEEE are coordinating with NIST on the relevant standards.

For more on V2X, see our [PQC automotive V2X CAN bus](../../blog/pqc-automotive-v2x-can-bus) article.

## OTA Updates: The Critical Path

Over-the-air (OTA) firmware updates are how modern vehicles get fixed and improved over their lifetime. An OTA update has to be authenticated end-to-end: the manufacturer signs the update, the vehicle verifies the signature before installing.

Currently, OTA updates use ECDSA or RSA signatures. These are quantum-vulnerable. A quantum adversary who breaks the signature scheme could push fake updates to vehicles in the field, with catastrophic consequences (think malware payload that disables brakes).

For OTA, the migration is more urgent than for in-vehicle communication, because the consequence of a forged update is severe. Most automakers are likely to add PQC OTA signing in the late 2020s, with hybrid PQC-plus-classical signatures during the transition. ML-DSA-65 or ML-DSA-87 plus Ed25519 in hybrid mode is the natural choice: large enough to provide strong PQ security, small enough to fit in OTA signature budgets.

The ECU side of OTA needs to verify these signatures. ML-DSA-87 verification takes about 40 ms on a Cortex-M7 ECU, which is acceptable for one-shot OTA verification (the verification happens during the update process, which already takes minutes for the actual data transfer).

## Time-of-Check vs Time-of-Use

A subtle issue in automotive PQC is the timing of cryptographic checks. ECUs typically verify signatures at boot or at install time, then trust the verified code or data for the rest of the operation. If the cryptography is broken later (by a quantum adversary), historical signatures cannot retroactively become invalid.

This is good news for some use cases. A signature on a firmware image installed in 2026 does not need to be quantum-safe in 2040 if the firmware has been replaced. But it is a problem if the same key signs many firmware updates over the vehicle's lifetime. If that key is recovered, all updates signed by it become forgeable.

The right pattern is to rotate signing keys periodically and to use stateful hash-based signatures (LMS) for long-lived signing operations. NIST SP 800-208 covers LMS in detail. LMS is well-suited to firmware signing because it has small signatures, fast verification, and proven post-quantum security. The state management overhead is manageable for offline build servers.

## What Manufacturers Are Doing

The automotive industry is paying attention to PQC migration but moves slowly. Some specific things in motion:

- AUTOSAR specifications are being updated to include ML-KEM and ML-DSA APIs.
- HSM vendors (Infineon, NXP, Renesas) have published PQC roadmaps for their automotive product lines.
- ISO 21434 second edition (2025) explicitly mentions PQC awareness as a cybersecurity concern.
- UNECE WP.29 cybersecurity regulations are driving cybersecurity certification for new vehicle types, which puts pressure on PQC awareness.
- Tier-1 suppliers (Bosch, Continental, ZF) are integrating PQC support into their reference designs.

The first vehicles with native PQC support are expected to ship in the late 2020s. Existing vehicles will receive PQC OTA updates where their hardware can support it. Older vehicles whose ECUs cannot run PQC will remain on classical cryptography for the rest of their lives, with the associated harvest-now-decrypt-later risk.

For more on the broader migration context, see our [NIST FIPS guide](../../blog/nist-fips-guide).

## What This Means for QNSQY Users

QNSQY does not run on automotive ECUs. It runs on Linux and Windows computers. But the pattern QNSQY uses (ML-KEM plus X25519 for confidentiality, up to ML-KEM-1024, and on paid plans ML-DSA plus Ed25519 for authenticity, up to ML-DSA-87) maps cleanly onto what automotive systems will deploy for OTA updates and similar workflows.

A practical use case today is on the operator side: a fleet operator can encrypt configuration files, logs and archives with QNSQY on its own Linux or Windows systems for storage or transfer between sites. Decrypting on the vehicle itself needs PQC-capable software on the ECU, which QNSQY does not provide.

This pattern works today on any system with a software ML-KEM and ML-DSA implementation, and it will work on tomorrow's ECUs with hardware-accelerated PQC. The format is interoperable across software-only and hardware-accelerated implementations.

For the design pattern, see our [hybrid encryption](../../blog/hybrid-encryption) explainer.

## FAQ

**Are automotive ECUs at risk from quantum attacks today?**
Not from active attacks (no quantum computers exist that can break ECC at automotive scale). But yes from harvest-now-decrypt-later: any cryptographic exchange happening over a vehicle's lifetime could be recorded today and decrypted decades later.

**When will my new car support PQC?**
Vehicles built in the late 2020s and beyond will increasingly include PQC for OTA updates and possibly for in-vehicle communication. Earlier model years may receive PQC features through OTA updates if their hardware supports it.

**What does ISO 21434 require for PQC?**
ISO 21434 does not mandate specific algorithms. It requires a TARA process to identify cybersecurity threats and a plan to manage them. PQC migration is implicitly required because cryptographically relevant quantum computers are a recognized threat. Manufacturers are expected to plan for migration.

**Can old cars get PQC?**
If their ECUs have enough RAM and flash, and if the manufacturer pushes a software update, yes. Many older ECUs do not have enough resources for ML-DSA. They will stay on ECC for the rest of their lives.

**Does QNSQY support automotive ECU integration?**
QNSQY does not integrate with AUTOSAR or HSM APIs. It runs on Linux and Windows computers. It uses the same NIST-standardized algorithms that automotive systems are adopting, but its .qs files are decrypted with QNSQY, so data meant for an ECU needs a format that the ECU's own software reads.

## Sources

1. NIST FIPS 203 (ML-KEM): https://csrc.nist.gov/pubs/fips/203/final
2. NIST FIPS 204 (ML-DSA): https://csrc.nist.gov/pubs/fips/204/final
3. NIST FIPS 205 (SLH-DSA): https://csrc.nist.gov/pubs/fips/205/final
4. NIST SP 800-208 (Stateful Hash-Based Signatures): https://csrc.nist.gov/pubs/sp/800/208/final
5. AUTOSAR Specifications: https://www.autosar.org/standards
6. ISO/SAE 21434 (Road vehicles - Cybersecurity engineering): https://www.iso.org/standard/70918.html

## Related Articles

- [What is Post-Quantum Cryptography](../../blog/what-is-post-quantum-cryptography)
- [ML-DSA vs SLH-DSA](../../blog/mldsa-vs-slhdsa)
- [Hybrid Encryption](../../blog/hybrid-encryption)
- [PQC Automotive V2X CAN Bus](../../blog/pqc-automotive-v2x-can-bus)
- [Harvest Now, Decrypt Later](../../blog/harvest-now-decrypt-later)

---

### Protect Your Data Before Q-Day Arrives

QNSQY's NIST-standardized post-quantum encryption protects files against both current and quantum-era threats.

[Try QNSQY](../../pricing)
