Commit Graph

144 Commits (0bd438e61785ee8a64289cb443327e9ee6e738f1)

Author SHA1 Message Date
Damir Jelić 778867e3ef crypto: Test that edits get properly decrypted 2021-07-26 15:28:17 +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
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
Damir Jelić 5fa2b05622 matrix-sdk: Fix some more typos 2021-06-08 11:13:23 +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 eed2b37885
Replace Arc<Box<DeviceId>> by Arc<DeviceId> 2021-06-06 18:15:18 +02:00
Jonathan de Jong f76cb1d123 the the 2021-06-05 14:55:01 +02:00
Jonathan de Jong f36fb55727 some more typos 2021-06-05 14:50:08 +02:00
Jonathan de Jong 74a6d39b9f various typos 2021-06-05 14:35:20 +02:00
Jonas Platte 15540e84e3
Upgrade ruma 2021-05-15 17:22:32 +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
Kévin Commaille b8017b1fb0
bump ruma to 24154195a00390a33542603b968e94022487587c 2021-05-07 13:22:32 +02:00
Damir Jelić 43b7072609 matrix-sdk: Fix some newly introduced clippy warnings 2021-05-06 20:42:27 +02:00
Damir Jelić cff90b1480 matrix-sdk: Add encryption info to our sync events. 2021-04-29 10:35:54 +02:00
Damir Jelić 4713af6aac crypto: Fix a typo 2021-04-14 11:14:59 +02:00
Damir Jelić 893a5109ce crypto: Remove some unneeded parenthesis 2021-04-12 19:11:03 +02:00
Kévin Commaille dadd2fa68c
Bump ruma to e2728a70812412aade9322f6ad832731978a4240 2021-04-11 12:04:53 +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
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ć 93e5c34670 crypto: Add a bit more info to the room key sharing logic logging 2021-03-02 17:15:10 +01:00
Denis Kasak df8c489304 Fix typo: visiblity -> visibility 2021-03-02 12:20:09 +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
Damir Jelić 5ca40b9893 crypto: Be more forgiving when updating one-time key counts 2021-02-17 15:24:46 +01:00
Damir Jelić 6cc03d1c19 crypto: Improve the logging for deserialization failures 2021-02-17 15:23:26 +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ć 9e83eaf2f5 crypto: Store the history visiblity with the outbound session 2021-02-03 16:01:58 +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ć 6cb2c8b468 crypto: Store and restore outbound group sessions 2021-01-25 17:14:13 +01:00
Damir Jelić 17f3dbb0a0 crypto: Return a deserialized ToDevice struct when we receive a sync 2021-01-19 12:59:31 +01:00
Damir Jelić ef95d9b539 crypto: Fix a misleading comment about the outbound session rotation period 2021-01-19 10:21:12 +01:00
Damir Jelić 4af9b74776 crypto: Properly clamp the rotation period of the outbound session 2021-01-18 20:46:34 +01:00
Damir Jelić 629a8ee84f crypto: Add getters for the sender key in our sessions 2021-01-18 13:28:09 +01:00
Damir Jelić 5418c88775 crypto: Add some more serialize/deserialize implementations 2021-01-18 13:21:30 +01:00
Damir Jelić 43a74524c5 crypto: Add a pending requests method for the outbound group session 2021-01-18 12:44:19 +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ć c6a80dc921 Merge branch 'master' into new-state-store 2021-01-04 17:34:33 +01:00
Damir Jelić 2e3b6fba7d common: Use the re-exported versions of js_int and assign 2021-01-04 15:29:49 +01:00
Damir Jelić 007e452d39 Merge branch 'master' into crypto-improvements 2020-12-22 15:53:08 +01:00
Damir Jelić 9245b2a89a crypto: Properly canonicalize the json when verifying signatures as well. 2020-12-22 15:45:42 +01:00
Damir Jelić d39e3141fc crypto: Use CanonicalJsonValue for all the signature calculations. 2020-12-22 14:12:57 +01:00
Damir Jelić 5babd71341 crypto: Copy the relates to field to the unencrypted content when encrypting 2020-12-09 17:16:03 +01:00
Damir Jelić b5c61af472 crypto: Move the base64 helpers into a common module. 2020-12-08 16:21:29 +01:00