I want to run a "reverse" cryptcheck for a remote crypt mount I have vs the source google drive.
The way I understand cryptcheck works after reading the docs is that it first downloads the file in the source Google Drive, encrypts it on the fly using the same nonce from the crypt mount, and then compares the hashes against each other. Instead of that, I want some kind of checksum check where it downloads the encrypted file from the crypt mount, calculates a hash on the unencrypted file, and compares it to the MD5/SHA1 hash already calculated by google drive.
Is this possible? The main reason for this is that my crypt remote has no download bandwidth limitations but the google drive source has a 4-5TB per day download limitation I run into.
One final question - is there a way to run rclone cryptcheck across just a random sample of files comparing one remote to another? For example my remote is 60TB so ideally I'd just run a random sample across say 1TB for cryptcheck and that will tell me if the files transferred generally okay without any issues/corruption.
Edit the file to randomly remove some number of lines. There are various tools that can help you with this. You could, for example, sort them in a random order and then copy the first X number of lines to a new file.
Use the edited file list as a --files-from filter for cryptcheck.
Alternatively, if true randomness is not important, you could approximate more quickly by getting creative with filters. For example, you could run cryptcheck with something like --include "*q*" to include only filenames which contain the letter q (likely a relatively small sampling -- but not truly random.)
It is an interesting idea and perhaps rclone should consider adding some sort of spot-check command/flag for this use case (for example, I could imagine using it to randomly do a check --download on my files from time to time to look for bit-rot.) If others would find this useful as well, I could probably be convinced to develop this.