Commit graph

45 commits

Author SHA1 Message Date
Bruno Windels b6d9993ed0 remove unused import 2022-03-01 17:08:49 +01:00
Bruno Windels 8adc5a9fae these were public actually 2022-02-18 17:24:55 +01:00
Bruno Windels 3f9f0e98c7 remove unused olm property in SenderKeyDecryption 2022-02-18 17:21:27 +01:00
Bruno Windels 82299e5aea
Update src/matrix/e2ee/olm/Decryption.ts
Co-authored-by: R Midhun Suresh <hi@midhun.dev>
2022-02-18 17:18:33 +01:00
Bruno Windels 620409b3f0 fixup: ctor argument order
as it was an object before, order didn't matter
2022-02-18 17:17:24 +01:00
Bruno Windels 78e0bb1ff0 replace isPreKeyMessage with const enum 2022-02-18 17:00:56 +01:00
Bruno Windels 347edb5988 remove unused storage property 2022-02-18 16:47:47 +01:00
Bruno Windels e3e90ed167 convert olm/Encryption to TS 2022-02-16 18:00:13 +01:00
Bruno Windels eb5ca200f2 missed rename here 2022-02-16 18:00:03 +01:00
Bruno Windels a4fd1615dd convert decryption 2022-02-15 18:21:29 +01:00
Bruno Windels 74c640f937 convert Session 2022-02-15 18:21:12 +01:00
Bruno Windels 8d315f2741 Merge branch 'master' into bwindels/log-signature-failure 2021-12-09 18:34:36 +01:00
RMidhunSuresh c8eb7ea7ac Convert Lock.js to ts 2021-11-17 20:28:44 +05:30
Bruno Windels 2da450d69d log signature verification failure in logger, not console 2021-11-15 15:27:57 +01:00
Bruno Windels ac23119838 convert SessionDecryption to TS and adapt to use KeyLoader 2021-10-22 17:48:35 +02:00
Bruno Windels 77d10c93d6 convert groupby and megolm decryption utils to typescript 2021-10-21 14:40:51 +02:00
Bruno Windels 30525cf391 oops, missing await to store new olm sessions! 2021-03-08 16:19:28 +01:00
Bruno Windels e0d14207ac make opening a txn async again
as we'll need to await a bogus request first thing after opening the txn

funny enough, we originally made it sync to accommodate the same bug
in safari, but that didn't prevent any microtask being awaited
before scheduling a request in the calling code closing the txn.

We'll await a bogus request within the transaction class now so it
doesn't depend on the calling code
2021-03-04 19:47:02 +01:00
Bruno Windels fb446167f6 make new sync room keys available during decryption of same sync 2021-03-02 19:39:04 +01:00
Bruno Windels dd38fc13d7 log sending messages 2021-02-23 19:22:59 +01:00
Bruno Windels 5f6ad91ff2 offload creating an olm session to the olm worker
so IE11 doesn't lock up when you start typing
2020-11-10 11:04:09 +01:00
Bruno Windels b00db1af3e only keep 20 outbound olm sessions in memory at once to prevent OOM 2020-10-14 12:44:27 +02:00
Bruno Windels 76381fbca1 open storage transactions synchronously
this (almost) makes it work in some browsers that otherwise
have throw a TransactionInactiveError on the first operation
you try to do on a store.
2020-09-28 16:06:41 +02:00
Bruno Windels e6a46874c4 wrap olm error for creating session in DecryptionError
so we can relate it back to the event that caused it
2020-09-21 17:58:13 +02:00
Bruno Windels 0ed2d14887 log OTK claim failures 2020-09-08 18:32:12 +02:00
Bruno Windels 4ca5ff9b9f only load 50 olm sessions at once 2020-09-08 18:30:06 +02:00
Bruno Windels 10b5614fd9 m.dummy events don't have content 2020-09-08 18:27:49 +02:00
Bruno Windels 9137d5dcbb make decryption algorithms return DecryptionResult
which contains curve25519 key and claimed ed25519 key as well as payload
2020-09-08 10:48:11 +02:00
Bruno Windels dc0576f2db cleanup 2020-09-04 15:31:45 +02:00
Bruno Windels 565fdb0f8c use proper error codes 2020-09-04 12:10:36 +02:00
Bruno Windels 408ff3322d content already exists here 2020-09-03 15:30:42 +02:00
Bruno Windels 620fc0d210 JSON stringify payload, olm_encrypt does not do objects 2020-09-03 15:30:18 +02:00
Bruno Windels 8676909a26 don't swallow errors! 2020-09-03 15:30:09 +02:00
Bruno Windels a943467e71 await txns 2020-09-03 15:30:01 +02:00
Bruno Windels 71ba2dd714 name userId -> ownUserId as elsewhere 2020-09-03 15:29:35 +02:00
Bruno Windels 8d0d4570dd fix import path 2020-09-03 15:29:09 +02:00
Bruno Windels b2fffee037 give better error when olm plaintext is not json 2020-09-03 15:28:49 +02:00
Bruno Windels 1f8005cdfd forgot to pass account 2020-09-03 15:28:38 +02:00
Bruno Windels 4f4808b94c lock on senderKey while enc/decrypting olm sessions 2020-09-03 12:12:33 +02:00
Bruno Windels 1492b6b6f8 cleanup of olm encryption 2020-09-03 09:53:16 +02:00
Bruno Windels e3daef5ca9 first draft of olm encryption 2020-09-02 17:58:01 +02:00
Bruno Windels 3cb46b38ff extract olm/Session into own file 2020-09-02 17:38:46 +02:00
Bruno Windels f1b78a5778 extract groupBy function from olm decryption into util 2020-09-02 17:38:25 +02:00
Bruno Windels 44e9f91d4c to_device handler for encrypted messages
changes the api of the olm decryption to decrypt in batch
so we can isolate side-effects until we have a write-txn open
and we can parallelize the decryption of different sender keys.
2020-09-02 13:33:27 +02:00
Bruno Windels 5fee7fedc3 implement olm decryption algorithm 2020-09-01 17:59:39 +02:00