# Dean Eigenmann - Ultralight Beam

- Channel: [Devcon](https://streameth.org/devcon)
- Date: 2020-10-09
- Duration: 12:34
- Topics: blockchain, smart contracts, distributed ledger, ethereum
- Watch: https://streameth.org/watch/yt-OxEYV3fZ6Pk
- YouTube: https://www.youtube.com/watch?v=OxEYV3fZ6Pk

## Description

Berlin Ethereum Meetup - January 2020

## Transcript

thank you I'm Dean I'm a researcher at status and I'm gonna quickly introduce a project that I work on on the side with a bunch of other people called ultralight beam no this is the outline I don't think this is accurate anymore because I like deleted slides in my uber but we'll see so quickly as quickly as to what or who is working on ultralight beam it's a project by me and then three guys at chained safe called Eric Kaman and Greg we started working on it as a project at s New York and have been like working on it since then on the side so it hasn't been getting as much love as it's supposed to get but we'll be working on it again like a pick up speed pretty soon so firstly what is ultra light beam ultra light beam is a transport agnostic magnet for sending arbitrary data a man net is a mobile ad hoc network which you can think of a bit as a mesh net but nodes aren't they're persistently so a man net is a network where topology changes like quite a lot so for example if all our phones in this room started connecting with each other and like nodes keep going offline and coming back and the topology has to reorganize every or in short bursts of time that will be considered a man that yeah so here's a more formal definition man net refers to a continuously self-configuring infrastructure list network of mobile devices connected wirelessly not only mobile devices there can be like bigger things like radios or whatever but that's just like the rough definition so where do things like MANET become useful in areas like during protests when an adversary turns off cell towers it's super useful because I can text someone who's in some accessible range by hopping through multiple phones up until a message reaches the specific peer it's supposed to reach or like at a festival or at a concert when there's like forty thousand people trying to connect to one cell tower everyone knows how that is the network is off or if you're in some obscure location which happened probably had a ton of Syrian meetups already where there's like a ton of people and you're trying to message someone and it is impossible or you don't have 3G or whatever another place is like for example a school building students love texting but what's the point of it hitting a cell tower if the person I'm texting is sitting right next to me there's no point in wasting data on that when I can just connect to them directly and send messages peer-to-peer or in remote villages in the middle of nowhere where there is no cell connection but there's electronic devices it can be used there's another interesting research facet there which is called van nets or vehicle ad hoc networks when the late alright networks which are interesting where like if a car goes into these areas it could collect messages and then broadcast it once it hits a cell tower later on which is like email kind of like mail but still electronic so the goal of this is kind of to be a really simple library that any app can integrate into their application and the beauty of it is if my app integrates it in your app integrates it they don't need to know about each other but will relay each other's messages so for example if I have whatsapp and whatsapp integrates this and someone else uses a telegram and telegram integrates this in an ideal world where there's no adversary what will happen is my message will be propagated by any other node in the network so that the reach is pretty far as long as people are using this protocol how it works is essentially every phone or every device that runs ultra light beam is a node that has a series of services in a series of transports services are things like for example whatsapp would have its own Watts up service or what we've built now is like a aetherium service so you can get send aetherium transactions over this and then transports are things for example like bluetooth would be a transport or Wi-Fi direct or ham radios or whatever and then there's like a delegate where messages are forwarded to if they were not routed successfully through the services so yeah the transports we have integrated now our Bluetooth ble the next thing we're working on is Wi-Fi direct which has been a little bit of an effort because that is only actually supported on Android and it's supported kind of obscurely and then one of our friends who's like a hobbyist radio dude is also working on a radio transport so we could send messages a lot further this is just a code example because I took the presentation from our workshop at Def Con where we were teaching people how to implement their own transports ideally or as you can see here everything is pretty simple the only thing that a developer is essentially exposed to as a send and a listen function where send they send some arbitrary message to some address and the listen function just receives messages that have been sent to that specific device the nice thing is as well devices can send and listen to multiple transports at the same time so if I'm paired with someone over Bluetooth and they're appeared with someone over Wi-Fi direct and I'm trying to send it to that person who the middleman is paired with the message would hop through the central person who understands the transport that I'm using and then forwarded to that other transport yeah as said currently we're supporting ble for a short distance communication that works for computers and mobile phones so we've done like examples of multiple Macs and iPhones and Android phones connecting and forwarding and broadcasting messages to each other near future is Wi-Fi direct as lot as well as like the ham radio stuff that I was talking about services as that are those advertised capabilities of a note and a man net here we have some examples which is like an ethereal RPC chat messaging or like if there was a generic state channel interface that works over the entire ham radio so you can send through or sent those through the network this is mostly relevant to the relayer which is a special kind of node so that it knows how to handle you be messages relays are the ones who would then like for example if it wasn't a theorem transaction broadcast it to the etherium network those are like the usually like a laptop that can receive a lot more messages and is connected to some internet endpoint or whatever yeah I said the relayer generally lives on the edge of the man net so it like is within the man net and then has access to like internet or whatever so that can broadcast the message is further what's interesting with this is multiple magnets could be connected by use having these edges that then send the message over the Internet to another edge that then propagates it within their own network yeah so bluetooth is what we currently support Wi-Fi direct is what we're working on next there's a github ultra light beam the current implementations that we have are Swift and there's a : one in the process we were also looking at writing a go one but the Bluetooth support there is kind of crappy and every operating system has their own Bluetooth drivers and bluetooth api's so it's suboptimal to do something that's not that device specific for Bluetooth are there any questions maybe a little bit about how the messages would be encrypted in this network and another one is there any limitation on like normal Wi-Fi in in mobile in terms of how how much of a network you can create well so the first question was encryption that's the messages are just arbitrary binary data so you can have a handshake before where you agree on signing key and then encrypt the messages end-to-end we are not doing that per default yet but what we're working on is implementing a lip p2p style handshake so that we can do that and then for the limitation of how many devices Bluetooth devices or ble devices can central's can connect to eight other devices at a time and their distance I think is something like 80 meters uninterrupted so that's with Bluetooth Wi-Fi direct I think has a cap of 16 devices on Android and the distance there is a lot further I'm not entirely sure the main problem which you have is the packet size because ble for example limits the packet size but what the Apple implementation does which is used by iPhones and Mac's is it already pages those messages into multiple pages so that you have Windows which are then automatically regrouped again on receiving but I don't think the Android version works the same way so we also need upbringing compatibility so that pagination works the exact same way I am I wonder how do we do the initial pairing of two devices via Bluetooth Low Energy given that Google doesn't allow getting the own Bluetooth MAC address anymore we don't rely on MAC addresses because those on Bluetooth are invalid anyways MAC addresses on Bluetooth are generated every time the device is discovered so you need some static peer ID and then you advertise yourself as oh I am this peer you can find me through this information in Bluetooth and I'll prove to you that I'm that peer by signing a message beforehand so what is the routing like because it's so with with MANET routing there's like three specific algorithms I forgot like the exact description of all three that we're doing a ton of research on it so what you can either do is just burst essentially which is what we're doing now we just broadcast to the entire network then what some other algorithms do is when I receive a message I check my peers and they give me or they always in short windows tell me who their peers is so I always know where it's gonna go after the next hop and you can start like building more accurate algorithms like that but the routing one is one of the big questions and man that's on how to solve that yeah the same kind of thing could have been made like 10 years ago like had the technology we had yeah the use cases any why that hasn't really been the thing that you know no there so there's been examples there was fire chat which was used during the umbrella protests in Hong Kong and that was shut down because the guy who developed at work or lives in China and at one point there was a knock on his door which told him to stop working on that application and so he also stopped working on that and then there's Bridget Phi but Bridget Phi is an open source and it only works over Bluetooth so the goal of this one is to be open source work on multiple transports and have multiple implementations so there's already been these like rough experiments but I think I think the main problem is the technological challenge or we've had this stuff for it but there's always been like certain challenges like with Bluetooth this implementation bluetooth was never low-energy enough for it to be useful Wi-Fi direct hasn't been stable up until now you still don't have Wi-Fi direct support in iOS devices natively and so like everything or all the things have been there but to be able to put it all together that's only like kind of come now and then of course the routing problem is huge but there's like a ton of interesting research coming towards that now and I think there's way more interest in that now because we've seen like after the Arab Spring and things which are happening now there's more use case for that thank you all right thank you much [Applause]
