How iMessage sends and receives messages securely
Users start a modern iMessage conversation by entering an address or name. If they enter a earphone number or electronic mail address, the device contacts the Apple Identity Service ( IDS ) to retrieve the populace keys and APNs addresses for all of the devices associated with the addressee. If the drug user enters a list, the device first uses the user ’ randomness Contacts app to gather the telephone numbers and electronic mail addresses associated with that name and then gets the public keys and APNs addresses from IDS. The user ’ second outgoing message is individually encrypted for each of the liquidator ’ sulfur devices. The public encoding keys and signing keys of the receive devices are retrieved from IDS. For each receive device, the sending device generates a random 88-bit value and uses it as an HMAC -SHA256 key to construct a 40-bit rate derived from the sender and receiver public key and the plaintext. The concatenation of the 88-bit and 40-bit values makes a 128-bit key, which encrypts the message with it using AES in Counter ( CTR ) Mode. The 40-bit value is used by the recipient side to verify the integrity of the decode plaintext. This per-message AES key is encrypted using RSA-OAEP to the populace key of the receive device. The combination of the code message text and the code message key is then hashed with SHA-1, and the hashish is signed with the Elliptic Curve Digital Signature Algorithm ( ECDSA ) using the transport device ’ sulfur individual sign key. In io 13 or late and iPadOS 13.1 or later, devices may use an elliptic Curve Integrated Encryption Scheme ( ECIES ) encoding rather of RSA encoding. The result messages, one for each get device, dwell of the code message text, the code message cardinal, and the sender ’ s digital signature. They are then dispatched to the APNs for manner of speaking. Metadata, such as the timestamp and APNs routing data, international relations and security network ’ thyroxine encrypted. communication with APNs is encrypted using a forward-secret TLS groove. APNs can entirely relay messages up to 4 or 16 KB in size, depending on the io or iPadOS version. If the message text is besides long or if an attachment such as a photograph 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 code form are then sent to the recipient role as the contents of an iMessage, with their confidentiality and integrity protected through normal iMessage encoding, as shown in the following diagram.
Read more: Ciphertext indistinguishability – Wikipedia
Read more: A Few Thoughts on Cryptographic Engineering
For group conversations, this procedure is repeated for each recipient and their devices. On the experience side, each device receives its transcript of the message from APNs and, if necessity, retrieves the attachment from iCloud. The incoming earphone count or e-mail address of the transmitter is matched to the liquidator ’ south contacts so that a name can be displayed when potential. As with all push notifications, the message is deleted from APNs when it ’ s delivered. Unlike other APNs notifications, however, iMessage messages are queued for delivery to offline devices. Messages are stored on Apple servers for up to 30 days .Published Date: May 13, 2022