 So welcome to the presentation We'll we'll make a quick presentation of free wing which is a decentralized communication platform It allows for audio video and text messaging in a decentralized manner ring A dev is developed by a free software consulting company in Montreal called file unix where both me and small work Yes Well, my name is Simon So during the talk we'll go over rings distributed peer-to-peer architecture and explain how we managed to make he called and calls and Transfer text messages in a decentralized manner Then we will go some security and privacy concerns and finally have a look at new up and upcoming features such as multi-device and You just use a name registry using a blockchain Finally, we'll have a look at the available clients First let's do a small demonstration All right, so on your right you will see Camera for the Android phone So when you just download the app on Android, as you see you can find it on Android If I just show you not the first in the list, but you can Find it Just go So what I did here in my computer is I've created an account what I bring account is is it's it's a nearest a key pair and The idea that you see here Actually contains my public key. So now small small can scan this QR code and send a message to me Okay, so now when you will start a ring on Android You will see the screen and then you can just create a ring account and then the time it takes to create the account Is actually the time for generating a pair of RSA keys keys So it takes Little time and once it's done now you can use your phone to Scan QR code when you have a friend is just nearby Just scan the code All right, and then once it scan You have this you jump in a conversation in which you can write some text So yeah, we could yeah right on from now The time is sent and as you can see he has received the message and all of this is Being exchanged Through distributed hash table. So we don't have any connection between us for now Um, so if we want to any instantiate a I'm calling you already. You're already calling me trying to so some I shouldn't receive your call in any time in any time We'll see how calls work later Maybe maybe you can try calling me. I don't know if you have a good connection to the Wi-Fi I always have another Oh So I did receive a call I could not make it I'll won't try and fight against the Wi-Fi and instead go over with the explanation of what happened here Before you understand how a ring calls work You need to understand what a ring ID is and I've already explained it It's a pair of RSA keys and it's your public identity on the network Your ring ID is meant to be public and it contains no private information other than your public key Now let's jump in in some explanation of what the distributed hash table is. So first We wanted to make some this distinction between two three types of networks So at first we have the centralized network, which we all know. It's all of your Google and YouTube and all of that You have the federated network and the distributed network so Out of curiosity here, who could name me maybe federated network? any anyone what Identity cut I don't I don't know that but okay Now I know There's an easy there's an easy one. You you know mail, you know mail and if you know Diaz porra, which is a kind of a Facebook Twitter, but this is this is a federated network in which you can choose for your Your your pod the pod which is the central server you use to connect to the whole network But this is not yet distributed and Ring ring is a software that wanted to Bring distributed network a reality for everyone to communicate So if you want to differentiate between the federated network and distributed network Well, every node in a distributed network is equivalent to another and another node So, yeah, this is the special thing about this so what makes us able to do that is Open DHT open DHT is the distributed hash table we use For those of you who don't know what the distributed hash table is will just walk you through the process of what it does but in short this is some tool that will allow you to Distribute some load of that data storage over a network. So it's it's pretty it's pretty efficient and pretty useful So in the network every node has an ID which is of length 160 bits and we use those IDs to Compute the distance between each of them using the XOR metric. This is a sort of Abstract distance which which is a computed yet again using the XOR metric and Yes, there are other Distributed hash table that exists already, but we wanted to have some specific features such as the lesson feature which will enable each nodes to be Notificated on new data storage We also implemented Some powerful queries allowing you to fetch partial data partial set of data on the network which could Reduce the traffic traffic we we get using the distributed hash table and also Some features that is a work in progress. We have the value indexation over the DHT So yeah, if you want to contribute if you want to know if Anymore things about the the the project open DHT or in order to provide a patch You can you can do do so on Get hub. Here's the link So Just just to show you what's the process behind distributed hash table. We'll just start here by looking at this at the circle where you have the key space every every key every ID, which is the same thing will be will be on this circle and when some Alice want to communicate with anyone or just use the the Distributed hash table. She first has to know a first node and once she knows a first node Which is here the the node that is labeled by the the key ID a 10 dot dot dot F4c She just asked to that node Which are the list of which is the what is the list of nodes? that is the closest to the ID I am looking for and on the screen you can see that the ID Alice is looking for is Actually 0 0 2 k 5 p and represented by the sort of mailbox And so then the first node will just say oh, I know I know Some ID that is a closer to the target you're looking for and here here it is and then we ask again and then again And we will eventually find the closest node to the to the target we're looking for and once we have found this this closest node we can just Exchange data between between this node in and us some operation that are Available to use in the distributed hash table are such as the get get operation for getting data and put for putting data and we have also as we We've talked to you just before The lesson the lesson which helps another Another node in the network to be notified if for instance Alice were to to put some data on the mailbox of So that's the way we we exchange some some data on the distributed hash table So one big issue with Communicating in peer-to-peer network is creating connections with one another one another This is not always possible because we have not and firewall issues So ring has to implement a number of methods to try to To go through a not very firewall If there is several methods that ring tries and it tries them in order in order to establish a connection in the best way possible So obviously like the class in the class in a classic situation Alice could be could have a public IP address and Bob could be on a private network in this case it might not be possible for Alice to contact Bob because he has a A private IP and he might not have configured his firewall to let Alice in so in this case She cannot send any packets to him, but he can contact her in in this situation here Only Bob is able to make calls to a list But it can get even worse where both of them are behind the firewall that they don't control this means that neither Bob nor Alice is able to instantiate a call and in this situation There is nothing we can do Most most home home routers allow for you PNP Which means that you will open ports on your on your on your machine and then you can make calls But your your IP changes all the time and of course you don't want to communicate with your IP with friends It's it's not convenient to share to open connections that way so Other other techniques techniques we can use to make a wire not in firewall Transversal is done So if you have a router that does not cooperate with you meaning that he does not want to tell you what your public IP is Then you could ask someone else on the internet Which is what we call a stun server and this stun server will answer to the quiet to the following question What is my one IP? When he tells it to you then you can you can tell it to your friends and they might be able to call you there This does not solve all issues because you could still have a firewall and packets won't go in So if that does not work you can you can revert to using a turn server What a turn server is is a point on the internet where both parties can connect that will relay all packets This means that you need the server somewhere that is willing to relay all your traffic So you're the color quality might be degraded or Yeah, it's a it's a less convenient situation The so what we use for for this is a protocol called ice So essentially what ice does is is Alice will tell Bob all the possible ways She thinks she can be contacted and he will do the same then they will create a match a matrix of Possible ways they could talk to each other try them all and then and then order the working ones and pick the best The way the way this works with open DHT is simple So all this time I've assumed that Bob can already talk to Alice without even having a connection open The the way this works is they use open DHT By within inside the DHT both Bob and Alice have what we call a mailbox like somewhere Somewhere you can send messages and they will notice So Bob is listening to the top and the top right mailbox And if Alice wants to make a call she will just put a message here This message is encrypted for only Bob to see and Bob is subscribed to this mailbox So as soon as this message arrives, he will receive it what this message says is hello I'm a list I want to make a call to you and these are the possible ways you could try to contact me Now Bob's Bob wants to answer the call so he will do the same He will send a message to Alice's mailbox She will be notified and what this message says is yes I want to make a call with you and her here are the possible ways you could try contacting me Now as of this very moment Alice tries to contact Bob's in every possible way With every possible like meanings of connection she has Now they both discover what is the best way to talk to each other and they have a call So this is how we establish calls in Ring Now there is the issue that you might not have access to a stunt server Well stunt server is pretty easy because they're available for free on the internet Because they don't do anything much they don't require much bandwidth But then turn servers it's a bit more of an issue because you have to set one up If it's not possible to make calls in any other way We are looking into ways to solve this such as pools of turn server contributed to the by the community but in general you should be able to make calls using just upnp So from top to bottom all of the messages that were exchanged between Alice and Bob are all encrypted. First of all the ring ID contains a RSA key pair that can be used to encrypt messages So it's all encrypted on the OpenDHD network and then calls in Ring are incendiated using SIP So we are compatible with whether a cell phone you have And so we leverage this existing standard same thing for audio Now there is the issue that we face that a ring ID is connected to a device It's connected to a node on the network so you might you might not find this practical because when you're used to those non free solutions right you can just call a username and it's going to ring whether he's on this laptop on his cell phone or whatever So what we do is we this is an up and coming feature by the way that it is not yet merged Alice will sign devices and now you can know that these devices are owned by Alice Whenever you want to make a call you will make a call to all of Alice's devices and she will answer on only one this allows for Alice to revoke a device that was stolen and not have to redo her whole identity again So this means that somewhere on the network Alice has to put the list of devices she owns So she will she will put information on the DHT network saying So these are my devices when you call me call me there And the way it works right now is only you have only one device So more features that are coming to ring are the issue that like ring IDs are not easy to share they are long hashes complicated like you won't ever remember it so you have to scan it for the QR code or send it to you via email instead we would like to propose a solution which is which is building a decentralized registrar so what we are working on is an Ethereum contract I won't go in depth about explaining how Ethereum work but Ethereum essentially what it does it is it allows you to write decentralized apps so you have a program that runs in a decentralized manner all over the internet what we will build is a program that registers username so you can talk to him and say I want to register this username to this ring ID and he'll say yes he'll remember it forever but but now there is the issue that not all not all ring nodes are willing to run this this potentially heavy Ethereum node so what we are building also is a light rest API that will that anyone could run on his own server for example or us we could run it for the community that will do the registrations for you so talking to Ethereum for you this is always going to be optional in the ring because it will always be possible to call a ring ID directly instead of calling a username but we will have a solution for a decentralized username registry it's interesting especially since we're here at webcam like everyone has probably a pgp key which is a 4096 bit rsa key pair we could imagine generating those keys from exist as an existing pgp keys so from from the what we could leverage the the usage of their web the existing web of trust to to know who's like what Alice's ring ID would be since I already know her pgp key um so if you want to see the source course search code or contribute to ring you can always find us on our gear it server and uh yep now available clients we all of our clients are open source even on another few platforms so uh we we already have a working client in debian that is in the repositories as of this week so you can type apt get install a ring right now if you're using another distro we have repositories our apps are available on both fjared and the google play store and you can download the apps for the other platforms on our website yeah find the ring if you have any questions um any technical questions you can handle them one one one one yeah it works um so it relies on a fleet of nodes yes uh does that imply that only the the phones that are out there that have a ring installed participate in that fleet or does that imply that you need some other servers on the internet to act as basically inactive or unanswering nodes and if that is the case can we help all of the all of the ring clients are joining are joining the open dhc network so by default you are you are a node so yeah we have hundreds of nodes already running all over the internet and the more so you come see the the answer uh the more the network is big the more the network is is healthy so uh yes you could also run well the community could also run some some nodes and some on some machines uh anywhere and you can run multiple nodes on on the on the same machine so um but yeah that's how the that's that's what the ring is based on for the first time you will boot your client you will we will have to know one existing node of the network right this is called a bootstrap node um what we do at saval file index is we host a we host a bootstrap node at bootstrap.ring.cx but what we plan to do is to instead ship ring with a list of community maintained servers so that you would not have to like trust saval file index to host the the first node it's already configurable configurable in your client you could put any node there you don't have to use ours to get bootstrap and whenever you restart your client it won't use the bootstrap node anyways uh i think uh thomas it's answered all right i want to know how you get into the network yeah you have to know a node yeah any other question all right i think we're done all right thank you