I don't think it's very useful but there's already a checksum in the meta data of an S3 object: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Object.h...
It might be better to keep an index of paths to checksums and use the checksum as object key in S3.
I'm not sure what you like to achieve but if you use restic with S3 as a backend you can achieve much better deduplicate and compression.