-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use of deprecated libolm for public-key encryption of POST bodies #64
Comments
Turns out the rust SDK has an implementation of the same functionality: https://github.com/matrix-org/matrix-rust-sdk/blob/ca09917d8452769a9b48db394c950ff3ee906ae7/crates/matrix-sdk-crypto/src/backups/keys/compat.rs |
If we expose this in the FFI layer of |
I think that's the easiest way forward since it also open the gate to using the FFI layer with new AND old app, and also remove libolm altogether from there. I have a WIP for adding it to the FFI layer, I am now trying to generate a wheel with |
But the Perhaps matrix-org/vodozemac#171 and https://github.com/matrix-nio/vodozemac-python would be the better path forward. |
Oh great I didn't know there were some work to bring |
@poljar are the Python bindings supposed to be working ? After doing a |
Well there are Python tests that are run as part of the CI, so they should™ work. |
So it turns out that a .so can be a self describing Python module, and doesn't need a matching Thanks, it indeed works. |
I just pushed matrix-nio/vodozemac-python#4. |
I have PR #65 up which entirely removes libolm by using the rust sdks directly. |
libolm is no longer a dependency as of v1.1.0 🎉 |
libolm has been deprecated and the content scanner uses it through python-olm.
We're not aware of any active security problem with using it, but it seems wise to think about this.
The content scanner only uses it for decrypting the bodies of POST requests, using a public-key encryption scheme, in order to prevent snooping by the server performing TLS termination or any node between that one and the content scanner itself.
The code in question is here as below:
matrix-content-scanner-python/src/matrix_content_scanner/crypto.py
Lines 89 to 117 in da1783c
Vodozemac does not implement the equivalent Olm
PkEncryption
functionality. (It also sounds like it is unlikely it ever will be implemented as-is, because something is off about the MAC calculation in Olm's current specification — N.B. this MAC issue is no problem for the content scanner)As far as I know, Element X does not implement support for the content scanner currently. Presumably the lack of implementations of Olm
PkEncryption
will pose an equivalent problem for them when it's time to implement support.My suspicion is that this functionality only uses Olm because the clients already had libolm available as a prerequisite for being a E2EE-supporting Matrix client and so it was somewhat convenient to just use what was already available.
Potential solutions:
PkEncryption
anyway, so there would be no benefit in sticking with the old over something more standard if it existedThe text was updated successfully, but these errors were encountered: