A checksum tells you a file arrived intact, but anyone can make a new checksum for a changed file. A signature ties the file to a private key that only you have.
Sign with the private key, then share the file, the signature and your public key:
openssl dgst -sha256 -sign private.pem -out backup.tar.gz.sig backup.tar.gz
openssl pkey -in private.pem -pubout -out public.pem
Whoever receives it checks the signature against the public key:
openssl dgst -sha256 -verify public.pem -signature backup.tar.gz.sig backup.tar.gz
A good match prints Verified OK and exits with 0. If even one byte of the file changed, or the signature was made with another key, you get Verification failure and exit code 1, which a script can act on.
I think this is a neat fit for a homelab: sign a config bundle or a script on one machine, and only run it on another one after the check passes. An EC key from genpkey works well and keeps the signature small. With an Ed25519 key, leave out -sha256: EdDSA does its own hashing, and OpenSSL 3 refuses an explicit digest with an error.
The check is only as good as the public key you compare with. If someone can swap both the file and public.pem, the check passes on their file. Get the public key to the other side once, over a channel you trust, and keep it there.
Further reading: OpenSSL: openssl-dgst, OpenSSL: openssl-pkeyutl