Signal contact address book is wholly kept separate from your phone OS contact address book, even when you say yes to permission to share the OS contact address book.
If you say no to the sharing of contact, then ONLY those contacts created WITHIN Signal’s own contact address book would have each Signal contact’s phone number as numerically big-hashed (within your own phone), then only those hash value of your limited Signal contact address book would be (naturally) sent to Signal server.
This is why I said “if you don’t mind the obtuse associativity”. And that is OK for most OpSec.
What is most important here is whatever you typed, only that other contact’s phone would be able to see this, no place else. That is, until the adversary gets their hand on one of the phone before its timed message deletion period.
This is all in the source code here
They already do all of those things. https://github.com/signalapp/Signal-Android
And here's the server implementation you can also run yourself: https://github.com/signalapp/Signal-Server
Telegram has also been exploited multiple times, while signal has held up against a US federal subpoena.
https://www.theverge.com/2016/10/4/13161026/signal-subpoena-...
Assuming the checks are not hash-based (literally any mutations to a file make these worthless, and the libraries of hashes of illegal content are gigabytes and growing), the computing power required on the client side is infeasible to ship in a product intended for any modest consumer hardware.
Let's assume this is limited to child pornography only. You first need to store some perceptually-encoded version of _every_ illegal image on the user's device (in such a way that it's impossible to reverse-engineer one of the images back out). Then you need to try to match the image being sent against each of the encoded versions of each of those images. On a server farm, that's _maybe_ practical. On someone's crappy Samsung Galaxy phone from 2013, it would take days or weeks to process a single image.
Let's assume it _was_ some hash based check. People complain that the Facebook Messenger app is over a hundred megabytes. Do you think someone is going to download the Signal client onto their phone with a gig of file hashes so that they can get reported to the police in the event that one of their images has a prohibited hash? No, that's crazy.
And even if it _was_ feasible, Signal is open source [0]. It would take a single person maybe a day of works tops to create a version without those restrictions and throw an APK onto a static website.
Edit: see below, server code is open. Keeping original text below:
IIRC the server code is proprietary, but the clients are open. That's a decent starting point.
I don't know where you got the impression this wasn't the case. An earlier VOIP product of theirs (RedPhone) had a proprietary server implementation, but ever since the feature was added to Signal proper it has been free software.
[1]: https://github.com/signalapp/Signal-Server [2]: https://github.com/signalapp/Signal-Android [3]: https://github.com/signalapp/Signal-iOS [4]: https://github.com/signalapp/Signal-Desktop
Can't I build and use this if I want? It looks very open, but I haven't tried building my own client.