Change protocol version (3 -> 4) : PKDBF2 is renamed in PBKDF2. This also avoid mismatch with new encryption system
This commit is contained in:
@@ -122,7 +122,7 @@ function a2hex(str) {
|
||||
function derive_mkey(user, mkey)
|
||||
{
|
||||
url = url_domain(document.URL) + "/" + user;
|
||||
mkey = a2hex(pkdbf2(mkey, url, pkdbf2_level, 256/8));
|
||||
mkey = a2hex(pbkdf2(mkey, url, pbkdf2_level, 256/8));
|
||||
return mkey;
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ function PasswordEntry (ciphered_login, ciphered_password, salt, shadow_login) {
|
||||
this.shadow_login_to_access_token = function(masterkey)
|
||||
{
|
||||
var aes = new AES();
|
||||
var key = pkdbf2(hex2a(masterkey), hex2a(this.salt), pkdbf2_level, 256/8);
|
||||
var key = pbkdf2(hex2a(masterkey), hex2a(this.salt), pbkdf2_level, 256/8);
|
||||
var a_key = aes.init(hex2a(key));
|
||||
this.access_token = aes.encryptLongString(hex2a(this.shadow_login), a_key);
|
||||
this.access_token = a2hex(this.access_token);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
along with gPass. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
function pkdbf2 (password, salt, iterations, outlen) {
|
||||
function pbkdf2 (password, salt, iterations, outlen) {
|
||||
var result = "";
|
||||
var temp = "";
|
||||
var temp2 = "";
|
||||
Reference in New Issue
Block a user