Root Causes 266: End-to-end Encryption in the Apple Technology Stack
Recent announcements from Apple lay out a set of expansions in the scope and capability of encryption throughout the Apple ecosystem. In this episode we detail the announced changes and some of their implications.
- Original Broadcast Date: January 4, 2023
Episode Transcript
Lightly edited for flow and brevity.
-
Tim Callan
This was actually a little bit ago – not a huge amount – but on December 7, 2022, I believe it was, Apple made a set of announcements essentially about how they are dealing moving forward with encryption in their ecosystem and I think we wanted to talk about those today.
-
Jason Soroko
That’s right, Tim. There’s a few things that they talked about. It’s interesting how technical journalists kind of picked up on one or two of them and never talked about really what’s going on behind the scenes as a whole and that’s what we do here on this podcast is get down to the root causes.
So what’s going on, Tim, is Apple is expanding their end-to-end encryption to iCloud backups which is kind of a big deal for people who really want to keep their backups in the cloud but it also extends out to some of their apps like Notes and stuff like that though what it doesn’t extend to is email. That’s the big exception but I think what’s interesting about that particular announcement is the fact that you can now hold the keys – and let me tell you what I mean by that. Whenever we say we are talking about encryption we are talking about there is a key pair that was generated for you behind the scenes.
-
Tim Callan
Yes. There must be a key pair somewhere or it doesn’t work. That’s correct.
-
Jason Soroko
Correct. So the iCloud backup for example is going to be encrypted. What would have happened in the past is the key pair, private key especially would have been sent up to the cloud-based Apple’s data server essentially.
It would have been sent over to their HSM in the cloud and what Apple is doing now, you can opt into this which is you will now be the sole possessor of the private key on one particular device. Your phone probably.
-
Tim Callan
Ok. So what used to happen in the past was - let me just make sure I get this right – is they would generate a private key on my behalf. They would store it in an HSM. They presumably had a whole bunch of security around there to protect those private keys and we were taking it on faith that Apple was going to do a good job of protecting our private keys and wasn’t gonna misuse them in any way. Is that the old technology paradigm? Did I describe it correctly?
-
Jason Soroko
That is correct. It still exists. If you do nothing and you don’t opt in, it’s still gonna be the way it works.
-
Tim Callan
Which is probably how it will work for most people, but you are saying I can also elect to generate and maintain my own private key?
-
Jason Soroko
Your phone is going to do the generation of the key. It’s not like a bring your own key thing.
-
Tim Callan
But it will be done locally?
-
Jason Soroko
It’s gonna be done locally but the idea being that that private key is not gonna leave that phone.
-
Tim Callan
So one implication of that, of course, is that decryption can only occur on that particular device. So part of the Apple ecosystem is that I migrate seamlessly between devices. I have a MacBook and I have an iPhone and I have an iPad and they’re all mine and all my stuff is in all of them. But if the private key is local to one device, presumably anything that I encrypt must be accessed through that device. Is that right?
-
Jason Soroko
Especially things like key recovery are gonna recover the device. Say your MacBook and other Apple devices, it looks like they are gonna be using their key chain technology and so therefore – here’s my understanding when I’m reading their blog on this – anywhere that you log in personally with your Apple ID, your private key will essentially be everywhere using Apple key chains technology.
-
Tim Callan
So my private key will actually move to these other devices? It will basically sit in storage on those devices?
-
Jason Soroko
In my mind, it seems to be the only way it could be done because of the way that they described it. Apple is tying it to your Apple ID and they are using Apple key chain, which means they are using key chain to be able to copy it across those devices.
-
Tim Callan
So that answers my next question or partially answers my next question which is what happens if I lose that device? So I encrypt everything with a private key that’s on my phone, it’s only on my phone and then I drop my phone off the side of the boat by accident. Does that mean that all my stuff is permanently encrypted and I’m out of luck?
-
Jason Soroko
That’s a good question. I think that if you have used it across say a MacBook and then your MacBook may be able to then since it has a copy of that key in the key chain, then it can presumably use it. Because a lot of the stuff was announced December 7 but it looks like the full implementation of this won’t be until early 2023, which is why we are talking about it now.
So all the details of this I don’t have in my head yet because I haven’t actually physically played with it but these are all good questions.
-
Tim Callan
Ok. So, maybe it’s premature to ask that. One presumes that a lot of brain power went into questions like these at Apple and that we should be able to get good answers when the time comes.
-
Jason Soroko
I think one of the bigger questions to ask is why. Why do this? And for those of you who know why, well, let’s at least discuss it. I think part of why Apple is allowing certain people to opt in to holding your own keys and taking the risk of, hey, can I just recover my keys my trusted Apple vendor. So, Tim, I think one of the main reasons why Apple is doing this is because there are some users and there has been some talk about Apple themselves being bound by subpoenas and so if you do an internet search on this, some of their big executives were questioned, hey, is it true that the FBI is compelling you do certain kinds of things and anyway, I won’t get into that whole story but…
-
Tim Callan
We all remember the famous story of law enforcement attempting – I think it was the FBI – attempting to compel Apple to unlock an iPhone and Apple refusing to do so and there was kind of a standoff and then ultimately it went away because the law enforcement body involved stated that they had found another way to unlock the phone but, yes, I can see that where lots of tech companies will guarantee that they are gonna protect your secrets up and to the point that they are forced by legal requirements such as subpoenas to do otherwise, at which point they will comply with the law. And if you can’t open the encrypted material because it’s just not possible mathematically then you can’t comply with the subpoena and you will not be contempt of court when you say sorry, I can’t do it. It’s just not possible. And so, under those circumstances, that makes great sense why they would offer that as an alternative.
-
Jason Soroko
I think that’s the main reason why this is being done. So for those of you who might be coming across some tech journalism on this or question why you might want to use it, I would say, hey, go ahead and extend Apple’s key chain, which has your private key up into their HSMs and have a nice day.
Like that’s the way we are all living right now and it works fine for most of us. But, on the other hand, if you know why you need to possess your private key and not let anybody else have it well then you know why you are doing that.
-
Tim Callan
And there’s a spectrum on that. And some of it is just principle. Some people just feel that as a matter of principle the government shouldn’t be able to do this and some people are going to walk the walk on that, are going to vote with their feet and I think that’s important because if you can easily spot the people who have something to hide because they are the only people who have selected this then that itself becomes a privacy violation. And part of what you want is you want everything to look the same. It’s not good to have a difference between who looks like they are actively hiding things and who doesn’t look like they are actively hiding things. And so some people may do this just because but, I think certainly some people will feel that you could have something that isn’t anybody else’s business and it may not even be that doesn’t mean cause you think that it’s illegal or unethical, you just might think it’s nobody else’s business and under those circumstances, this is an option that cryptographically guarantees that it really will be nobody else’s business.
-
Jason Soroko
Well, Tim, we had a podcast recently that was about crypto currencies and it was about FTX and there was a saying that we had – and I think it was the name of the podcast. We said if you don’t hold the keys, you don’t hold the cheese.
And it’s true in this case as well. So I want to cover off two other pieces of the announcement from December 7, Tim.
And they are kind of related. Especially this part which is the usage of hardware keys with iPhone and iPad. So it’s already obviously been available to use a hardware key like a YubiKey, as an example, with a MacBook but now, you will be able to use NFC-based and lightening port YubiKeys with your iPhone and iPad, Tim.
I think that kind of goes hand-in-hand with if you are now in the possession of your private keys and you don’t even want to trust just the way the phone is storing it either in the software or the enclave or where Apple is putting it, you can actually now put that into your YubiKey, as an example.
-
Tim Callan
And then maybe that gets to my question of what happens if you lose your phone. Because if it’s on your dongle and you lose your phone, it’s ok. You’ve got your dongle. I guess there’s another question of what if you lose your dongle.
-
Jason Soroko
So the thing is the reason why I don’t think that’s a clearcut answer to that just as of yet and this is mostly because I haven’t had my hands on it yet, is because it looks like this usage of a hardware token basically mostly related to their incorporation of WebAuthn.
So, essentially using FIDO technologies for authentication, which underlying is WebAuthn. Of course, they have the marketing term of security keys. That’s Apple’s marketing term for it but in reality it’s just FIDO WebAuthn, which of course, we have a previous podcast meaning about meaning certain websites that want to take advantage that passwordless authentication for their websites can now, the entire ecosystem is now in place from the hardware token through the operating system and the necessary SDKs that you can incorporate within iOS and within your website. So everything is now in place.
-
Tim Callan
And you are anticipating another question is was gonna have or maybe it’s a comment because it’s not like you have the insider story but I was gonna say, it seems to me that it’s unlikely that it’s a coincidence that the WebAuthn move and this move both happened in close proximity to each other. This feels like a single coordinated, integrated effort that is being rolled out in pieces.
-
Jason Soroko
100%. It would be the exact same people at Apple more than likely and I would see that this is the big picture and I love how, because Apple owns the entire ecosystem, they are able to put all of this together and in an Apple-ish kind of way, it’s well thought out. So, anyway, we’ll see.
And here’s the third one, Tim, just to mention it. So, basically, Apple is now claiming in the same December 7 release – sorry, not release, but news release – they claim that an iMessage, their new iMessage can alert you if state-sponsored spies are eavesdropping on you and I think really what that comes down to, Tim, is when you are iMessaging with someone that’s already an end-to-end encrypted communication using Apple’s words. Not something I’ve personally verified but it’s Apple’s words. So, there’s two issues with that. One is let’s say you and I were doing a PGP communication and we wanted to exchange our public keys with each other offline. Completely offline. Let’s say we met face-to-face and we wanted to be able to exchange each other’s public keys. With PGP, that’s just kind of how it works. With iMessage, it’s not something that you were ever able to do because you couldn’t just get that key information and pass it on. But apparently, Apple will be – and again, this is another thing I just haven’t had my hands on yet, but they are now claiming that that kind of PGP-like experience of passing the public key to verify who it is actually speaking to is a part of what they are offering and a second part of what they are offering here is let’s say that an unauthorized computer came into the possession of the Apple ID of the person you are speaking to. You as the other end of the iMessage party will be notified to that and, in fact, they had a screenshot of what that would look like on Apple’s blog on this topic. So, I thought that was interesting. They are giving you visibility to the state of security. Things like, hey was there an unauthorized computer that has successfully logged into the Apple ID account. So, they’re giving you that kind of capability now.
-
Tim Callan
I wonder, there’s a bunch of questions that come with that one. How do they know? Like if I go and purchase a new MacBook and then log in, is that going to trigger that? Presumably not because it’ll be attached to my Apple ID. Interesting. And also interesting in terms of will there be circumstances now or if Apple gets subpoenaed and somebody says we are gonna do, try to spy on this communication, can a court order Apple not to inform you of that? I mean I think we could probably assume that when we get that warning, it’s probably true. And that could be happening in lots of places. Maybe it’s the government of Turkey that’s doing that and Turkey has no jurisdiction out of Apple so they can go pound sand. But if it’s the NSA, is Apple still gonna be able to tell me?
-
Jason Soroko
The answer could be, it could be. Because if for your Apple ID account you are in fact in the sole possession of the private key then presumably even the NSA could go pound sand. So, that’s interesting.
-
Tim Callan
Right, if you are in the sole possession of the private key it doesn’t matter because once again just mathematically Apple cannot obey the court order. They simply can’t.
-
Jason Soroko
So, it really, when Tim Cook and other executives at Apple were saying that they were gonna be a privacy first company, in terms of everything that we are seeing - again, I haven’t had my hands on it - I would really like to see other white hats really put a good pounding on all of this stuff and see how well it’s been implemented but on the surface, Tim, it shows you where certain companies are diverging in 2023, which is Apple is going full-blown privacy route and other companies are kind of doing the opposite.
-
Tim Callan
And to your point, not that we expect them to be perfect, but Apple usually is pretty buttoned up on stuff like this. So, you don’t expect them to make rookie errors. You don’t expect any high school kid to be cracking this. Maybe it might turn out to be imperfect or flawed but you think those flaws are going to be subtle and Apple usually when they roll something like this out, it’s usually pretty well thought through.
-
Jason Soroko
That’s been my experience. And I know some of the people who work there and they’re some of the most thoughtful people there is. I can tell you, they’ve probably been working on this now for a couple of years. It’s like Toyota vs. anybody else in the car industry. It’s like Toyota is usually a year or two behind on some of their technologies but that’s because they’ve been thinking about it a lot harder than anybody else for a while. And it’s just part of their corporate ethics and how they operate.
Anyway, interesting announcement December 7 and it’s right up the ballpark of this particular podcast. So there you go.
-
Tim Callan
There you go. So that’s important. A lot of people are out there using the Apple stack and if you are, this is a big thing to be aware of and these might be options that are interesting to you.