Close

Speed

A project log for HomeKit for Bluetooth

Apple's HomeKit supports Bluetooth but isn't an open spec. Here's the open source code to make it work

Tim WilkinsonTim Wilkinson 07/12/2015 at 05:330 Comments

The HomeKit protocol uses some pretty heavy duty math to secure itself. This is especially true with the choice of SRP for pairing an IOS device to a HomeKit device. But while these choices are not the familiar RSA, SHA1 or AES protocols, they are well defined standards already adopted in new cryptographic products. Unfortunately this doesn't make them the speediest choice for a little 16MHz Cortex-M0.

HomeKit has two major security processes. The first is Pairing when a trusted relationship is established between an iOS device and a HomeKit device. The second is Verifying, which takes places each time an iOS device reconnects to a HomeKit device (and so happens often).

Benchmarking these on the nRF51 we see the following:

While pairing is extremely slow, this is less important because it only happens once - we can tolerate this. Verifying is thankfully quick.

Out of interest, I've also benchmarked on the new nRF52 processor. This is a Cortex-M4 device running at 64MHz; quite a bit faster. Here we see the following:

Quite a nice improvement.

Discussions