{"id":800,"date":"2023-12-07T02:00:08","date_gmt":"2023-12-07T02:00:08","guid":{"rendered":"https:\/\/fde.cat\/index.php\/2023\/12\/07\/building-end-to-end-security-for-messenger\/"},"modified":"2023-12-07T02:00:08","modified_gmt":"2023-12-07T02:00:08","slug":"building-end-to-end-security-for-messenger","status":"publish","type":"post","link":"https:\/\/fde.cat\/index.php\/2023\/12\/07\/building-end-to-end-security-for-messenger\/","title":{"rendered":"Building end-to-end security for Messenger"},"content":{"rendered":"<p><span>We are beginning to upgrade people\u2019s personal conversations on Messenger to use end-to-end encryption (E2EE) by default<\/span><br \/>\n<span>Meta is publishing two technical white papers on end-to-end encryption:<\/span><\/p>\n<p><span>Our <a href=\"https:\/\/engineering.fb.com\/wp-content\/uploads\/2023\/12\/MessengerEnd-to-EndEncryptionOverview_12-6-2023.pdf\" target=\"_blank\" rel=\"noopener\">Messenger end-to-end encryption whitepaper <\/a>describes the core cryptographic protocol for transmitting messages between clients.<\/span><br \/>\n<span>The <a href=\"https:\/\/engineering.fb.com\/wp-content\/uploads\/2023\/12\/TheLabyrinthEncryptedMessageStorageProtocol_12-6-2023.pdf\" target=\"_blank\" rel=\"noopener\">Labyrinth encrypted storage protocol whitepaper<\/a> explains our protocol for end-to-end encrypting stored messaging history between devices on a user\u2019s account.<\/span><\/p>\n<p><span>Today, we\u2019re announcing that we\u2019ve begun to upgrade people\u2019s personal conversations on Messenger to use E2EE by default. Our aim is to ensure that everyone\u2019s personal messages on Messenger can only be accessed by the sender and the intended recipients, and that everyone can be sure the messages they receive are from an authentic sender.<\/span><\/p>\n<p><span>This is the most significant milestone yet for this project, which began in earnest after <\/span><a href=\"https:\/\/www.facebook.com\/notes\/2420600258234172\/\" target=\"_blank\" rel=\"noopener\"><span>Mark Zuckerberg outlined his vision for it in 2019<\/span><\/a><span>. Bringing E2EE to Messenger has been a complex process, with every feature and product goal revealing further challenges that required careful consideration.<\/span><\/p>\n<p><span>Enabling E2EE on Messenger meant fundamentally rebuilding many aspects of the application its protocols to improve privacy, security, and safety while simultaneously maintaining the features that have made Messenger so popular.\u00a0<\/span><\/p>\n<h2><span>Why we\u2019re bringing E2EE to Messenger<\/span><\/h2>\n<p><span>Messenger first<\/span> <a href=\"https:\/\/about.fb.com\/news\/2016\/07\/messenger-starts-testing-end-to-end-encryption-with-secret-conversations\/\" target=\"_blank\" rel=\"noopener\"><span>built end-to-end encrypted chats in 2016 <\/span><\/a><span>as a feature called Secret Conversations. Since then, we\u2019ve learned a great deal in regards to rolling out E2EE for a wider user base. For example, we recently published an updated<\/span> <span>white paper, \u201c<\/span><a href=\"https:\/\/messengernews.fb.com\/wp-content\/uploads\/2021\/12\/Metas-approach-to-safer-private-messaging-on-Messenger-and-Instagram-DMs-Sep-23.pdf\" target=\"_blank\" rel=\"noopener\">Meta\u2019s Approach to Safer Private Messaging on Messenger and Instagram Direct Messaging<\/a>,\u201d t<span>hat sets out the industry-leading safety systems and tools available on Messenger.<\/span><\/p>\n<p><span>End-to-end encryption isn\u2019t about the technology at its core. It\u2019s about protecting people\u2019s communications, so they can feel safe expressing themselves with their friends and loved ones. To\u00a0 achieve this, we typically focus on two aims:<\/span><\/p>\n<p><span>Only the sender and recipients of an E2EE message can see its contents.<\/span><br \/>\n<span>Nobody (not even Meta) should be able to forge messages to appear to have been sent from someone they weren\u2019t.<\/span><\/p>\n<p><span>In other words, the aim is that only you and the people you\u2019re corresponding with can read your messages \u2013 not even the app\u2019s provider (in this case, Meta) could interfere with their contents \u2013 and you can be confident in who sent the messages.\u00a0<\/span><\/p>\n<h2><span>Understanding these goals<\/span><\/h2>\n<p><span>These two aims are broad. However, when we reflect on our approach to addressing them, they end up breaking down into eight overlapping concepts that we believe achieve a cohesive approach to meaningful E2EE:\u00a0<\/span><\/p>\n<h3><span>1. Confidentiality in transit<\/span><\/h3>\n<p><span>Message contents are authentically and securely transmitted between your devices and those of the people you\u2019re talking to. This is, perhaps, the primary goal of E2EE, and is where much E2EE research and design work is targeted, such as the Signal protocol we use in our products (such as WhatsApp, Messenger, and Instagram Direct), or the <\/span><a href=\"https:\/\/datatracker.ietf.org\/doc\/rfc9420\/\" target=\"_blank\" rel=\"noopener\"><span>IETF\u2019s Messaging Layer Security protocol<\/span><\/a><span>, which we helped to design and was recently standardized.<\/span><\/p>\n<h3><span>2. Confidentiality in storage<\/span><\/h3>\n<p><span>Typically, E2EE messaging services rely on local storage and encryption keys to secure encrypted messages. Messenger, however, has a long history of storing people\u2019s messages for them so that they can access them whenever they need without having to store them locally. That\u2019s why we\u2019ve designed a server-based solution where encrypted messages can be stored on Meta\u2019s servers while only being readable using encryption keys under the user\u2019s control.\u00a0<\/span><\/p>\n<h3><span>3. Control over endpoints<\/span><\/h3>\n<p><span>For something to be \u201cend-to-end encrypted,\u201d it is necessary to have a notion of what the \u201cends\u201d are. For an E2EE messaging app this means that users should have the ability to verify and manage their set of endpoint devices that are receiving their messages, as well as visibility into when this set of devices changes.<\/span><\/p>\n<h3><span>4. Private feature designs<\/span><\/h3>\n<p><span>Product features in an E2EE setting typically need to be designed to function in a device-to-device manner, without ever relying on a third party having access to message content. This <\/span><a href=\"https:\/\/messengernews.fb.com\/2023\/08\/22\/expanding-testing-for-end-to-end-encryption-on-messenger\/\"><span>was a significant effort for Messenger<\/span><\/a><span>, as much of its functionality has historically relied on server-side processing, with certain features difficult or impossible to exactly match with message content being limited to the devices.<\/span><\/p>\n<h3><span>5. Logging limitations<\/span><\/h3>\n<p><span>Maintaining the confidentiality of message content extends to avoiding accidentally leaking it back to us in telemetry. In a product of Messenger\u2019s scale, complexity, and iteration speed, this creates particular challenges\u00a0as telemetry is vital in ensuring that the product is working well for people, and in debugging when things go wrong.<\/span><\/p>\n<h3><span>6. Application security<\/span><\/h3>\n<p><span>It\u2019s a common saying that, \u201cYou can\u2019t have privacy without security,\u201d and this is absolutely true in the end-to-end encrypted domain. Security is important for any consumer product, but E2EE exacerbates the challenges in two important ways: it reduces the provider\u2019s ability to protect the user from attacks, and, in fact, it expands the threat model to include the service provider itself. Our security team is keenly aware of these challenges and works closely with product teams to secure design and implementation of E2EE functionality. For example, we\u2019ve been working to improve the memory safety of our apps; and our E2EE surfaces are covered by our <a href=\"https:\/\/www.facebook.com\/whitehat\" target=\"_blank\" rel=\"noopener\">bug bounty program<\/a>.<\/span><\/p>\n<h3><span>7. Being deliberate about what\u2019s being protected<\/span><\/h3>\n<p><span>E2EE protects message content. However, this is a complex term to define, and, while certain things are relatively clear \u2013 such as the strings contained in a text message, or a photograph sent from your camera roll \u2013 in a sufficiently complex messaging application, it turns out there\u2019s a surprisingly large grey area.\u00a0 Our focus is on determining the appropriate boundaries, ensuring that we remain true to our commitments, setting the correct user expectations, and avoiding creating meaningful privacy risks, while still ensuring that the product retains its usefulness to our users.<\/span><\/p>\n<h3><span>8. Third-party scrutiny<\/span><\/h3>\n<p><span>E2EE implies confidentiality even if the provider wants to access the contents of a communication. We aim for this to be verifiable externally, and, to this end, have published two white papers to provide transparency into our operations. We describe the properties of some features in our Help Center, and we encourage submissions to our <a href=\"https:\/\/www.facebook.com\/whitehat\" target=\"_blank\" rel=\"noopener\">bug bounty program<\/a>. Throughout the project, we have consulted with a diverse range of external parties to ensure that we\u2019re making the right set of tradeoffs. To improve people\u2019s ability to scrutinize us, we also support <\/span><a href=\"https:\/\/engineering.fb.com\/2022\/03\/10\/security\/code-verify\/\" target=\"_blank\" rel=\"noopener\"><span>the Code Verify browser extension<\/span><\/a><span> for our web-based end-to-end encrypted messaging, to give security researchers greater confidence that the code version that they are assessing is being used globally.\u00a0<\/span><\/p>\n<h2><span>High-level approach<\/span><\/h2>\n<p><span>With all of this in mind, our high-level approach was to build off of Meta\u2019s prior learnings in E2EE, from both <a href=\"https:\/\/engineering.fb.com\/2021\/09\/10\/security\/whatsapp-e2ee-backups\/\" target=\"_blank\" rel=\"noopener\">WhatsApp<\/a> and Messenger\u2019s Secret Conversations, and then to iterate on our most challenging problems.\u00a0<\/span><\/p>\n<p><span>Working from the baseline of these two approaches, we then had to address a series of significant technical challenges, including:<\/span><\/p>\n<p><span><strong>Multi-device capability<\/strong>: Messenger\u2019s model of multi-device reflects the Facebook network, which allows people to authenticate on new devices with a username and password, in order to send and receive messages. Since <a href=\"https:\/\/engineering.fb.com\/2021\/07\/14\/security\/whatsapp-multi-device\/\" target=\"_blank\" rel=\"noopener\">WhatsApp\u2019s multi-device capability<\/a> relies on a single primary device that must cryptographically authenticate companion devices, we adopted the Secret Conversations model of multi-device, while ensuring that it functions well for all of our users.<\/span><br \/>\n<span><strong>Feature support<\/strong>: Messenger has a number of messaging features that either don\u2019t exist in WhatsApp, or function differently. Some of these just had to be rebuilt from scratch, while others required deploying new applied privacy technology. For example, we used <\/span><a href=\"https:\/\/datatracker.ietf.org\/wg\/ohai\/about\/\" target=\"_blank\" rel=\"noopener\"><span>OHAI<\/span><\/a><span> and <\/span><a href=\"https:\/\/engineering.fb.com\/2022\/03\/30\/security\/de-identified-authentication-at-scale\/\" target=\"_blank\" rel=\"noopener\"><span>Anonymous Credentials<\/span><\/a><span> to support searches of Facebook\u2019s first-party sticker library, without revealing to us who is sending them.<\/span><br \/>\n<span><strong>Message history<\/strong>: Messenger has always allowed clients to operate off of a small stored local cache, relying on a server-side database for their message history. Neither WhatsApp nor Secret Conversations operated in this manner, and we didn\u2019t want all users to have to rely on a device-side storage system. Instead, we designed an entirely new encrypted storage system called <a href=\"https:\/\/engineering.fb.com\/wp-content\/uploads\/2023\/12\/TheLabyrinthEncryptedMessageStorageProtocol_12-6-2023.pdf\" target=\"_blank\" rel=\"noopener\">Labyrinth<\/a>, with ciphertexts uploaded to our servers and loaded on-demand by clients, while operating in a multi-device manner and supporting key rotation when clients are removed.<\/span><br \/>\n<span><strong>Web support<\/strong>: We needed to support E2EE within our existing web surfaces, including the main Facebook site. The Web platform carries significantly different constraints from native apps, meaning that we needed to take custom approaches to many different aspects of the product. Further, Web users often add and remove devices in very different patterns from mobile-only users, increasing the complexity of our multi-device challenge.<\/span><\/p>\n<h2><span>Learn more about E2EE on Messenger<\/span><\/h2>\n<p><span>Today, we are sharing two white papers:<\/span><\/p>\n<p><span>Our <\/span><a href=\"https:\/\/engineering.fb.com\/wp-content\/uploads\/2023\/12\/MessengerEnd-to-EndEncryptionOverview_12-6-2023.pdf\"><span>Messenger end-to-end encryption whitepaper<\/span><\/a><span>, which describes the core cryptographic protocol for transmitting messages between clients.<\/span><br \/>\n<span>The <\/span><a href=\"https:\/\/engineering.fb.com\/wp-content\/uploads\/2023\/12\/TheLabyrinthEncryptedMessageStorageProtocol_12-6-2023.pdf\"><span>Labyrinth encrypted storage protocol whitepaper<\/span><\/a><span>, describing our protocol for end-to-end encrypting stored messages history between devices on a user\u2019s account.<\/span><\/p>\n<p><span>These add to a number of publications that we have shared which cover Messenger\u2019s E2EE, including:<\/span><\/p>\n<p><span>Our recently updated <\/span><a href=\"https:\/\/messengernews.fb.com\/wp-content\/uploads\/2021\/12\/Metas-approach-to-safer-private-messaging-on-Messenger-and-Instagram-DMs-Sep-23.pdf\" target=\"_blank\" rel=\"noopener\"><span>Safety whitepaper<\/span><\/a><br \/>\n<span>The independent <\/span><a href=\"https:\/\/about.fb.com\/news\/2022\/04\/expanding-end-to-end-encryption-protects-fundamental-human-rights\/\" target=\"_blank\" rel=\"noopener\"><span>E2EE Human Rights Impact Assessment<\/span><\/a><br \/>\n<span>Our <\/span><a href=\"https:\/\/engineering.fb.com\/wp-content\/uploads\/2022\/07\/Meta-Security-Principles-for-Private-Messaging-White-Paper-July-2022-2.pdf\" target=\"_blank\" rel=\"noopener\"><span>Security Principles whitepaper<\/span><\/a><br \/>\n<span>The <\/span><a href=\"https:\/\/engineering.fb.com\/2022\/03\/10\/security\/code-verify\/\" target=\"_blank\" rel=\"noopener\"><span>Code Verify browser extension<\/span><\/a><\/p>\n<h2><span>Beyond E2EE for Messenger<\/span><\/h2>\n<p><span>The journey to bring E2EE to Messenger has been a long one, but it\u2019s not yet finished. While we are globally launching default E2EE for personal one-to-one messages on Messenger, we are still in the testing phase for group messaging and some other products, like Instagram Direct Messages. On Instagram, we are currently testing \u201cdisappearing messages\u201d for one-to-one Instagram Direct conversations in select countries. Disappearing messages are ephemeral and, as with those in Messenger, expire 24 hours after being sent. They are built leveraging our E2EE infrastructure and provide an increased level of privacy. We plan to expand this work as well as conduct additional testing around E2EE on Instagram over the next year.<\/span><\/p>\n<p>The post <a href=\"https:\/\/engineering.fb.com\/2023\/12\/06\/security\/building-end-to-end-security-for-messenger\/\">Building end-to-end security for Messenger<\/a> appeared first on <a href=\"https:\/\/engineering.fb.com\/\">Engineering at Meta<\/a>.<\/p>\n<p>Engineering at Meta<\/p>","protected":false},"excerpt":{"rendered":"<p>We are beginning to upgrade people\u2019s personal conversations on Messenger to use end-to-end encryption (E2EE) by default Meta is publishing two technical white papers on end-to-end encryption: Our Messenger end-to-end encryption whitepaper describes the core cryptographic protocol for transmitting messages between clients. The Labyrinth encrypted storage protocol whitepaper explains our protocol for end-to-end encrypting stored&hellip; <a class=\"more-link\" href=\"https:\/\/fde.cat\/index.php\/2023\/12\/07\/building-end-to-end-security-for-messenger\/\">Continue reading <span class=\"screen-reader-text\">Building end-to-end security for Messenger<\/span><\/a><\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","footnotes":""},"categories":[7],"tags":[],"class_list":["post-800","post","type-post","status-publish","format-standard","hentry","category-technology","entry"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":833,"url":"https:\/\/fde.cat\/index.php\/2024\/03\/06\/making-messaging-interoperability-with-third-parties-safe-for-users-in-europe\/","url_meta":{"origin":800,"position":0},"title":"Making messaging interoperability with third parties safe for users in Europe","date":"March 6, 2024","format":false,"excerpt":"To comply with a new EU law, the Digital Markets Act (DMA), which comes into force on March 7th, we\u2019ve made major changes to WhatsApp and Messenger to enable interoperability with third-party messaging services.\u00a0 We\u2019re sharing how we enabled third-party interoperability (interop) while maintaining end-to-end encryption (E2EE) and other privacy\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":462,"url":"https:\/\/fde.cat\/index.php\/2021\/09\/20\/how-whatsapp-is-enabling-end-to-end-encrypted-backups\/","url_meta":{"origin":800,"position":1},"title":"How WhatsApp is enabling end-to-end encrypted backups","date":"September 20, 2021","format":false,"excerpt":"For years, in order to safeguard the privacy of people\u2019s messages, WhatsApp has provided end-to-end encryption by default \u200b\u200bso messages can be seen only by the sender and recipient, and no one in between. Now, we\u2019re planning to give people the option to protect their WhatsApp backups using end-to-end encryption\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":701,"url":"https:\/\/fde.cat\/index.php\/2023\/04\/13\/deploying-key-transparency-at-whatsapp\/","url_meta":{"origin":800,"position":2},"title":"Deploying key transparency at WhatsApp","date":"April 13, 2023","format":false,"excerpt":"WhatsApp has launched a new cryptographic security feature to automatically verify a secured connection based on key transparency.\u00a0 The feature requires no additional actions or steps from users and helps ensure that a conversation is secure.\u00a0 Key transparency solutions help strengthen the guarantee that end-to-end encryption provides to private, personal\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":331,"url":"https:\/\/fde.cat\/index.php\/2021\/08\/31\/how-whatsapp-enables-multi-device-capability\/","url_meta":{"origin":800,"position":3},"title":"How WhatsApp enables multi-device capability","date":"August 31, 2021","format":false,"excerpt":"For years, people have been asking us to create a true multi-device experience that allows people to use WhatsApp on other devices without requiring a smartphone connection. Today, we\u2019re announcing the rollout of a limited public beta test for WhatsApp\u2019s updated multi-device capability.\u00a0 With this new capability, you can now\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":784,"url":"https:\/\/fde.cat\/index.php\/2023\/11\/08\/enhancing-the-security-of-whatsapp-calls\/","url_meta":{"origin":800,"position":4},"title":"Enhancing the security of WhatsApp calls","date":"November 8, 2023","format":false,"excerpt":"New optional features in WhatsApp have helped make calling on WhatsApp more secure. \u201cSilence Unknown Callers\u201d is a new setting on WhatsApp that not only quiets annoying calls but also blocks sophisticated cyber attacks. \u201cProtect IP Address in Calls\u201d is a new setting on WhatsApp that helps hide your location\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":166,"url":"https:\/\/fde.cat\/index.php\/2020\/12\/30\/2020-year-in-review-connectivity-innovations-faster-apps-and-progress-toward-net-zero\/","url_meta":{"origin":800,"position":5},"title":"2020 year in review: Connectivity innovations, faster apps, and progress toward net zero","date":"December 30, 2020","format":false,"excerpt":"It goes without saying that 2020 has been a challenging year, to put it lightly. But if anything, the COVID-19 pandemic has shined a light on our need to connect as people. For Facebook, that meant our work has become more important than ever. Whether it was finding new and\u2026","rel":"","context":"In &quot;External&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/posts\/800","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/comments?post=800"}],"version-history":[{"count":0,"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/posts\/800\/revisions"}],"wp:attachment":[{"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/media?parent=800"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/categories?post=800"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/tags?post=800"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}