6 ms·
It's interesting how easy Apple's iMessage model would lend itself to being a mass-deployed, heavily-used, CA-based asymmetric encryption network. As I underst
by ComputerGuru 14y ago
It's interesting how easy Apple's iMessage model would lend itself to being a mass-deployed, heavily-used, CA-based asymmetric encryption network.
As I understand iMessage, when you attempt to text a number a background thread fires and checks with Apple's iMessage servers to see whether or not the number is associated with an iMessage account, then returns the end-user account details to your device so it may send a digital message addressed to that user to Apple's iMessage servers.
Replace that digital ID with a public key. Private keys are generated and kept only on your iDevice. iMessage servers are your CA. Each iDevice has a unique public key.
At this point you have a very secure, end-to-end encryption scheme. No warrantless snooping is possible, and even Apple is unaware of your message contents.
Now depending on whether you want your design to be CALEA-compatible or not, Apple can issue a new private key to the government and add it to "your" list of public keys on their CA to allow the government to intercept future messages after they have obtained a warrant. If you think you can go toe-to-toe with the FBI and exempt yourself from CALEA by claiming the design of your infrastructure does not permit for message interception, you can tweak the CA around a bit. Only one public key per user, pass private key symmetrically encrypted with a password only the user knows from one device to the other via a "secure" side channel when adding new iDevice to user's iMessage account or other workaround.
I'm absolutely not a security person, and none of what I say should be taken except as some ramblings that might have some hint of an idea beneath them. I already can think of a dozen weaknesses in this system, this kinda works only if you assume you can trust Apple to play within the rules of the framework they're making, i.e. not to try to intercept your private key, log your keystrokes, automatically add a second public key recipient to your messages, etc. Fact of the matter is, you are at their mercy. tptacek, please be gentle in gutting me.
Edit: Thanks for that link, daniel. It is comforting to know that there is indeed some base level of security. If CALEA-compliance is achieved by adding the fed's public key to a list of destination public keys for a message, that implies you should actually be able to find out whether or not you're being monitored by simply checking for new/unknown/unexpected additions to your list of public keys. Of course, there are other methods of doing this that wouldn't be as easy to detect, e.g. maybe there is an out-of-band request for additional public keys to send to, maybe the fed's public key is already embedded in the device and is being used invisibly every time, etc. etc. etc.
Edit2: For people wondering if syncing of old iMessages between devices means iMessage doesn't work like this, I don't think that's the case. I believe that's done via iCloud (i.e. backup of previously decrypted messages), as when you add a new Apple ID to iMessages on OS X, you don't get the old messages for that account, only new ones. So it's another attack vector, but not inherent weakness in the iMessage design.
- danielsju6 14y agoThis is actually how the protocol works, it uses the certificate burnt into the CPU; Apple claims that the private keys are known by no party including themselves, probably generated by the chip fab with some some of SCEP exchange. I've been meaning to update the IMWiki page with my research, but here's the bit where you see that exchange: http://imfreedom.org/wiki/IMessage#Unknown2 http://imfreedom.org/wiki/IMessage#Unknown2 ["Apple iPhone Device CA" / "Mac OS Device Identity (Production)"]
- andreyf 14y ago> Apple claims that the private keys are known by no party including themselves Source? How can I add a new device (e.g. Messages on OSX) and get all the messages between my phone and friends?
- danielsju6 14y agoPrivate keys, not public; the messages are decryptable by anyone who's been added to the keybag, you've probably seen the pop up notifying you that another device (private keys burnt onto the chipset) is joining the keybag. Once you hit OK Apple pings you with encrypted communications from the other devices (them being the pipe and presumably not in the trust chain, this explains why sometimes it's a little iffy showing cross device messages.) The protocol hasn't been completely reverse engineered but enough to know it's likely decentralized like this, just MITM it (quite a bit is documented on the wiki I linked), Apple is the CA and the piping but it appears to be rather strong and decentralized in terms of chain-of-trust. Apple has put itself, probably without coincidence, in a position where they may not even be able to execute a court order to spy on a user. The Apple security white-papers detail their hardware level certificates, I've dealt with this a lot as a Apple MDM developer.
- deleted 14y ago[deleted]
- andreyf 14y agoI've seen the message notifying me that I've added a new device to the account, yes, but what does that have anything to do with the encryption? When someone sends me an iMessage, their client sends as many copies as I have devices?