 OK, so hi, I'm going to present OpenDHT. So OpenDHT, it's a project that we started developing along with ring. So we presented ring half an hour ago in the privacy room. So first of all, who knows what that DHT is, just to have an idea. OK, maybe half, two-thirds of the room. OK, so OpenDHT, it's a distributed hash table. And who knows what an hash table is? OK, so the most known DHT implementation existing is the biterant mainline DHT. It's used by biterant to find other people who have a given torrent. So if you've ever seen magnet links online for torrents, so magnet links are trade keys on the distributed hash table that is used by biterant. And the distributed hash table provides a global shared dictionary. And in the case of biterant, this dictionary will be a dictionary between, so it's a mapping between the key. So the key is the magnet link. And the value is the IP address of people having this torrent. So when you have a torrent, you will perform a put operation on the DHT with your own IP address. So it will be added to the list of IP addresses. So when you want to download that magnet link at torrent, you will perform a get operation on this same key and retrieve the list of IP addresses from people who previously performed that put operation to register the IP address. And that's how you will have the list of peers that will then reach directly in peer-to-peer to exchange files. So we use the same idea for a ring to join people and establish peer-to-peer communications with them. But the DHT implementation used by biterant was too limited. So for instance, the IP addresses that were stored were unclear. We wanted to have them encrypted in ring. We also wanted to store more kind of data, different than IP addresses. So basically, any kind of encrypted or even plain text that can be stored on open DHT. So we still begin by forking an existing implementation of the biterant mainline DHT. And we extended it and improved it. So it's still a Cadamilia-style DHT, just like the mainline biterant DHT. So Cadamilia is just the routing algorithm used in the background to know which node should store which data and what is the algorithm to look for those nodes. So Cadamilia means that the Cadamilia algorithm means that operations will have a complexity of n. And n is the size of the network, so the number of nodes in the network. So it's kind of very efficient. I mean, compared to other distributed algorithm, it's very efficient. But the downside of it is that there's no guarantee. It's a best-defort network. So for this reason, every data is stored on eight different nodes. So every data, every value stored on the dictionary has a redundancy of eight to allow people to disconnect at any time and still preserving the value on the distributed network, on the shared dictionary. So the DHT from the user perspective provides access, as I mentioned, to a shared global dictionary. So it's key value pairs, actually. You can have multiple values for the same key. So it's a multi-map structure. Like every map, there are two very basic operations you can do in it. You can retrieve values for a given key, or you can store a new key, a new value, sorry, for a given key. So this is the get and put operations. And for OpenDHT, we also introduced a new operation that is the listen operation. So the listen operation is like the get operation, except that it's non-blocking, and it will inform the user when there are new values stored on a given key. So instead of just retrieving the keys at a, instead of just retrieving the values at a given key at some specific time, you will just write and listen for new values being stored at that key. And that is used by ring to listen for incoming messages and incoming calls. We start doing pooling and we start reading values on the DHT on a regular basis. So it's much more energy efficient and it reduces network consumption. So OpenDHT, it's written in C++11. We forked the C code and we improved it and made it in C++11. So we can, for instance, have multiple nodes running in the same programs and these kinds of things use lambdas to have callbacks and this kind of thing. And we also have Python bitings. So OpenDHT can be used very easily in a very straightforward way by any Python program. It's a Python tree bitings. Okay, so recently we introduced new features to OpenDHT. So they were introduced along with the new version of ring that we presented in the previous presentation. So the major new feature is the DHT proxy. So when you run a node, it will be a local node running on your computers and connecting to other nodes on the distributed network. But this will consume resources. Maybe every few seconds, there will be some packets exchanged with other nodes to preserve the network connectivity and maybe you will receive some messages from other nodes. Make sure that you're still there to store values on your local node. So this might not be viable depending on your requirements on mobile devices, for instance. It's not really viable to have a DHT node running 24 seven because when your phone is in your pocket, it wants to sleep. If it doesn't, it will just draw the battery progressively because the DHT will just keep maintaining the radio active. It will keep the CPU and the OS active because it will have to wake up on a regular basis to handle the packets. Even if it's a very small amount of processing, it will just keep stuff running and it will draw the battery. So there's the need to have a proxy. So the DHT node could actually be running on another computer and the DHT will completely transparently redirect every operation to the distant node. We sought any change from the code using the DHT node and we even have the ability to switch and run time between a local node and the proxy. And this was because maybe we want a mobile device to use the local node if the device is connected to power or on Wi-Fi and switch to a remote node if we are on 3G or disconnected from power. And this will allow to have the most distributed possible network while still improving the power consumption when we're not connected to the power. So yeah, we also have the ability to have push notification with Open DHT. It allows us to use, for example, an application on iOS. You can't have a node H24 on the iOS device. So because Apple will kill your app. So with push notification, you can ask the proxy to send a wake up notification to wake up your application and retrieve the value from the DHT. We also rework on the protection on DDOS things. So for the proxy, just a simpler REST API which is described on the wiki and you can switch. So let's have a little demo. Where is my, okay. We have a proxy on DHT proxy.ring.6 for 8,000. So since the DHT proxy API is a REST API, so we wrote a simple DHT client in web with JavaScript. So the proxy API actually also enables the use of DHT from web apps. So web apps can connect to the proxy server to the REST API and use perform function on the DHT. So I will use the proxy to put some value on the hash. So it takes some times. And after that, I can get values from the DHT. So this is retrieving from the proxy. And we also have listen capability. So if I put, we will have a real-time streaming. So this is for the demo. Yeah, for the push notification, we use a gateway. For the gateway, we use a Gorush REST API. It's an open source and the MIT license push gateway. And the thing is we want push notification systems as distributed as possible, but push notification is centralized by default because you have what we call a push provider, like a FCM for Android or APN for Apple. And you need to authenticate your notification to that the push provider. So you need to store a key or password somewhere. So we have a push gateway hosted by server for Linux. It's a push.ring.cx. And this central server, you store the data from the key and the password for APN or FCM. So each node can create a notification with just a device ID and ask the push gateway to send a wake-up notification or a time-out notification if the listen expert. So this is the new feature for Bandit DHT 1.6. If you have any question, you are free to ask. And thank you. Yeah, so you can have, of course, yeah. So the network starts at two nodes. You can have two nodes and it works. I mean, it works even better if there are less nodes. So log of N, so it's faster. It's a bit faster if you have a smaller network. Yeah, sure. Yeah, for example, text messages for ring. Okay, he asked if the value on the DHT have an expiration time. So yeah, for example, for ring, if you send the text messages after five minutes, it will be deleted from the DHT poisoning. Yeah, so every value will expire at some point. But yeah, so the question was, is there a mechanism to avoid poisoning of the DHT? Yeah, so it's part of the value expiration system. So actually we have some mechanisms so that if some given IP address fluids the DHT, it will not have priority for values. So if some other IP will want to store a value, then, so there is a maximum value, so it's eight megabyte per node. And so if eight megabytes in memory are used, then the values from the IP using the most storage will be dropped. I mean, the oldest value from the node who stored the most data will be dropped to avoid the poisoning and, but yeah. The question is basically, do we have a non-tree point to the network? And yeah, we have bootstrap.ring.6, it's the non-tree point of ring OpenDHT network. You need to connect your node to the network, so you need any non-tree point on the server. Sorry, just a precision. You don't have to connect to bootstrap.ring.6. You can use any running node on the DHT network as an entry point. It's just that bootstrap.ring.6 is a known running node of the network, so you can use this reliably to connect to the network, but if you know some other nodes running, you could use this other node to connect. So the question is, what's the maximum size of the value on the OpenDHT? We limit a value to 64 kilobytes. Yeah, so we are based on the BitTorrent DHT, which is the largest DHT, I mean, maybe the largest distributed network actually running in the world. They have more than 10 million nodes. So they use the Kedemlia, it's a Kedemlia-style DHT, just like us, actually, we are based on the same basic algorithm. And so it's, yeah, it runs, if you can download a file using BitTorrent, if you have a magnetic link, it will be between probably less than five seconds to get the list of peers from the DHT. And it's similar to what we observe in the DHT nor DHT. Almost always under 10 seconds, and most of the time, less than three seconds for a get operation to retrieve a value. Yeah, of course, there are multiple kinds of DHT networks like CORD, but yeah, we would just use the main line Kedemlia DHT-style.