TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

iMessage, explained

622 pointsby spoon16over 1 year ago

23 comments

bgormanover 1 year ago
My prediction is that Apple will start to use attestation (device check) to lock down iMessage. The problem is that this would require a software update for older devices.
评论 #38535225 未加载
评论 #38534385 未加载
评论 #38540280 未加载
评论 #38534731 未加载
评论 #38541185 未加载
评论 #38536365 未加载
CTmysteryover 1 year ago
Learning the contract is great, thank you for the work! How about the infra stack used by imessages? Does anyone have intel on that? The scale is incredible, which always makes me wonder how it can be so good while other apple web services (forums, dev portals, etc) can be so buggy and half baked
评论 #38540793 未加载
benttover 1 year ago
OMG I love this. Go get em! Also, this is perfect material for Hack Club. You should join! <a href="https:&#x2F;&#x2F;hackclub.com&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;hackclub.com&#x2F;</a>
lxeover 1 year ago
This is phenomenal work. You should write a little on how you got into this whole field. There are high school and college kids all over reddit struggling how to excel at technical stuff, learn programming, get a job in tech, and I feel like they can really benefit from your perspective.
评论 #38535676 未加载
评论 #38540987 未加载
评论 #38535851 未加载
dbuxtonover 1 year ago
Genuine question - can a topic really be `opertunistic` or is that author typo? I love these `referer`-type misspellings that become fossilized over generations
评论 #38538249 未加载
评论 #38535878 未加载
benororover 1 year ago
More on this: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=38531759">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=38531759</a>
jamesdeppover 1 year ago
pypush, the open source project behind today’s developments in the iMessage reversing news, is licensed under MongoDB’s Server Side Public License and owned by Beeper (JJTech sold the rights to Beeper, per discord). Although this library is fantastic, I do think that the extremely copyleft license could have implications on where we see this used.
评论 #38537390 未加载
xg15over 1 year ago
&gt; <i>When making an IDS registration request, a binary blob called “validation data” is required. This is essentially Apple’s verification mechanism to make sure that non-Apple devices cannot use iMessage.</i><p>I wonder, will this be in violation of the EU&#x27;s DSA and&#x2F;or DMA once they are in force?
评论 #38537047 未加载
评论 #38537981 未加载
joshavantover 1 year ago
Looking at the Beeper Mini announcement [1], they clearly state that a user doesn&#x27;t need an Apple ID to register their phone number and send&#x2F;receive iMessages. Also, they describe direct, device-to-Apple interactions.<p>However, this article says:<p>&gt; IDS is used as a keyserver for iMessage...<p>&gt; The first step in registering for IDS is getting an authentication token. This requires giving the API your Apple ID Username and Password.<p>&gt; After registering with IDS, you will receive an “identity keypair”. This keypair can then be used to perform public key lookups.<p>So how does the Beeper Mini app take an arbitrary Android phone number, register public keys for it with IDS, and perform public key lookup of recipients... all without ever using an Apple ID?<p>[1] <a href="https:&#x2F;&#x2F;blog.beeper.com&#x2F;i&#x2F;139416474&#x2F;security-and-privacy">https:&#x2F;&#x2F;blog.beeper.com&#x2F;i&#x2F;139416474&#x2F;security-and-privacy</a><p>EDIT - It looks like the answer here is the &#x27;SMS Gateway&#x27; which is virtually undescribed in the OP article or anywhere on [1]. Guess that&#x27;s the secret sauce.
评论 #38552888 未加载
lxgrover 1 year ago
Absolutely amazing work.<p>Just one nit: Per the article,<p>&gt; While the pair format is much more documented and easier to implement, it does not provide forward secrecy using “pre-keys” (similar to Signal) as the new pair-ec format does.<p>Is there any indication that (modern, i.e. ECIES-using) iMessage really uses pre-keys? As far as I can tell, it only uses a drop-in replacement of ECIES instead of RSA for the encryption (and maybe signature?) part, but that alone does not yield forward secrecy.<p>If there isn&#x27;t, I believe this might be a misinterpretation of how RSA, Elliptic Curves, and forward secrecy relate. The Wikipedia article on iMessage seems to propagate the same mistake:<p>&gt; The post also noted that iMessage uses RSA key exchange. This means that, as opposed to what EFF&#x27;s scorecard claims, iMessage does not feature forward secrecy.<p>(The quoted reference actually makes no such claim.)
Thoreandanover 1 year ago
So… anyone gonna make a libpurple plug-in?
评论 #38541415 未加载
geospatialoverover 1 year ago
the fact that you&#x27;re in high school is incredible. keep it up!
评论 #38537039 未加载
d4rkp4tternover 1 year ago
It’s 2023 and I’m still really shocked how hard it is to download all your iMessages and archive or search through them.
nyreedover 1 year ago
Huh. So Android&#x27;s push notification service is built on their instant messenger (GTalk), and Apple&#x27;s instant messenger is built on their push notification service.<p>How cute.
评论 #38539717 未加载
swiftlyTypedover 1 year ago
A few days later, seems apple has begun locking down iMessage further
评论 #38585872 未加载
maqpover 1 year ago
Gonna repeat myself since iMessage hasn&#x27;t improved one bit after four years. I also added some edits since attacks and Signal have improved.<p>iMessage has several problems:<p>1. iMessage uses RSA instead of Diffie-Hellman. This means there is no forward secrecy. If the endpoint is compromised at any point, it allows the adversary who has<p>a) been collecting messages in transit from the backbone, or<p>b) in cases where clients talk to server over forward secret connection, who has been collecting messages from the IM server<p>to retroactively decrypt all messages encrypted with the corresponding RSA private key. With iMessage the RSA key lasts practically forever, so one key can decrypt years worth of communication.<p>I&#x27;ve often heard people say &quot;you&#x27;re wrong, iMessage uses unique per-message key and AES which is unbreakable!&quot; Both of these are true, but the unique AES-key is delivered right next to the message, encrypted with the public RSA-key. It&#x27;s like transport of safe where the key to that safe sits in a glass box that&#x27;s strapped against the safe.<p>2. The RSA key strength is only 1280 bits. This is dangerously close to what has been publicly broken. On Feb 28 2023, Boudet et. al broke a 829-bit key.<p>To compare these key sizes, we use <a href="https:&#x2F;&#x2F;www.keylength.com&#x2F;en&#x2F;2&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.keylength.com&#x2F;en&#x2F;2&#x2F;</a><p>1280-bit RSA key has 79 bits of symmetric security. 829-bit RSA key has ~68 bits of symmetric security. So compared to what has publicly been broken, iMessage RSA key is only 11 bits, or, 2048 times stronger.<p>The same site estimates that in an optimistic scenario, intelligence agencies can only factor about 1507-bit RSA keys in 2024. The conservative (security-consious) estimate assumes they can break 1708-bit RSA keys at the moment.<p>(Sidenote: Even the optimistic scenario is very close to 1536-bit DH-keys OTR-plugin uses, you might want to switch to OMEMO&#x2F;Signal protocol ASAP).<p>Under e.g. keylength.com, no recommendation suggest using anything less than 2048 bits for RSA or classical Diffie-Hellman. iMessage is badly, badly outdated in this respect.<p>3. iMessage uses digital signatures instead of MACs. This means that each sender of message generates irrefutable proof that they, and only could have authored the message. The standard practice since 2004 when OTR was released, has been to use Message Authentication Codes (MACs) that provide deniability by using a symmetric secret, shared over Diffie-Hellman.<p>This means that Alice who talks to Bob can be sure received messages came from Bob, because she knows it wasn&#x27;t her. But it also means she can&#x27;t show the message from Bob to a third party and prove Bob wrote it, because she also has the symmetric key that in addition to verifying the message, could have been used to sign it. So Bob can deny he wrote the message.<p>Now, this most likely does not mean anything in court, but that is no reason not to use best practices, always.<p>4. The digital signature algorithm is ECDSA, based on NIST P-256 curve, which according to <a href="https:&#x2F;&#x2F;safecurves.cr.yp.to&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;safecurves.cr.yp.to&#x2F;</a> is not cryptographically safe. Most notably, it is not fully rigid, but manipulable: &quot;the coefficients of the curve have been generated by hashing the unexplained seed c49d3608 86e70493 6a6678e1 139d26b7 819f7e90&quot;.<p>5. iMessage is proprietary: You can&#x27;t be sure it doesn&#x27;t contain a backdoor that allows retrieval of messages or private keys with some secret control packet from Apple server<p>6. iMessage allows undetectable man-in-the-middle attack. Even if we assume there is no backdoor that allows private key &#x2F; plaintext retrieval from endpoint, it&#x27;s impossible to ensure the communication is secure. Yes, the private key never leaves the device, but if you encrypt the message with a wrong public key (that you by definition need to receive over the Internet), you might be encrypting messages to wrong party.<p>You can NOT verify this by e.g. sitting on a park bench with your buddy, and seeing that they receive the message seemingly immediately. It&#x27;s not like the attack requires that some NSA agent hears their eavesdropping phone 1 beep, and once they have read the message, they type it to eavesdropping phone 2 that then forwards the message to the recipient. The attack can be trivially automated, and is instantaneous.<p>So with iMessage the problem is, Apple chooses the public key for you. It sends it to your device and says: &quot;Hey Alice, this is Bob&#x27;s public key. If you send a message encrypted with this public key, only Bob can read it. Pinky promise!&quot;<p>Proper messaging applications use what are called public key fingerprints that allow you to verify off-band, that the messages your phone outputs, are end-to-end encrypted with the correct public key, i.e. the one that matches the private key of your buddy&#x27;s device.<p>7. iMessage allows undetectable key insertion attacks.<p>EDIT: This has actually has some improvements made a month ago! Please see the discussion in replies.<p>When your buddy buys a new iDevice like laptop, they can use iMessage on that device. You won&#x27;t get a notification about this, but what happens on the background is, that new device of your buddy generates an RSA key pair, and sends the public part to Apple&#x27;s key management server. Apple will then forward the public key to your device, and when you send a message to that buddy, your device will first encrypt the message with the AES key, and it will then encrypt the AES key with public RSA key of each device of your buddy. The encrypted message and the encrypted AES-keys are then passed to Apple&#x27;s message server where they sit until the buddy fetches new messages for some device.<p>Like I said, you will never get a notification like &quot;Hey Alice, looks like Bob has a brand new cool laptop, I&#x27;m adding the iMessage public keys for it so they can read iMessages you send them from that device too&quot;.<p>This means that the government who issues a FISA court national security request (stronger form of NSL), or any attacker who hacks iMessage key management server, or any attacker that breaks the TLS-connection between you and the key management server, can send your device a packet that contains RSA-public key of the attacker, and claim that it belongs to some iDevice Bob has.<p>You could possibly detect this by asking Bob how many iDevices they have, and by stripping down TLS from iMessage and seeing how many encrypted AES-keys are being output. But it&#x27;s also possible Apple can remove keys from your device too to keep iMessage snappy: they can very possibly replace keys in your device. Even if they can&#x27;t do that, they can wait until your buddy buys a new iDevice, and only then perform the man-in-the-middle attack against that key.<p>To sum it up, like Matthew Green said[1]: &quot;Fundamentally the mantra of iMessage is “keep it simple, stupid”. It’s not really designed to be an encryption system as much as it is a text message system that happens to include encryption.&quot;<p>Apple has great security design in many parts of its ecosystem. However, iMessage is EXTREMELY bad design, and should not be used under any circumstances that require verifiable privacy.<p>In comparison, Signal<p>* Uses Diffie Hellman + Kyber, not RSA<p>* Uses Curve25519 that is a safe curve with 128-bits of symmetric security, not 79 bits like iMessage.<p>* Uses Kyber key exchange for post quantum security<p>* Uses MACs instead of digital signatures<p>* Is not just free and open source software, but has reproducible builds so you can be sure your binary matches the source code<p>* Features public key fingerprints (called safety numbers) that allows verification that there is no MITM attack taking place<p>* Does not allow key insertion attacks under any circumstances: You always get a notification that the encryption key changed. If you&#x27;ve verified the safety numbers and marked the safety numbers &quot;verified&quot;, you won&#x27;t even be able to accidentally use the inserted key without manually approving the new keys.<p>So do yourself a favor and switch to Signal ASAP.<p>[1] <a href="https:&#x2F;&#x2F;blog.cryptographyengineering.com&#x2F;2015&#x2F;09&#x2F;09&#x2F;lets-tal" rel="nofollow noreferrer">https:&#x2F;&#x2F;blog.cryptographyengineering.com&#x2F;2015&#x2F;09&#x2F;09&#x2F;lets-tal</a>...
评论 #38538167 未加载
评论 #38537994 未加载
评论 #38540676 未加载
评论 #38549024 未加载
评论 #38541414 未加载
whynot-123over 1 year ago
I would like to point out how awesome it is that someone in high school is making this caliber of a post. I&#x27;ve thought at least a dozen times over the last 20 years how i would like to understand macOS internals, and this person is deconstructing it. well done!
评论 #38535840 未加载
评论 #38536245 未加载
dinobonesover 1 year ago
Reverse engineering iMessage has been touted as some holy grail meme for what... 10+ years now?<p>So proud that a high school student was the one to finally figure it out.<p>In a world of 100s of thousands of software engineers, &quot;Cybersecurtiy professionals&quot;, and so on.<p>A kid with almost no credentials out-innovates everyone because they have talent and focus. Literally <i>Hacker</i>News! My favorite kind of news.
评论 #38537158 未加载
catlover76over 1 year ago
I just got an iPhone for the first time, and it is a noticeably better device than my previous Android phones.<p>One downside is that I can&#x27;t use iMessage on my Windows and Linux computers. Will look into pypush<p>Honestly, the iPhone is nudging me further to giving a Macbook&#x2F;OSX a try one day, but the major blocker to me is the poor state of gaming on Macs.
评论 #38534987 未加载
评论 #38534813 未加载
评论 #38535355 未加载
评论 #38534904 未加载
评论 #38540594 未加载
评论 #38535644 未加载
评论 #38536082 未加载
评论 #38539004 未加载
评论 #38537983 未加载
评论 #38535256 未加载
cynicalsecurityover 1 year ago
&gt; In order to generate the “validation data”, pieces of information about the device such as its serial number, model, and disk UUID are used.<p>Sadly, this is a clear sign the project is going to stop working eventually. At some point, the Apple is simply going to pull the plug.<p>I remember doing similar tricks when I was a kid. Nowadays I simply won&#x27;t even care trying. The problem clearly isn&#x27;t supposed to be solved this way. I&#x27;m not even sure if it&#x27;s a good exercise in programming either. Software development is about doing the things the right way, not exercising in futility.<p>A better experience would be writing your own message delivery solution, superior to iMessage.
评论 #38537210 未加载
评论 #38537451 未加载
评论 #38538127 未加载
评论 #38536843 未加载
评论 #38538069 未加载
评论 #38537552 未加载
评论 #38538218 未加载
评论 #38575789 未加载
评论 #38537883 未加载
评论 #38538646 未加载
edweisover 1 year ago
More and more often, I see titles that are not capitalized.<p>Is it a new trend ?
评论 #38540671 未加载
autoexecover 1 year ago
I was hoping this would explain why iMessage allows invisible messages and attachments. I really can&#x27;t think of any reason why Apple would want to implement something like that, but they&#x27;ve been predictably used to infect devices.
评论 #38540949 未加载
评论 #38538520 未加载
ChrisMarshallNYover 1 year ago
I just got done adding APNs to one of my dashboard apps.<p>It&#x27;s a wicked pain in the butt, but I finally got it. The trickiest part was the backend server, which I implemented in ... <i>gasp</i> PHP. I didn&#x27;t want to load in a whole SaaS, in order to do a very simple push notification, so I had to learn to do it from scratch.<p>In the process, I learned that there&#x27;s a lot of wrong information out there, and I had do quite a bit of trial and error.<p>But it works, and the code is actually wicked simple.
评论 #38540635 未加载