Jonas Platte
cd77441d1b
Upgrade ruma to 0.1.0 (crates.io release)
2021-05-17 02:57:36 +02:00
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
poljar
e15f7264dc
crypto: Don't borrow inside a format unnecessarily
...
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
2021-04-20 12:27:56 +02:00
Damir Jelić
78b7dcac61
crypto: Add a public method to request and re-request keys.
2021-04-19 15:00:21 +02:00
Damir Jelić
8c007510cd
crypto: Only load the outgoing key requests when we want to send them out
2021-04-15 19:40:24 +02:00
Damir Jelić
f9d290746c
crypto: Load unsent outgoing key requests when we open a store
2021-04-15 17:48:37 +02:00
Damir Jelić
02331fa325
crypto: Add specialized methods to store outgoing key requests
2021-04-15 13:28:50 +02:00
Damir Jelić
fdb1e3482e
Merge branch 'bump-ruma'
2021-04-06 12:44:33 +02:00
Kévin Commaille
7c34ac4e82
Bump ruma to 2f1b9f097930bf7908ca539f2ab7bb0ccf5d8b25
...
Use MxcUri instead of String for media URLs.
Fix wrong MXC URIs in tests.
Remove method parse_mxc no longer useful.
Apply new non-exhaustive types: CrossSigningKey, OneTimeKey and SignedKey.
Apply endpoint name change: send_state_event_for_key to send_state_event
2021-04-05 19:49:55 +02:00
Jonas Platte
79eb07f717
Allow Result aliases to be used with two type parameters
2021-04-01 19:35:09 +02:00
Damir Jelić
7465574bdc
crypto: Fix a clippy warning
2021-03-11 20:06:51 +01: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ć
daf313e358
crypto: Go through the user device keys in parallel
2021-03-10 14:08:45 +01:00
Damir Jelić
7729e2b11f
matrix-sdk: Add some custom debug implementations
...
This should avoid polluting the logs with sled trees and a lot of
redundant info in a device if a device or store ends up in the
structured logs.
2021-03-02 16:22:38 +01:00
Damir Jelić
e6f6665fa0
Merge branch 'master' into history-visiblity-session-share
2021-03-01 20:47:31 +01:00
Damir Jelić
544881f11c
crypto: Fix a clippy warning
2021-02-16 10:52:19 +01:00
Damir Jelić
ef5d7ca579
crypto: Add missing flush calls to the sled crypto store
2021-02-16 10:29:10 +01:00
Damir Jelić
1799721a5f
crypto: Store the history visibility with inbound group sessions
...
This can be useful to share the room history with new room members.
2021-02-03 16:59:34 +01:00
Damir Jelić
bf4f32eccf
crypto: Remove the sqlite store for now
2021-01-27 15:29:42 +01:00
Damir Jelić
bc3ba3fab0
crypto: Add tests for the sled cryptostore
2021-01-27 15:19:32 +01:00
Damir Jelić
d6c5a4d8aa
crypto: Add a missing encode call in the sled store
2021-01-27 15:15:45 +01:00
Damir Jelić
71a087c379
crypto: Encode our keys in the sled cryptostore as well
2021-01-26 14:22:03 +01:00
Damir Jelić
6cb2c8b468
crypto: Store and restore outbound group sessions
2021-01-25 17:14:13 +01:00
Damir Jelić
c034de470b
base: Allow using the same sled database for the state and cryptostore
2021-01-22 11:33:06 +01:00
Damir Jelić
4a06c9e82d
base: Initial support for an encrypted sled store.
2021-01-20 15:57:23 +01:00
Damir Jelić
06a973a1b8
crypto: Don't use the full PBKDF rounds when testing
2021-01-20 14:10:57 +01:00
Damir Jelić
4f4ba831c1
crypto: Bump the PBKDF rounds for the pickle key derivation
2021-01-19 12:05:30 +01:00
Damir Jelić
b8fcc003ea
base: Finish up the error handling for the new stores
2021-01-19 12:03:46 +01:00
Damir Jelić
1746690eda
crypto: Add a sled cryptostore
2021-01-18 13:38:00 +01:00
Damir Jelić
b311a31c9e
matrix-sdk: Bump our tokio and reqwest versions.
2021-01-05 21:39:52 +01:00
Damir Jelić
4c6c1d2107
matrix-sdk: Get rid of the common macros crate
...
This crate was used to support different trait bounds on WASM vs other
targets, since we only define async traits in a couple of places having
a whole crate to support this feels a bit excessive.
This patch defines a target specific super trait instead, this lowers
the compile time a couple of seconds.
2021-01-04 16:34:14 +01:00
Damir Jelić
d84a852ae9
matrix-sdk: Bump ruma to a released version.
2021-01-04 14:06:07 +01:00
Damir Jelić
e20b1efae9
crypto: Store private identities and accounts with the Changes struct as well.
2020-12-01 17:14:32 +01:00
Damir Jelić
270350cd34
crypto: Save the olm message hash.
2020-12-01 14:38:03 +01:00
Damir Jelić
08babb6d6c
crypto: Document the new cross signing methods in the store.
2020-12-01 10:54:41 +01:00
Damir Jelić
7ec5a5ad1a
Merge branch 'master' into crypto-improvements
2020-11-26 13:24:57 +01:00
Jonas Platte
0422bae924
Fix clippy lint rc_buffer
2020-11-25 19:01:28 +01:00
Damir Jelić
44cc1cef71
crypto: Let devices hold on to the private identity.
2020-10-30 11:41:48 +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ć
7de002b128
crypto: Fix some lint issues.
2020-10-22 16:40:05 +02:00
Damir Jelić
f60dc7ed78
crypto: Allow cross signing identities to be stored/restored.
2020-10-22 16:25:25 +02:00
Damir Jelić
78d7f6c10b
crypto: Fix a clippy issue.
2020-10-21 17:05:36 +02:00
Damir Jelić
fa25ca4475
crypto: Make the pickle key encryption future proof.
2020-10-21 16:52:40 +02:00
Damir Jelić
ac0df5dea9
crypto: Properly handle errors in the pickle key decryption.
2020-10-21 15:28:43 +02:00
Damir Jelić
d175c47a05
crypto: Use a random pickle key in the sqlite store.
2020-10-21 15:13:21 +02:00
Damir Jelić
959e8450af
crypto: Use a transaction to create sqlite tables.
2020-10-21 14:01:27 +02:00
Damir Jelić
dd0642cd59
crypto: Add a pickle key struct.
2020-10-21 13:21:22 +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ć
425a07d670
crypto: Don't load all the devices in the sqlite store.
2020-10-16 16:57:26 +02:00