vector-im-hydrogen-web/src/matrix/e2ee
2021-02-18 12:44:19 +01:00
..
megolm add more sync logging 2021-02-18 12:44:19 +01:00
olm offload creating an olm session to the olm worker 2020-11-10 11:04:09 +01:00
Account.js don't log here yet as the logger isn't passed from createIdentity yet 2021-02-18 12:44:19 +01:00
attachment.js move base64/58 encoding into platform 2021-02-12 16:01:54 +01:00
common.js createEnum does not take an array 2020-09-18 13:08:35 +02:00
DecryptionResult.js make decryption algorithms return DecryptionResult 2020-09-08 10:48:11 +02:00
DeviceTracker.js add some comments while debugging a problem 2021-02-11 21:08:06 +01:00
OlmWorker.js provide random value for IE11 2020-11-10 18:31:18 +01:00
README.md add prepareSync and afterPrepareSync steps to sync, run decryption in it 2020-09-10 12:11:43 +02:00
RoomEncryption.js add more sync logging 2021-02-18 12:44:19 +01:00

Integratation within the sync lifetime cycle

prepareSync

The session can start its own read/write transactions here, rooms only read from a shared transaction

- session
    - device handler
        - txn
            - write pending encrypted
        - txn
            - olm decryption read
        - olm async decryption
            - dispatch to worker
        - txn
            - olm decryption write / remove pending encrypted
- rooms (with shared read txn)
    - megolm decryption read

afterPrepareSync

- rooms    
    - megolm async decryption   
        - dispatch to worker

writeSync

- rooms (with shared readwrite txn)
    - megolm decryption write, yielding decrypted events
    - use decrypted events to write room summary

afterSync

- rooms
    - emit changes

afterSyncCompleted

- session
    - e2ee account
        - generate more otks if needed
        - upload new otks if needed or device keys if not uploaded before
- rooms
    - share new room keys if needed