Podcast
Root Causes 85: Automotive Key Fobs and Cryptography


Hosted by
Original broadcast date
April 23, 2020
Recent headlines have unveiled high profile attacks against automobile key fobs. Such an attack is potentially huge since successfully mimicking these fobs can yield complete access to an automobile's capabilities.
Our hosts are joined by repeat guest Alan Grau as they describe the cryptographic architecture of a modern automotive key fob, how these attacks take place, and what automobile manufacturers can do about it.
Podcast Transcript
Lightly edited for flow and brevity.
And so, then what, what people did in some cases, it's like, well, we'll also encrypt that data. So, make it harder to break and what one of the challenges in this is, you know, the trade-offs is, right, you don't want to have an $800 key fob with lots of hardware in it. So, people were trying to build super, super cheap key fobs. So, they had very limited capability in the chipset on the key fob to perform these operations. And so, some of the early ones were doing 40-bit encryption. 40 bits of what's called symmetric encryption. Something like an AES encryption algorithm. And that's important to understand for a couple of reasons. One is that means that it's symmetric encryption. So, both ends of the communication channel have the same encryption key. So, if you can discover the encryption key, then you can break the encryption.
And so, what we've seen as a way to solve that, and this is, you know, anytime you connect to a website using a secure protocol, so anytime your browser connects to amazon.com, your banking site, whatever it may be, it uses TLS. Right? So, TLS is the underlying security protocol and the way that the protocol works is it first does authentication and key establishment using public key encryption, using PKI certificates, and what's called asymmetric encryption, or public key encryption and in that mode, each node has its own key pair. So, it's got a public key and a private key and those keys are related in that if you encrypt data with the public key, you can decrypt it with a private key and vice versa. So, to kind of walk-through step by step the way that works, if we - - assume that Jason and I are communicating, and I want to set up a secure connection with Jason, I would - - he would share his public key with me which he can do over any insecure channel, I'd use that public key to encrypt a message with him that contains the private key, and some that - - or that contains not the private key, but the symmetric encryption key, the AES encryption key and send that to him. Now, Jason's the only person who can decrypt that because of the special way that symmetric keys, that asymmetric keys work, the Public-Private Key Pairs work. He can decrypt that message and we now have a shared key that we can utilize and we can use that for all of our communication. Now, if we had a crypto expert listening to this, they would say, well, there's a lot of subtleties that we've brushed over. And that's true, right? When you dig down into the details, there's a lot of things that they get involved underneath, but essentially, that's the process. And so now, each time you set up a communication session, you have a new key that's created and shared for just that session and nobody can, you know, find that hard-coded on the machine, you know, it's much, much more difficult to break that and even if they are able to, you know, listen to the traffic, do a brute force attack and discover the key, they can't use that for the next communication session. So, it's only used for that session. So, they can't use it to duplicate a key fob. So that's, you know, ultimately, the way any strong communication and authentication protocol should be implemented. And then the last point on that to get back to Tim's point, you know, early on, he said that hardware isn't that expensive, you know, for doing these things, right? There are chips available that support these types of operations that cost, you know, some small number of dollars, you know, so they're not hundreds of dollars to buy these chips, you know, they're, you know, $1 apiece, or somewhere in that ballpark. So, there is the ability to transition to this sort of technology.


