Richard van der Hoff
9c18893ae5
Use to-device events for key sharing
...
Synapse now supports out-of-band messages, so use them instead of sending the
key-sharing messages in-band.
2016-09-07 13:56:54 +01:00
Richard van der Hoff
98dc5328a0
Use ciphertext instead of body in megolm events
...
Apparently `body` is going to be special.
2016-09-06 16:23:23 +01:00
Richard van der Hoff
408671b58a
Megolm: Remove check for signature field
...
We're putting the signature in the body, so we don't want a separate field.
2016-09-06 15:59:57 +01:00
Richard van der Hoff
b4f22310ea
Reset megolm session when people join/leave the room
2016-08-26 11:24:59 +01:00
Richard van der Hoff
42babbc595
Put all of the megolm keys in one room message
...
Avoid hitting the rate-limiter by putting all of the megolm keys in a single
event.
2016-08-24 11:46:22 +01:00
Richard van der Hoff
31e7addf2f
Reinstate device blocking for simple Olm
...
Commit 4cde51b3 broke device blocking such that we were encrypting for all
devices, including blocked ones. Reinstate it, and add a test.
2016-08-24 09:26:12 +01:00
Richard van der Hoff
ba339ffdad
Merge pull request #180 from matrix-org/rav/receive_megolm_keys
...
support for unpacking megolm keys
2016-08-23 17:30:30 +01:00
Richard van der Hoff
e708e59b15
Add a TODO about batching events
2016-08-23 17:27:47 +01:00
Richard van der Hoff
1159e0911f
support for unpacking megolm keys
...
This is incredibly hacky at the moment, pending the arrival of ephemeral
events, but it kinda works.
2016-08-22 18:24:46 +01:00
Richard van der Hoff
9f180179d5
rename m.key event to m.room_key
...
... because m.key is scary, or something
2016-08-22 18:13:11 +01:00
Richard van der Hoff
238700cbdb
Send out megolm keys when we start a megolm session
...
For now, pending the arrival of SPEC-138, this happens via inline messages in
the room.
2016-08-22 17:59:22 +01:00
Richard van der Hoff
0234410b43
Factor out a function for doing olm encryption
...
Make a library file with some constants and a function to pack olm-encrypted
events (which we are going to use from megolm)
2016-08-22 10:22:12 +01:00
Richard van der Hoff
32fa51818b
Make encryption asynchronous
...
We're going to need to send out a load of messages to distribute the megolm
keys; as a first step, deal with the asynchronicity this will require.
2016-08-19 16:18:33 +01:00
Richard van der Hoff
4d6f9da578
Megolm: don't dereference nullable object
...
It is possible for `room` to be null when passed to
MegolmEncryption.encryptMessage; we need to avoid dereferencing it. Instead,
make sure that the EncryptionAlgorithm knows about the roomId it is targeting,
and use that.
Replace the increasingly-long argument list on the EncryptionAlgorithm
constructor with a params list, and update DecryptionAlgorithm to match.
2016-08-17 16:21:37 +01:00
Richard van der Hoff
89d8133ad2
Implement megolm encryption/decryption
...
Very early attempt at encryption/decryption implementation via megolm. You have
to c&p the keys manually.
2016-08-16 16:47:37 +01:00
Richard van der Hoff
2c9f8ba598
Factor Olm encryption/decryption out to new classes
...
- to make way for alternative encryption algorithms. We now store an encryption
object for each room, rather than referring to sessionstore on each event.
Also a little light tidying to the jsdocs.
2016-08-16 15:12:28 +01:00