Sicherheitsaspekte für Flashing Over The Air in … · - Smooth SOTA migration path required - Key...

17
Sicherheitsaspekte für Flashing Over The Air in Fahrzeugen Axel Freiwald 1/2017

Transcript of Sicherheitsaspekte für Flashing Over The Air in … · - Smooth SOTA migration path required - Key...

Page 1: Sicherheitsaspekte für Flashing Over The Air in … · - Smooth SOTA migration path required - Key will be the customer acceptance of potential downtime - Solutions are available

Sicherheitsaspekte für Flashing Over The Air in Fahrzeugen

Axel Freiwald 1/2017

Page 2: Sicherheitsaspekte für Flashing Over The Air in … · - Smooth SOTA migration path required - Key will be the customer acceptance of potential downtime - Solutions are available

All OEMs Will Implement Software OTA As Soon As Possible

IHS Study

› Motivation:

Save on recalls caused by software bugs

› Evolution not Revolution:

Implement into vehicle’s network with as little changes as possible

› Challenges:

• Cyber Security

• Safety

Wireless SOTA Revenue

Cost Savings per Year

Functional SOTA Update Revenue

SOTA Royalty Revenue

2 2016-12-06 Copyright © Infineon Technologies AG 2016. All rights reserved. Infineon Proprietary

Page 3: Sicherheitsaspekte für Flashing Over The Air in … · - Smooth SOTA migration path required - Key will be the customer acceptance of potential downtime - Solutions are available

Secure OTA Architecture A brief explanation

Security Updates

Auto Apps

Software Update

Performance Upgrade

Safety and security must be ensured throughout the process

Step 1: Download while driving Software download to central storage Unnoticed by the customer Vehicle shall be at any time safe and

operational

Step 2: Update from central storage After customer approval

In the background or at key-off

Permissible update time

(100s to 15min)

Confirmation to Backend

3 2016-12-06 Copyright © Infineon Technologies AG 2016. All rights reserved. Infineon Proprietary

Page 4: Sicherheitsaspekte für Flashing Over The Air in … · - Smooth SOTA migration path required - Key will be the customer acceptance of potential downtime - Solutions are available

Evolutionary Software OTA Flow From Software Development to Vehicle Reboot

Over The Air – Telematics unit TCU › Receive and decrypt from secure wireless protocol

Download service pack › Check OEM authenticity › Setup encryption services › Service pack stored in vehicles central storage › Verify data › Unpack for ECUs

Updating the vehicle i.e. using UDS › Start UDS programming session › Send service packs to ECUs in small blocks using

UDS protocol (UDS, ISO 14229-1:2013)

Update inside ECUs: Secure Flash Bootloader and HSM › Erase Flash › Decrypt and unzip blocks (end to end protection) › Write new code into Flash › Update and verify signatures (HASH)

Reboot the vehicle with new SW versions › Exit update mode › Restart all ECUs within the car

transport Transport via Internet

Service pack at OEMs update server

Formatting for Update Handling

Generate and release new Software version

4 2016-12-06 Copyright © Infineon Technologies AG 2016. All rights reserved. Infineon Proprietary

Page 5: Sicherheitsaspekte für Flashing Over The Air in … · - Smooth SOTA migration path required - Key will be the customer acceptance of potential downtime - Solutions are available

Secure Update: OTA vs OBD Equal Basics for both flows to update ECUs via OBD or OTA : Precondition: The new SW version must meet all legal requirements (Fahrzeugfreigabe). The service pack is distributed from the OEMs server via the internet. ECUs receive the commands and service packs via their bus interfaces i.e. in UDS format. Inside the ECUs the functions for updating software are handled by e.g. the Secure FLASH

Bootloader Restrictions:

o Not all code can get updated. i.e. the secure FLASH Bootloader itself is excluded. o For multiple ECU updates all updates must be successful. Partially updated vehicles are not

allowed to drive.

Differences OTA to OBD updates: With OBD updates the external diagnostic tool provides the update service. With OTA the update

service must be implemented inside of the vehicle. OTA updates shall get started by drivers without technical background. Special safety measures

apply to ensure that nobody gets harmed during and after the update. The update flow must be power fail prove. Long update times are more vulnerable for power fails.

OBD

Diagnostic Tool

= Update client

UDS LAN Onboard

Diagnostic Service

UDS UDS

ECU ECU

5 2016-12-06 Copyright © Infineon Technologies AG 2016. All rights reserved. Infineon Proprietary

Page 6: Sicherheitsaspekte für Flashing Over The Air in … · - Smooth SOTA migration path required - Key will be the customer acceptance of potential downtime - Solutions are available

SW OTA Comes Along With Security Threats Security Threats are Safety Threats

https://www.youtube.com/watch?v=MK0SrxBC1xs

› Cloud connections are typically active all the time and thus OTA interfaces are potentially accessible for hackers.

› SW OTA services provide doors for attacks which might endanger the operation of vehicles. Typical examples: Functional changes, Tuning, Trojans

› Already the potential to attack vehicles is threatening Tier1s, OEMs and politicians.

6 2016-12-06 Copyright © Infineon Technologies AG 2016. All rights reserved. Infineon Proprietary

Page 7: Sicherheitsaspekte für Flashing Over The Air in … · - Smooth SOTA migration path required - Key will be the customer acceptance of potential downtime - Solutions are available

Protection and Safety Interests for OEMs and Tier1s

Encrypted SW Secure HASH

ECU level: Secure Flash Boot Loader

Tier1 targets: ECU-IP protection and safety responsibility

OEM targets: vehicle and server

protection and safety responsibility

vehicle level: Secure Update

Service

transport

End to End Protection Required

Certified

Signatures

7 2016-12-06 Copyright © Infineon Technologies AG 2016. All rights reserved. Infineon Proprietary

Page 8: Sicherheitsaspekte für Flashing Over The Air in … · - Smooth SOTA migration path required - Key will be the customer acceptance of potential downtime - Solutions are available

Security is a global system requirement

› Extra trust zones for key storage and key management:

› Vehicle: TPM and HSM

› OEM & Tier1: security server

› All parties involved with key handling are requested to have high security levels. OEMs’ and Tier1s’ challenge: production and service

› The whole process must be secured from all sides

› Keys and passwords must get especially protected

8 2016-12-06 Copyright © Infineon Technologies AG 2016. All rights reserved. Infineon Proprietary

Page 9: Sicherheitsaspekte für Flashing Over The Air in … · - Smooth SOTA migration path required - Key will be the customer acceptance of potential downtime - Solutions are available

SOTA Flow Security Elements From Infineon

› Mutual authentication between car and OEM update server

› Encrypted transport channel

Service Authentication

Verification and Central Storage

› Service Pack reception

› 1st verification

› Store in car’s central memory

Update of Target ECU

› Service Pack reception

› 2nd verification

› Flashing of code memory

OPTIGA™ TPM

HSM

HSM

9 2016-12-06 Copyright © Infineon Technologies AG 2016. All rights reserved. Infineon Proprietary

Page 10: Sicherheitsaspekte für Flashing Over The Air in … · - Smooth SOTA migration path required - Key will be the customer acceptance of potential downtime - Solutions are available

Trust Zone: Hardware Security Module (HSM) AURIX TC3xx: Full compliant

Flash

Peripherals

TriCore0 TriCore1

SRAM Bridge F

irew

all

32-bit

CPU

SRAM

96kB

TRNG

Boot

ROM

AES 128

Timer

HSM

Peripherals Peripherals

Trusted Execution

Environment

Hardware Security Module (HSM)

› A highly flexible and programmable solution

› HW accelerator matching performance for automotive protocols: AES128 PKC – ECC-256 SHA224/256

› Crypto- and Algorithm Agility by Software

› AIS31 compliant 128bit True Random Number Generator (TRNG) with high Random Entropie over Lifetime

Security

CPU

Sec

APP

Sec

APPSec

APP

AES

RNG

sec

APP HSM

ECC

RSA

10 2016-12-06 Copyright © Infineon Technologies AG 2016. All rights reserved. Infineon Proprietary

PKC

ECC256

HASH

SHA 2

Page 11: Sicherheitsaspekte für Flashing Over The Air in … · - Smooth SOTA migration path required - Key will be the customer acceptance of potential downtime - Solutions are available

OPTIGA™ TPM Trusted Platform Module

› Temper proof design and architecture: CC EAL4+ certified

– Individual private key by hardware

– Unlimited number of asymmetric /symmetric keys

– Certified true random number generator TRNG: AIS31

› TPM use case in vehicles: Main trusted anchor for the vehicle

– Asymmetric cryptography in authentication services

– Central generation, storage, and processing of individual keys for the vehicle including production and service

– Flexible Authorization mechanisms to protect against duplication/misuse

› TPM use case in SOTA process:

– Mutual authentication of vehicle with OEMs servers

– Key generation (SHA)

OPTIGA™ TPM

11 2016-12-06 Copyright © Infineon Technologies AG 2016. All rights reserved. Infineon Proprietary

Page 12: Sicherheitsaspekte für Flashing Over The Air in … · - Smooth SOTA migration path required - Key will be the customer acceptance of potential downtime - Solutions are available

OEM

TIER1

Secure SW OTA Front End Security Elements and Formatting

Step 5: Over The Air Update download is established by Provision of

authentication and encryption services File of service pack is formatted and

encrypted for wireless data transport

Step 4: Service pack into update server For updating multiple ECUs in one operation all

individual UDS service packs of all effected ECUs are integrated to one package

Service pack is signed with OEM signature Service pack is loaded into update server as

one file

Step 3: UDS Formatting Individual service pack is wrapped to get

handled by the protocol of the Unified Diagnostics Services (UDS, ISO 14229-1:2013)

Step 2: Formatting for Secure Flash Bootloader zip – encrypt – sign

with keys and signatures from Tier1 ECU specific individual service pack

Step 1: Engineering New software version for ECU Verified and released

Tier1 security server

new

SW

individual service pack signature

signed service pack

OEM security server

signature

keys

individual service pack

UDS formatted

SW update server

files from tools

OTA security server

keys

12 2016-12-06 Copyright © Infineon Technologies AG 2016. All rights reserved. Infineon Proprietary

Page 13: Sicherheitsaspekte für Flashing Over The Air in … · - Smooth SOTA migration path required - Key will be the customer acceptance of potential downtime - Solutions are available

Paradigm Shift: “Vehicles Get Attacked Every Day. The Task Is To Reduce The Damage”

Security risk mitigation: successful hacks must not endanger the whole fleet

› Individual keys for each vehicle - No fleet keys

› The number of persons who can see the keys shall go down to zero.

› Keys shall get generated and distributed automatically within a secure environment without personal interaction of people.

– Automatic key and password change

– Frequent change of keys: successful attacks do not get control for a long time

– Session keys for data transport

› Use of intermediate keys for production and service

– Transport keys

– Service keys

13 2016-12-06 Copyright © Infineon Technologies AG 2016. All rights reserved. Infineon Proprietary

Page 14: Sicherheitsaspekte für Flashing Over The Air in … · - Smooth SOTA migration path required - Key will be the customer acceptance of potential downtime - Solutions are available

OTA Overview And Example For 4MB Updates Typical network topology (Background Slide)

1. Bus-Transfer (4MByte)

Usable Date Rate

1)FlexRay (10MBit/s): ca. 300 KByte/s

ca. 13,6s

2)CAN-FD (2MBit/s): ca. 88,5 KByte/s

ca. 47,4 s

3)CAN (500kBit/s) : ca. 16,8 KByte/s

ca. 250s

4)Ethernet (100MBit/s): ca. 5-10 MByte/s

ca. 1 s

2. Processing & Reprogramming

inside ECU (4MByte)

AES-128 Hash: ca. 0,16s and

+ Erase5): ca. 8s and

+ Programming: ca. 4s (5V burst mode)

CAN-FD ca. 66s

for 4MByte

FlexRay ca.30s

for 4MByte

1) 50% Dynamic segment usage

2) “ISO CAN FD”, 64 Bytes data field, 2 MBaud, 50% bus load

3) “Classical CAN”, 8 Bytes data field, 500 kBaud, 50% bus load

4) Bandwidth depending on used protocol e.g. UCP or TCP/IP

5) AURIXTM, 65nm generation

1. + 2. + 10% communication

overhead (e.g. for 8KByte block transfer)

Ethernet ca.16s

for 4MByte

TPM

Modem

Central Gateway

Comfort

CAN

Chassis

FlexRay (or CAN)

Drive Train

CAN-FD

CAN-FD

TCU e.g. TC27x

EMS e.g. TC27x

OBD

ABS e.g. TC23x

EPS e.g. TC23x

Telematics Unit

TC23x

Roof

Antenna

Cellular Update

CAN ca.290s

for 4MByte

Infotainment

ETH

TC2xx

e.g. TC29x

Central Storage

14 2016-12-06 Copyright © Infineon Technologies AG 2016. All rights reserved. Infineon Proprietary

Page 15: Sicherheitsaspekte für Flashing Over The Air in … · - Smooth SOTA migration path required - Key will be the customer acceptance of potential downtime - Solutions are available

Three topology proposals to minimizing the downtime of one ECU

classic approach

update from local storage

A/B swap

› Downtime: Seconds

› Products available today

› Medium to small cost adder

› Downtime: Minutes (CAN), Secs (Ethernet)

› State of the art today

› No cost adder

› Downtime: None

› Products under evaluation, not available today

› High cost adder

15 2016-12-06 Copyright © Infineon Technologies AG 2016. All rights reserved. Infineon Proprietary

Page 16: Sicherheitsaspekte für Flashing Over The Air in … · - Smooth SOTA migration path required - Key will be the customer acceptance of potential downtime - Solutions are available

Summary

Security is essential; on product and process level - Certified products such as TPM are best practice for securing critical

external interfaces

HSM is mandatory for Secure Flash Bootloader implementation

Revolution of network topology is unlikely - Smooth SOTA migration path required - Key will be the customer acceptance of potential downtime - Solutions are available today without significant cost impact

Infineon can support SOTA with AURIXTM and OPTIGATM TPM

Software Over The Air impacts the overall

car architecture

16 2016-12-06 Copyright © Infineon Technologies AG 2016. All rights reserved. Infineon Proprietary

Page 17: Sicherheitsaspekte für Flashing Over The Air in … · - Smooth SOTA migration path required - Key will be the customer acceptance of potential downtime - Solutions are available