experimenting with matrix federation over yggdrasil
play

Experimenting with Matrix federation over Yggdrasil Bachelor - PowerPoint PPT Presentation

Experimenting with Matrix federation over Yggdrasil Bachelor Semester Project Timothe Floure Responsible / Prof. Bryan Ford Supervisor / Cristina Basescu EPFL / DEDIS 2020-01-13 Timothe Floure (EPFL / DEDIS) Matrix over Yggdrasil


  1. Experimenting with Matrix federation over Yggdrasil Bachelor Semester Project Timothée Floure Responsible / Prof. Bryan Ford Supervisor / Cristina Basescu EPFL / DEDIS 2020-01-13 Timothée Floure (EPFL / DEDIS) Matrix over Yggdrasil 2020-01-13 1 / 20

  2. Big Picture Matrix: modern, federated (instant) messaging system. Yggdrasil: experimental P2P overlay network, providing E2EE and compact routing (ish). Aim of this project: have matrix homeservers exchanging over the Yggdrasil network . Timothée Floure (EPFL / DEDIS) Matrix over Yggdrasil 2020-01-13 2 / 20

  3. Matrix + Yggdrasil Project discussed with Matthew Hodgson from Matrix.org. Neil Alexander from Yggdrasil was interested to support this project. Personal interest in Matrix and P2P systems. Timothée Floure (EPFL / DEDIS) Matrix over Yggdrasil 2020-01-13 3 / 20

  4. Matrix 1/2 Figure 1: Three Matrix homeservers, each with one client connected. Timothée Floure (EPFL / DEDIS) Matrix over Yggdrasil 2020-01-13 4 / 20

  5. Matrix 2/2 Modern feature: media support, message history, end-to-end encryption, VoIP bridging to other IM services. 1.0 milestone reached during the first half of 2019. Communications done over HTTP(S). A few rough edges, but active community and going in the right direction! Timothée Floure (EPFL / DEDIS) Matrix over Yggdrasil 2020-01-13 5 / 20

  6. Yggdrasil 1/3 Experimental P2P, end-to-end encrypted, self-arranging overlay network. Routing inspired from Robert Kleinberg’s Geographic Routing Using Hyperbolic Space . No automatic peering management or naming system. Timothée Floure (EPFL / DEDIS) Matrix over Yggdrasil 2020-01-13 6 / 20

  7. Yggdrasil 2/3 Can be embedded into applications using Go library (August 2019). Draft specification published (mid-fall 2019). Timothée Floure (EPFL / DEDIS) Matrix over Yggdrasil 2020-01-13 7 / 20

  8. Yggdrasil 3/3 Timothée Floure (EPFL / DEDIS) Figure 2: Representation of Yggdrasil’s spanning tree, 2020-01-05. Matrix over Yggdrasil 2020-01-13 8 / 20

  9. Matrix + Yggdrasil Integration with Matrix homeserver. Yggdrasil address resolution. HTTP over Yggdrasil. Practical Yggdrasil peering. Timothée Floure (EPFL / DEDIS) Matrix over Yggdrasil 2020-01-13 9 / 20

  10. How does it look? Timothée Floure (EPFL / DEDIS) Matrix over Yggdrasil 2020-01-13 10 / 20 Figure 3: Overview

  11. Integration with Matrix homeserver Initially wanted to use Dendrite, next-gen homeserver written in Go. Dendrite federation was not working properly yet. Switched to use Synapse, the reference (python) homeserver implementation. Direct integration was not possible anymore (no python Yggdrasil library). => HTTP-over-Yggdrasil-and-Back proxy Timothée Floure (EPFL / DEDIS) Matrix over Yggdrasil 2020-01-13 11 / 20

  12. Yggdrasil address resolution NodeID (sha512sum of encryption key). Falling back to standard DNS insfrastructure. Timothée Floure (EPFL / DEDIS) Matrix over Yggdrasil 2020-01-13 12 / 20

  13. HTTP over Yggdrasil Initially wanted to leverage Go’s net/http. Realized that Yggdrasil exposes connections more akin to UDP than TCP. CoAP ( CO nstrained A pplication P rotocol) as a translation layer. Timothée Floure (EPFL / DEDIS) Matrix over Yggdrasil 2020-01-13 13 / 20

  14. CoAP as a translation layer Defined over UDP by RFC7252. Build with low-bandwith, unreliable links in mind. REST-like! Previous low-bandwith experiment by matrix.org. go-ocf/go-coap library. Timothée Floure (EPFL / DEDIS) Matrix over Yggdrasil 2020-01-13 14 / 20

  15. Practical Yggdrasil peering No automatic peering update / bootstrapping. Peers discovered from actual traffic (DNS). Periodic routine updating peers based on latency/usage/stability. Work-in-progress. Timothée Floure (EPFL / DEDIS) Matrix over Yggdrasil 2020-01-13 15 / 20

  16. Output go-ocf/go-coap fork adding Yggdrasil support. matrix-org/synapse fork adding federation proxying + yggdrasil NodeID resolution. matrix-yggdrasil-http-proxy. Timothée Floure (EPFL / DEDIS) Matrix over Yggdrasil 2020-01-13 16 / 20

  17. It works!™ Figure 4: A working proof-of-concept Timothée Floure (EPFL / DEDIS) Matrix over Yggdrasil 2020-01-13 17 / 20

  18. Future work Compression! Peer selection. In-browser homeserver & Dendrite integration. Homeserver discovery and name resolution. Extended testing and real-world usage. => Will likely be discussed at FOSDEM. Timothée Floure (EPFL / DEDIS) Matrix over Yggdrasil 2020-01-13 18 / 20

  19. Thanks Cristina Basescu from DEDIS. Neil Alexander and Arceliar from Yggdrasil. Matthew Hodgson from the Matrix.org Foundation. Timothée Floure (EPFL / DEDIS) Matrix over Yggdrasil 2020-01-13 19 / 20

  20. Wrapping up: Matrix over Yggdrasil Matrix: federated IM system. Synapse reference (python) homeserver, Dendrite next-gen (Go) homeserver. Yggdrasil: E2EE, self-arranging P2P overlay network. Routing inspired from Robert Kleinberg’s work. CoAP: low-bandwith REST-like protocol defined over UDP. matrix-yggdrasil-http-proxy: HTTP to CoAP over Yggdrasil and back. Timothée Floure (EPFL / DEDIS) Matrix over Yggdrasil 2020-01-13 20 / 20

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend