Encrypt files using AES-256-GCM when using OX#2186
Merged
Conversation
Add support to send encrypted files when in an OX (XEP-0373) session. When a user has OX encryption enabled in a 1:1 chat window, invoking `/sendfile` will now trigger local e2e encryption of the file using AES-256-GCM from XEP-0454 OMEMO media sharing. The encrypted payload is uploaded to the HTTP Upload (XEP-0363) component. On successful completion, the download URL is formatted under the custom `aesgcm://` scheme with the appended IV and key fragment, and transmitted as a standard OX encrypted signcrypt message. So this means not only the link to the file is encrypted (OX) but the file itself is encrypted as well. The drawback is that now `/sendfile` only works if Profanity is built with OMEMO support since we use those routines. We might make this configurable: * upload encrypted file (omemo) + encrypt link (ox) * upload plain file + encrypt link (ox) Fixes: #2175 Signed-off-by: Michael Vetter <jubalh@iodoru.org>
Add `/ox encryptfile on|off` command to allow users to toggle local AES-256-GCM encryption before file upload when using OX. Enabled by default when compiled with OMEMO support. Disabled in case we compile with OX but without OMEMO. Signed-off-by: Michael Vetter <jubalh@iodoru.org>
Member
Author
|
@mdosch feedback welcome. |
Contributor
|
LGTM, tested with gajim. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes: #2175