Skip to content

Update architecture.rst #50

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

Merged
merged 4 commits into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions source/security/architecture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ When opening a vault, the following steps have to be followed:

#. Decode ``vault.cryptomator`` without verification.
#. Read ``kid`` header and, depending on its value, retrieve the masterkey from the specified location.
#. Verify the JWT signature using the masterkey.
#. Verify the JWT signature using the concatenation of encryption masterkey and MAC masterkey.
#. Make sure ``format`` and ``cipherCombo`` are supported.


Expand Down Expand Up @@ -125,7 +125,7 @@ The JWE's decrypted payload holds a single value, which can then be consumed by
Masterkey File
^^^^^^^^^^^^^^

Alternatively, for normal password-protected vaults, Cryptomator will derive a :abbr:`KEK (Key-encryption key)` via `scrypt <https://tools.ietf.org/html/rfc7914>`_, encrypt the masterkeys using `AES Key Wrap (RFC 3394) <https://tools.ietf.org/html/rfc3394>`_,
Alternatively, for normal password-protected vaults, Cryptomator will derive a 32byte long :abbr:`KEK (Key-encryption key)` via `scrypt <https://tools.ietf.org/html/rfc7914>`_ (non-parallel), encrypt both masterkeys using `AES Key Wrap (RFC 3394) <https://tools.ietf.org/html/rfc3394>`_,
and store the results together with the key derivation parameters in a JSON file:

.. code-block:: console
Expand Down Expand Up @@ -160,4 +160,4 @@ When unlocking a vault the KEK is used to unwrap (i.e. decrypt) the stored maste
.. image:: ../img/security/masterkey-decryption@2x.png
:alt: Masterkey Decryption
:width: 440px
:align: center
:align: center
2 changes: 1 addition & 1 deletion source/security/vault.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The payload of the last chunk may be smaller than 32 KiB.
cleartextChunks[] := split(cleartext, 32KiB)
for (int i = 0; i < length(cleartextChunks); i++) {
chunkNonce := createRandomBytes(12)
aad := [bigEndian(i), headerNonce]
aad := bigEndian(i) . headerNonce
ciphertextPayload, tag := aesGcm(cleartextChunks[i], contentKey, chunkNonce, aad)
ciphertextChunks[i] := chunkNonce . ciphertextPayload . tag
}
Expand Down