We usually include checksums of .deb packages in the Debian world, just like the BSD world does with their .tgz Ports. APT does have a GPG backend to authenticate repositories. If you then download from e.g. HTTPS you are secure against MITM attacks on network layer, and package layer (provided the certificates are checked). It is still possible for hostile code to be inside a package no matter if it is a .deb or .rpm.