password now encrypts random "data key" which is then used for encryption of the actual data

This commit is contained in:
azivner
2017-09-16 23:21:46 -04:00
parent fdc668e28b
commit 1d395badfa
8 changed files with 107 additions and 48 deletions

View File

@@ -83,17 +83,17 @@ function setExpandedToServer(note_id, is_expanded) {
});
}
let globalVerificationSalt;
let globalEncryptionSalt;
let globalEncryptionSessionTimeout;
let globalEncryptedDataKey;
$(function(){
$.get(baseUrl + 'tree').then(resp => {
const notes = resp.notes;
let startNoteId = resp.start_note_id;
globalVerificationSalt = resp.verification_salt;
globalEncryptionSalt = resp.encryption_salt;
globalEncryptionSalt = resp.password_derived_key_salt;
globalEncryptionSessionTimeout = resp.encryption_session_timeout;
globalEncryptedDataKey = resp.encrypted_data_key;
if (document.location.hash) {
startNoteId = document.location.hash.substr(1); // strip initial #