Skip to content

Commit 3ade94c

Browse files
authored
Document the purpose of dirid.c9r file
Closes #29
2 parents bb070e0 + 762af0a commit 3ade94c

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

source/security/architecture.rst

+22
Original file line numberDiff line numberDiff line change
@@ -336,3 +336,25 @@ A vault containing several nodes with very long names might result in a cipherte
336336
├─ masterkey.cryptomator
337337
├─ masterkey.cryptomator.DFD9B248.bkup
338338
└─ vault.cryptomator
339+
340+
341+
.. _security/architecture/backup-directory-ids:
342+
343+
Backup Directory IDs
344+
--------------------
345+
346+
.. note::
347+
348+
This layer is optional and not required for a complete implementation of the Cryptomator Encryption Scheme.
349+
It doesn't provide any additional security.
350+
Its sole purpose is to increase data recoverability in case of missing or damaged directory files.
351+
352+
By obfuscating the hierarchy of cleartext paths using ``dir.c9r`` files, which contain :ref:`directory IDs <security/architecture/directory-ids>`, the directory structure is more vulnerable to problems like incomplete synchronization or bit rotting.
353+
354+
When a directory file is missing or damaged, the ``dirPath`` cannot be computed, which effectively makes the directory content inaccessible in the :ref:`virtual filesystem <security/architecture/virtual-filesystem>`.
355+
In theory, the contents of the encrypted content of these files can be recovered.
356+
But since the :ref:`filename encryption <security/architecture/filename-encryption>` is dependent on the directory ID of the parent folder, which is only stored in the directory file, names of all items (files, directories, or symlinks) are lost.
357+
358+
To alleviate this issue, a backup directory file will be stored during the creation of a directory.
359+
Inside the ciphertext directory, a file named ``dirid.c9r`` will be created, which contains the directory ID of its parent folder.
360+
It is :ref:`encrypted <security/architecture/file-content-encryption>` like a regular ciphertext file.

0 commit comments

Comments
 (0)