aboutsummaryrefslogtreecommitdiffstats
path: root/matrix-e2e.h
Commit message (Collapse)AuthorAgeFilesLines
* e2e: Utility to decrypt media dataDr. David Alan Gilbert2018-02-251-0/+2
| | | | | | | Pass the received image data through gcrypt to do the decryption using the previously received keys. Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
* e2e: Parse media decryption infoDr. David Alan Gilbert2018-02-251-0/+3
| | | | | | | | For encrypted images the decrypted message contains key information to decrypt the actual media once received. Add a structure and a parser to extract the information from the JSON. Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
* e2e: Add device info actionDr. David Alan Gilbert2018-02-251-0/+1
| | | | | | | Add a purple action (i.e. thing on the accounts->matrix-> menu) to display the device ID and public key. Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
* e2e: Cleanup inbound megolm sessions in memoryDr. David Alan Gilbert2018-02-251-0/+1
| | | | | | Cleanup on closing the plugin or leaving a conversation. Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
* e2e: Route decrypted messages back upDr. David Alan Gilbert2018-02-251-1/+1
| | | | | | Parse the decrypted JSON and route it back up to the room code. Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
* e2e: Decrypt m.room.encryptedDr. David Alan Gilbert2018-02-251-0/+2
| | | | | | | Decrypt m.room.encrypted messages sent to a room; these come out with normal events. Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
* e2e: Parse received d2d m.room.encrypted messagesDr. David Alan Gilbert2018-02-251-0/+1
| | | | | | Parse the top level of m.room.encrypted messages. Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
* e2e: parse sync_key_counts to decide on key sendingDr David Alan Gilbert2018-02-251-0/+2
| | | | | | | | | | | | | | The server returns the count of one-time-keys that it has, we parse that and detect if we need to send more. It's a little tricky in that a server that doesn't have any keys will send an empty response, so force sending in that case. If we get to the point of multiple types of keys this will need reworking to make sure we only send the key types needed. Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
* e2e: Retrieve or create Olm account state, send keysDr. David Alan Gilbert2018-02-251-0/+3
| | | | | | | | If we've got a previously stored olm account state then use it, else create us a new one. Either way, upload the device keys to the server. Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
* e2e: Add matrix_sign_jsonDr. David Alan Gilbert2018-02-251-0/+2
| | | | | | | Given a JsonObject, produce a canonical json blob, sign it and add the signature back into the JsonObject. Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
* e2e: Create MatrixE2EData type and matrix-e2e.[ch] filesDr. David Alan Gilbert2018-02-251-0/+24
Somewhere for the e2e magic to happen. Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>