A no-network-IO implementation of a state machine that handles E2EE for Matrix clients.
Usage
If you're just trying to write a Matrix client or bot in Rust, you're probably looking for matrix-sdk instead.
However, if you're looking to add E2EE to an existing Matrix client or library, read on.
The state machine works in a push/pull manner:
- you push state changes and events retrieved from a Matrix homeserver /sync response into the state machine
- you pull requests that you'll need to send back to the homeserver out of the state machine
use BTreeMap;
use ;
use ;
async
Room key sharing algorithm
The decision tree below visualizes the way this crate decides whether a room key will be shared with a requester upon a key request.
Crate Feature Flags
The following crate feature flags are available:
-
qrcode
: Enbles QRcode generation and reading code -
testing
: provides facilities and functions for tests, in particular for integration testing store implementations. ATTENTION: do not ever use outside of tests, we do not provide any stability warantees on these, these are merely helpers. If you find you need any function provided here outside of tests, please open a Github Issue and inform us about your use case for us to consider.