Illustrates the two-stage decryption process in Joplin, detailing how the Master Password decrypts the Master Key, which then decrypts notes and resources.
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
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.
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.
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.