Skip to content

Commit

Permalink
Bump crypto
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Coats committed May 3, 2023
1 parent 6a2c6e7 commit a860896
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changes/bump-iota-crypto.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"iota-stronghold": minor
---

Bump `iota-crypto` version to 0.18.0.
2 changes: 1 addition & 1 deletion bindings/native/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions client/src/procedures/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ pub struct Pbkdf2Hmac {

pub salt: Vec<u8>,

pub count: u32,
pub count: core::num::NonZeroU32,

pub output: Location,
}
Expand All @@ -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()
}
};
Expand Down
2 changes: 1 addition & 1 deletion engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion engine/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion engine/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down

0 comments on commit a860896

Please sign in to comment.