05/18 Enhanced codes and functionalities

This commit is contained in:
2026-05-18 11:38:28 -04:00
parent 22fff0660e
commit fc4145a78e
8 changed files with 197 additions and 13 deletions
+4 -2
View File
@@ -2,9 +2,11 @@
* recover.js — Account recovery flow
*
* Step 1: User provides email + recovery code.
* - Fetch recovery data (enc_key_salt, recovery_enc_salt, recovery_iv) from server.
* - Fetch recovery data (recovery_enc_salt, recovery_iv, nonce) from server.
* NOTE: enc_key_salt is NOT returned here — the client must derive it by
* decrypting the recovery blob with the recovery code.
* - Derive recovery key from the recovery code (PBKDF2).
* - Decrypt enc_key_salt using the recovery key.
* - Decrypt recovery_enc_salt using the recovery key → decrypted enc_key_salt.
* - If decryption succeeds, store decrypted enc_key_salt in module state → show step 2.
*
* Step 2: User provides new master password.