Crypt: Filename Encryption Only

Onedrive limit file path length to 400 characters while gdrive have a much relaxed limit.
Therefore, I don't encrypt the filename when uploading to onedrive. But I want to encrypt filename on google drive.
Now I have my computer to sync files to onedrive and a VPS to sync files from onedrive to google drive. Since they uses different filename encryption config, the VPS have to decrypt and encrypt every file even though I uses same key.
What if we add an encrypt filename only mode to avoid this?

That already exists:

You can choose to encrypt on the file names.

I uses crypt to encrypt file content for both Onedrive and GDrive. Onedrive = crypt file content, GDrive = crypt content + filename.
I want VPS that to sync from Onedrive to GDrive, without decrypt and encrypt file content.

You'd have to use the same method for encryption on both as there's no --magic flag.

1 Like

I did a proof of concept.

My Computer would runs rclone sync {local-path} crypt_onedrive: using

[crypt_onedrive]
    type = crypt
    remote = OD:
    filename_encryption = off
    directory_name_encryption = false
    password = [password1]
    password2 = [password2]
    file_content_encryption = true
    filename_password = [fn_pass]

VPS runs rclone sync crypt_fn_onedrive: crypt_fn_gdrive: using

[crypt_fn_onedrive]
    type = crypt
    remote = OD:
    filename_encryption = off
    directory_name_encryption = false
    password = [fn_pass]
    file_content_encryption = false
[crypt_fn_gdrive]
    type = crypt
    remote = GD:
    filename_encryption = standard
    directory_name_encryption = true
    password = [fn_pass]
    file_content_encryption = false

Access to encrypted gdrive would be

[crypt_gdrive]
    type = crypt
    remote = GD:
    filename_encryption = standard
    directory_name_encryption = true
    password = [password1]
    password2 = [password2]
    file_content_encryption = true
    filename_password = [fn_pass]

This change can avoid re-encryption of file and avoid putting the password on to VPS.

Great? I'm not sure what problem you are trying to solve but if you got it working, that's superb.

I'm pretty sure there is an issue or PR for disabling file encryption already: https://github.com/rclone/rclone/pull/2981

Why do you need a separate password for the file name encryption?

That's great.
Separating passwords is a minor issue. I don't want to put my password on VPS just to copy the files, increasing the surface of attack.

1 Like

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