End-to-end encrypted messages need more than libsignal
mjg59.dreamwidth.org
mjg59.dreamwidth.org
> Messaging applications are increasingly making use of end-to-end security mechanisms to ensure that messages are only accessible to the communicating endpoints, and not to any servers involved in delivering messages. Establishing keys to provide such protections is challenging for group chat settings, in which more than two clients need to agree on a key but may not be online at the same time. In this document, we specify a key establishment protocol that provides efficient asynchronous group key establishment with forward secrecy and post-compromise security for groups in size ranging from two to thousands.
There is now a follow-up IETF project to use MLS for inter-messenger interoperability, with Matrix as an early participant, https://news.ycombinator.com/item?id=33420112
Review of 2020 draft protocol, https://liu.diva-portal.org/smash/get/diva2:1388449/FULLTEXT...
> Work is now ongoing to introduce the Messaging Layer Security (MLS) protocol as an efficient standard with high security guarantees for messaging in big groups. This thesis examines whether current MLS implementations live up to the promised performance properties and compares them to the popular Signal protocol. In general the performance results of MLS are promising and in line with expectations, providing improved performance compared to the Signal protocol as group sizes increase.
https://mailarchive.ietf.org/arch/msg/mls/ZJ4e78obXSdYWnxmsN...
If China (e.g. WeChat) is a predictor of future messaging systems, there may be convergence between messaging and payments. Musk has publicly suggested that Twitter follow in WeChat's footsteps as an "Everything App". If payments and messaging converge, and governments adopt CBDCs for digital legal tender, then we may be looking down the barrel of state-issued digital IDs for online and offline activity.
Linux Foundation is promoting blockchain for both software signing and globally interoperable travel/health credentials. Big tech companies each have their own island of semi-verified identities, depending on their proximity to financial services. It's not clear which groups are willing or able to effectively lobby for pseudonymous digital identity.
The word you’re looking for is “repudiability.”
Although one might say that lacking repudiability could be enough for a messaging system to lack reputability ;)
It's worth highlighting (as a comment in the linked discussion does) that the EU's newly-passed Digital Markets Act requires interoperability between the messaging apps of large "gatekeeper" platforms.
If Twitter does end up supporting E2EE messaging, it may soon be forced to implement MLS, and if Facebook and Google are really supportive of MLS then soon(TM) most people online will be able to communicate via that technology.
You have to put trust in the app (and the company that owns that app), though.
In twitter, I type a message in plain text. The twitter app encrypts it and sends it to the recipient. I am trusting Twitter to not encrypt it twice, once with my key and once with there's and capturing their copy in flight.
With current trends at Twitter, I wouldn't trust them an inch.
[1] https://github.com/signalapp/libsignal/blob/main/LICENSE
So they are able to offer Twitter a non-APGL license. Usually for a sizeable fee.
You can fork such dual licensed project, add your own contributions and then Signal cannot use your code in anything they license to third-parties under non-AGPL. The fork becomes AGPL-only.
Example of where this has happened: MySQL was forked to MariaDB, so developments to MariaDB cannot be used by Oracle in their proprietary licensing of MySQL.
You're giving the company (in this case Signal) an open-ended license for your contributions whilst they don't return the favour. And so whilst they can offer a proprietary version e.g. Signal Pro with a friendlier license e.g. BSD you can't.
And what kind of underpins all of this is that many companies especially in the enterprise will not touch anything that is GPL or AGPL.
But for me AGPL is not in the spirit of FOSS. It's like you're an unpaid employee of some company who is happy to take your work as long as you don't compete with them.
I understand why AGPL was invented i.e. to prevent AWS ripping your project off but I don't think it's a particularly fair license for individual contributors.
[1] https://www.fsf.org/blogs/licensing/FSF-copyright-handling [2] https://lwn.net/Articles/857791/
Affero predates AWS by a lot. It was invented because FSF wants users to be able to see software they are using, but they cannot if it’s a remote server.
It has been used recently as magic anti-AWS wand, but it wasn’t built for that
edit: I am wrong in my dating! Affero is 2007, AWS was launched 2006. But yeah it was never meant as anti-AWS magic wand.
Aws , TiVo , whatever . Lots of orgs exploited the contractual logic gap in gpl v2. Aws is the latest in a long list of freeloaders .
I license all my / my startups code under AGPL v3. I don’t offer anyone proprietary license and I don’t ask anyone for CLA.
Defense against freeloaders and also tyrant. My operating agreement for my LLC has language about this stuff. It’s that core to our DNA.
With the CLA it's the same. But at least Signal give back by still providing libsignal as free software.
It depends on your motivations for contributing. If you don't like the CLA or any other things, you can still fork. Even if it may not be compatible with your own motivations, it is still in the spirit of free software.
> "agreement to license Signal protocol was reached"
https://mobile.twitter.com/bhcarpenter/status/15966919162503...
e2e means server never does any encryption or decryption so i don't think they'll have any signal code running on their server.
They will however be required to open source their application code.
Edit : and i think open sourcing twitter app would be a stunning move, that elon is totally capable of.
No, not at all. If a server is AGPL-licensed, clients may have whatever license they want. If a client is AGPL-licensed, servers may have whatever license they want. What the AGPL does is provide that if code under the AGPL is used to provide network services, then clients of those servers are entitled to the server source code. You may read the terms here: https://www.gnu.org/licenses/agpl-3.0.en.html
There is no copyright mechanism by which the AGPL could apply to clients of an AGPL server.
What i’m saying about server code is the logic of agpl. GPL is about providing the means for users to obtain source code of the binary they’re running. There was a gap with api, where a given library feature could be exposed through network services and since no binary were downloaded then the code wouldn’t required to be open sourced. AGPL fixes that.
But we both agree that client code and server code are independent relative to their licensing terms.
The cryptography itself didn't come out unscathed, but the basic nuts and bolts semantics of the system itself had devastating vulnerabilities.
The response (or lack thereof) to this research is pretty fascinating!
What about: https://matrix.org/blog/2022/09/28/upgrade-now-to-address-en...
> "Homeserver Control of Room Membership" – A malicious homeserver can fake invites on behalf of its users to invite malicious users into their conversations, or add malicious devices into its users accounts. However, when this happens, we clearly warn the user: if you have verified the users you are talking to, the room and user will be shown with a big red cross to mark if malicious devices have been added. Similarly, if an unexpected user is invited to a conversation, all users can clearly see and take evasive action. Therefore we consider this a low severity issue. That said, this behaviour can be improved, and we've started work on switching our trust model to trust-on-first-use (so that new untrusted devices are proactively excluded from conversations, even if you haven't explicitly verified their owner) - and we're also looking to add cryptographic signatures to membership events in E2EE rooms to stop impersonated invites. These fixes will land over the coming months.
Anyways, my point is just: this is a good illustration of the phenomenon described by the root comment.
First, they have not said they will add alerts, they say that such alerts are already there. Second, they did admit that the current situation can be improved, and have said they will add cryptographic signatures to membership events in the future. To my reading that would be precisely what the researchers were missing, aka if new folks show up, even with support of the homeserver, they still need to present a signed invite from one of the group members to be given the keys.
If Signal server is evil and starts to MITM a communication between two parties, replacing each of the parties keys with their own keys and decrypting in the middle, both of the participants will also just get warning “the other party changed their key”, right?
That was the gist of the issue of yesteryear with Guardian and WhatsApp, right?
How is this in practice different? User see a warning and ignores it (as people change their phones thus their keys all the time).
I’m not trying to be snarky but actually asking a question
> In environments where cross-signing and verification are enabled, adding a new unverified user adds a warning to the room to indicate that unverified devices are present. However, it is possible for a homeserver to add a verified user to rooms without changing the security properties of the room. This allows a colluding homeserver and verified user to eavesdrop on rooms not intended for them. In other words, the warning regarding unverified devices is independent to whether the device is intended to participate in the specific room. Users may, of course, simply ignore warnings.
If I'm not mistaken this is not just a "warning" - Matrix clients will actively refuse to encrypt messages to the new recipient until they are verified in this situation.
The last time I seriously looked at Matrix (2019-2020ish), cross-signing and verification were essentially required for real security in chats. It sounds to me like (a) the worst case scenario vis-à-vis the "rogue server" is that things regress back to where they were in 2019, and (b) there's an issue where if everyone in a room has a rogue user validated, a rogue server can add the rogue user to a room that the user is not supposed to be invited to, without triggering a warning. This latter issue strikes me as something that should definitely be fixed (if it hasn't already been), but far from fatal for smaller chats.
"They killed it. It's dead." strikes me as an enormous reach.
> They killed it. It's dead.
…is ridiculous hyperbole. This is a debate around the “system warns you when something bad happens” versus “system stops something bad happening in the first place”. It’s like saying SSL is “killed dead” because browsers let you connect to sites with bad certs albeit with a big red warning.
And much as this was addressed for SSL with HSTS etc, we’re working on the fix for Matrix. For what it’s worth, the current approach is https://github.com/matrix-org/matrix-spec-proposals/blob/fay...
Screaming about Matrix being “killed dead” helps no-one, and risks completely sabotaging our efforts to improve open communication, just in order to score a rhetorical point.
Nobody has ever disputed that it's possible for the Matrix team to build a secure messaging protocol. I'm sure you can. But: have you yet?
By way of example: TLS 1.0 is dead as a doornail, too. If you like, we can use a different word to capture the equivalence class here. TLS 1.0 and the current Matrix protocol: "ex-parrots".
This whole situation is wild. What we're discussing on this thread is the single most impactful set of cryptographic vulnerability findings against any secure messaging system ever. And this thread is, I think, one of a very few places on the whole Internet where there's even a conversation about it. Everybody else is just rolling along as if nothing happened.
If I sound mean about this, I don't mean to be. But, fair warning, I'm in full-on "wake up, sheeple" mode over this.
People have been dismissing security research with this "not very practical" epithet for as long as I've been working. Literally, at least since I got into the field.
https://web.archive.org/web/20000818162612/http://www.entera...
But let's say I'm playing red team, and I get root on the box where my target is running their Matrix server. Practically, what can I do to extract information without setting off giant red flags? From my read of the paper the answer is "not much", since a bunch of big warnings popping up would probably alert the users that something sketchy is happening.
You can decrypt all the messages. I sometimes feel like I must have read a different paper than everybody else.
> While the Matrix specification does not require a mitigation of this behaviour, when a user is added to a room, Element will display this as an event in the timeline. Thus, to users of Element this is detectable.
Virtually everyone uses Element, so it's blatantly tamper-evident. That makes it a really bad option if red-teaming.
(Here it's worth noting that this is the behavior post-fix for this paper. Read the paper! It was so much worse.)
With III-B, they can add an unverified device, but that causes a warning for every other room participant. Again, tamper evident.
Furthermore, you need to distinguish between what Element happened to do (which users may or may not watch out for) and what the standard demanded.
Note that at this point, as far as I understand it, there is no dispute between us - the authors of this research - and the Matrix developers about that leaving group membership under the control of the server was a bad and avoidable design decision. The Matrix developers are working on a spec change/fix which resolves this, linked elsewhere in this thread.
It really would have been better to separate the legit vulns from the group membership question, as mixing them up just confuses people, as per this whole thread.
So what’s the scenario here? You have an encrypted group chat with so many members that some rando nefarious user can slip in? And then the big deal is that the E2E breaks down, so the home server that they probably own can read the messages that they are already reading?
Awfully weak stuff for a cypherpunk-ish protocol. The CCC crowd that rabidly hates anything centralised, thinks it’s insecure and corporate, are probably having a existential crisis. Matrix is doing a terrible job fixing the issues, worse they seem to downplaying and denying too. And the Tech press seem to dismiss the issue believing Matrixs’ claims there isn’t an issue.
We are not denying these issues - we just dare to disagree that they are as catastrophic as some suggest.
In an end-to-end encrypted setting a malicious server is precisely the adversary you defend against, not an edge case.
To me, it looks pretty good on the surface, but I don’t know if I can convince myself that it’s secure. I’m not even sure if I could write down a precise definition of security here, without banging my head on it for a while.
For offline file encryption ( pgp isn’t intended for messaging).
I guess you mean "leak" as in "being copied", which relies on how good the hardware actually is at preventing this, but what if I just lose my hardware key, isn't that the same?
The Signal Protocol somewhat excessively provides forward secrecy for each and every message sent. That is sort of pointless while the messages still exist on the screen. Most people would be happy getting rid of their old messages every week or so. You could totally do that in an instant messaging system that used OpenPGP formatted messages. The reason that no one bothers is because few people want to dump their old encrypted emails. No one wants to dump their old encrypted files. Instead they take advantage of the greater security inherent in an offline encryption system and avoid getting their keys leaked in the first place.
If you really wanted to do message by message forward secrecy using a hash ratchet using OpenPGP formatted messages you could do that too. There is nothing magical about the Signal Protocol for stuff like that...
Relevant discussion:
Or if the message's recipient took a screenshot.
In other words, the point being that a man-in-the-middle attacker cannot decrypt past conversations that he recorded even if in the future he is able to determine the key?
It's kind of obvious that you cannot prevent the other party from saving the messages, but from what I understand I don't think that's what forward secrecy is even trying to do (disclaimer: I'm not a cryptographer).
Yes. Exactly. Only the transport part is protected. Contrast, say, TLS with messaging. TLS is basically an encrypted pipe. Plaintext goes in and plaintext comes out. If someone saves some of that plaintext and it gets leaked, well, that isn't your job to prevent that but you can at least provide forward secrecy. After all, people don't normally save their sensitive web pages for extended periods of time...
With messaging, saving old messages is more or less the default. When that happens the value of forward secrecy is negated. If you want your old messages to be gone, you (and your correspondent) actually have to get rid of them.
>...man-in-the-middle attacker...
Terminology quibble. I think this would be normally described as recording the encrypted messages off the wire. MITM implies than an attacker is impersonating one or more correspondents.
Well, isn't that valuable?
> With messaging, saving old messages is more or less the default. When that happens the value of forward secrecy is negated.
It's not negated because a passive attacker that records communications and then, in the (potentially far) future, somehow can obtain the key (say, by exploiting some weakness and/or brute-forcing), still cannot decrypt your past communications, regardless of whether everybody saves old messages or not.
By passive attacker, I mean someone like the NSA, your ISP, your messaging provider, the server/P2P host that relays your messages, etc.
> If you want your old messages to be gone, you (and your correspondent) actually have to get rid of them.
But that's not what forward secrecy is designed to do, is it? It's designed to prevent third parties who can record the encrypted end-to-end communication from decrypting past messages when/if they can obtain your key.
It's not designed for making old messages be gone.
> Terminology quibble. I think this would be normally described as recording the encrypted messages off the wire. MITM implies than an attacker is impersonating one or more correspondents.
Yes, sorry, I meant a "passive man-in-the-middle attacker".
If someone breaks the encryption somehow then forward secrecy is also negated. They get the encrypted material directly. Forward secrecy is only effective in messaging if the attacker does something like break into your device to get the secret key material. At that point they will also get any saved messages that are still accessible to you, in whatever way they are accessible.
Now in theory a messaging client could reencrypt old messages to something like a public key pair where the secret key material was protected by a strong passphrase. But no one does that because that would mean you would have to type in the passphrase whenever you wanted to see an old message. At that point you might as well just use encrypted email and leave everything encrypted all the time.
> When you want to send a message to someone, you ask the server for one of their one-time prekeys and use that. Decrypting this message requires using the private half of the one-time prekey, and the recipient deletes it afterwards. This means that an attacker who intercepts a bunch of encrypted messages over the network and then later somehow obtains the long-term keys still won't be able to decrypt the messages, since they depended on keys that no longer exist.
> Since these one-time prekeys are only supposed to be used once (it's in the name!) there's a risk that they can all be consumed before they're replenished. The spec regarding pre-keys says that servers should consider rate-limiting this, but the protocol also supports falling back to just not using one-time prekeys if they're exhausted (you lose the forward secrecy benefits, but it's still end-to-end encrypted).
> This implementation not only implemented no rate-limiting, making it easy to exhaust the one-time prekeys, it then also failed to fall back to running without them. Another easy way to force DoS.
You just described a security/convenience tradeoff in the use of prekeys. OK. Then, the app's choice to go with security over convenience is a security problem, because you're not allowed to send messages without forward secrecy. For greater security, the app should have allowed messages at a lower level of security.
If you want to make the case that someone did the wrong thing, do it in a way where they wouldn't also have been wrong if they did the opposite of what you're complaining about.
Maybe cause I'm here more often than GH.
> Although roaming is not supported by the OpenSSH server, it is enabled by default in the OpenSSH client, and contains two vulnerabilities that can be exploited by a malicious SSH server (or a trusted but compromised server): an information leak (memory disclosure), and a buffer overflow (heap-based).
[1] https://www.qualys.com/2016/01/14/cve-2016-0777-cve-2016-077...
Want to make the argument that libsignal can be misused? First, go through all of your examples and make sure they actually show misuse.
> I think your response here is knee-jerk and superficial.
You're not exactly in a position to criticize that. https://news.ycombinator.com/item?id=33918022