Joplin Decryption Flow

Auth & Payment Flows · flowchart diagram · NOASSERTION

Illustrates the two-stage decryption process in Joplin, detailing how the Master Password decrypts the Master Key, which then decrypts notes and resources.

Source: https://github.com/laurent22/joplin/blob/9e46f80713c5b7c13d40a21b137539b644748ac0/readme/dev/spec/e2ee/native_encryption.md
Curated by laurent22
Joplin Decryption Encryption Security Flowchart Data Protection Master Key

Mermaid source

graph LR;
    pwd[Master<br/>Password]
    mk[Master Key]
    emk[Encrypted<br/>Master Key]
    dec_1(("EncryptionService<br/>.decrypt()"))
    sync[(Sync Target)]
    pt[Notes/Resources]
    dec_2(("EncryptionService<br/>.decrypt()"))
    ct[Encrypted<br/>Notes/Resources]

    sync-->ct
    sync-->emk
    subgraph Master Key Decryption
        pwd-->dec_1
        emk-->dec_1
        dec_1-->mk
    end
    subgraph Data Decryption
        mk-->dec_2
        ct-->dec_2
        dec_2-->pt
    end

What this diagram shows

This diagram illustrates the two-stage decryption process used in Joplin. It shows how the Master Password and the Encrypted Master Key are used by an EncryptionService to derive the Master Key. Subsequently, this Master Key, along with Encrypted Notes/Resources from a Sync Target, is used by another EncryptionService to decrypt the actual Notes/Resources.

When to use it

Use this diagram to explain or document secure data decryption workflows, especially in applications that use multi-layered encryption with master keys. It's suitable for demonstrating how encrypted data is retrieved and made accessible to a user.

How to adapt it for your project

To adapt this diagram, you could add more details about the specific cryptographic algorithms used, integrate error handling paths, or expand on the 'Sync Target' to show different storage options. For other applications, replace 'Joplin' with the relevant product name and adjust key/data labels accordingly.

Key concepts