diff --git a/.changes/bump-iota-crypto.md b/.changes/bump-iota-crypto.md new file mode 100644 index 000000000..1ddeae0c7 --- /dev/null +++ b/.changes/bump-iota-crypto.md @@ -0,0 +1,5 @@ +--- +"iota-stronghold": minor +--- + +Bump `iota-crypto` version to 0.18.0. diff --git a/bindings/native/Cargo.toml b/bindings/native/Cargo.toml index f0ed6e13c..dcbf3a51c 100644 --- a/bindings/native/Cargo.toml +++ b/bindings/native/Cargo.toml @@ -23,7 +23,7 @@ iota_stronghold = { package = "iota_stronghold", path = "../../client/ engine = { package = "stronghold_engine", path = "../../engine", version = "1.0.0" } tokio = { version = "1.15.0", features = ["full"] } base64 = { version = "0.13.0" } -iota-crypto = { version = "0.15.1", default-features = false, features = [ +iota-crypto = { version = "0.18.0", default-features = false, features = [ "aes-gcm", "aes-kw", "random", diff --git a/client/Cargo.toml b/client/Cargo.toml index 0cc6742ce..d2406a3a0 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -20,7 +20,7 @@ insecure = [ ] thiserror = { version = "1.0.30" } zeroize = { version = "1.5.7", default-features = false, features = [ "zeroize_derive" ] } serde = { version = "1.0", features = [ "derive" ] } -iota-crypto = { version = "0.15.1", default-features = false, features = [ +iota-crypto = { version = "0.18.0", default-features = false, features = [ "aes-gcm", "blake2b", "aes-kw", diff --git a/client/src/procedures/primitives.rs b/client/src/procedures/primitives.rs index 285928944..9aa53862d 100644 --- a/client/src/procedures/primitives.rs +++ b/client/src/procedures/primitives.rs @@ -736,7 +736,7 @@ pub struct Pbkdf2Hmac { pub salt: Vec, - pub count: u32, + pub count: core::num::NonZeroU32, pub output: Location, } @@ -748,17 +748,17 @@ impl GenerateSecret for Pbkdf2Hmac { let secret = match self.hash_type { Sha2Hash::Sha256 => { let mut buffer = [0; SHA256_LEN]; - PBKDF2_HMAC_SHA256(&self.password, &self.salt, self.count as usize, &mut buffer)?; + PBKDF2_HMAC_SHA256(&self.password, &self.salt, self.count, &mut buffer); buffer.to_vec() } Sha2Hash::Sha384 => { let mut buffer = [0; SHA384_LEN]; - PBKDF2_HMAC_SHA384(&self.password, &self.salt, self.count as usize, &mut buffer)?; + PBKDF2_HMAC_SHA384(&self.password, &self.salt, self.count, &mut buffer); buffer.to_vec() } Sha2Hash::Sha512 => { let mut buffer = [0; SHA512_LEN]; - PBKDF2_HMAC_SHA512(&self.password, &self.salt, self.count as usize, &mut buffer)?; + PBKDF2_HMAC_SHA512(&self.password, &self.salt, self.count, &mut buffer); buffer.to_vec() } }; diff --git a/engine/Cargo.toml b/engine/Cargo.toml index 9c0831bd7..3acb0a522 100644 --- a/engine/Cargo.toml +++ b/engine/Cargo.toml @@ -37,7 +37,7 @@ serde = { version = "1.0", features = [ "derive" ] } default-features = false [dependencies.iota-crypto] - version = "0.15.1" + version = "0.18.0" features = [ "random", "chacha", diff --git a/engine/fuzz/Cargo.toml b/engine/fuzz/Cargo.toml index 7199e368c..5404022c1 100644 --- a/engine/fuzz/Cargo.toml +++ b/engine/fuzz/Cargo.toml @@ -18,7 +18,7 @@ path = "../" version = "0.4" [dependencies.iota-crypto] -version = "0.7.0" +version = "0.18.0" features = [ "random", "chacha" ] default-features= false diff --git a/engine/runtime/Cargo.toml b/engine/runtime/Cargo.toml index 7ac0cd377..596b7eb63 100644 --- a/engine/runtime/Cargo.toml +++ b/engine/runtime/Cargo.toml @@ -24,7 +24,7 @@ serde = { version = "1.0", features = [ "derive" ] } random = { version = "0.8.4", package = "rand" } dirs = { version = "4.0.0" } thiserror = { version = "1.0" } -iota-crypto = { version = "0.15.1", default-features = false, features = [ "blake2b" ] } +iota-crypto = { version = "0.18.0", default-features = false, features = [ "blake2b" ] } [target."cfg(windows)".dependencies] windows = { version = "0.36.0", features = [