Mind the Gap: Where Provable Security and Real-World Messaging Don't Quite Meet
Secure messaging apps have enjoyed huge uptake, and with the headline figure of one billion active WhatsApp users there has been a corresponding burst of academic research on the topic. One might therefore wonder: how far is the academic community from providing concrete, applicable guarantees about the apps that are currently in widespread use? We argue that there are still significant gaps between the security properties that users might expect from a communication app, and the security properties that have been formally proven. These gaps arise from dubious technical assumptions, tradeoffs in the name of reliability, or simply features out of scope of the analyses. We survey these gaps, and discuss where the academic community can contribute. In particular, we encourage more transparency about analyses’ restrictions: the easier they are to understand, the easier they are to solve. In the past few years, secure messaging apps have enjoyed explosive growth in uptake, perhaps best exemplified by WhatsApp’s headline figure of a billion active users. There has been a corresponding burst of academic research into these secure messaging protocols [7, 10, 12, 18, 24], and in particular into Open Whisper Systems’ Signal Protocol, which is fast becoming an industry standard. Kobeissi, Bhargavan, and Blanchet [18] and Cohn-Gordon et al. [7] both give formal security proofs of Signal. One might imagine that, armed with the certainty provided by a mathematical proof of security, users could rest assured that their messages are only readable by the right people. In this extended abstract we discuss the myriad ways in which this may fail to hold despite these proofs. We aim (i) to clarify the limits of existing analyses, and (ii) to show how new research and collaboration can help bridge this gap. We focus here on three main areas. In §I we discuss issues with the security theorems themselves, in §II topics out of scope of most analyses but necessary to deploy a practical protocol, and in §III additional features added by implementers. I. LIMITATIONS AND ASSUMPTIONS IN SECURITY MODELS Every security model makes some assumptions on the cryptographic primitives that it uses. In the symbolic methodology, these assumptions are generally clear, simple and too strong; for example, that encryption is a black box revealing no information about the plaintext, or that it provides message integrity. It is also not uncommon to perform bounded verification, in which the relevant property is checked only for a small number of agents or sessions (often as few as two or three). Computational models use more fine-grained assumptions; sometimes these are fairly standard (e.g. given Diffie-Hellman values g and g, it is hard to compute g, an assumption known as CDH), but modern key exchange protocols with complex key derivations often require assumptions such as Gap-DH, PRF-ODH [5], XDH or similar. These assumptions are much less well-understood and rely on internal properties of the underlying group, which may well not be true when instantiated. However, if the chosen assumptions does not hold in the chosen group, then the security proof does not prove anything. Computational models also often assume that hash functions are random oracles, despite the well-known problems with this assumption [6]. Computational reductions also merit highlighting, since they are “loose” for almost all protocol proofs [2]. This implies that the concrete security parameters needed to invoke a security theorem with reasonable guarantees on its protocol are generally much, much larger than those actually used when the protocol is deployed. Seen one way, this is a technicality; seen another, it means that most proofs do not apply to actual instantiations of their protocols. Almost all protocol security models assume that every agent knows its peers’ public keys; this distribution must actually be performed when protocols are deployed. TLS uses the well-loved X.509 PKI, with all its attendant quirks, but messaging protocol implementations generally just nominate the service provider as a trusted third party for key distribution. (The Signal app includes an out-ofband “fingerprint” or “safety number” channel—but many users will not understand or perform this verification.) Of course, a malicious or coerced service provider could intercept Alice’s messages by giving her malicious keys. There are some new and exciting designs attempting to remove some trust in the service provider, based on Google’s original Certificate Transparency [13]. Perhaps the closest to being in widespread use is Key Transparency [14], which is in turn based on CONIKS [21] but with some changes made by Google; other examples include [3, 17, 25, 26, 27]. However, one downside of the Merkle-tree family of solutions is that they are generally very complex, with a number of different subsystems: log servers, monitors, auditors, and gossip between clients. Recent work on detection by Milner et al. [22] considers techniques for users to detect disagreement, for example, on the keys they have been provided. Their work could provide a simpler way for users to notice malicious key distributions, assuming a weaker-than-Dolev-Yao adversary. II. ANALYSIS SCOPE IS ALWAYS LIMITED We turn now to practical considerations which apply to all deployed secure messaging apps but are generally excluded from the scope of formal analyses. Although there are a number of ways to measure and quantify resistance to side channel attacks, most widely-used protocol models do not consider them, restricting the adversary to “legitimate” communication channels with participants. However, many of the most significant reported vulnerabilities of the past few years fall into this category; padding oracles are a particularly fruitful class. Some models allow the adversary to learn or affect the output of agents’ random number generators, which overapproximates certain types of side channel attacks. However, many protocols assume that the random numbers generated during executions are perfect, and indeed fail if they are not. Signal and (all versions of) TLS fall into this category, although there is some research on how to do better. On the implementation side, the app installed on users’ devices does not necessarily correctly implement the abstract protocol it uses. Errors here are a major concern and source of employment for red teams: the Debian patch removing OpenSSL’s entropy source is a famous example, but others abound. Many implementations of the Signal protocol use the Open Whisper Systems libsignal-protocol codebases in Java, Objective-C or Javascript (and thus will share any bugs that arise), but this has licensing restrictions and some vendors have reimplemented Signal from scratch. (This is a common pattern: Beurdouche et al. [4] reveal many different and buggy state machines arising from vendor reimplementations of TLS.) Perhaps equally worrying, though, is the fact that the code actually executing on devices is generally an opaque binary compiled by the operating system vendor. This means that there is no way for a user to be certain that the code running on their device is actually the open-source code that they might trust. Indeed, even the Signal app uses Google’s closed-source Play Services library to handle push notifications: if Google deployed or were coerced to deploy malicious code in this library, they could easily access message plaintexts in a way that would not be easy to detect. There is a significant amount of research in this area, but few ideas have achieved widespread deployment. One simple approach is to allow users who do not trust OS-provided binaries to compile and run their own clients, but (for a different reason) the Signal developers do not allow federation [19].