CAN AUTHENTICATION AND ENCRYPTION
Implementing scalable CAN Security with CANcrypt
by Olaf Pfeiffer
CAN AUTHENTICATION AND ENCRYPTION February 2017 CAN PROVIDES - - PowerPoint PPT Presentation
Implementing scalable CAN Security with CANcrypt by Olaf Pfeiffer CAN AUTHENTICATION AND ENCRYPTION February 2017 CAN PROVIDES MULTIPLE ATTACK VECTORS Record and re-play messages Can trigger desired actions Re-engineering
by Olaf Pfeiffer
Record and re-play
Can trigger desired actions
Re-engineering
Monitor and analyse
Inject messages
Denial-Of-Service (DOS)
Generate selected
February 2017 CANcrypt
Small message size
Single byte command Sometimes „known“ data
Limited resources
Microcontrollers with
Can security be added to
February 2017 CANcrypt
Popular security methods
Require a minimum of
Can not easily (real-time,
February 2017
CANcrypt
Customizable security
Simple bit mixup for lower
Key Management
Key Hierarchy
Secure key transfers
Slow but invisible CAN
Shared bit generation
Grouping
Based on inital shared key
Permanent or last sessison
Secure heartbeat
Updates shared dynamic key
Pairing
Based on inital shared key
From a key hierarchy
Updated shared dynamic key
By invisible shared bit generation
February 2017 CANcrypt
CANcrypt is based on
Configurable length Multiple keys per device
Key can be combined with
February 2017 CANcrypt
Key must cyclically change
Shared random values Permanent key Counters and or data
CANcrypt
February 2017 CANcrypt
How close can we get to a
Or: how close do we need to get
Highest level not required
Here: based on dynamic
Permanent key Message counter Optional: last data
February 2017 CANcrypt
February 2017
CANcrypt
All devices must monitor
Look for CAN IDs used for
Produce an alert / emergency
NOTE: this is already done
February 2017 CANcrypt
Uses dynamic one-time pad Consists of
3 random bytes 1 byte checksum
Initializer from one-time pad
All 4 bytes XOR encrypted
February 2017 CANcrypt
Consumer decrypts the 4
Calculates the checksum On match, continue All random bytes are used by
February 2017 CANcrypt
Initial pairing requests
Participants synchronize
February 2017 CANcrypt
Monitor network for
On detection
Send alert
Else
Send secure heartbeat
On receive of messages
Authenticated by next
Depending on driver
February 2017 CANcrypt
February 2017
CANcrypt
If 2 nodes randomly select a
Example: range 10h to 1Fh No data
and transmit these
then an observer does not
Exception:
advanced attack scenario
The 2 nodes know who
February 2017 CANcrypt
February 2017 CANcrypt IF I am the configurator device IF I transmitted lower bit generation message common bit is 0 ELSE IF I transmitted higher bit generation message common bit is 1 ELSE both used same message, no bit determined ELSE I am a device IF I transmitted lower bit generation message common bit is 1 ELSE IF I transmitted higher bit generation message common bit is 0 ELSE both used same message, no bit determined
The 2 pairing nodes need a
Shared permanent key used
Ensures authentication,
Performance not suitable
But good enough to
128 bit key, about 1.6s 256 bit key, about 3.2s
February 2017 CANcrypt
One-time pad security Two messages Unused bytes filled with
Ensures size of 128 bit AES or other can be used
16 bit checksum
February 2017 CANcrypt
Grouping
Authentication by secure heartbeat
Pairing
Secure messaging between two devices Configuration, key transfers
Key management
Key hierarchy
Customizable security functions