Commit graph

1298 commits

Author SHA1 Message Date
Damir Jelić
48f43a4af1 crypto: Remove some unused imports. 2020-12-17 16:28:12 +01:00
Damir Jelić
4ad4ad1e94 crypto: Send out done events for in-room verifications. 2020-12-17 15:50:13 +01:00
Damir Jelić
79102b3390 crypto: Make the cancelations output only CancelContents. 2020-12-17 12:15:11 +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ć
5105629c08 crypto: WIP handle in-room start events. 2020-12-11 16:13:58 +01:00
Damir Jelić
7570cf5ac2 crypto: WIP genrealize the sas so it can handle in-room and to-device events. 2020-12-11 15:42:49 +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ć
1bb5b42b1d crypto: Prepare the sas structs to handle in-room verifications. 2020-12-10 15:18:28 +01:00
Damir Jelić
b9ddbb11af crypto: Move the inner sas struct into a separate module. 2020-12-10 14:07:47 +01:00
Damir Jelić
7198b0daba crypto: WIP key verification request handling. 2020-12-09 17:18:23 +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ć
d9e5a17ab0 crypto: Use a native Rust sha2 implementation to calculate the commitment 2020-12-08 16:21:29 +01:00
Damir Jelić
b5c61af472 crypto: Move the base64 helpers into a common module. 2020-12-08 16:21:29 +01:00
Damir Jelić
fd705b7d5e crypto: Canonicalize the start event content before calculating the commitment
This fixes: #117.
2020-12-08 16:02:51 +01:00
Damir Jelić
8e53982bcd Merge branch 'master' into crypto-improvements 2020-12-08 15:06:14 +01:00
Damir Jelić
ca4e738fff Merge branch 'master' into user-avatar-ci 2020-12-08 14:43:46 +01:00
Damir Jelić
594e9b9e2d README: Swap out the CI badge. 2020-12-08 14:31:14 +01:00
Damir Jelić
15b87e9dc1 CI: Restrict code coverage to the master branch. 2020-12-08 14:30:49 +01:00
Damir Jelić
fa3583234c CI: Fix the coverage yml. 2020-12-08 14:09:51 +01:00
Damir Jelić
9679db6ddc CI: Enable code coverage again. 2020-12-08 14:05:25 +01:00
Damir Jelić
fdf48d1f30 CI: Rename the workflow file. 2020-12-08 13:58:26 +01:00
Damir Jelić
40d13d9b59 cyrpto: Another timing based test that only works on Linux. 2020-12-08 13:37:55 +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ć
0a76f75c22 Revert "CI: Use the cargo-clippy workflow."
This reverts commit 795c1225dd.
2020-12-08 12:45:16 +01:00
Damir Jelić
795c1225dd CI: Use the cargo-clippy workflow. 2020-12-08 12:37:39 +01:00
Damir Jelić
b982d36303 crypto: Run the time sensitive tests only on linux. 2020-12-08 12:34:59 +01:00
Damir Jelić
a80aa4c2ad base: Fix some lint issues. 2020-12-08 12:11:55 +01:00
Damir Jelić
27d9cf04de base: Remove a flaky state store test.
The state store is undergoing a rewrite and this test fails more often
than i would like making our CI seem flaky.

Remove the test since it's going to become obsolete anyways.
2020-12-08 11:52:21 +01:00
Damir Jelić
e4779163b8 CI: Run the tests on the CI. 2020-12-08 11:36:01 +01:00
Damir Jelić
2cc899338a CI: Split out the fmt and clippy runs into two jobs. 2020-12-08 11:21:09 +01:00
Amanda Graven
8dc56ec332
Add methods for setting, getting and uploading avatar 2020-12-08 11:18:00 +01:00
Damir Jelić
1d5ee22dd2 CI: Name our lint stages. 2020-12-08 11:08:41 +01:00
Damir Jelić
59917f45e3 matrix-sdk: Fix a clippy lint. 2020-12-08 11:01:20 +01:00
Damir Jelić
35247fac2a crypto: Fix a lint issue. 2020-12-08 10:50:58 +01:00
Damir Jelić
e24fb8b471 CI: Fix the cargo fmt invocation. 2020-12-08 10:44:19 +01:00
Damir Jelić
795900cf39 CI: Add a lint github workflow. 2020-12-08 10:42:05 +01:00
Amanda Graven
bca7f41ca9
Fix error in example 2020-12-07 13:14:23 +01:00
Amanda Graven
7f503eb71c
Add examples, remove user from method names 2020-12-07 12:59:10 +01:00
Amanda Graven
a26dc3179a
Add methods for getting and setting display name 2020-12-07 11:17:26 +01:00
Damir Jelić
aa1a64628f crypto: Remove a bunch of unneeded whitespace in a log line. 2020-12-05 14:59:40 +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ć
3f41e5071b crypto: Preserve the relationship info while decrypting events. 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ć
804bd221b2 crypto: Improve key imports.
This patch changes so key imports load all existing sessions at once
instead loading a single session for each session we are importing. It
removes the need to lock the session when we check the first known index
and exposes the total number of sessions the key export contained.
2020-12-02 11:12:46 +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ć
e65915e159 Merge branch 'crypto-improvements' 2020-12-01 15:10:58 +01:00
Damir Jelić
4800e80492 matrix-sdk: Remove an unused import. 2020-12-01 15:08:53 +01:00
Damir Jelić
5d0ff961b2 crypto: Check the Olm message hash if we fail to decrypt an Olm message.
Wether by accident (the next_batch token doesn't get stored properly) or
by malicious intent (the server replays a message) an Olm encrypted to-device
message may appear multiple times.

This is usually fine since nothing bad happens, we don't decrypt the message
and the message gets thrown away.

Since the introduction of Olm session unwedging an undecryptable message
leads to the creation of a new fresh Olm session. To avoid this we
remember which Olm messages we already decrypted so they don't trigger
an unwedging dance.
2020-12-01 14:50:04 +01:00
Damir Jelić
270350cd34 crypto: Save the olm message hash. 2020-12-01 14:38:03 +01:00