1
0
Fork
You've already forked ImageDownloader
0
Downloads encrypted images from HTTP Host – forked from github.com/moparisthebest/ImageDownloader
  • Rust 46.7%
  • C 34.9%
  • Shell 18.4%
Find a file
2020年03月13日 20:49:21 +01:00
src More rust tweaks 2017年08月08日 00:57:51 -04:00
.gitignore Add helper script 2020年03月13日 20:45:18 +01:00
aesgcm-example.sh Add helper script 2020年03月13日 20:45:18 +01:00
aesgcm.c Support new 12-byte IV format and legacy 16-byte IV format 2017年08月07日 00:26:43 -04:00
Cargo.lock Add rust implementation and test/benchmark script 2017年08月08日 00:33:17 -04:00
Cargo.toml Add rust implementation and test/benchmark script 2017年08月08日 00:33:17 -04:00
openbrowser.sh Handle new 12-byte IV format in openbrowser.sh 2018年04月18日 19:04:10 -04:00
README.md Add reference to original author 2020年03月13日 20:49:21 +01:00
test.sh Add rust implementation and test/benchmark script 2017年08月08日 00:33:17 -04:00

Forked from moparisthebest at Github

ImageDownloader

When Conversations uploads an encrypted image with XEP-0363: HTTP Upload it appends the encryption key as an anchor to the URL.

There are now 2 formats for anchors.
LEGACY FORMAT: 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.
CURRENT FORMAT: The anchor is made of 88 characters which represent 44 bytes in HEX. The first 12 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 and encrypt 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.

You can also encrypt data with aesgcm by sending in enc as the second parameter.