Skip to content

Instantly share code, notes, and snippets.

@Zil0
Last active January 16, 2019 09:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Zil0/25c54d8380a300bc1dfb8f7e6b03de5f to your computer and use it in GitHub Desktop.
Save Zil0/25c54d8380a300bc1dfb8f7e6b03de5f to your computer and use it in GitHub Desktop.
GSoC submission

The goal of my project was to implement Matrix's end-to-end encryption protocol in Python, as part of matrix-python-sdk.

Code location

My work is spread across 31 PRs, which can be found here.
Those in direct relation to the project are tagged [E2E], while the others are general improvements to the SDK.
At the time of writing, 5 [E2E] PRs are merged among 16. The last PR is matrix-org/matrix-python-sdk#271.

Some of the main PRs are:

In order to test the implementation under real conditions, I also wrote a small bot https://github.com/Zil0/matrix-list-bot.

I also contributed to documentation. Those PRs can be found here, and another one is here.

Project state

The project is finished, although a significant part is still awaiting review.

Some stats

Among the 5687 new lines I added to the project as reported by Git, 985 are already merged.

Out of those lines, 1803 are tests. All the code I wrote, located in a new crypto/ subdirectory of the main module matrix_client, reports 100% branch coverage.

Further work

I will address PR review comments. Generally, I will try to help maintain the SDK, since I became the main contributor.

Lastly, end-to-end encryption in a decentralized protocol leads to many tricky edge cases. I may have missed some of those, and they are likely to be found when more people try out the code.

Using the code

It is already possible to try out the code, which I have already successfully tested in production. Instructions can be found in the issue requesting end-to-end encryption support matrix-org/matrix-python-sdk#100.

More about the project

I have written a blogpost summarizing my experience, available on Matrix offictial blog https://matrix.org/blog/2018/08/01/gsoc-implementing-end-to-end-encryption-in-the-matrix-python-sdk/.

Acknowledgements

Thanks to my mentors Richard van der Hoff (richvdh) and Hubert Chathi (uhoreg) for their help (and allowing me to work on this in the first place!). And a special thanks to Adam Beckmeyer (non-Jedi) for reviewing my PRs in his free time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment