File names are too long


First of all thank you for making Cryptomator! But i have run into a problem regarding file name length.

The problem is i use, STACK as my cloud provider. They have a file name limit of 148 characters (including file extension). Any larger than that, it will not be synced to their cloud. I have 4 files that exceed this limit. Is there any way i can set a limit to the file name length?

Cryptomator 1.5.0b2 (Wasn’t sure to post it in help or development, since i do not know if this is a 1.5.0 thing or not)
OS: Linux Mint 19.3 Tricia
Cloud provider: TransIP STACK.
Storage PC: 4TB Hard Drive formatted to EXT4.

Any help is appreciated!

Sadly, this can not be configured. Beginning with the new vault format introduced in 1.5.0, Cryptomator creates ciphertext filenames with up to 220 chars. Any software compatible with the new vault format needs to be able to rely on deterministic filename encryption.

Thanks for your reply and explanation on why this is happening. So what can i do? Can i just remove the file from the vault. Then put it back in, and hope the file will be encrypted with a shorter file name?

No, filename encryption is deterministic. This means you will always get the same encrypted filename of a given cleartext path inside the same vault.

The length of the ciphertext filename correlates with the cleartext filename. However, I can tell you what the maximum cleartext filename is that your vault content is allowed to have:

Max ciphertext filename (including .c9r) is 148
Max ciphertext filename (excluding .c9r) is 144
Using base64 encoding 144/4*3 gives us 108 bytes
Subtracting 16 bytes IV we have 92 bytes for encrypted payload.

If you only use regular (ASCII) chars in your filenames, you can therefore use up to 92 chars for filenames inside your vault.

Many Unicode chars require multiple bytes, though. So 92 bytes would then only allow maybe 85 chars.

Search for files with long names inside your vault. Simply rename them, the encrypted name will then change, too. Sync should then work again.

Absolutely amazing support mate! Thanks for explaining. I’ll rename my files to only use ASCII characters then i won’t run into trouble it seems.

1 Like

It doesn’t hurt if there is a unicode char every now and then. For example the German ä takes two bytes. For a files is named 2020-02-12 example document with a long näme.pdf its 48 char filename will take up 49 bytes.

So if you stick below roughly 80 chars, you should be safe (for western languages, that is).