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
63 stars 28 forks source link

Support avatar decryption #137

Open nanu-c opened 2 years ago

nanu-c commented 2 years ago

On Android it uses this function:

nonce has 12 bytes from the the beginning of the avatar and the profile key has a length of 32.

https://github.com/signalapp/Signal-Android/blob/a47448b6c6c26a0d7f7156ce54eeaf2a6a34ed5d/libsignal/service/src/main/java/org/whispersystems/signalservice/api/crypto/ProfileCipherInputStream.java#L22-L35

https://github.com/signalapp/libsignal-client/blob/86ba9b5b60f6bbd3b42833e3144708d8c75f2dde/rust/bridge/shared/src/crypto.rs#L20-L42

Are you planing to use libsignal-client decryption/encryption functions in all the places in the future?

rubdos commented 2 years ago

Are you planing to use libsignal-client decryption/encryption functions in all the places in the future?

Yes, back in the time this crate was started they didn't exist yet. We had our own libsignal-protocol-rs... Also, we want to upstream as much as possible to libsignal-client.

gferon commented 2 years ago

I think this will pair very well with https://github.com/whisperfish/libsignal-service-rs/pull/119 🤓