Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains a proof of concept for E2E support.
For this, a session store must be created and the E2E room keys imported.
In order for the messages to be displayed as secure, the session must be verified by all recipients.
Related to #32
Note
The decision whether to activate encryption must be passed to the program at the first start.
Changing (de)activation of the encryption afterwards is not supported.
Breaking changes
Program modes
The program can be executed in two modes, run and verify. In run mode the program is executed as usual and a webhook is provided.
In verify mode, the session can be verified interactively via emojis to classify the messages as trustworthy.
Important
In verification mode, the matrix id must be specified completely, otherwise the verification will fail.
Eg:
@test:matrix.org
New command-line parameters
--mode
This parameter is used to switch between verification and normal program.
It accepts two options run and verify.
Default:
run
--storage
This parameter specifies the path where the session storage is located.
Default:
./storage
--key-password
This parameter contains the password for the E2E room keys.
--encryption
This parameter specifies whether encryption is enabled.
Folder structure of the session storage
Files
In this folder, apart from the ones listed below, matrix-nio creates additional files that allow you to send encrypted messages.
element-keys.txt
This file contains the room keys exported by Matrix. Here a tutorial on how to export these keys.
data.json
This file contains the access token, the device ID and the status whether encryption has been enabled.