Cryptograpghy Understanding

I read about the encryption procees . But I want to know is it cryptomator who tear a file into chunks of 128 bit or it is aes 256?

Don’t know where you read that, but based on the documentation chunks are max 32 KiB (+48 bytes), and this is done by Cryptomator.
There is the corresponding code snipped in the doc.
https://docs.cryptomator.org/en/latest/security/architecture/#file-content-encryption

Sorry my mistake. So Cryptomator devides data into chunks of 32KB and again this chunk is divided into a block of 128 bit by aes.
SO when a video file is being played by a normal video player how cryptomator know which segment to decrypt and provide to mediaplayer? Is it webDav or WinFsp which ask cryptomator to read a file from a specific chunck and then cryptomator decrypts that chunk and provide it to Fuse or Webdav?

I guess there is a misunderstanding. If you play a video file from within your vault, the file is completely decrypted before given to the video player. This is also the case for any other file type. Every time a file from the vault is opened, it gets completely decrypted before actually opened. There is no streaming or what so ever.

Actually, @afzl-wtu is correct with this assumption:

The video player asks the file system to read a certain range of bytes, which Cryptomator translates to corresponding chunk numbers. For example, if the file system is asked for bytes 140000 - 180000, chunks 4 to 6 (which contain bytes 131073 - 196608) are being decrypted.

This way, when you open a large video file, you can immediately skip to a certain position.

1 Like

Last Question and thanks for the response.
So How WebDAV or Fuse works in the Android app?
Can I use this, as a fuse alternative, to decrypt files on the fly from mobile storage?

The Android and iOS apps work different, there is no virtual file system involved that can request byte ranges. In this case, Cryptomator downloads and decrypts the full file.

1 Like

Thanks for correcting. Wasn’t aware of that and it seems that I mixed up how mobile vs desktop works.