Commit Graph

284 Commits

Author SHA1 Message Date
Lukas Lihotzki 761138a56d refactor: use OpenSSL for AES 2021-04-12 14:49:01 +02:00
Lukas Lihotzki 7faf05fe90 refactor: selectable hash for pbkdf2 2021-04-12 14:48:38 +02:00
Lukas Lihotzki a25d1932ee fix: fast pbkdf2 with OpenSSL 2021-04-12 14:48:38 +02:00
Lukas Lihotzki 285b14912a chore: null safe crypto dependencies 2021-04-12 14:48:36 +02:00
Lukas Lihotzki 08043c06f4 refactor: high-level loops 2021-04-01 12:51:45 +02:00
Christian Pauly 0ceb2b26df refactor: Constants names 2021-03-30 12:43:50 +02:00
Christian Pauly 9012ce6b2c fix: Display errors from isolates in the logs 2021-03-17 09:46:13 +01:00
Christian Pauly 0a9f8497e2 chore: Make bootstrap logs more chatty 2021-03-17 08:22:22 +01:00
Krille Fear 9bef8452d3 docs: Clean up dart documentations
Changing to `code` blocks where it cant be resolved to [stuff] things.
2021-03-16 12:32:21 +00:00
Krille Fear 57fde98fec Merge branch 'soru/less-sql-statements' into 'main'
chore: Reduce needed database accessess

See merge request famedly/famedlysdk!666
2021-03-09 18:12:40 +00:00
Sorunome c76dc0daa2
chore: Reduce needed database accessess 2021-03-09 18:28:58 +01:00
Sorunome 7ef288ec91
fix: A few ssss fixes 2021-03-09 18:28:42 +01:00
Krille Fear 44ca96e544 refactor: Update pedantic
This enforces to NOT use curly braces in Strings where not needed
and not await non-future variables.
2021-03-09 17:28:04 +00:00
Krille Fear 0d8bddf708 Merge branch 'soru/fallback-keys' into 'main'
feat: Add fallback keys support

Closes #136

See merge request famedly/famedlysdk!653
2021-03-03 07:38:32 +00:00
Sorunome 498c7825a5
feat: Add fallback keys support 2021-03-02 16:17:32 +01:00
Christian Pauly c9d3c327f6 refactor: Deprecate eventType in EventUpdate 2021-02-26 13:06:02 +01:00
Sorunome 34b15e45fc
fix: Better logic when to auto-trigger self-sign 2021-02-13 15:03:10 +01:00
Sorunome 6c2fc1679a
feat: Auto-selfsign and auto-cache when opening ssss keys 2021-02-13 14:55:09 +01:00
Krille Fear 6d7ab8e1d4 Merge branch 'soru/cancel-broadcast-verify' into 'main'
fix: Allow to broadcast cancels during key verification

See merge request famedly/famedlysdk!643
2021-02-10 12:44:21 +00:00
Sorunome 2d70360a8d
fix: Better detection if x-signing and megolm backup is enabled 2021-02-10 13:35:45 +01:00
Sorunome d07b663866
fix: Allow to broadcast cancels during key verification 2021-02-10 13:05:09 +01:00
Sorunome d373a06aa2
fix: Add to_device queue to prevent olm session corruptions 2021-02-08 14:57:19 +01:00
Christian Pauly bd4c4a6131 chore: Add more bootstrap logging 2021-02-04 15:33:27 +01:00
Sorunome 0462863ce6
fix: Cache ssss keys if using an existing ssss in bootstrapping 2021-02-03 14:47:42 +01:00
Sorunome 8a4af0c0ea
chore: add keyOrPassphrase to cross-signing selfVerify 2021-02-03 13:02:38 +01:00
Sorunome 0c4db25d05
feat: Add a way to string-encode a recovery key 2021-02-03 11:34:56 +01:00
Sorunome 650484c306 Merge branch 'krille/olmerrorhandling' into 'main'
change: Olm exception handling

See merge request famedly/famedlysdk!633
2021-02-03 10:09:43 +00:00
Christian Pauly 9fac03639e change: Olm exception handling 2021-02-03 11:01:01 +01:00
Christian Pauly ad39e3af25 chore: More try catch in bootstrap 2021-01-29 11:18:18 +01:00
Sorunome a35266f1e4
feat: Replay last sent olm message on olm session recovery from other device 2021-01-20 12:50:52 +01:00
Sorunome fddced2b3a
fix: Properly handle initial device key uploading failures and better handle OTK upload failures 2021-01-12 12:56:23 +01:00
Christian Pauly 8b13df8c9d refactor: Add json parsing for encryption and encrypted content 2021-01-08 13:26:25 +01:00
Christian Pauly 39b776716c refactor: Olm Exceptions 2021-01-07 12:53:49 +01:00
Christian Pauly 88403d19ba fix: Dont run background task after logged out 2021-01-05 15:15:39 +01:00
Krille Fear 2efe404e13 Merge branch 'soru/disable-master-autoverify' into 'main'
fix: Disable auto-verify own master key for now

See merge request famedly/famedlysdk!602
2021-01-05 13:58:37 +00:00
Sorunome a0f7dd4732
fix: Disable auto-verify own master key for now 2021-01-05 14:54:40 +01:00
Christian Pauly e806bb9770 refactor: Add verbose logs and refactor something 2021-01-05 14:44:15 +01:00
Christian Pauly 9ffecd845a chore: Update license header 2021-01-04 10:34:50 +01:00
Christian Pauly e450a09fb5 refactor: External matrix api 2021-01-04 10:26:29 +01:00
Sorunome 734ec0357b
fix: Throw an error if all existing olm sessions are corrupted 2020-12-31 10:45:22 +01:00
Sorunome 08dcce6225
chore: Add more debugging logs 2020-12-30 18:50:40 +01:00
Sorunome add19c73a0
fix: Load multiple olm sessions from the database at once for increased performance 2020-12-30 12:52:54 +01:00
Sorunome 6723c01a31
feat: Lazy-send room keys, chunked and sorted by importance 2020-12-29 14:46:36 +01:00
Sorunome 68afe362ce
feat: Start megolm sessions while typing 2020-12-28 16:14:07 +01:00
Sorunome ccd03ecd22
fix: Various small e2ee fixes 2020-12-28 14:49:55 +01:00
Sorunome 768baa7602
chore: Implement a proper deep-copy function for json maps 2020-12-28 14:35:21 +01:00
Christian Pauly 79fe7b0878 refactor: Replace some magic strings 2020-12-23 12:14:16 +01:00
Sorunome b00a9e8834
feat: Better determine which devices to encrypt to 2020-12-21 15:26:46 +01:00
Sorunome dfd88277b9 Merge branch 'soru/autoreply-more-key-requests' into 'main'
feat: Auto-Share megolm sessions with other users we know for a fact are...

Closes #127

See merge request famedly/famedlysdk!570
2020-12-21 14:08:17 +00:00
Sorunome df1c249011
feat: Auto-Share megolm sessions with other users we know for a fact are allowed to see said message 2020-12-21 14:41:44 +01:00
Christian Pauly cd4dafcd45 chore: Nicer logs in tests 2020-12-21 14:21:12 +01:00
Christian Pauly 57286d4c28 feat: Use logger package 2020-12-19 12:04:25 +00:00
Christian Pauly fbd7393fce fix: Dont create new megolm session if one is creating 2020-12-17 12:55:08 +01:00
Christian Pauly 3856b618e8 refactor: Encryption errors 2020-12-15 08:24:55 +01:00
Christian Pauly 6657e073a0 refactor: Follow up clean up bootstrap 2020-12-11 09:57:45 +01:00
Christian Pauly b563aec7bb refactor: Add secretstoragekeycontent 2020-12-10 11:03:45 +01:00
Sorunome 49f0679fbf feat: Add bootstrapping 2020-12-10 08:13:24 +00:00
Christian Pauly bec1761172 refactor: content parsing 2020-11-30 15:34:46 +01:00
Christian Pauly 323b203718 refactor: algorithm types 2020-11-30 14:26:31 +01:00
Sorunome 15d817023d
feat: Decrypt events on megolm key receiving better 2020-10-31 12:08:49 +01:00
Sorunome 5924e57cf1
feat: Add broadcast to-device verification 2020-10-30 11:40:19 +01:00
Sorunome 955fb747c2
fix: Only look at online keybackup for automated requests 2020-10-28 11:27:36 +01:00
Sorunome 412da6ae0c
fix: Properly rotate megolm session on device changes 2020-10-26 11:55:47 +01:00
Sorunome 343c26b3ed fix: Decrypt last message on received megolm key 2020-10-26 07:49:02 +00:00
Christian Pauly 66e590073e refactor: Event Update Type 2020-10-22 13:01:35 +02:00
Sorunome 090f0c326c
fix: Do not require unrequired field in supported versions response 2020-10-19 18:10:07 +02:00
Sorunome d116a52ea9
fix: Better handle olm session recovery 2020-10-17 12:03:54 +02:00
Sorunome ae79af6ea8
fix: store timestamps in milliseconds to fix decrypt error 2020-10-04 12:12:03 +02:00
Sorunome ab97c596ac
chore: Add better debug logging for corrupt sessions 2020-09-28 10:58:24 +02:00
Sorunome 86a4f90a5a
fix: Run automated key requests in root zone 2020-09-21 18:11:14 +02:00
Sorunome 70939a7c9c
fix: Message index replay attack check 2020-09-21 10:24:15 +02:00
Sorunome f6259efa59
fix: Better handle online key backup 2020-09-18 12:25:25 +02:00
Sorunome 5d5c7fa8b4
fix: Catch all root zone exceptions 2020-09-17 12:59:40 +02:00
Christian Pauly 0871e218d1 refactor: Json signature check 2020-09-16 12:29:21 +00:00
Christian Pauly df2cfb3faf fix: Ask only own devices on automated key requests 2020-09-16 13:42:05 +02:00
Sorunome cb1ec86b32
feat: Periodically fetch ssss secrets from other devices 2020-09-10 14:46:30 +02:00
Sorunome 2c7ae759f8
fix: Remove potential race conditions and database issues with OTK upload 2020-09-10 14:07:25 +02:00
Sorunome bbc1b63695
feat: Auto-verify own master key, if there is a valid signature chain within the same account 2020-09-10 13:04:24 +02:00
Sorunome 64b8e01444 fix: Handle duplicate indexes properly 2020-09-10 10:48:59 +00:00
Sorunome 99d536b14f
feature: Upload to online key backup 2020-09-09 09:53:26 +02:00
Sorunome 8a104b34ff
fix: potentially fix SSSS passphrase not working for some accounts 2020-09-07 16:31:29 +02:00
Sorunome 5863c8e168
fix: Run advanced things in database handling in their own separate zone 2020-09-06 15:06:41 +02:00
Sorunome ea59c4bd94
refactor(keybackup): Update database for stored megolm keys to prepare for proper online key backup 2020-08-17 09:10:51 +02:00
MTRNord 26586b6f02
style: Change package:famedlysdk imports to relative imports
Changing the imports from `package:famedlysdk` to relative imports allows us to easier move the files

Took 2 minutes
2020-08-13 10:40:39 +02:00
Christian Pauly fb9b505988 Krille/make client extend matrixapi 2020-08-11 16:11:51 +00:00
Christian Pauly c184dfba6b Don't show potential session keys in logs 2020-08-10 10:42:14 +02:00
Christian Pauly 6170c79fe1 Improve logging 2020-08-06 09:35:02 +00:00
Sorunome 18a790be84 put key request in try...catch 2020-08-01 07:06:39 +00:00
Christian Pauly 5bf52664e1 Merge branch 'soru/key-verification-fixes' into 'master'
some key verification fixes and temporarily disable transactions

See merge request famedly/famedlysdk!403
2020-07-30 08:33:44 +00:00
Sorunome 69431a1aff
some key verification fixes and temporarily disable transactions 2020-07-30 09:57:45 +02:00
Sorunome 6915781e6a
Prevent m.relates_to to be removed from the status=1 object in encrypted rooms 2020-07-29 11:43:27 +02:00
Sorunome 14c8377a2f
make sure that no http requests are done inside of /sync 2020-07-26 07:54:03 +02:00
Sorunome 2214ac2d0a fixes a racing condition in key verification 2020-07-20 06:31:05 +00:00
Sorunome fd406987c1 Better validate event contents 2020-06-29 12:02:18 +00:00
Sorunome fb48837d08
update function call 2020-06-24 09:30:25 +02:00
Sorunome b109e75962
also restore on broken olm session 2020-06-24 09:27:36 +02:00
Sorunome f833511e38
fix tests 2020-06-24 09:27:35 +02:00
Sorunome 68fac1e112
pick the correct session when encrypting to_device events 2020-06-24 09:27:32 +02:00
Sorunome f79a85ca71
Merge branch 'master' into soru/cross-signing 2020-06-24 09:26:22 +02:00
Sorunome 439f6f0aa0
Fix some olm sessions not being loaded from database 2020-06-23 11:42:01 +02:00
Sorunome 48c03865a2
make auth_data just a json object 2020-06-23 08:30:50 +02:00
Sorunome c4d09268a0
add key verification test 2020-06-15 13:12:59 +02:00
Sorunome c233d57f9f
add online key backup test 2020-06-13 19:48:38 +02:00
Sorunome ef0a567401
finish ssss tests 2020-06-13 19:12:32 +02:00
Sorunome 7803dc4b93
add more tests 2020-06-13 10:56:39 +02:00
Sorunome 34619c065b
format 2020-06-12 17:40:08 +02:00
Sorunome 221d6c275b
fix timer stuffs 2020-06-12 17:32:35 +02:00
Sorunome aed1cf1270
handle ssss cache fetching better 2020-06-12 17:15:26 +02:00
Sorunome 3825f7292f
format 2020-06-12 16:17:28 +02:00
Sorunome 2a6a19e2b0
Request-ify room key store stuff 2020-06-12 16:17:00 +02:00
Sorunome fc5400a30c
Merge branch 'master' into soru/cross-signing 2020-06-12 14:34:22 +02:00
Sorunome 1a98634fd6 fix key request sending 2020-06-12 12:32:42 +00:00
Sorunome 5334266529
Merge branch 'master' into soru/cross-signing 2020-06-10 16:25:08 +02:00
Sorunome 485d88b896
Hotfix decryption can request session 2020-06-10 12:11:10 +02:00
Sorunome f261f35712
Merge branch 'master' into soru/cross-signing 2020-06-10 11:33:24 +02:00
Sorunome 7ddb6be30e
Allow requesting and updating of session keys with lower index and lower forwarded chain 2020-06-10 10:44:22 +02:00
Sorunome 2de03bc0e8
properly reply to room key requests 2020-06-07 15:09:11 +02:00
Sorunome 45232be3a0
simplify key signing a tad 2020-06-06 15:19:44 +02:00
Sorunome b4e83caa89
requestify cross-signing endpoints 2020-06-06 15:17:05 +02:00
Sorunome e1679d59be
better smoothen out keys 2020-06-06 14:28:18 +02:00
Sorunome 4154c7d0eb
format and some analyze 2020-06-06 13:47:37 +02:00
Sorunome 060a772bfa
fix up a few things with key verification 2020-06-06 13:38:19 +02:00
Sorunome d4eabbb756
ssss password --> passphrase 2020-06-06 12:40:52 +02:00
Sorunome 115cd9e5b3
better cache invalidation of ssss cache 2020-06-05 22:22:07 +02:00
Sorunome 4c60369b8d
migrate to new thingy! 2020-06-05 22:03:28 +02:00
Sorunome d29fb9abfe
Merge branch 'soru/modularize-e2ee' into soru/cross-signing 2020-06-05 18:59:58 +02:00
Sorunome 8358dec3a5
analyze and format 2020-06-05 10:56:51 +02:00
Sorunome 086dcae907
add key manager tests 2020-06-05 10:51:11 +02:00
Sorunome fbc8f03f67
encrypt m.room_key event properly 2020-06-05 10:15:36 +02:00
Sorunome 05c799e6a5
format 2020-06-04 20:16:18 +02:00
Sorunome c94e41d393
fix tests for real 2020-06-04 18:16:22 +02:00
Sorunome f3f3231df6
add some encrypt / decrypt tests 2020-06-04 17:51:49 +02:00
Sorunome 2e46155f47
fix tests without olm 2020-06-04 14:26:35 +02:00
Sorunome fcde6a2459
split encryption stuff to other library 2020-06-04 13:39:51 +02:00