whisperfish / libsignal-service-rs

A Rust version of the libsignal-service-java library for communicating with Signal servers.
https://whisperfish.github.io/libsignal-service-rs/libsignal_service
GNU Affero General Public License v3.0
68 stars 31 forks source link

Attachments are encrypted with synchronous code in the executor #278

Open rubdos opened 9 months ago

rubdos commented 9 months ago

crate::attachment_cipher::encrypt_in_place(iv, key, &mut contents) gets called synchronously, blocking the executor. This should probably go on a threadpool.

rubdos commented 9 months ago

Also doesn't really make sense that encryption of attachments happens in the library, while decryption happens outside :'-)