cryptomator / cryptomator/cryptofs

Support for UserDefinedFileAttributeView

Open
#47 2 comments 0 reactions 1 assignee Claimed by @overheadhunter View on GitHub
Dominant language
Java
Stars
109
Forks
37
PR merge metrics
No merged PRs in 30d

Description

If the underlying file system [supports it](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/FileStore.html#supportsFileAttributeView(java.lang.Class)), we should allow retrieval of a [`UserDefinedFileAttributeView`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/attribute/UserDefinedFileAttributeView.html).

Maximum xattr name length on macOS is 127 chars (255 on Linux, unknown on Windows). Subtracting the prefix, we have 118 usable chars to store a base64-encoded value or in other words: 87 bytes. If we subtract a 16 byte IV, we can store up to 71 cleartext bytes.

Therefore we need to decide, if this is sufficient or whether we want a deterministic scheme (SIV) and then hash the name, which slows down listing but essentially allows any length. We need to [collect some data](https://community.cryptomator.org/t/how-long-are-your-extended-attributes/7280) to decide this.

One further advantage of using SIV (+hash), is the ability to cache names and thus speed up xattr listings and decryption independent of the dir. This comes with the disadvantage, that xattr names repeat across different dirs, leaking some information.

Content encryption should be the same as for file contents.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.