And how to we know they don't collect other data but don't advertise it?
If they have a special deal with government, the court wouldn't even know about those, or might be instructed not to ask them and not disclose anything.
Valid question, which I don't have the answer for, but since Signal is open-source [1][2] it's open to lot of analysis. Since we haven't heard anything damaging so far, I'm guessing it's _secure enough_.
Another question then: can we verify (even if we have to jailbreak and check the binary) that the encrypted app delivered on iOS (and I presume Android) is built from the exact same source code?
E.g. could we build it ourselves in, say, Xcode, and compare a hash of the resulting app binary with the installed one?
Identical to what? Aren't iOS (at least) App Store apps encrypted, so even if I build one locally, I can't compare the resulting file with the encrypted app
I don't use iOS, so I'm not familiar, but surely there is a way to download app packages from their store to verify them and generally exercise due diligence and do security research?
Reproducible builds are notoriously hard even without having to worry about things like jailbreaking and app stores.
The point is not just that everyone can make their own, but that anyone who is competent enough can prove that their client code is exactly what is used to produce the version that gets distributed.
This means that with Telegram it shouldn't be possible to hide a backdoor in the client in a way that is impossible to spot.
You can audit your Signal client app (which is open source) and see exactly what it sends, and how.
Now realistically, most people can do that, so they have to trust that somebody who can actually did it. Security experts have been and are looking into messengers like Signal: they have an interest to do so as security researchers, because that would look good on their CV.
Of course there is trust somewhere, you cannot do without trust. But Signal is amongst the best you can find.
I know that part, that's why I asked "how can one tell the app blob in their phone is the same as the one produced if you build the code?".
The problem being that apps as installed from the App Store come (to my knowledge, could be wrong) encrypted. So you can't just compare an unencrypted local build with the encrypted installed app (and you can't decrypt the app or encrypt your build the same way, because you don't have the key, e.g. Apple has it - and iirc, there's no access to it, because it's held in the secure enclave in iOS case).
If they have a special deal with government, the court wouldn't even know about those, or might be instructed not to ask them and not disclose anything.