Title: Securing Embedded Systems
1Securing Embedded Systems
- tepán Kopriva
- koprivas_at_msoe.edu
- SE-4920
2Introduction
3Growing field of embedded systems
- Fastest growing field in computer business
- PDAs, Smart Cards, Digital music players
- Heart monitoring device
- Sensor monitoring water quality
- Futuristic technologies on the horizon
- Embedded network sensors
- Wearable computers
4Security of embedded systems
- Systems
- Resource constrained in capacities
- Easily accessible at physical layer
- Security
- Cant be solved at a single abstraction layer
- Biometric authentication device
5Embedded design challenges
6Characteristics of embedded system
- Processor based devices
- Portable
- Communicate via wireless channels
- Its tempting to port workstation based security
on embedded systems - Resource limitation
- Physical accessibility
7Resource limitation I
- Smart-Dust node
- 4 MHz 8-bit CPU
- 8000 bytes of instruction memory
- 512 bytes of RAM
- 512 bytes of EEPROM
- Battery-powered
8Resource limitation II
- Public key cryptography (RSA)
- Infeasible because of memory
- Infeasible because of processor horsepower
- Infeasible because of battery exhaustion
9Physical accessibility
- Devices are easily accessible at the physical
layer - Physical tampering
- Side-channel analysis
- Differential Power Analysis
- Monitoring smart cards power line to extract the
cards cryptographic key
10Physical accessibility II
- Privacy concerns
- Data only in one location compared to servers
- If the device is stolen, it needs extra security
measures built-in
11Embedded security pyramid
12Embedded security pyramid
13Protocol level
- Design of the protocol
- Is responsible for
- Confidentiality
- Identification
- Data integrity
- Data origin authentication
14Algorithm level
- Design of cryptography primitives
- Block cyphers
- Hash functions
- Application specific algorithms
- Algorithms used at the protocol level
15Architecture level
- Hardware software partitioning
- Embedded systems to prevent hacks
16Microarchitecture level
- Hardware design of modules required and specified
at the architecture level - Processors
- Coprocessors
17Circuit level
- Implementing technics to thwart physicall layer
attacks - Transistor level
- Package level
18Security types
- Single level
- Problem and the remedy are at the same level of
abstraction - Translevel
- The problem at one level can be solved only with
remedy at another level (lower). - Every level must be secure
19Building the pyramid
20Wirelles biometric authentication device (WBAD)
- CMOS fingerprint sensor
- 32-bit RISC controller
- Embedded memory
- Biometric hardware
- Security hardware
- Infrared wireless transmitter
21WBAD Server based scheme I
22WBAD Server based scheme II
- User enters claimed identity
- Magnetic card
- Smart card
- Server validates the identity
- User impresses fingerprint on the servers senzor
- Server compares the fingerprint with a previously
stored template
23WBAD Server based scheme III
- Security flaws
- Residual fingerprint image stays on the public
sensor - Storing the fingerprint on the server can be
considered a privacy violation
24WBAD Device based scheme I
25WBAD Device based scheme II
- User interacts just with the device
- The device authenticates both itself and the user
with a fixed server - All biometric-processing algorithms are performed
on the device - Server stores a keyed hash of biometric template
26Protocol level Verification protocol
27Protocol level II Single level security flaw
- Server masquerade attack
- Device never authenticates RANDRANDT
- False server could send these values undetected
- Solution
- Additional hash from server H(SK,RANDRANDTID)
where MAC is a message authentication code
28Protocol level II Translevel security flaw
- Bypass attack
- Adversary inserts malicious software to bypass
the biometrics function - Directly after receiving the rand numbers, the
hacked program loads the key K telling that the
match has been made - Server assumes that the device works properly
- Cant be solved on protocol level
29Algorithm level I
- Cryptographic algorithm
- Advanced Encryption Standard
- 128 cipher (128-bit key, 128-bit data)
- C E(K,P)
- Keyed hash function
- Cipher-block chaining MAC mode
- Hashing a variable-length data stream D to a
fixed 128-byte hashH(K,D)
30Algorithm level II
- Signal-processing algorithms
- Feature-extraction algorithm
- Extracts the minutiae from the raw image
- Matching algorithm
- Performs a matching operation between the
minutiae and a stored template
31Architecture level I
- Protocol and algorithm are mapped onto an
embedded architecture platform - Security partitioning
- Secure modules
- Insecure modules
- Clearly distinguish between secure and insecure
parts
32Architecture level II
33Architecture level III
- Single chip solution
- Two modules connected by a secure insecure bus
- Easy programmability
- Waste of area and power
34Architecture level IV
35Architecture level V
- Dual chip solution
- Each module designed independently
- Secure-to-insecure bus accessible on the board
- Additional power and additional protocols
(handshaking) needed
36WBAD architecture
- Single chip insecure microprocessor and secure
coprocessor - Microprocessor - Leon
- 32 bit RISC
- Embedded Sparc V8 open source core
- Coprocessor
- Custom designed
37Architecture level VI
- Coupling between modules
- Loosely coupled (memory mapped)
- Performance advantages
- Design time disadvantages
- Tightly coupled (register mapped)
- Our design
- Memory mapped coprocessor
- 3 buses between secure and insecure part
- 16 bit INS, 32 bit D_IN, 32 bit D_OUT
38Architecture level VII
39Architecture level VIII
- Mapping phase
- Map protocol functions on secure/insecure modes
- Secure functions on secure coproccesor, which is
accessible to processor through instruction set
only
40Architecture level IX
- Secure instruction set
- To protect secure functions from software bypass
- Processor accesses coprocessor via two
instructions - DO_MATCHING
- DO_CRYPTO
41Architecture level X
- DO_MATCHING
- Loads the stored template
- Matches it to the candidate minutiae
- Sets match flag internal to coprocessor
- Coprocessor sends READY_FOR_CRYPTO signal
- Indicates that the matching is completed
- Sends this signal after constant number of cycles
42Architecture level XI
- DO_CRYPTO
- Coprocessor
- Loads the internal flag
- Performs cryptographic steps to produce the token
- Token is returned to processor and send to the
server - Insecure processor doesnt have any way to set
the match flag high other than through biometric
processing
43Architecture level XII
- Information sent on the bus
- READY_FOR_CRYPTO signal
- Token
- Insecure processor cant decrypt it because it
doesnt know the key K
44Microarchitecture level I
- Hardware implamantation
- Insecure part Leon processor
- Secure part
- Custom design of coprocessor
- Hardware coprocessor reduces energy needed for
encryption - AES - 10Gbits/joule compared to 10Kbits in Java
45Microarchitecture level II
- Secure module
- Top-level controller
- Cryptographic engine
- Matching engine
- Private buses
- Secure buses internal to coprocessor
- Public buses
- Coprocessors interface to the outside world
46Microarchitecture level III
- It is necessary to simulate secure and insecure
modules together - Boundary between hardware and software is often
week part of the system - Top level controller constraints
- Allowed combination of instructions
- Security vs. flexibility
47Circuit level I DPA
- CMOS the standard building block
- The only transaction that causes dynamic power
dissipation from the power supply is 0 gt 1
output transaction - 1 gt 0 transaction output capacitance
discharges to ground - During 0 gt 0 and 1 gt 1 circuits use no dynamic
power
48Circuit level II combating DPA
- The ciurcuit needs to have the same dynamic power
dissipation regardless the transaction Sense
amplifier based logic (SABL) - Charging the same capacitance at every event
49Circuit level III
50Circuit level IV
- SABL disadvantages
- Power It doubles average power consumption
- Area It roughly doubles the area