Encryption vs obfuscation

i using windows os and rclone 1.65.2.

I tried to use encrypt feature but for onedrive I got the following error

Failed to copy: invalidRequest: pathIsTooLong: Path is too long

after looking into the file and folder names in OneDrive, i noticed they become quite lengthy once encrypted. i have also come across the option of obfuscation, which seems to work well. could anyone explain the potential downsides of using obfuscation?

The best what you can do for crypt over onedrive remote is to use base32768 filenames' encoding. Default encoding is very limiting for this remote.

Obfuscation is "fake" encryption - everybody can read your files' names. Just need few mins to read docs how:)

1 Like

crypt over onedrive remote is to use base32768 filenames

can you please explain a bit more?

for obfuscation, I checked the file name. it gave a random name. i tried to read it by changing the extension, but I was not able to read it. is it something like base64 encoding?

Not exactly but not far:) This is why it is called obfuscation and not encryption.

for onedrive crypt use base32768 - it is the best what you can do.

1 Like

I am assuming that here you are talking about the base32768, not the obfuscation.

The general idea is that you can encode a lot of bytes as symbols. The reason this is generally not a good thing but is for OneDrive and Dropbox is how they calculate the length of a path.

For example, if you have a path name 泸☌棟 that is three characters but is UTF8 encoded as \xe6\xb3\xb8\xe2\x98\x8c\xe6\xa3\x9f or nine bytes. Many remotes have a maximum length in UTF8-encoded bytes (of which this is nine) but OneDrive and DropBox consider that as three characters (well, UTF16 code points but that is not immediately important)

The beauty if that there are 32768 possible characters in the encoding to encode 256 possible byte values so you can deeply "compress" the names. In fact, the names get shorter (in terms of characters). You can use this to shorten unencrypted names and not even encrypt the files if you wish!

1 Like

be careful with this statement. It only works for people using "western" alphabets. When you type korean or chinese there is no "compression" bonus. But people there are probably accustomed to some limitation more than we are.
Still base32768 is the best option for onedrive.

i tried base32768. but file name encrypted something like the Chinese alphabet. is it correct?


yes. it is correct. It is not chinese ideograms only (there is no chinese alphabet - as there is no phonetic or syllabic writing system). But base32768 needs 32768 characters - so it uses all sort of unicode possible. And yes a lot come from east asia so it looks like some oriental writing:)

Here a bit of background story:

if you are interested in "why/how"

thank you so much for all the help.

1 Like

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