You have a quaint and obsolete notion. What's "trusted"? You want, for example, VLC, you have to download it from a unpaid network of mirrors. Commercial software comes from various CDNs. Even the Apple stores allow local caching proxies (using OS X Server), so you may not be downloading from Apple. How do you know it wasn't tampered with in the CDN? Did you use TLS/HTTPS when you downloaded it? How do you know somebody on the network didn't tamper with it then?
Is that a serious question?! You calculate the checksum (MD5, SHA1, ... ) of the binary you just downloaded and compare it against whatever values the /original/ website provides. If a mismatch: someone has tampered with the file!
It's as easy as that!