Three lessons from Threema: Analysis of a secure messenger
11–20 of 55 posts
Re: Three lessons from Threema: Analysis of a secure messenger
#12Not directly related to the topic but how is it that Threema is the only popular secure messenger where you have a random ID to give to people to communicate with and not a phone number (Signal) or have your name show up across all your contacts / groups (Telegram)?
Re: Three lessons from Threema: Analysis of a secure messenger
#13Not directly related to the topic but how is it that Threema is the only popular secure messenger where you have a random ID to give to people to communicate with and not a phone number (Signal) or have your name show up across all your contacts / groups (Telegram)?
Tech paper for anyone interested: https://www.olvid.io/assets/documents/2020-12-15_Olvid-speci...
Re: Three lessons from Threema: Analysis of a secure messenger
#14* Threema's end-to-end inner protocol, the one used to exchange messages between actual humans, is based on a single X25519 key, used bidirectionally. It has no forward secrecy. Worse, to prevent otherwise-trivial replay attacks made possible by the simplistic structure of the protocol, both sides have to cache every nonce they've seen used to encrypt a message. This breaks down when users change devices, which, due to the structure of the protocol, is trivially detectable.
* The Threema E2E protocol includes enough metadata to ostensibly enforce message ordering, but they don't authenticate it, so attackers can (1) strip the metadata off and (2) hold back and/or reorder messages at their luxury.
* Threema has the hello-world of E2E protocols, but for reasons not made clear has chosen to build their own transport protocol for client-server transactions (ie, login), rather than using TLS or NoiseIK. The C2S handshake has the raw material to do an authenticated DH key exchange, ala 3DH (both sides have long-term and ephemeral secrets), but they freelanced it instead and come up with a proof-of-identity round trip that is trivially replayable, and which destroys the forward secrecy of the C2S protocol.
* One form of Threema backup uses encrypted ZIPs, which reveal the names of files, which files apparently (according to the paper) reveal the identity of counterparties you've been talking to. Also: the ZIP library the client uses didn't verify MACs, and while Threema fixed that, the maintainer of the ZIP library Threema chose hasn't responded, which is :grimace-emoji:.
* You can "lock" your Threema app, but it does so much background processing that attackers can extract your private key if they have access to the device (or, maybe, all its traffic?) --- to wit, Threema does automated backups, the backups are compressed-then-encrypted, Threema processes messages in the background even when locked, one of those messages runs an automatic contact discovery protocol, and attackers can inject contact-discovery messages to do a byte-by-byte CRIME-style recovery of the private key, which is embedded in the same JSON document(!) as contact information in the backup system.
There is a very funny bit in the middle of the paper where they reconstitute the C2S proof-of-identity replay attack, this time minting a new identity proof rather than replaying it. To pull this off, they bounce the C2S protocol off of the E2E protocol: because, and I cannot believe I am saying this, Threema uses PKCS7 padding (ie, "I'm 3 bytes short of my block size, so I'll pad with 03h 03h 03h"), you can trick a Threema client into sending a message which, once encrypted, will have the 01h-delimited format of the identity proof (because 1/254 validly padded messages will happen to end in 01h). I didn't read closely enough to figure out if there was any reason you would go to the trouble of executing this attack variant, and it is entirely possible that they are just showing off. But: that's why you read these kinds of papers! For the stunt cryptography!
A bit of advice: read these papers for the cryptographic design and pitfall ideas, not for verdicts on which messaging systems to use. Maybe there are very good reasons to use Threema besides its flimsy protocol design; the point is: we know how to design better protocols that don't have these problems, and so (1) here are some more examples for the textbooks on why you should domain-separate your keys (for instance, to make it impossible to bounce the C2S protocol off the E2E protocol in the first place), and (2) Threema could drastically improve their system simply by adopting a known-good protocol rather than freelancing their own.
Great stuff.
Re: Three lessons from Threema: Analysis of a secure messenger
#15[0] https://spectator.sme.sk/c/22216551/threema-saga-kocner-repo...
Re: Three lessons from Threema: Analysis of a secure messenger
#16Not directly related to the topic but how is it that Threema is the only popular secure messenger where you have a random ID to give to people to communicate with and not a phone number (Signal) or have your name show up across all your contacts / groups (Telegram)?
I love Signal and think it is a great problem. I think it is too slow (e.g. username rollouts...) -- especially with Moxie's famous fuck decentralization speech -- and needs to actually adapt to the moving ecosystem, but people complain about it in weird ways. For better or for worse, right now it is the best game in town simply because messaging apps require networks. We'll see if they last though, because they aren't adapting fast enough. I think this would be a shame. But it is also a shame that Signal is failing so hard.
[0] https://community.signalusers.org/t/signal-needs-to-shift-to...
Re: Three lessons from Threema: Analysis of a secure messenger
#17Not directly related to the topic but how is it that Threema is the only popular secure messenger where you have a random ID to give to people to communicate with and not a phone number (Signal) or have your name show up across all your contacts / groups (Telegram)?
Not sure, but it seems like from a usability perspective it's easier for apps to 'just connect' people in your contacts via the phone number. From a privacy perspective, though, it's much better what Threema does. That's also why I use Tutanota, one of the very few mail providers that you can use without a phone number.
Re: Three lessons from Threema: Analysis of a secure messenger
#18Threema messages of Marian Kočner, a contorversial Slovak businessman who allegedly ordered a murder of a local journalist, were somehow obtained with the help of Europol. [0] The part of his trial where a security expert explained how the police got the messages was purposely not made public. [0] https://spectator.sme.sk/c/22216551/threema-saga-kocner-repo...
Re: Three lessons from Threema: Analysis of a secure messenger
#19Not directly related to the topic but how is it that Threema is the only popular secure messenger where you have a random ID to give to people to communicate with and not a phone number (Signal) or have your name show up across all your contacts / groups (Telegram)?
Unfortunately, this is a big dynamic on HN, not just on cryptography threads, but especially on threads rooted in stories with intense technical details. It's time consuming to bring yourself up to speed with what the paper says, but it's easy to have something to say about, say, Signal phone numbers. Which means comments here will be heavily biased towards superficial and tangential stuff.
Re: Three lessons from Threema: Analysis of a secure messenger
#20I would be very interested to know what overlap any of these attack surfaces may have with Signal, or other prominent applications. What issues are fixable, which are more endemic to the classical architectures?