Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store (encrypted) DirectoryID inside of ciphertext directory #113

Closed
infeo opened this issue Sep 6, 2021 · 4 comments · Fixed by #118
Closed

Store (encrypted) DirectoryID inside of ciphertext directory #113

infeo opened this issue Sep 6, 2021 · 4 comments · Fixed by #118
Assignees
Milestone

Comments

@infeo
Copy link
Member

infeo commented Sep 6, 2021

With CryptoFS 2.1.0 exists a possibilty to restore orphaned directories. The only downside of this method (and also other health fixes of Diagnostic Results) is, that the for the fix important dirId is not present by looking only at the encrypted vault structure and hence all files inside the orphaned dir need new, arbitrary names.

After implementing #47, this problem can be solved by storing the directory ID within the dir node itself, simplyfing the retrieveal if the dirID and making also more fixes possible.

@overheadhunter
Copy link
Member

Or alternatively (since xattr may not survive sync) we can store it in a dedicated file inside the dir. This may need encryption to prevent attackers to descramble the dir structure.

@infeo
Copy link
Member Author

infeo commented Nov 29, 2021

Regarding encryption: The dirId can be encrypted with the masterkey and the rootDir as AD. That way, we can always decrypt it and it is has the same protection level as everything else.

@overheadhunter
Copy link
Member

and the rootDir as AD

can you explain what purpose this serves?

@infeo
Copy link
Member Author

infeo commented Nov 29, 2021

can you explain what purpose this serves?

The intention was to unify some code, but a short research and talk showed me, this is completely unnecessary^^

@infeo infeo changed the title Store (encrypted) DirectoryID in extended attributes of directory Store (encrypted) DirectoryID inside of ciphertext directory Mar 31, 2022
@infeo infeo self-assigned this Mar 31, 2022
@infeo infeo closed this as completed in #118 Apr 1, 2022
@infeo infeo added this to the 2.4.1 milestone Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants