Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

feat: ✨ e2ee support (old) #79

Closed
wants to merge 10 commits into from
Closed

Conversation

HarHarLinks
Copy link
Contributor

@HarHarLinks HarHarLinks commented Nov 17, 2021

first step to #76

thanks to and kindly asking for review from @anoadragon453

Also this is my first time productively using poetry, so please tell me what I still need to learn.

todo:

  • warn when message can't be decrypted
    • ignore messages older than joining
    • notify + log when the crypto session broke incl hint to reset acces_token and crypto store: compare access_token -> session ID -> crypto db
  • prefer (loaded) access_token over password login, to keep session. necessary since session must correspond to e2e session
  • settings to handle unverified devices
    • do/not encrypt to unverified
      • list of users to automatically verify
    • do/not listen to unverified?
    • by mxid (regex?)
    • verification support: should be as easy as the user adding a predefined callback for verification events
      • emoji as mentioned in #76
      • manually by comparing text hashes
  • expose some config options to user/config file
  • add simplematrixbotlib[e2e] extra which pulls in matrix-nio[e2e]
  • add tests where possible
  • update docs with the above and
    • install libolm (as per nio docs!) and simplematrixbotlib[e2e] to enable e2e support
    • mention on main readme + doc page that e2e is supported

Copy link

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The functionality of the code looks fine. Note that you will have to document that users need to install libolm>=3.0.0 as a native dependency in order for matrix-nio[e2e] to build correctly.

https://github.com/anoadragon453/nio-template/blob/master/SETUP.md has some documentation in this area.

@ghost ghost marked this pull request as ready for review November 17, 2021 22:59
krazykirby99999 and others added 2 commits November 17, 2021 18:26
this way sessions are reused if possible.
it is especially necessary to keep e2e sessions.
it can be imported from callbacks.py and added to callbacks manually if
user wants to enable it:

```python
async def verify(event):
    await emoji_verification(bot.async_client, event)

bot.async_client.add_to_device_callback(verify, KeyVerificationEvent)
```
@HarHarLinks HarHarLinks changed the title add basic e2ee support feature: ✨ e2ee support Dec 1, 2021
@HarHarLinks HarHarLinks changed the title feature: ✨ e2ee support feat: ✨ e2ee support Dec 1, 2021
@ghost ghost force-pushed the master branch 2 times, most recently from a711bef to e95148d Compare December 29, 2021 17:51
@anoadragon453
Copy link

(is this blocked on me currently?)

@HarHarLinks
Copy link
Contributor Author

HarHarLinks commented Jan 19, 2022

(no, this is blocked on my free time vs the todos in the OP ☹️ though I'm happy to accept contributions)

@HarHarLinks HarHarLinks mentioned this pull request Jul 27, 2022
28 tasks
@HarHarLinks HarHarLinks marked this pull request as draft July 30, 2022 13:45
@HarHarLinks HarHarLinks changed the title feat: ✨ e2ee support feat: ✨ e2ee support (old) Jul 30, 2022
@imbev imbev closed this Aug 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants