Circles is a new kind of secure social sharing app.
You can think of it like an encrypted messenger that looks and feels like a social network.
Or you can think of Circles as a social network app where every post is encrypted from end to end.
Which is it really? It’s both, at the same time.
Unlike with other secure messaging apps, when you post something in Circles, there’s no implication that you’re expecting an immediate response. Instead, you just post whatever you want, whenever it’s convenient for you. Your friends will come along and see your post later, whenever it’s convenient for them. So in this way, it works more like a social network.
But unlike other social networks, your posts on Circles are encrypted so that they’re only readable by the people who you’ve invited and who have accepted admission into your circles. Even the service itself cannot read your messages or look at your pictures. There’s no creepy tracking or analytics running behind the scenes to sell you targeted ads. In this way, the security that you get with Circles is much more like that of an encrypted messenger app such as Signal, Wire, Threema, Element/Matrix, or WhatsApp (well, before the Facebook updates, anyway).
Circles and Groups
In the Circles app, we support two different kinds of social structures: circles and groups.
Groups are simpler, so let’s talk about them first.
A group in the Circles app works pretty much like a group anywhere else. It has a well-defined set of members, and everyone who’s in the group is in the same group with everyone else. Everyone in the group can see everything posted in the group.
Any organized group of people in the real world is probably a reasonable fit for a group in the app. For example:
- Your book club.
- Your softball team.
- The people who live on your block, or in your building.
- Your kid’s preschool classroom. (Well, the parents and teachers anyway. Preschoolers definitely shouldn’t be on social networks!)
Any organized group of people with well-defined membership is probably a reasonable fit for a group in the app.
Circles are loose, flexible, and overlapping, just like real, organic, human social circles.
In the real world, if you and I are friends, then your set of friends is probably not exactly the same as my set of friends. And that’s OK.
The people who I consider my neighbors are not necessarily limited to just the set of people who live on my same block, or in my same building. My “neighbors” might include some people who live down the street, or around the corner, or even in the next town over. And moreover, even if you and I live next door to each other, my set of who I consider my “neighbors” could be very different from yours.
Similarly, if you and I are family, that doesn’t mean that the set of people who you consider to be family must be exactly the same people that I call family. For one thing, if you and I are blood relatives, then your in-laws are probably totally unrelated to my in-laws, and vice versa.
And, again, that’s totally OK. That’s how human relationships work. Circles are our way of helping the technology catch up to the social reality.
A circle is a good fit for any type of relationship where every individual has their own network of connections that’s different from anyone else’s.
So, what exactly is a circle?
In most earlier social networks, they gave you just one place to post things to share with everyone in the whole world. Maybe they called it your “page” or your “wall” or something like that. You could connect with your friends, and then the app would show you your timeline of posts pulled from all of your friends’ pages / walls / things / whatever they’re called.
That’s what a circle does. It gives you a place to post stuff for others to see, and it’s also the place where you can scroll through the timeline of events from the people you’re following. It’s like your own little microcosm of the larger social network, but made up of only the people who you care about, sharing about the topic that you and they have in common.
So for example, my Family circle is where I would share stuff for my family members to see. I would invite my wife, my mom, my sister, my brother-in-law, my cousins, … You get the picture.
Each of those people would also have their own Family circle, which they would probably invite me to follow. But each of them is going to have their own unique set of followers. Like, my wife and I might be the only two people in the world who would follow both her brother and my sister.
So in my Family circle I’m going to be following my mom’s Family circle, my wife’s Family circle, my brother-in-law’s Family circle, etc, and so on and so on. All I have to do is tap on my Family circle, and I can instantly see what all of my relatives have been up to lately.
Or, at least I see all the stuff that they wanted to share with their family, which is all that I really wanted to see anyway. The point of giving everyone multiple circles is that I don’t have to also scroll through their work drama, their sports fandom, or anything else that they’re into and I’m not.
A circle is like your own little microcosm of the larger social network, but made up of only the people who you care about, sharing about the topic that you and they have in common.
Note: The set of people who I’m following in a circle might not be exactly the same as the set of people who are following my own circle. But in most cases it’s probably going to be pretty close.
This Twitter-style distinction between follower and followee is somewhat unfortunate, but it’s necessary to make all the encryption and security work out in a manageable way. (See below for the details.)
Also, let’s be real: Often real relationships are asymmetric. Like, maybe there’s someone who I want to share my family updates with, but I don’t actually want to follow the stream of garbage that they continue to post in their circle every day. I am personally very fortunate that I am not in that situation myself, but I know from the Internet that it is sadly all too common. Human relationships are hard.
Bonus Feature: Encrypted Photo Galleries
Ok, this one isn’t really necessary for a social app, but it was an easy thing to add, and I think it’s really cool. Plus, I think it will be really useful.
We also give you encrypted photo galleries. You can share a gallery with your friends and family, or you can just use it for yourself as an encrypted cloud backup of your photos.
Galleries also give you an easier way to manage photos that you want to share with more than one of your groups or circles. If you upload the photo into a gallery first, you can then share it with a group or a circle with just a couple of taps on the screen.
Here I’m going to dive into some of the gory details that Circles users don’t really need to worry about.
If you’re here because you like privacy enhancing technologies, or encrypted systems in general, or Matrix in particular, and you’re looking for the technical implementation details, then you’re in the right place. Read on.
If not, you can probably skip this section and not miss anything.
So, at a technical level, what is a circle? And how do we make it all work?
Circles is built on top of Matrix, the amazing open source end-to-end encrypted communications platform built by a worldwide community and provided to the world by matrix.org. (Note that Circles is not affiliated with Matrix in any way; we are just one very satisfied consumer of their open source technology.)
Matrix was originally built for group chat – kind of like Slack – and that legacy as a chat platform still shows through in a lot of the ways that Matrix talks about itself today. Don’t let the chat legacy fool you though. I predict that Matrix is going to be the foundation for a lot of exciting new developments in end-to-end secure distributed systems over the next few years. It wasn’t the first E2E software, but it’s definitely the most open. Matrix is like the Linux of E2E systems, or maybe the LLVM.
In Matrix, everything happens in a “room” (as in a “chat room”). In Matrix’s encrypted messaging protocol, the encrypted messaging sessions are done on a per-room basis. So it should come as no surprise that our groups and our circles are both built on top of Matrix rooms.
Each of our groups is implemented with a single Matrix room behind the scenes. When you post a new encrypted message to your group, the app on your device (1) posts the message into the room, and (2) makes sure that every other user in the room has the keys that they need in order to decrypt your message. When someone else in the group posts a message, it goes into the same underlying room.
Encrypted Photo Galleries
Like our groups, each photo gallery is implemented with a single Matrix room. When you upload a new photo, the app on your device encrypts the photo, and if the photo is large, it also generates a smaller thumbnail image and encrypts that one too. It then uploads both images and posts them as a message in your gallery’s room. If you are sharing your gallery with other users, your app also makes sure they get the keys that they need in order to decrypt the photo and its thumbnail.
Our social circles are a little more complicated.
Sharing with your circle. Remember above where I said that each of your circles is like a social “wall” or “page” where you get to share stuff with your people? In Circles, all of those posts go into – you guessed it – a Matrix room that you own and control. When you invite someone to follow your circle, your app invites their account to join the underlying Matrix room.
You can control whether each follower is allowed to post things into your circle. The most common use case for posting on someone else’s “wall”, as far as I can tell, is the classic once-yearly “Happy Birthday!” post. You can choose to allow or deny this kind of “wall” posting for each of your followers; when you make changes to this, your app is really just adjusting the given user’s Matrix power level in the room.
So to share stuff with your people, all we really need is a single Matrix room for each one of your circles.
Catching up with your circle. To see what all of your people have been up to requires a bit more work. Each of the people you’re following has a room of their own that holds their posts and connects all of their followers. When you scroll through the timeline for a given circle, your app downloads the messages from all of these Matrix rooms, decrypts them with the appropriate keys, and sorts them into chronological order for display on your screen.
The algorithm for figuring out which messages from which rooms should go on the screen as you scroll backwards through time is slightly more complex. The challenge is that you may have one friend who posts 100 times per day, while another friend might post only once every 3 or 4 days. We can’t just grab the 10 (or 20 or however many) most recent messages from each room and throw them onto the screen. If we did that, you would get the last 30 minutes of posts from your talkative friend, mixed with the past two weeks of posts from your shy friend. The solution to this one is actually not too difficult, but the details are a bit beyond the scope of this post.