mirror of
https://github.com/moparisthebest/ImageDownloader
synced 2024-11-13 21:15:05 -05:00
aesgcm.c | ||
openbrowser.sh | ||
README.md |
ImageDownloader
When Conversations uploads an encrypted image with XEP-0363: HTTP Upload it appends the encryption key as an anchor to the URL.
The anchor is made of 96 characters which represent 48 bytes in HEX. The first 16 bytes are the IV the last 32 bytes are the key.
The encryption mode is aes-256-gcm
. The authentication tag of 16 bytes is appended to the file.
This C project provides sample code on how to decrypt a file. Output is to stdout. Redirect to file or pipe to image viewer.
Compile with gcc aesgcm.c -lcrypto -o aesgcm
, openbrowser.sh also tries to compile it if the executable not already exist.
Set openbrowser.sh as your browser in gajim or another XMPP client to automatically decrypt http uploads encrypted with OMEMO or PGP with Conversations.