Cryptography
Below is a practical, ISO/SAE 21434-aligned description of how cryptography is used in an automotive ECU across the full lifecycle, clearly distinguishing Tier-1 vs OEM responsibilities. This is written in the way assessors, auditors, and OEM cybersecurity teams expect to see it.




1. Concept Phase (Item Definition & Threat Analysis)
Purpose of Cryptography
At this phase, cryptography is not yet implemented, but strategically defined to mitigate threats identified in TARA.
Typical Cryptographic Objectives
Prevent unauthorized software execution
Ensure authenticity of ECUs and vehicle networks
Protect sensitive data (keys, firmware, personal data)
Enable secure diagnostics and updates
Standards Driving Decisions
ISO/SAE 21434
UNECE UN R155
OEM internal cryptographic policy (algorithms, key lengths, PKI model)
OEM Responsibility
Define cryptographic strategy:
Symmetric vs asymmetric crypto
PKI vs shared secrets
Root of Trust concept
Define Cybersecurity Goals & Claims
Define Vehicle PKI (VPKI) concept
Define lifecycle key ownership
Tier-1 Responsibility
Provide feasibility input
Propose crypto-capable HW (MCU, HSM)
Identify performance & cost impacts
2. System & Architecture Design Phase
Cryptography Gets Architected
Key Design Elements
Root of Trust (RoT)
Secure key storage
Cryptographic services partitioning
Trust boundaries
Typical Mechanisms
Secure Boot
Asymmetric signatures (RSA/ECC)
In-vehicle comms
MACs, symmetric encryption
Diagnostics
Challenge-response
OTA
Firmware signing + encryption
Identity
ECU certificates
OEM Responsibility
Approve:
Algorithms (e.g. AES-128/256, ECC-P256)
Certificate hierarchy
Key lifetimes
Define security interfaces (Diag, OTA, CAN, Ethernet)
Define key provisioning model
Tier-1 Responsibility
Design ECU security architecture
Integrate:
AUTOSAR Crypto Stack
Hardware Security Module (HSM)
Define crypto APIs and isolation
3. Detailed Design & Implementation Phase
Cryptography Is Implemented in ECU Software & Hardware
Common Implementations
Secure Boot chain:
Boot ROM β Bootloader β Application
Secure Flashing:
Signed & optionally encrypted firmware
Secure Communication:
CAN/Ethernet message authentication
Secure Diagnostics:
Certificate-based or key-based access
Tier-1 Responsibility (Primary Owner)
Implement cryptography:
Crypto libraries
Key handling logic
Ensure:
Keys never leave secure boundary
No hard-coded secrets
Perform:
Secure coding
Static analysis
Crypto misuse checks
OEM Responsibility
Audit:
Crypto design compliance
Algorithm compliance
Approve key lengths, curves, modes
Review misuse risks (weak randomness, reuse)
4. Integration, Verification & Validation
What Is Verified
Correct cryptographic behavior under attack conditions
Proper key isolation
Secure failure handling
Typical Tests
Secure boot bypass attempts
Invalid signature injection
Replay attacks
Diagnostic brute-force attempts
Tier-1 Responsibility
ECU-level crypto testing
Pen-testing of ECU interfaces
Provide test evidence
OEM Responsibility
Vehicle-level cybersecurity validation
Independent penetration testing
Final approval for SOP
5. Production & Manufacturing Phase
Cryptography Becomes Operational
Key Activities
ECU identity creation
Key injection
Certificate provisioning
OEM Responsibility
Operate PKI
Own:
Root CA
Intermediate CAs
Control:
Key generation
Revocation
Approve manufacturing security
Tier-1 Responsibility
Secure manufacturing environment
Inject:
ECU certificates
Initial secrets
Prevent:
Key leakage
Over-provisioning
6. Operation & Maintenance Phase (Vehicle in Field)
Cryptography Protects Live Vehicle
Usage Examples
Secure diagnostics at workshops
Secure OTA updates
Secure backend-to-vehicle communication
ECU authentication on vehicle network
OEM Responsibility
Operate backend systems
Manage:
Certificate renewal
Revocation lists (CRL)
Incident response (CSMS)
Tier-1 Responsibility
Support:
Crypto updates
Patch compatibility
Provide root cause analysis for crypto incidents
7. End-of-Life (EOL) Phase
Cryptography Is Decommissioned
Activities
Disable backend access
Revoke certificates
Prevent reuse of ECUs
OEM Responsibility
Define EOL crypto policy
Ensure backend revocation
Compliance with UN R155 CSMS
Tier-1 Responsibility
Support secure decommissioning
Provide EOL documentation
Summary: Tier-1 vs OEM Responsibilities
Crypto strategy
β
β
PKI ownership
β
β
ECU crypto implementation
β
β
Key injection
Governance
Execution
Secure boot & comms
Approval
Implementation
OTA crypto
Backend
ECU side
EOL revocation
β
Support


Cryptography Checklist for ECU Projects
1. Planning / Concept Phase (Item Definition & TARA)
Governance & Strategy
β Cryptographic policy received from OEM (algorithms, key sizes, curves, modes)
β Regulatory alignment confirmed (ISO/SAE 21434, UN R155)
β Cryptography included in Cybersecurity Goals & Claims
β Cryptography mapped to threat scenarios in TARA
β Clear Tier-1 vs OEM responsibility split defined
High-Level Design Decisions
β Root of Trust (RoT) concept defined
β PKI vs symmetric key strategy decided
β Secure boot required? (Yes/No β justification)
β Secure diagnostics required? (Yes/No)
β Secure OTA/update requirement confirmed
2. System & Architecture Design Phase
Architecture & Trust Boundaries
β Secure boot chain defined (ROM β Bootloader β App)
β Trust boundaries documented (HW, SW, backend)
β Secure storage location for keys identified
β Hardware security capability confirmed (HSM/TPM/TEE)
Algorithms & Mechanisms
β Approved algorithms selected (e.g., AES, ECC, SHA-2)
β Random number generation source defined (TRNG/DRBG)
β Message authentication vs encryption decision justified
β Certificate hierarchy defined (Root, Intermediate, ECU)
Interfaces
β Cryptography applied to:
β In-vehicle communication (CAN/Ethernet)
β Diagnostics (UDS/DoIP)
β Flashing / OTA
β Secure failure behavior defined (no silent bypass)
3. Detailed Design Phase
Key Management Design
β Key types identified (root, boot, session, diagnostic)
β Key lifetimes defined
β Key rotation strategy defined
β Revocation mechanism designed
β No shared keys across ECUs (unless justified)
Software Design
β Crypto services isolated from application logic
β Use of standard crypto stack (e.g. AUTOSAR Crypto)
β No custom crypto algorithms
β No hard-coded secrets
β Side-channel considerations documented
4. Implementation Phase
Secure Coding
β Certified or OEM-approved crypto library used
β Proper key zeroization implemented
β Secure memory access enforced
β Error handling does not leak sensitive info
β Debug/test backdoors removed or protected
Secure Boot & Flashing
β Firmware authenticity verified before execution
β Rollback protection implemented
β Flashing requires cryptographic authorization
β Integrity check covers full image
5. Integration & Verification Phase
Functional Verification
β Secure boot verification tested (valid/invalid images)
β Secure flashing tested (authorized/unauthorized)
β Diagnostic authentication tested
β Communication authentication/encryption tested
Security Testing
β Replay attack resistance verified
β Brute-force resistance verified
β Fault injection behavior checked
β Pen-test findings addressed
Evidence
β Cryptography test reports available
β Traceability to cybersecurity requirements complete
6. Production & End-of-Line (EOL β Manufacturing)
Key Injection & Provisioning
β Secure key injection process approved by OEM
β Keys generated in secure environment
β ECU identity (certificate/ID) provisioned
β Manufacturing access protected with crypto
Manufacturing Security
β No master keys exposed to operators
β Logging of key provisioning events enabled
β Separation of test vs production keys enforced
β Secure erase of temporary secrets completed
7. Operation & Maintenance (Vehicle in Field)
Live Cryptographic Operations
β Secure diagnostics enforced in workshops
β OTA updates cryptographically protected
β Backend authentication enforced
β Certificate validity monitored
Incident Handling
β Certificate/key revocation supported
β Crypto updates supported without ECU replacement
β Incident response procedure defined (CSMS)
8. End-of-Life (Vehicle & ECU Decommissioning)
Decommissioning
β Backend access revoked
β Certificates invalidated
β OTA disabled
β Diagnostic access restricted or disabled
Reuse & Disposal
β ECU reuse prevention strategy defined
β Secure wipe procedure supported (if required)
β EOL compliance evidence available (UN R155)
Final OEM / Tier-1 Ownership Snapshot
Crypto policy & PKI
β
β
ECU crypto architecture
Approval
β
Crypto implementation
β
β
Manufacturing keys
Governance
Execution
Field operations
β
Support
EOL revocation
β
Support
Last updated
Was this helpful?