Commit Graph

14 Commits (2ef0c2959cd9b9d2103c88a0111cadb1c15a2f3c)

Author SHA1 Message Date
Devin Ragotzy 2ef0c2959c Add use_small_heuristics option and run fmt 2021-05-12 15:37:29 -04:00
Devin Ragotzy c85f4d4f0c Add rustfmt config file and run over workspace 2021-05-12 15:36:52 -04:00
Damir Jelić d4c56cc5b3 crypto: Refactor the outobund group session storing
This introduces a group session cache struct that can be shared between
components that need to access the currently active group session.
2021-04-15 15:19:21 +02:00
Damir Jelić 593b5e55cb crypto: Don't load the account every time we load sessions in the sled store
This removes a massive performance issue since getting sessions is part
of every message send cycle.

Namely every time we check that all our devices inside a certain room
have established 1 to 1 Olm sessions we load the account from the store.

This means we go through an account unpickling phase which contains AES
decryption every time we load sessions.

Cache instead the account info that we're going to attach to sessions
when we initially save or load the account.
2021-03-11 19:49:32 +01:00
Damir Jelić c5241af675 crypto: Expose the crypto store error pulicly 2021-03-04 17:46:18 +01:00
Damir Jelić de4df4e50a base: Re-introduce a state store trait. 2021-01-21 12:08:16 +01:00
Damir Jelić 4ab6ae7f30 crypto: Fix an os_target definition. 2020-12-08 13:15:19 +01:00
Damir Jelić c8dd6bfd26 crypto: Scope the imports for the unwedging test into the test. 2020-12-08 12:56:16 +01:00
Damir Jelić b982d36303 crypto: Run the time sensitive tests only on linux. 2020-12-08 12:34:59 +01:00
Damir Jelić 7ec5a5ad1a Merge branch 'master' into crypto-improvements 2020-11-26 13:24:57 +01:00
Damir Jelić 34bec59389 crypto: Hold on to the private identity in the store. 2020-10-30 11:34:55 +01:00
Damir Jelić 5fd004bae5 crypto: Connect the private identity to the verification machine. 2020-10-23 11:17:13 +02:00
Damir Jelić 7cab7cadc9 crypto: Rework the cryptostore.
This modifies the cryptostore and storage logic in two ways:
    * The cryptostore trait has only one main save method.
    * The receive_sync method tries to save all the objects in one
    `save_changes()` call.

This means that all the changes a sync makes get commited to the store
in one transaction, leaving us in a consistent state.

This also means that we can pass the Changes struct the receive sync
method collects to our caller if the caller wishes to store the room
state and crypto state changes in a single transaction.
2020-10-20 17:19:37 +02:00
Damir Jelić e7a24d5e68 crypto: Move the session managers under a common module. 2020-10-16 11:09:55 +02:00