ruby-matrix-sdk icon indicating copy to clipboard operation
ruby-matrix-sdk copied to clipboard

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

Open tylerjl opened this issue 3 years ago • 7 comments

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.

tylerjl avatar Jul 16 '22 07:07 tylerjl

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.

ananace avatar Jul 16 '22 10:07 ananace

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.

tylerjl avatar Jul 20 '22 16:07 tylerjl

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.

14mRh4X0r avatar Aug 08 '22 14:08 14mRh4X0r

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?

pgiblock avatar Nov 02 '23 19:11 pgiblock

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.

ananace avatar Nov 03 '23 06:11 ananace

Are there any possible workarounds at the moment?

You could use pantalaimon to handle the E2EE part

14mRh4X0r avatar Nov 03 '23 15:11 14mRh4X0r

Hi @tylerjl and @ananace,

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

hostingnuggets avatar Mar 16 '24 09:03 hostingnuggets