Commit Graph

75 Commits (0bd438e61785ee8a64289cb443327e9ee6e738f1)

Author SHA1 Message Date
Damir Jelić 4432be48e0 crypto: Fix a broken doc link 2021-07-26 11:47:53 +02:00
Damir Jelić 5566886f20 crypto: Add public methods to request verifications with devices 2021-07-19 10:26:39 +02:00
Damir Jelić 909cd42ac1 crypto: Cancel the verification request for to-device Sas verifications 2021-07-19 09:32:48 +02:00
Damir Jelić ead91a1e6b crypto: Send cancellations if the other device picks up over to-device 2021-07-12 18:12:02 +02:00
Damir Jelić c5df7c5356 crypto: Add methods to request verification from users 2021-07-08 12:30:30 +02:00
Damir Jelić c78406ceb9 crypto: Clean up the method to check if a device is verified. 2021-06-29 12:56:28 +02:00
Jonas Platte 4d5768111d
Simplify ruma identifier imports 2021-06-23 16:12:23 +02:00
Jonas Platte 43e213fd67 matrix-sdk: Update ruma
Co-authored-by: Damir Jelić <poljar@termina.org.uk>
2021-06-21 15:45:33 +02:00
Damir Jelić 00c3921d2a crypto: Add initial support for QR code verification 2021-06-17 11:04:17 +02:00
Jonas Platte 74d0ac7c77
crypto: Depend on ruma directly
… instead of using matrix_sdk_common's re-exports
2021-06-07 18:55:56 +02:00
Jonas Platte 3bac536daf
Fix clippy lints
Automated via `cargo clippy --workspace --all-targets -Zunstable-options --fix`.
2021-06-07 15:51:18 +02:00
Damir Jelić 6f11244017 Merge branch 'typos' 2021-06-06 21:01:30 +02:00
Jonas Platte 6b685b671d
Replace Arc<Box<dyn (Crypto|State)Store>> by Arc<dyn (Crypto|State)Store> 2021-06-06 18:16:25 +02:00
Jonas Platte eed2b37885
Replace Arc<Box<DeviceId>> by Arc<DeviceId> 2021-06-06 18:15:18 +02:00
Jonathan de Jong 74a6d39b9f various typos 2021-06-05 14:35:20 +02:00
Devin Ragotzy 5f09d091cb Add cargo fmt to ci using nightly 2021-05-12 15:38:59 -04: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
Damir Jelić 324a0aafca Merge branch 'key-share-improvements' 2021-04-21 13:47:02 +02:00
Damir Jelić 4a7be13961 crypto: Only send out automatic key requests if we have a verified device
Sending out automatic key requests is a bit spammy for new logins,
they'll likely have many undecryptable events upon an initial sync.

It's unlikely that anyone will respond to such a key request since keys are
shared only with verified devices between devices of the same user or if
the key owner knows that the device should have received the key.

Upon initial sync it's unlikely that we have been verified and the key
owner likely did not intend to send us the key since we just created the
new device.
2021-04-20 11:47:11 +02:00
Johannes Becker 3414a59b91 chore: bump ruma 2021-04-16 12:45:21 +02:00
Damir Jelić 02b44ca9ba matrix-sdk: Fix or silence a bunch of new clippy warnings 2021-03-30 13:05:13 +02:00
Damir Jelić bbe812f1d9 common: Add a executor abstraction so we can spawn tasks under WASM 2021-03-23 10:18:55 +01:00
Damir Jelić daf313e358 crypto: Go through the user device keys in parallel 2021-03-10 14:08:45 +01:00
Damir Jelić 570bd2e358 crypto: Move the tracked users marking out of the device key handling method 2021-03-10 12:20:03 +01:00
Damir Jelić c8d4cd0a5b crypto: Calculate the device changes for a given user in parallel 2021-03-10 12:05:21 +01:00
Damir Jelić 0c5d13cb91 crypto: Remove some stale TODO comments 2021-03-10 10:03:54 +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ć 6e168051b6 crypto: Chunk out key query requests. 2021-02-26 16:48:42 +01:00
Damir Jelić 10da61c567 crypto: Answer key reshare requests only at the originally shared message index 2021-01-28 14:07:51 +01:00
Damir Jelić 077050efb4 crypto: Add a hack so e2ee support works under WASM again 2021-01-22 18:40:08 +01:00
Damir Jelić 436530e874 crypto: Fix a couple clippy warnings 2021-01-18 13:50:59 +01:00
Damir Jelić 5418c88775 crypto: Add some more serialize/deserialize implementations 2021-01-18 13:21:30 +01:00
Damir Jelić 14575892bd crypto: Implement serialize/deserialize for devices. 2021-01-18 13:19:13 +01:00
Damir Jelić bab8fde0ac crypto: Change the way we share group sessions
This patch removes the need to ask if a group session needs to be shared
it also adapts the method so it re-shares sessions if new users or
devices join the group.
2021-01-15 18:04:45 +01:00
Damir Jelić 48f43a4af1 crypto: Remove some unused imports. 2020-12-17 16:28:12 +01:00
Damir Jelić b6e28e2280 crypto: WIP more work on in-room verifications now up to accepting them. 2020-12-15 16:35:54 +01:00
Damir Jelić b0ac9d3320 crypto: WIP change the types of the sas sturcts to allow in-room verifications. 2020-12-10 17:49:28 +01:00
Damir Jelić 0e66640b9f crypto: Log both user id versions when the device keys mismatch. 2020-12-05 14:59:40 +01:00
Damir Jelić 9eb17e757c matrix-sdk: Update ruma. 2020-12-05 14:59:40 +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ć b27f1b0e34 crypto: Fix some clippy warnings. 2020-10-30 14:38:29 +01:00
Damir Jelić b67cd4ddd2 crypto: Create a trusted public cross signing identity when we create a private one. 2020-10-30 13:21:14 +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ć 2077ea0ddf crypto: Split out the device_key signing method. 2020-10-27 13:48:51 +01:00
Damir Jelić e757d605f5 crypto: Allow users to be signed as well. 2020-10-27 13:29:19 +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