End-to-End Encryption in ActivityPub

Protocol Symposium 2024 · September 2024 · 1:02:06

Evan Prodromou and Tom Coates explain their proposal to add end-to-end encryption to ActivityPub, the W3C standard behind Mastodon and the wider fediverse, where servers store posts in the clear and many are run by hobbyists users may not trust. They weigh integration options and candidate protocols including PGP, OTR, Signal and Messaging Layer Security (MLS), and choose MLS, defined as an ActivityPub extension with a key store and group collections. Coates adds interface guidance on key management, backups and keeping encrypted and unencrypted messages apart. Next steps are a W3C proposal and a reference implementation.

Speakers

Topics

From Protocol Symposium 2024, hosted by Protocol Institute.

Transcript

why are we talking about activity p and into end encryption we should be talking about this or I've still got my doctor who presentation ready at hand if anyone no worries all right well let's kick it off here uh welcome back to the protocol Symposium it's a twoe online Showcase of the work from the summer of protocols 2024 uh today we are here with Evan and Tom who uh will be talking about their project the into in encryption in activity Pub so go and take it away fellas does that work looks great yeah perfect looks great good I I I love this part um great so I'm gonna uh we're gonna try and uh switch off uh between

me and Tom going through the talk today uh we have a lot to talk about first talking about the purpose of our research Tom will talk a little bit about our user stories design research I'll get into some of the potential architectures um for the um solution and then come down to um an explanation of the solution that we landed on uh Tom's going to talk about some of the um UI guidelines necessary for handling this kind of issue in a Federated social network and then I'm going to talk about our next steps what we do next from here so what are we doing when we talk about e2e over activity Pub what does that mean activity Pub is uh the distributed

social network a API and protocol it was standardized by the w3c the worldwide web uh uh uh Consortium in 2019 It's Got Roots and RSS feed formats being able to follow different um kinds of uh blogs or or Publications but it has a number of interesting um changes that make it much more social so um structurally it um defines a number of json-based um uh types and formats that represent objects in a social world people applications

organizations um also the um connections we have in a social world what our social graph is the kinds of activities that we do in a a social World liking things sharing things replying to people um the uh one nice thing about activity Pub that makes it more interesting than feed formats is that it's push based so as soon as someone you follow updates does something that gets pushed to all their followers so it's got a real real-time aspect to it um another wonderful part about it is that it's very extensible we built it so that oh sorry I was one of the standardizer of this it was built to be much more extensible than older feed formats um so I've got a beautiful uml

diagram here for those of those of you who like writing software basically the rough way it works is that each user connects to their own activity Pub server and sends messages directly there and then servers make sure to Interchange messages that are destined for users on other servers so this is a very familiar topology if you're used to say um internet email where we use mail servers send your message to the mail server and the mail server routes it to the right people we're doing the exact same thing here with activity Pub uh by the Numbers there are about 30,000 uh activity Pub servers live on the

internet today we know of about 20 million registered users who are using um these uh applications and there's some like uh Dark Matter out there people who haven't been well measured um we think that there's somewhere around uh 2 million measurable monthly active users there's probably a lot more um in terms of implementations we've got um a lot of big companies and big organizations who use it Flipboard WordPress meta uh for their threads product Mastodon is probably the best known and people often call the network the Macedon Network even though it's a lot more than Macedon ghost is another

um big implementation one thing that um is different between the way that uh that um activity Pub was designed and the way that it's actually worked out it was designed to be much more like email and have operators of s of servers have a high trust relationship with those users so um just like your company sets up an email server that you can send mail through and you trust your company not to go through your mail um or you trust a paid um cloud service not to go through your mail unless it's absolutely necessary um we expected to have uh a network of servers provided by these

high trust server networks what actually has shaken out on the fediverse is a lot of these servers are run by Anonymous or pseudonymous um hobbyists um and they are um you know free software activist or people um from vulnerable communities who who have set up these servers and um another thing that has been very um attractive here is that there's a high-risk user base so there's a lot of lgbtq people people who have looked for privacy on the Social Web avoiding some of the harassment that they saw in other networks um there's also a lot of

political um participation and a big info security um contingent so what we've got is a combination of um low trust relationship ship between um users and their servers unexpected and also a highly vulnerable population of people who are using the network also not expected um so why is that a big deal well posts on uh activity Pub are uh encrypted in flight so as they go through um the internet you know they go over SSL htps um users have a lot of control pry on their post who's able to see them but

once they get to a server they're stored in the clear meaning that um the server operator is actually able to go see them directly and because these server operators have little or no relationship with the users there's um uh not great trust there and even if you have strong trust in your own server you may not have trust in your correspondent server so users really don't trust the privacy of this network and you see like m on has a big banner that says like do not share sensitive information on on mdon there's no endtoend encryption um so what we came here to do is um solve this problem by integrating endtoend encryption into activity Pub so

that's the point of this um of This research project um are two deliverables from this research project the first is a proposed protocol for E2 over activity Pub for w3c and the second is reference implementation designs um architectures Etc and probably some uh proof of concept work too um and now I'm gonna move move over to Tom Tom I'll I'll just do slides for you so just tell me when to advance that would be great um you know there's a a run of slides in a moment with uh we going through fairly quickly so I'll just say got my tapping finger ready yeah we can thank you next thank you okay so the first thing we did when we sat down to do this

project was uh we spent roughly the first first month to six weeks like delving deep and trying to just understand the space obviously Evan is an expert in activity Pub technology director protocol expert in the area um so he went off and started digging into the various encryption approaches um and trying to work out a first pass of what would work best with the activity Pass Pub and he went and talked to the communities to determine their goals we'll talk a bit more about that in a minute that's next section um in the meantime I'm more of the design and product side so my my role here was to work out how other people are articulating or building or creating products around endtoend encryption um to get a sense of how it works get a

sense of what's new or different or complicated about it and and the kind of flows and stuff involved in it what with with the goal that eventually we'd come back together and reunite and say this protocol works best and the way it operates will be comp compatible with a good user centered um design flow so I was looking at flow of data what so I went off and dug into a whole range of other clients and products um uh and the goal out for me was what's the flow of data how's stuff moving around keys and all that kind of stuff how do they communicate to users what's happening if they communicate to users what happen what's happening and what additional features or screens do these apps have above and beyond uh non endtoend encrypted messaging because obviously um

activity Pub as a pro call has messaging as a core part of its functionality already and many of many clients out there already support it so if we go to next um uh next please yeah so we're just going to cycle through these every five five like every 5 Seconds basically I went through and I looked at all the core screens and all the core flows for Facebook Messenger iMessage next WhatsApp next signal next Telegram next Viber next threer next wire next wicker next elements next keybase next line and I think that's it NE one more next

brilliant so um what you'll have noticed from that is uh there's a fairly steep drop off in terms of the names you'll have remembered or recognized but you'll also have noticed presumably that a bunch of the sort of core services that you use every day um including WhatsApp um iMessage and Facebook Messenger all have uh inbuilt Android encryption it's just normal and you don't notice it most of the time it is you know they don't advertise it particularly it's not like highly promoted most of them don't spend a lot of time doing a sort of security theater around it um the Assumption they've got is that this is just a core piece of the functionality you should have and they're going to provide it now the full

document where I went through all of these things which was looking at exactly like what's the setup process how did they work what's the the interaction design of the messages themselves how much do they talk about encryption um the full document is at that URL at the bottom of the page um and it has like pretty much everything for these sort of 102 Services one one thing that was interesting again is like the there's a fairly quick path of diminishing returns in this one like the um once you're past the top five or six you you've seen most of the patterns that those people build with so let's go to the next one um so that so yeah that there were three major conclusions that that this work came to for me the first one is that messaging uis are wildly standardized at

this point um I am you know I'm doing this document which goes through pretty much everything that um uh in the space you know to to sort of talk about things but one thing became really clear is I probably don't need to do too much work articulating what a messaging UI looks like on mobile it has two views one is here a list view um where where you can see the conversations in place with the most recent one at the top maybe you can swipe on it for more interactions maybe the the new buttons in a slightly different place but it's pretty damn standard next um uh and and that's true of all of them like that's true of the the the individual conversation slide as well it's true of the the the way it's represented on the web as well the other thing that became really clear from

looking at the sort of and I hate to schol them competitors because they're not but like the other things in the world that use this kind of stuff is the the they've all pretty much standardized technically as well um around public key encryption models mostly based around um the signal approach now some of the conversation we're going to have in a minute involves people having a basic understanding of what public key encryption means in this space this is a massively ba bastardized um uh description of it please don't think you know that I'm too stupid to have got this right um this is just like just the things you need to know to progress so when you sign in on to a client any new ient you have for your thing that client creates a public key public private key pair it puts the public key on the a

central server that's there to be discoverable um and the private key never leaves your client when someone writes you a message they go to that server they find your public key they encrypt their message multiple times one for each of the public Keys you have stored in there and also to themselves they encrypt it based on their own key so it can go to their own clients if they've got got more than one client and then it sends it each of your clients then receives a message that only that client can read using their locally stored private key and since no intermediary service it's your private key never leaves your device the messages are secure no one in the middle can read them that's basically how it works and pretty much all of these things operate along that level and if

we get the next one and the last bit is the sort of UI challenges aren't in the chat itself and there are three areas in particular I want to draw people's attention to particularly if you're upgrading from a non to approach to one that includes and encryption the first one is you need to have a feature you need to have a set of features around Key Management when someone adds a new client they need um um if a new client is added to your account you need to be informed to make sure it's you that someone hasn't got hold of something or logged in without your knowledge and you as a user if you lose your phone need to be able to go and revoke um the the key associated with it another thing that's that's really distinct and interesting is how archives work and I'm going to talk a

bit more about that later um but the the short gist is because um a client can only read messages that have been explicitly sent to its public key um if it only just got a public key none of your archived client messages are readable none of them so you have to find a different way to restore your archive from somewhere else and then the third bit that became interesting and confusing was about having both e2e messages and non2 messages in the same environment and and obviously this is because um madon and activity P based products already have um direct messaging and private messaging built into them so uh that they are not

encrypted so the question about how to have those two things operating in the same space without them colliding or causing more confusion or problems is like one of the larger problems um next so once I'd gone through that process of investigating all this kind of stuff and Evan was out there um doing another set of work um investigating the protocol side we both independently came together well both independently wrote up what we considered to be the sort of user stories for our bit what what this product needed what this protocol needed to be able to serve Evans are as you'd expect engineering focused mine are or protocol focused mine are user interface and user focused so um uh so the big job that we did at the EDG to Edge uh the

end to Edge Edge Esmeralda event in Hillsburg ear this year was make sure that we were on the same page with all of these and understand how all the keys and the messages would be traced through the system and at that point I want I think I'm Turing over to back to Evan you're muted I think um yeah so I'd like to talk a little bit about uh integration models so how are we going to put uh e e onto this other protocol one of the things that happened as soon as we announced that we were doing this work is we started getting input messages from people in the community along the lines

of why don't you just X why don't you just do this one particular way so part of the work here was evaluating each of those ways of doing things and making sure that you know we weren't overlooking something that was um that that might be a better way for doing things so um the current state and kind of the um kind of one option is like not having any integration and that's something that a lot of folks um said like you know putting any integration in like this there are other products that do it why are you going to bother doing it just leave it off um it's definitely uh one option oh I'm gonna run through

all these uh all these models here so that's that's one option is that we don't don't bother um I think that we would have spent the summer twiddling our thumbs not how we were going to engage our uh our time at Summer of protocols but it also really does not it it leaves the we don't think that the current state of affairs is um sufficient another option would be just including some sort of structured link to an existing application so on my activity Pub profile I have a link to my signal account and you can click it and it starts signal and there you go that's enough um although that's really low effort it is also depending a lot on external systems it doesn't um give a

lot of shared authentication between the messaging system and the rest of your social experience um and uh there's a lot of like trust issues between the identities so big chance of mismatch um so another option is instead of just like bouncing out to a um through a link to another app the there's actually an initiation process that happens within the activity Pub client or server to start a signal conversation or start a WhatsApp conversation and then you move smoothly into that so you're not popping into another app you're actually like integrating in um this is an interesting

one it requires um you know some effort from developers less effort from system administrators the big problem is like making those two edges work really well together so that you have a smooth experience because if it's a bumpy experience it's not much better than just having a link um a last well not last option uh uh another option that we definitely heard from quite a bit was like there are other endtoend encrypted um messaging systems so xmpp is a messaging system Matrix is another messaging system so the idea would be like you take an entire activity Pub server you take an entire Matrix server you kind of mash them together or

overlap them and they become this kind of unified structure um again there's like impedance mismatch between the user structures the way those two systems work the way that authorization and authentication work we felt like it was um it it didn't make as much much sense probably going to introduce quite a few um quite a few problems so is there a way for us to build a um system that works like an extension on top of activity Pub seamlessly integrated one option is to use um uh a custom API one of the apis that was uh built for um social software Mastodon

has an API that's very popular a lot of Mastodon clients exist um so that's one way for us to do this project um the problem is the Masson API is not extensible by either client or servers it's got a very fixed format and we didn't really have any entry points into making changes to that API um so it doesn't support arbitrary data types uh which we would need for encrypted content um so it felt like it would be introducing a lot of ugly line noise in for um non2 clients um without actually helping a lot for end to-end encrypted systems um so given

those boundaries um we decided to lean into using activity Pub as a substrate and building an abstract protocol on top of activity Pub activity Pub has an API it's very extensible you can use different kinds of content I mentioned social content in its Json encoded form you can add new vocabularies of content and um with those new vocabularies make totally different social applications um and they uh the distribution still happens client to server server to server so it happens over the same network but you've got new different payloads that work that way so given

those different kinds of integration models you know uh from from having none which isn't really doing anything uh having a full fullon integration with some uh other protocol um we decided that the right way to go was with an abstract protocol that works on top of the activity Pub substrate um so which uh abstract protocol to choose um we considered um well we had one strong candidate when we started and uh we tried to open up to a number of different candidates um given that again a lot of um incoming suggestions that were along the lines of

why don't you just um suggesting different kinds of uh abstract protocols that could work on to above the activity Pub protocol and I'll talk about a few of them here pgp mime is uh kind of the granddaddy of um eedee messaging it's how um people used to do um encrypted emails um is a very simple well simple topology at least the math for the enry encryption is still plenty H hard um but um in terms of the structure it's very straightforward there's lots of libraries out there so developers would be able to engage with

it pretty quickly and would probably have a very simple topology the problem is is that as you start increasing the number of addressed people in your messages you go from oneon-one messages to one to 10 messages and start getting into say telegram sized uh group messages um this system just wouldn't scale right it barely scales to like 10 and as you get out to like a 100 it's it simply doesn't work um it also doesn't have a lot of robustness in terms of losing your keys Key Management is something that people are used to thinking of as very manual although we think that it could work um in an automated way ASM is another similar one uh similar structure it actually has a

certificate Authority mechanism so you have these kind of like centralized authorities uh it's still very simple um but um very old too um OTR off the Record was developed in the 2000s specifically to bring those structures that we're working for email to instant messaging it's pretty simple it's a nice you know kind of in between system and it handles some of the interesting cases like uh verification of end encryption uh being able to deal with lost Keys somewhat more complex not as what but the pro big problem here is it's not widely implemented um and it's not great for doing group messaging so

that brings us to Modern uh uh end to-end encryption protocols the 800 pound gorilla for an encryption protocols today is signal signal has its own uh client the signal client very popular um but signals protocol has been licensed by a number of different um implementers around the world so WhatsApp Facebook Messenger um Google's uh uh RCS uh system uses signal um so there's quite a few um licensed applications of this signal protocol what's cool about signal

is it's very well trusted it's very robust in terms of security um it is also would give us the opportunity to bridge to other networks so we could bridge between WhatsApp and activity Pub and keep the messages encrypted as they go across that um across that boundary which is really um interesting in terms of growing out this system um the uh uh digital markets act in Europe has kind of pushed these big messaging systems to open up for bridging so that might be an opportunity for us here to have a much bigger um environment using it the big downsides with signal um the reference

implementation is gplv3 uh this is a very restrictive license restrictive open source license um it's also complex uh protocol um and they're very defensive about the trademark trademark is one of the things that they license to these big companies um signals run by a small nonprofit it and uh they make most of their money from licensing this trademark so they're very concerned about um misuse of the trademark so brings me to my last um uh candidate protocol which is MLS or messaging layer security this is a ietf standard so it's an open standard protocol and it is um designed specifically to meet our scenario so

taking a secure messaging layer and putting it on top of another protocol um it was designed for this need um um they took some of the um designs from other messaging structures and made it possible to scale groups to millions of users now uh we're not sure that that's a necessity but it's good to know that we're not going to hit an upper boundary um earlier than other um entend encrypted systems the other thing is it's a royalty-free standard it was standardized at ITF so we have no problems with intellectual property Etc um the cons are that it's really complex it's very chatty um clients are like

sharing Keys all the time and making updates to um structures all the time um I I say here it's not yet implemented in major me messaging service it's actually implementing WebEx now which is cool and there's some uh other systems that are starting to look at it uh for for MLS another thing is that for digital Market act which I talked about previously um at least meta has said that they would interact with uh they would be willing to bridge with mls-based systems so it's possible for us to have a system that Bridges from MLS um so considering different abstract protocols one of the things that was pretty surprising here was the social layer really drove a lot of this

decision it was less about um technically which is best um in particular um any Community uh discussion about pgp or as ASM went right into the ground almost immediately um it was just considered too old and because it was old considered to be insecure and inappropriate um OTR is somewhat obscure and we just couldn't get uh work around it ultimately the need for the signal uh company to keep control of the signal trademark um just made it inappropriate to try to integrate it over there uh objection into an open standard right

it's just it was just too hard to to do so MLS turns out to be the best option for us so um our uh work then became building an activity Pub extension an extension to our protocol that implements messaging layer security um activity Pub um has like certain levers here's my more uml certain things that you can do primarily it's about defining um properties of objects on the network and then different types of messages that can be inter uh uh interchanged between those objects so that's really the two levers

that we can drive for activity pep what MLS needs it's actually defined this way into the spec needs two major Services needs one service to do delivery delivery of of of messages as they're generated and another one to do authentication being able to say this user has this um this key so we can bring those two together by defining new properties for activity Pub in an activity Pub extension so not required it's a new experimental mechanism but implementers can actually use it the first thing that we uh that we defined was a key store this is something that'll be um included with every user

account and it provides that authentication Service and stores all the public uh public keys for that User it's World readable so remote users can read it the local user can read it um and it's managed using some standard mechanisms within um activity Pub and uh there are potential fallbacks to go to other data stores for that are available for every activity Pub server I don't know if they're really that compelling because they take a lot of time and a lot of effort I don't think um if a server doesn't support this structure it's probably not worthwhile to try and U try and do a fallback second thing that we're at that we are defining in

this extension is a groups mechanism so these are the conversation groups that you're a member of it's listed um it's a collection of those that you can get from your um server uh one for each messaging group um only readable by the actor that's not available to everybody only by you but it's got the full set of MLS messages that have happened in those conversations so as you go into a conversation you sync up with the um MLS messages there are um a few activity types that we're going to have to add uh MLS has a few for um managing these like big sets of of keys that Define a group um but we can also reuse messages that

are pretty standard out of activity Pub uh which is is nice for some of these other things um the big thing the kind of explosive area for us in this uh definition is that MLS has um you know like 20 plus um data types that are defined in the standard and so we need to have those same data types available within um this activity Pub extension um the good thing is that they're very well defined and uh translating them into adjacent format which is what we use for um delivery over the wire for uh activity pu is not that difficult so it's basically just mapping the definition into

Json so I guess the question probably seems like wow that doesn't seem like a lot of work right that that doesn't seem like a lot that you're doing well um MLS defines a lot of behavior at the client side and um we are just mapping the interaction between that activity pb-based client or excuse me that MLS based client and the activity Pub Network um the um protocol as such um depends on those two existing protocols in order to um execute that anend encryption we don't need to define the full working mechanism of uh MLS MLS is

already well spe specified so it's really about providing that glue layer between the two of them so that's the uh that's the good part about this is that we can have a relatively simple um structure with guidance um it the hard part is when we actually come up with our reference implementation so the protocol standard is not too tough It's the um messaging UI and uh and uh that reference implementation that starts to become a challenge Tom you want to take it away yes brilliant uh if you could click forward so again like what I want what did I wanted to do in this thing originally the plan was I mean I am I'm doing a I'm wrapping up the designs now

for like the reference implementation a simple reference implementation but originally when I started working on this I thought okay I will just do the design work to work through every element of a of a messaging app end to end and say here is an example of how to do this right but as I said like one of the first things that became very clear when looking at sort of 15 different U messaging apps is how Bloody similar they all are like they they they really the standards they've really really massively standardized so as I said this is a fairly normal mobile list view there's a list of things uh the message at the top is emboldened maybe you can swipe on it uh to get some additional functionality that additional functionality tends to be contextual but it tends to also not be um the only

place you can find it um some people put the the new message button in a slightly different place some people uh stick a search bar when you pull down or do a pull to refresh but you know these are fairly small um interaction design um changes and and frankly if you looked at as I did like 15 of these apps after a while um and screencapped them all and detailed them and logged them all at Great length going back to it I can't tell which is which you know if I look if I look at a pile of screens I'm like is that I IM message you know it really is extremely hard so if you can click to the next screen and it's true for all of it like the mobile conversation view is basic basically the same like I'm

showing you something here simplified um uh and I don't think you will you know this will not seem like a puzzling UI to you everyone every single person will be familiar with it and if you click again um on the web and desktop effectively a very similar thing happens you know instead of it being uh a left hand a column you know a page that you tap on and then slide into a subview they put the messages on the left and then the conversation is on the right um and again there aren't really a lot of recommendations to make in these areas if you if you click again um and so this brings me back to trying to work out what are the areas where we really do need to help people um uh and these are the three major ones

that I want to talk about a bit today um I brought them up earlier in the conversation they were things that that cropped up a lot during this um this process and they are he and client management and notifications around that handling archives and how to restore mage mesages to a new phone or a new device of any kind uh and how to handle ENT encrypted messages and unencrypted messages being in the same environment so if we can now go for the next one so with key management right so the entire principle of endtoend encryption being secure relies on you knowing that you have created X keypads one for each of your clients that the public ones are out in

and public and that the private ones have left your phone um so there are two scenarios um where something like that could be compromised in some way like if someone has got access to your account and creates uh um uh and logs in on a new device then a new public private keyp PA will be generated and from that point on they'll receive your messages and if you lose a device and left it like unlocked or something or open then there's always possible that someone has access to that one and can read messages so they're the sort of the two bits of functionality that um the two situations you need to be concerned about um so when moving from a a system which doesn't have end to end encryption to

one which does um you need to be able to um uh do two major things to be notified if a new client is added to all your other clients receive a message and for you to be able to see a list of the clients that um are associated with your account and to be able to revoke one if your the phone has been lost or stolen or whatever it's new functional requires new screens um we click forward now this stuff you'll you'll have seen this all the time right this is what all of this is sorry I should have sworn um across all of you know this stuff that we all experience on a semi- routine basis you know like you're sitting in front of the television um signing into an app on your iPad and then your phone on the

other side that's frantically buzzing to to warn you that someone has signed into your iPad and that you need to approve it um it can be a bit infuriating but the foundation of it is that you are being notified there's a new login that uh it is important for your security that you know that has happened um if we can click forward again and so and the other side of this is a fairly standard set of screens now this stand standard set of screens is basically on pretty much every one of the um uh apps I went through earlier it's some kind of notification on your home screen when someone logs into your account and then some screen somewhere whether it's to do with your sessions or your devices or your logins which H which shows you a list of the devices

you have logged into your account and then allows you to revoke or delete access if you're on an iPhone you can go to your iCloud page and right on that page you will see every device associated with your um with your um account including your homepods and Apple TVs or whatever and you can revoke access to every single one of them in that place because every single one of them has like um uh now access to some of your security and behind the scenes on iMessage um if someone sends you a message it will come to any of those devices that has a message and client on it uh and it will only be readable by that device next screen please so the next next thing I want to talk about and I'll be quick is

restoring archives on new devices and this is surprisingly complicated um for a range of reasons so again the core premise of the E2 enabled apps is that your content cannot be read content that you as been sent to you cannot be read without the private key that is the partner to the public key it was sent to so if Evan sends me a message to my public key uh I can only ever read that message if I have the private key that private key is secured on my device often most of the time in fact you are not even able to remove your private key from one device and transfer it to another one in fact almost almost always signal allows you to to merge to um private keys or and Associate them but that's about it that

means if you buy a new phone since it won't have had a public key pair associated with it in the past and since any message cannot therefore have been sent to that public key if you log in by default you will never be able to read any message from your archive that is how they all work every single one of these systems in its Baseline implementation will not allow you to read messages from other places so how do you res how do you have a backup because we all know when you get a new iPhone you install it and run it and you have your your message archive is magically there they all have a separate service distinct from e2e um where you can choose to back up your messages it is normally a default

process that what during run during your setup you just click through and don't think about um and uh the messages are separately stored and encrypted and put into those places and then recovered at the other end um so you know Facebook does it they have their own secure thing you can also use um Dropbox or iCloud or something for those Google uses um Google Drive Apple uses iCloud we click to the next next screen this is the kind of functionality that you probably don't remember seeing but is there uh um when you set up Facebook Messenger it'll say well you're going to have an a chat chat history you know that's exciting you know this is how this is where you store it and on on iCloud messages on iCloud so this is

this is completely distinct and separate from the endtoend encryption um messaging stuff it's like a completely different layer that sits alongside it um click forward now look this is a thorny area a lot of people do not think that um uh however good the encryption is on something like iCloud or whatever that you should be um uh doing a backup of all of your messages to one of these large providers but what we do know is that large providers generally are uh much more careful and secure than small providers and that they are much more liable to Legal threats and that they are very keen to not be sued so they tend to use well established best

practices to sync the content between those Services they cannot do it though without your permission problem we have in our environment is that the activity public maret is much more diverse and any individual user may have five 10 different clients that they're using and the question how can I store all my content in a backup way so that I can restore it later and it's accessible to any client that I might have is very complicated right Tom I'm sorry to interrupt you we're running a little late so I I I wanted to let you know yes thank you um uh the uh so the normal way that these Services operate is uh Apple or Google will create a little Enclave

that only your app app can access and you can store things in there and then you can access that data across different situations again the problem is it's not one app we're talking about here so this is complicated and we think actually it's probably not solvable by us uh this feels like it's a it's a conversation to be had by an app developer figuring it out um in in that context potentially something will emerge in this space but in the short term we're going to focus on the messaging and not on archives and backups um next page uh this is the last one so the the the last chunk is about this uh end to end encrypted messages and non-end to end encrypted messages um to some extent being segregated the situation is very simple here right like uh if I send a

message that is encrypted to one person uh because they have one key or one encrypted key somewhere and I uh but it's available to all their other clients then there's other clients won't be able to read it they can then respond in kind or one of those saying new phone who this I don't understand what's going on this is and confusing uh that message is then sent unencrypted and then if you imagine this at a larger scale with like every user having five or six clients a conversation between 20 people then there are some real UI problems and complexity problems that emerge out of that one um when we first looked at this pass this approach that was still our preferred approach because it made it unnecessary for us to do any server upgrades we'd be able to do trans a

transmission of information without any of the individual servers having to do lots of extra work um um uh but in the end this turned out to be an academic conversation the protocol um Choice required a lot more complexity required us to have a a defined new message type separate so now effectively what we're saying is you can either send uh an unencrypted message and it will go to everyone on the other end's phone or you can send it to an encrypted message and it will only go to clients that can handle encrypted messages if we can click forward um so the design guidelines here are pretty simple they are as much as possible try and keep the endtoend encryption messaging uis distinct from non-encrypted ones so there isn't confusion you choose to to look at your

encrypted messages or your unencrypted messages you choose to send an encrypted message that will only be received by people who can receive encrypted messages uh and the goal here is to go from a transition where initially this starts off as an experimental feature where um uh you know depending on who takes it up in the community first um where it's not used as much until there's more critical mass gradually getting to a place where it runs in parallel and eventually replacing it obviously this depends a lot on the community uh the largest number of of servers out there or instances out there um is run by Mastadon if Mastadon decided to turn on encrypted messages across all of their platforms most users would be immediately you know in this ecosystem

pretty quickly in the meantime here are some ideas about how to keep them uh distinct if click forward I'm like two minutes away from the end now um so some Services treat private mentions differently from how You' um treat uh um most to how you handle messaging they put them inside your feed as a private mention so one one exam one situation one approach you could take in that kind of context is to leave that exactly as it is but then have um ento and encrypted messages handled separately as a sort of right-and or top level menu item um were handled more like other services handle DMS that would mean two very distinct bits of functionality operating at the same time uh without

there being Collision or confusion if you go to the next one another approach is just to say we'll have some kind of tabbed UI or leftand menu UI where it says messages and then underneath it it says experiment uh encrypted messages experimental and the two are kept nicely segregated in that space and the third and the third approach is to Mark each message as encrypted or unencrypted one thing that's been really interesting to both of us I think when we came into this we thought there'd be a lot I said the phrase earlier like a performative um uh security or security theater where people would talk a lot about the um encryption they were having actually that only seems to happen in a fairly Niche number of of smaller apps which are really trying to upsell it um mostly

apps do not communicate to you if they're into encrypted because they just assume all messages should be enter and decrypted and all of their messages are um but there is a scenario you can imagine where um you keep them distinct as two separate set of conversations here I can send a conversation with Evan unencrypted or encrypted and he will receive the encrypted one and read it only on the device that is equipped to read it um so skip forward that's effectively that's that's those are the three areas that I'm spending the most time um focusing on but there'll be a larger document available shortly that um explains the rest so I'm going to talk a little bit about last steps for us uh we are uh bringing protocol wise draft proo

proposal to the w3c social CG there's a special task force just working on endtoend encryption uh for activity Pub um that we started so this is happening now uh we're going to be doing architecture and UI design for reference implementation and hopefully some uh proof concept code but probably not a full reference implementation at this point um next um next steps after that um is to build out that reference implementation show what can be done uh we'd want to do a revised proposal based on those implementation learnings how what did we learn from actually using it um looking

for uh other independent implementations best way to test out a protocol is make sure you have independent implementations finalize a proposal um and have it become a uh a report from the social uh group at w3c which gives it um that kind of mandate for for wider use um big questions Tom or are we open to Big questions from the audience I think we're available this is not mine this is I think I pinged you earlier to say should this section be here and you didn't reply so all righty everyone let's just take it as our way of opening up to questions to the audience y how's everyone doing you having a nice day

yeah doing great over here if you have questions in the audience please go ahead and uh raise your hand and we'll uh or and we'll call on you uh Dron drwn you have your hand raised hey there um uh thank you for doing this research very excited about this um you uh mentioned that MLS is relatively complex uh I I worry some that that might discourage implementers from actually incorporating it is there any way that like a subset of MLS could work to smooth along that process I I imagine

that could also get prickly uh but that's the question thanks y' that's a such a super good question and dealing with complex protocols so a lot of what makes uh MLS a good protocol is that it does a lot of um it's very chatty about oh there's a new user in the group hey we've been using this shared um uh key for a while and now we need to turn it over so let's agree on which what new key to use um it's a very it's very chatty in that way um it I think that there are two different ways that we can approach uh making that easier for implementers first way is live liaries right there are existing libraries that

Implement MLS so providing the glue code that connects those libraries with activity Pub might be a really good way for us to help um get that um uptake the other one like you say is leaning um a little bit into the subsets there are some optional parts of MLS not a lot actually it's only only a few little bits but we could make make those parts um leave the Parts out of the activity pup profile and make that somewhat uh simpler so this is something we we're really concerned about um in terms of implement ability versus uptake and ultimately we decided that with all the

feedback from the community about we really want something modern something new here's this MLS thing clearly everybody thinks it's great we went with it um for that reason uh great question thank you awesome Dorian you have a question hey guys thanks that was um really comprehensive um so when you demonstr when you showed the MLS uh you were saying something about the MLS Nam space was that does are they implementing their objects in rdf like you guys are doing under the hood and activity streams or is it just some other thing yeah so it's uh so use Json

LD in the so it's like an rdf um encoding right and in order to build extensions to activity Pub we have to define a new namespace so we would be defining this new namespace for this process I think that um in terms of uh of MLS it has a a definitions for all these object types but they're not names spaced so we'd be basically taking their object definitions and map mapping them into that new name space right is it a sneaky thing like you're doing with uh activity streams though like there's an owl ontology under the hood and you kind of project that out in a

jent not actually not actually the case yeah we we we need to do it through um standard Json LD uh mechanism so doing a full Json LD context document to make that work um next question any other questions from the audience I haven't had a chance I don't think Tom and I uh got a chance to scroll back into the chat were there any questions that came up in the chat that uh folks thought we could address here I think there was a long conversation and question about Doctor Who and how much they wanted me to explain what's happened in the last 15 seasons of that quite welcome to answer that one but

maybe another time anyone else great I mean one question I would one thing I would like encourage people if you I mean if you have questions about one of the things that's been really interesting about this project is neither Evan or I are sort of like in innate experts in encryption so we've gone out there and talked to the experts in encryption and applied that to our territory um but I I mean I mean Evan's obviously considerably more expert in that than I am but um the one thing that's been really interesting to me in this space is figuring out like how these things inter operate and work with one another so if you actually have a question just about like how the existing Services work um uh and why things are the way they are please ask

because I I found that stuff fascinating uh Eric yeah when you did your very uh um sort of quick run through of the various messaging apps did you guys come across session at all the most privacy oriented folks I've talked to uh strongly prefer that one for technical reasons that completely outstrip my capability of adjudicating uh I did not come I don't recall that one I went I did quite a lot of extensive searching um and investigation uh and looked at web and mobile UI but if I miss that one uh and it's particularly good then that

reflects poorly upon me it did feel so private that no one seems to have heard of it other than the Privacy Advocates that convince me to download it onto my phone oh interesting is it good um It suffers from the the Deep challenges of network effects that sort of corrode better improvements in so many technical ecosystems which is if no one will message me on it then the benefits are limited to me and the one person who convinced me to install it on my device so um you know take that for what it is and I have zero interest Financial or otherwise in the app itself

just more it came to mind when I saw your impressive run through fantastic it was so uh it's such a great one and I love the fact that Tom went deep into like every single messenger that we had either of us had ever heard of and there was still another one that we didn't include thanks so much it's worth taking a look at absolutely I think we're at the uh close to the hour so I think you might get the last word uh yeah one thing that's always confused me is how disappearing messages and deleting messages works like sometimes you get an option to delete a message for yourself or for everybody

and how does that work and how does it interact with encryption so both disappearing and deletion um yeah that's not something we want deep into with a The Disappearing messages for deletion um I I I think that that's a um uh it really has to do with like Buy in from all sides right so you delete a message it really has to be deleted on all the other uh systems I think for most of the um uh messaging systems that are monolithic that aren't Federated like activity Pub um they are you can count a lot more on that deletion happening I think it's probably a a fair thing to say that deletion

probably is less uh less easy to count on in activity Pub so we have a lot of activity Pub uh users who make posts delete messages go out they are almost universally approved um and taken care of I don't know of activity Pub implementations that don't do deletes but it's at least theoretically possible that's I think that's an interes one in a range of voice and it sort of it ties in sort of adjacent to the conversation around telegram at the moment as well and the Very specifically odd way that they handle um uh private conversations where almost nothing on telegram uh is actually encrypted um it's all just stored on their servers

and so the first thing is is it stored on their servers um like if the message is just rooted to you and arrives at your end and isn't kept on a server it's a hell of a lot easier to have sort of automatic delet at the client layer um uh um the the other thing is they they also do this thing where you with telegram in particular you you launch your device the uh you say you want to have an encrypted message with say venat venat is is informed that I want to have an encrypted message the server swaps our kind of direct contact details with one another and then the server is taken out of the picture and we are from that moment on talking to one another completely directly um uh it's a very

complicated way to do it because you can't you know normally you can't just rely on on obser on knowing precisely how to have a direct person-to-person communication with the other player but yeah like I would I think Evan's right like one of the core things about all of those services and one of the real complexities about um activity Pub in this area is the is the variety of clients and the and the the shift in it you can't you cannot rely on the receiving client being you know the kind of standard or quality that you're using there's just no way to do it you know like um so you have to have a conversation in which you're saying like I as an individual choose what kind of quality of app that I want to use the

person the other end makes similar decisions and you know this is a sort of social contract that uh we're assuming these things will operate in an effective way we obviously in that environment we can't say the message should be automatically deleted from the client because someone will just build an activity Pub client that says I'm not going to do that and there's nothing you know once they've received it they can cash it and it's done uh do we have time to go to jang's question I'm I'm happy to if everyone else is if let do it okay great Jen hi uh so you mention uh the mrss protocol is very chaty and that overload the the uh provider or server and uh we will

embed the uh the MLS uh fit in the uh users Feit or is it a separate and create implement it in a separate feed so that it doesn't uh uh interv with each other yeah uh excellent question that's exactly the point of that uh separate groups uh property on the Octor is that all the MLS messages are going to go directly in there and they're not part of the main inbox right with that idea they're not overloading the um conversations that are happening elsewhere uh really good question absolutely the case cool um great well uh I think we're at the hour I want to say thanks Tom

thanks everyone um do we have contact information we want to share Tom I guess find us on the fediverse awesome thanks fellas for a great talk and uh we'll see you all tomorrow for another dive into uh summer protocols uh 24 research um yeah we'll see you tomorrow and may your beards be ever full