signalapp / libsignal

Home to the Signal Protocol as well as other cryptographic primitives which make Signal possible.
GNU Affero General Public License v3.0
3.42k stars 398 forks source link

zkgroup: Move blob padding/unpadding into Rust #416

Closed jrose-signal closed 2 years ago

jrose-signal commented 2 years ago

Previously this was defined in the app layers, because zkgroup's original codegen didn't support custom exception types. However, we can now move it to a common implementation in Rust.

This could live in libsignal-bridge, or in the zkgroup crate proper. I chose libsignal-bridge because padding isn't an inherent requirement for the zkgroup encryption format, but it could go either way.

jrose-signal commented 2 years ago

I chose libsignal-bridge because padding isn't an inherent requirement for the zkgroup encryption format, but it could go either way.

I think I've changed my mind on this; putting non-trivial behavior in libsignal-bridge means people have to pay more attention to libsignal-bridge when something goes wrong. Normally I'd look at the app-level interface or the Rust implementation first, then the other, before looking at the bridge layer. Update coming shortly.