Better HN
topnewbestaskshowjobs
Log inSign up

martinralbrecht

308 karma · joined Apr 27, 2014 (12y ago) · 44 submissions

I am a professor in the Information Security Group at Royal Holloway, University of London. I work on cryptography and computational mathematics.
Submissions

comment 10mo ago · link · parent

Note that WhatsApp as a web client, too: https://eprint.iacr.org/2025/794

comment 10mo ago · link · parent

We did reverse engineer it and we're cryptographers not reverse engineering experts https://eprint.iacr.org/2025/794

comment 10mo ago · link · parent

WhatsApp's end-to-end encryption has been independently investigated: https://kclpure.kcl.ac.uk/ws/files/324396471/whatsapp.pdf

Full version here: https://eprint.iacr.org/2025/794.pdf

We didn't review the entire source code, only the cryptographic core. That said, the main issue we found was that the WhatsApp servers ultimately decide who is and isn't in a particular chat. Dan Goodin wrote about it here: https://arstechnica.com/security/2025/05/whatsapp-provides-n...

comment 2y ago · link · parent

Telegram's symmetric cryptography has been reviewed by cryptographers: https://mtpsym.github.io/

comment 2y ago · link · parent

We explain this under the heading "A Somewhat Opinionated Discussion" here: https://mtpsym.github.io/ which is our security analysis of MTProto's symmetric cryptography.

comment 3y ago · link · parent

NIST responded: https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/W2VO...

comment 3y ago · link · parent

NIST responded: https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/W2VO...

comment 3y ago · link · parent

"As independent information security and cryptography researchers, we build technologies that keep people safe online. It is in this capacity that we see the need to stress that the safety provided by these essential technologies is now under threat in the Online Safety Bill."

9.

Open Letter from Security Researchers in Relation to the Online Safety Bill [pdf](haddadi.github.io ↗)

278 points · by martinralbrecht · 3y ago · 153 comments

comment 3y ago · link · parent

- Issue 1: using uninitialised keys. - Issue 2: IV reuse in AES-GCM when a file is re-encrypted after an update. - Issue 3: a malicious server can place a chosen key in a victim user's encrypted keystore; the user then rotates everything to that key on next login/update.

11.

“Breaking Cryptography in the Wild: Nextcloud”(twitter.com ↗)

4 points · by martinralbrecht · 3y ago · 1 comment

comment 3y ago · link · parent

Cool, thanks! That's interesting to know. Do you know how they deal with FOI and auditable communications in this case?

PS: I talked about the seemingly unexploitable IND-CCA vulnerability because it means Matrix can't give you some security guarantees: It should be fine - we don't have an exploit, only a vulnerability - but it is not clear how to reason to arrive at "there cannot be an exploit". If you care about security guarantees, you care about it.

comment 3y ago · link · parent

Since Matrix (and thus BundesMessenger?) currently doesn't provide standard security guarantees for its end-to-end encryption (the mitigation to the "Simple confidentiality break" from https://nebuchadnezzar-megolm.github.io/ is still in the design phase; same for the IND-CCA break, but that doesn't seem exploitable in practice) I wonder how much the German government cares about E2EE for its civil servants? The blog post mentions E2EE prominently, but any insights to share on whether that mattered for this particular adoption?

comment 3y ago · link · parent

re: implementation bugs: Almost, but not quite. See https://nebuchadnezzar-megolm.github.io/#anticipated-questio...

Also note that in the review of the ecosystem the Matrix developers, i.e you :), also discovered further clients vulnerable to variants of attack #3 and assigned CVE-2022-39252, CVE-2022-39254 and CVE-2022-39264.

While I'm here, yep those seem fixed also as far as we can tell: https://nebuchadnezzar-megolm.github.io/#remediesfixes

comment 3y ago · link · parent

We explain how this works in Appendix A of https://nebuchadnezzar-megolm.github.io/static/paper.pdf but it's also a nice little exercise to work out how this breaks confidentiality. TL;DR: Yes, the plaintext coming out is not what you'd expect ("breaks decryption") but in a predictable way.

comment 3y ago · link · parent

A quick comment on this, we did address this in our paper:

"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. Finally we note that users may, of course, simply ignore warnings." https://nebuchadnezzar-megolm.github.io/static/paper.pdf

comment 3y ago · link · parent

This isn't correct. Several of our attacks succeeded without any warnings popping up.

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.

comment 3y ago · link · parent

We had working exploits for those vulnerabilities where exploiting them wasn't immediately obvious. We shared those with the Matrix developers but didn't publish them because there was no dispute on whether our attacks were practical. So we meant it when we wrote "practically-exploitable".

In an end-to-end encrypted setting a malicious server is precisely the adversary you defend against, not an edge case.

comment 4y ago · link · parent

Indeed:

> 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. However, such a detection requires careful manual membership list inspection from users and to participants, this event appears as a legitimate group membership event. In particular, in sufficiently big rooms such an event is likely to go unnoticed by users.

https://nebuchadnezzar-megolm.github.io/

comment 4y ago · link · parent

Unfortunately, it is not quite so simple:

> Does this mean that Matrix does not provide confidentiality and/or authentication?

> Matrix and its implementations can, after today’s fixes, provide confidentiality and authentication assurances against malicious homeservers, if users act as follows. Each user must enable cross-signing and perform out-of-band verification with each of their own devices, and with each user they interact with.2 They must then remain vigilant: any warning messages or icons must be spotted and investigated. In the Element user interface, this requires checking the room icon and each individual message they receive (in some cases, past messages can retroactively receive a warning). Note that such warnings could be expected behaviour (for example if the message was decrypted using a server-side Megolm backup or through the “Key Request protocol”). Users would need the expertise to investigate these warnings thoroughly and, if an issue is found, recover from it. If you follow these instructions without fail, Matrix can provide you with confidentiality and authentication.

> This places an unnecessary burden on users of Matrix clients, limits the user base to those with an understanding of the cryptography used in Matrix and how it is used therein, and is impractical for daily use. The burden this places on users is unnecessary and the result of the design flaws we highlight in our work (this is our “Simple confidentiality break” attack). Whilst this issue will persist after today’s fixes, a remediation is planned by the Matrix developers for a later date.

> Some of our other attacks against Matrix’s flagship client Element are based on implementation flaws and, thus, were able to break its confidentiality and authentication guarantees even when the steps above were followed (prior to today’s patches). As of today, most of these issues should be fixed (see above), but we have not independently verified this. The Matrix developers report that other clients are not affected but, similarly, we have not independently verified this.

https://nebuchadnezzar-megolm.github.io/

comment 4y ago · link · parent

Several of these bugs were indeed on the protocol level: https://nebuchadnezzar-megolm.github.io/

comment 4y ago · link · parent

This is discussed by the research team who reported these issues (I'm one of those researchers) at: https://nebuchadnezzar-megolm.github.io/

> Are these attacks design flaws in the Matrix specification?

> We will explain this one by one by using the name of the attacks previously defined:

> a. Simple confidentiality break: The root cause of this attack is the fact that room management messages are not authenticated, which is a design flaw in the protocol itself, as no mechanism was specified for authentication of such messages.

> b. Attack against out-of-band verification: This attack exploits an insecure implementation choice enabled by a design flaw in the specification as there is no domain separation enforced there.

> c. Semi-trusted impersonation: This is mostly implementation bug supported by a lack of guidance on the processing of incoming key shares in spec.

> d. Trusted impersonation: This is an implementation error as no check is performed to check whether Olm is used for encryption or not.

> e. Impersonation to confidentiality break: This is an implementation error as no check is performed to check whether Olm is used for encryption or not.

> f. IND-CCA break: This theoretical attack exploits a protocol design flaw.

On the viability of the discussed countermeasure:

> 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. However, such a detection requires careful manual membership list inspection from users and to participants, this event appears as a legitimate group membership event. In particular, in sufficiently big rooms such an event is likely to go unnoticed by users.

comment 4y ago · link · parent

Writeup of these vulnerabilities and attacks by the research team who reported them: https://nebuchadnezzar-megolm.github.io/

comment 4y ago · link · parent

- Matrix announcement: https://matrix.org/blog/2022/09/28/upgrade-now-to-address-en... - Write-up by research team: https://nebuchadnezzar-megolm.github.io/

comment 4y ago · link · parent

Write-up of the vulnerabilities and attacks by research team who reported them: https://nebuchadnezzar-megolm.github.io/

26.

Practically-Exploitable Cryptographic Vulnerabilities in Matrix(nebuchadnezzar-megolm.github.io ↗)

18 points · by martinralbrecht · 4y ago · 1 comment

comment 5y ago · link · parent

> As an aside, Jakobsen and Orlandi wrote: “We stress that this is a theoretical attack on the definition of security and we do not see any way of turning the attack into a full plaintext-recovery attack.” Similarly, the Telegram “FAQ for the Technically Inclined (MTProto v.1.0)” provides the following analogy: “A postal worker could write ‘Haha’ (using invisible ink!) on the outside of a sealed package that he delivers to you. It didn’t stop the package from being delivered, it doesn’t allow them to change the contents of the package, and it doesn’t allow them to see what was inside.” In hindsight, we think that this is incorrect. As explained above, our timing side channels essentially exploit this behaviour in order to do message recovery (but we need to “chain” two “exploits” to make it work, even ignoring practicality concerns).

https://mtpsym.github.io/

comment 5y ago · link · parent

RC4: https://en.wikipedia.org/wiki/Wired_Equivalent_Privacy#Weak_...

comment 5y ago · link · parent

https://shattered.io/

comment 5y ago · link · parent

1. Re: "needs additional work to become a fully fledged exploit": We have verified this attack in practice, see the paper.

2. We give an example application where it has some "bearing on the security of messages" at the end of https://mtpsym.github.io/ under the heading "Did we really break IND-CPA?" and in the paper.

3. Perhaps a better analogy is: the remaining door requires the date of birth but luckily they kept that secret. But analogies aside: "Luckily, it is almost impossible to carry out in practice. In particular, it is mostly mitigated by the coincidence that certain metadata in Telegram [a salt and an id] is chosen randomly and kept secret." https://mtpsym.github.io/

4. By cryptographic standards the strongest attack as it would imply full compromise if successful. It costs in the order of 2^32 noise-free queries within minutes where it is not clear how many noisy queries are needed to get "one noise-free query" since we didn't want to test it against Telegram's servers. This falls significantly short of "well established crypto protocols [...] where it's just infeasible to brute force" NB: these provide guarantees also against state resources. This does not mean it is a practical concern.

The key contribution of our paper, however, is that we prove that MTProto's symmetric cryptography (with some fixes and when implemented carefully) can give you something comparable to TLS (well, it's Record protocol) which is it's closest "competitor".

This proof comes with some caveats, though: MTProto is tricky to implement correctly (as highlighted by our attacks on the official clients). Secondly, MTProto relies on unstudied assumptions that you do not need to make if you use just TLS. See "A Somewhat Opinionated Discussion" at https://mtpsym.github.io/

12