How does rclone do hash comparison of encrypted files?

What is the problem you are having with rclone?

Say I am doing a one way sync from my computer to B2 and I am using crypt.

The files on the left are not encrypted, and the files on the right are encrypted. You can't compare the hashes of the two files since they are not the same.

So what is rclone doing?

Is it storing the hash of the unencrypted file in some pre/post bits?

Run the command 'rclone version' and share the full output of the command.

N/A

Which cloud storage system are you using? (eg Google Drive)

N/A

The command you were trying to run (eg rclone copy /tmp remote:tmp)

N/A

The rclone config contents with secrets removed.

N/A

A log from the command with the -vv flag

N/A

rclone does not store the hash.

Hashes are not stored for crypt. However the data integrity is protected by an extremely strong crypto authenticator.
Use the rclone cryptcheck command to check the integrity of a crypted remote instead of rclone check which can't check the checksums properly.

Got that.

But then how exactly is it comparing hashes. It either must store hash or do on the fly unencryption to calculate the hash…

When you upload rclone calculates the hash of the encrypted data and compares with what the provider returns.

Rclone cryptcheck does a similar thing.

Does it calculate hash server side or does it have to download to do that?

Nevermind. I see some cloud providers (like B2) provide checksums of the file on file list and I assume rclone just uses that...

Yes that is right. Then we get a really got idea as to whether the data is corrupted or not.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.