Reading List

iMessage Doesn’t Use APNs for Attachments from Daring Fireball RSS feed.

iMessage Doesn’t Use APNs for Attachments

Small follow-up point re: my post this week on iMessage’s delivery architecture being built atop the Apple Push Notification service:

APNs can only relay messages up to 4 or 16 KB in size, depending on the iOS or iPadOS version. If the message text is too long or if an attachment such as a photo is included, the attachment is encrypted using AES in CTR mode with a randomly generated 256-bit key and uploaded to iCloud. The AES key for the attachment, its Uniform Resource Identifier (URI), and an SHA-1 hash of its encrypted form are then sent to the recipient as the contents of an iMessage, with their confidentiality and integrity protected through normal iMessage encryption, as shown in the following diagram.

This explains why you can often text, but not send or receive images, with iMessage over in-flight Wi-Fi. (Thanks to Adam Shostack for flagging this detail.)