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

[Question]: where is the derived encryption key persisted? #115

Closed
cre8 opened this issue Jul 23, 2022 · 3 comments
Closed

[Question]: where is the derived encryption key persisted? #115

cre8 opened this issue Jul 23, 2022 · 3 comments

Comments

@cre8
Copy link

cre8 commented Jul 23, 2022

When reading the security paper the algorithm of how to generate the key from the password is explained, but I found no information about where the key for de/encrypting for the files on the server is stored.

Is there any documentation about it? Of course the derived encryption key is useless without having a valid access token to download + decrypt relevant information.

@cre8
Copy link
Author

cre8 commented Jul 23, 2022

Seems to be here:

u_storage.k = JSON.stringify(masterKeyArray32);

There aren't better ways to store it with latest technology, are there?

@dbm-mega
Copy link

Hello.
Q1 Answer:
Nodes (files/folders) keys are stored in the node's metadata (we call them node's attributes). The node's key is passed to the server along with other attributes after it gets encrypted with the user's Master-key.
Therefore, the servers will have an encrypted form of the node's key which cant be used to decrypt the node's content (data).

Only the user can decrypt nodes data after fetching their keys and using their own Master-key to decrypt the node's key, then use the decrypted node key to decrypt the data.

Q2 Answer:
This key storing is made for the purpose of keeping the session active for the user without the need for re-login.
So, the key gets stored if the user ticked "remember me" or till they log out.

@cre8
Copy link
Author

cre8 commented Jul 27, 2022

Thank you for clarification.

@cre8 cre8 closed this as completed Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants