ananace / ruby-matrix-sdk

Ruby SDK for the Matrix communication protocol
MIT License
82 stars 9 forks source link

Support for end-to-end encryption / olm library integration? #30

Open tylerjl opened 2 years ago

tylerjl commented 2 years ago

Hi! Thanks for this project, it's very useful.

Do you have any interest in using this Ruby olm library in order to implement e2e encryption? As it currently stands, I'm able to use this library pretty well, although the client shows up as unencrypted within encrypted rooms. The olm library is pretty old but seems to be explicitly focused on supporting Matrix's use of the algorithm.

ananace commented 2 years ago

I chatted with some people about maybe getting an up-to-date olm gem built for the crypto purposes, but that seems to not really have gone anywhere.

I've since started looking at maybe hacking together Ruby bindings for matrix-sdk-crypto, since that seems to be a modern and reasonable point to hook into for E2EE. They have FFI bindings as well, so a prototype using the ffi gem could definitely be done.

tylerjl commented 2 years ago

Ah, that seems like a better/more-maintained solution. I haven't done any Ruby/Rust FFI before but I can certainly pitch in with testing and/or light Ruby stuff. I assume there's some useful prior art to help implement the protocol in the current Python libraries.

14mRh4X0r commented 2 years ago

I had started working on FFI bindings to libolm, but real life caught up, and progress has been mostly non-existent since then. The actual FFI declarations are automatically generated through a modified ffi_gen, but it's still missing a user-friendly API for the most part.

pgiblock commented 1 year ago

Thanks for the project, it seemed quite useful until I hit this, and all of our rooms are E2E encrypted. Are there any possible workarounds at the moment?

ananace commented 1 year ago

Unfortunately none that I can think of, I haven't personally had the time to dig deeper into matrix-sdk-crypto bindings - neither the magnus ones I started nor ffi.

14mRh4X0r commented 1 year ago

Are there any possible workarounds at the moment?

You could use pantalaimon to handle the E2EE part

hostingnuggets commented 7 months ago

Hi @tylerjl and @ananace,

E2E encryption in this matrix Ruby SDK would be very useful indeed. Is there any status update on its progress?