diff --git a/services/root-keys/Cargo.toml b/services/root-keys/Cargo.toml index d4f2560b9..2738cfe15 100644 --- a/services/root-keys/Cargo.toml +++ b/services/root-keys/Cargo.toml @@ -33,7 +33,7 @@ aes-kw = { version = "0.2.1", features = ["alloc"] } # bcrypt cipher = "0.4.3" -blowfish = { version = "0.8.0", features = ["bcrypt"] } +blowfish = { version = "0.9.1", features = ["bcrypt"] } # password modals - keep them in this crate to minimize plaintext password manipulations gam = { path = "../gam" } diff --git a/services/root-keys/src/bcrypt.rs b/services/root-keys/src/bcrypt.rs index bb9da43d8..22087a34e 100644 --- a/services/root-keys/src/bcrypt.rs +++ b/services/root-keys/src/bcrypt.rs @@ -62,9 +62,9 @@ pub fn bcrypt(cost: u32, salt: &[u8], pw: &str, output: &mut [u8]) { for i in 0..3 { let i: usize = i * 2; for _ in 0..64 { - let (l, r) = state.bc_encrypt(ctext[i], ctext[i + 1]); - ctext[i] = l; - ctext[i + 1] = r; + let lr = state.bc_encrypt([ctext[i], ctext[i + 1]]); + ctext[i] = lr[0]; + ctext[i + 1] = lr[1]; } let buf = ctext[i].to_be_bytes();