Commit graph

252 commits

Author SHA1 Message Date
Damir Jelić
da82fbab4f crypto: Connect the responding to secret request logic 2021-08-13 18:28:52 +02:00
Damir Jelić
ee838087ca crypto: Add methods to export/import cross signing keys 2021-08-13 18:28:52 +02:00
Damir Jelić
b540b8df62 crypto: Add a method to check the state of our private cross signing keys 2021-08-13 18:28:52 +02:00
Damir Jelić
0598bdebc7 crypto: Store our own device we receive from the server 2021-08-13 18:28:52 +02:00
Damir Jelić
2cf6ad21d3 crypto: Refactor and split out the gossiping logic 2021-08-13 18:28:52 +02:00
Damir Jelić
68df9b6ed2 crypto: Allow secrets to be requested and imported 2021-08-13 18:28:52 +02:00
Damir Jelić
3726492cf9 crypto: Improve some log lines 2021-08-13 18:28:52 +02:00
Jonas Platte
578ddd2698
Upgrade to ruma 0.3.0 2021-08-12 10:41:20 +02:00
Damir Jelić
46f9c292ab crypto: Streamline how we update one-time key counts
There is no reason to use different logic when updating one-time key
counts coming from an upload response vs when coming from a sync
response.

Switch to an AtomicU64 for the count as well, the i64 is probably a
remnant of the SQLite based crypto store.
2021-07-22 16:06:10 +02:00
Damir Jelić
c5df7c5356 crypto: Add methods to request verification from users 2021-07-08 12:30:30 +02:00
Damir Jelić
113587247e crypto: Notify our users that a verification timed out on our end 2021-06-29 12:56:28 +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ć
34703bc0d6 crypto: Add a method to get all verification requests of a certain user 2021-06-17 11:04:18 +02:00
Damir Jelić
5d38bc3802 crypto: Scope the verification requests behind the other user id 2021-06-17 11:04:18 +02:00
Damir Jelić
00c3921d2a crypto: Add initial support for QR code verification 2021-06-17 11:04:17 +02:00
Damir Jelić
ada71586ac crypto: Scope the verifications per sender 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
Damir Jelić
1e48b15040 crypto: Add enums so we can handle in-room and to-device verifications the same 2021-06-04 15:16:38 +02:00
Damir Jelić
110b8eb8dd Merge branch 'master' into sas-longer-flow 2021-05-18 09:07:50 +02:00
Jonas Platte
15540e84e3
Upgrade ruma 2021-05-15 17:22:32 +02:00
Damir Jelić
3f57a2a9f2 Merge branch 'master' into sas-longer-flow 2021-05-13 11:26:40 +02:00
Damir Jelić
09a7858702 crypto: Initial support for the longer to-device verification flow 2021-05-13 11:15:56 +02:00
Damir Jelić
ec55258be9 crypto: Handle decrypted to-device events as well
Usually only room keys and forwarded room keys are sent as encrypted
to-device events, those are specially handled to avoid accepting room
keys coming in unencrypted.

Some clients might send out other events encrypted which might lower
metadata leakage and the spec doesn't disallow it.

This patch handles decrypted events the same way as non-encrypted ones,
we're still special casing the decryption handling to avoid decryption
loops/bombs (i.e. events that are encrypted multiple times).
2021-05-13 11:08:13 +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
Damir Jelić
77c2a4ed4f matrix-sdk: Bump ruma 2021-05-12 19:19:42 +02:00
Kévin Commaille
b8017b1fb0
bump ruma to 24154195a00390a33542603b968e94022487587c 2021-05-07 13:22:32 +02:00
poljar
6048a1a507
crypto: Fix a typo
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
2021-04-29 15:34:53 +02:00
Damir Jelić
cff90b1480 matrix-sdk: Add encryption info to our sync events. 2021-04-29 10:35:54 +02:00
Damir Jelić
324a0aafca Merge branch 'key-share-improvements' 2021-04-21 13:47:02 +02:00
Damir Jelić
78b7dcac61 crypto: Add a public method to request and re-request keys. 2021-04-19 15:00:21 +02:00
Johannes Becker
3414a59b91 chore: bump ruma 2021-04-16 12:45: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ć
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ć
02331fa325 crypto: Add specialized methods to store outgoing key requests 2021-04-15 13:28:50 +02:00
Damir Jelić
5132971558 crypto: Add a progress listener for key imports 2021-04-13 12:47:22 +02:00
Damir Jelić
b4b897dd51 crypto: Await the group session invalidation 2021-04-12 15:19:30 +02:00
Damir Jelić
cb58c499b3 crypto: Store that our outbound session was invalidated 2021-04-12 13:47:38 +02:00
Damir Jelić
61167fab15 crypto: Make restored outbound sessions wait for requests if they have some 2021-03-05 17:12:32 +01:00
Damir Jelić
c5241af675 crypto: Expose the crypto store error pulicly 2021-03-04 17:46:18 +01:00
Damir Jelić
e6f6665fa0 Merge branch 'master' into history-visiblity-session-share 2021-03-01 20:47:31 +01:00
Damir Jelić
1f5cad136e matrix-sdk: Bump Ruma 2021-03-01 19:20:07 +01:00