canmove, Confirmed users
725
edits
(Update.) |
|||
Line 48: | Line 48: | ||
So long as the salt is available, other clients can apply PBKDF2 to their stored passphrase and the salt to yield the new key without any re-entry or J-PAKE-style key distribution. | So long as the salt is available, other clients can apply PBKDF2 to their stored passphrase and the salt to yield the new key without any re-entry or J-PAKE-style key distribution. | ||
A known fixed string (which includes encryption algo details) and the username are used as input to SHA256-HMAC. The hash operations are chained. | A known fixed string (which includes encryption algo details) and the username are used as input to SHA256-HMAC. The hash operations are chained. | ||
let m = Utils.decodeKeyBase32(syncKey); | |||
// Reuse the hasher. | // Reuse the hasher. | ||
let h = Utils.makeHMACHasher(); | let h = Utils.makeHMACHasher(); | ||
Line 71: | Line 66: | ||
// Save them. | // Save them. | ||
this._encrypt = btoa(enc); // WeaveCrypto expects | this._encrypt = btoa(enc); // WeaveCrypto expects base64 | ||
this._hmac = hmac; | this._hmac = hmac; | ||