Security in Apple HomeKit 4. Meeting IG sha 9. März 2017 in Horw Dr. Cuno Pfister pfister@oberon.ch http://oberonhap.com
The Problem? 2
Also a Problem X? 3
Apple WWDC 2014 With HomeKit we want to bring some sanity to home automation 4
HomeKit 5
Voice Control 6
Setup of an Accessory... 7
Setup of an Accessory... 8
HomeKit Accessory Protocol End-to-end security protocol IP and BLE as transports Simple setup process Interoperability (API in ios) Scenes allow control of multiple devices Siri voice control State-of-the-art security algorithms Remote access via icloud is optional 9
What are HomeKit Products? HomeKit Accessories With standard profiles With custom profiles Bridges HomeKit SDKs Standard SDKs for some reference hardware Custom SDKs for custom hardware 13.03.17 10
The Challenge 11
HomeKit Security 13.03.17 12
OberonHAP Architektur (WiFi, Ethernet) accessory logic (e.g. door lock code) IP stack OberonHAP server OberonHAP protocol OberonHAP crypto platform (hardware, with RTOS or «bare metal») 13
Algorithmic Innovations Novel combinations of key algorithms «Multiplication in a prime field including modular reduction» Reducing the number of expensive instructions For example, bringing down the number of multiplications for SRP from 64 to 8 millions 13.03.17 14
nrf52 Reference Platform nrf52 microcontroller Cortex-M4F at 64 MHz 64 KB RAM and 512 KB Flash nrf52 DK development kit link BLE stack S132 v2.0 (SoftDevice) SDK developed by Nordic using OberonHAP link 13.03.17 15
Speed: Pair Setup & Verify Core Cortex-M0 Cortex-M3 Cortus APS3RP Instruction set architecture Cortex-M4F ARMv6-M ARMv7-M Cortus V2 ARMv7E-M with FPv4-SP extension microaptiv UP MIPS32 with DSP enhancements Clock frequency 16 MHz 48 MHz 50 MHz 64 MHz 200 MHz Setup phase 1 (static setup code) 3,881 ms 1,109 ms 578 ms 361 ms 97 ms Setup phase 2 14,965 ms 4,256 ms 2,191 ms 1,338 ms 357 ms Opening a session (authentication) 935 ms 255 ms 125 ms 52 ms 18 ms These numbers only include the cryptographic processing. The Bluetooth Low Energy stack (or the IP stack for WiFi or Ethernet), the application logic, and ios at the other end will add to the round-trip times as experienced by a user. Zero wait states assumed. 13.03.17 16
nrf52 RAM Footprint free for application 34.5 KB free for application 39.5 KB free for application 40.4 KB OberonHAP plus accessory logic (static data) OberonHAP plus accessory logic (stack) BLE Stack (static data & stack) 7.7 KB 11.8 KB 10.0 KB OberonHAP plus accessory logic (static data) OberonHAP plus accessory logic (stack) BLE Stack (static data & stack) 7.7 KB 6.8 KB 10.0 KB OberonHAP plus accessory logic (static data) OberonHAP plus accessory logic (stack) BLE Stack (static data & stack) 7.7 KB 5.9 KB 10.0 KB FAST option MEDIUM option SMALL option 17
Side-Channel Attacks 13.03.17 18
How to Trust such Code? Test suite Edge cases, negative tests, random tests Formal correct proofs The proofs have been reviewed by external security experts (Prof. Willi Meier and Prof. C. Nicola) Found to be «in all parts mathematically and formally correct» 13.03.17 19
Tim Cook, Apple CEO Oberon is key partner of Apple in HomeKit ecosystem, along with accessory & silicon vendors (some are customers of 20 us).
Questions? 13.03.17 21
Oberon microsystems OberonHAP Instruction Set (e.g. ARMv7) data sheets & dev kits Semiconductor Vendor (e.g. Nordic Semiconductor) HomeKit SDK dev kits HomeKit Accessory Developer marketing collateral Retailers packaged accessories Consumers Hardware IP Vendors (e.g. ARM) Hardware IP (e.g. Cortex-M4) chip design accessory hardware design and firmware packaged accessories Foundries Contract Manufacturers HomeKit Accessory Protocol specification production chips Distributors Apple
Oberon microsystems HomeKit SDK Instruction Set (e.g. ARMv7) data sheets & dev kits Semiconductor Vendor (e.g. Nordic Semiconductor) dev kits HomeKit Accessory Developer marketing collateral Retailers packaged accessories Consumers Hardware IP Vendors (e.g. ARM) Hardware IP (e.g. Cortex-M4) chip design accessory hardware design and firmware packaged accessories Foundries Contract Manufacturers HomeKit Accessory Protocol specification production chips Distributors Apple
Serendipity! 13.03.17 24
First Licensee 25