Skip to content

Commit

Permalink
Merge pull request #13 from iqlusioninc/hkdf/v0.8.0
Browse files Browse the repository at this point in the history
Upgrade hkdf to v0.8.0
  • Loading branch information
tony-iqlusion authored Mar 3, 2020
2 parents 27252d3 + f671cd3 commit ea16f76
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ chrono = "0.4"
getrandom = "0.1"
gumdrop = "0.7"
hkd32 = { version = "0.3", default-features = false, features = ["mnemonic"] }
hkdf = "0.7"
hkdf = "0.8"
hmac = "0.7"
once_cell = "1.3"
prost-amino = "0.5"
Expand Down
2 changes: 1 addition & 1 deletion src/commands/yubihsm/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ fn generate_mnemonic_from_hsm_and_os_csprngs(hsm_connector: &Connector) -> mnemo
ikm.extend_from_slice(&[0u8; KEY_SIZE]);
getrandom(&mut ikm[KEY_SIZE..]).expect("RNG failure!");

let kdf = Hkdf::<Sha512>::extract(None, &ikm);
let kdf = Hkdf::<Sha512>::new(None, &ikm);

// 32-bytes (256-bits) -> 24 BIP32 words
let mut okm = [0u8; KEY_SIZE];
Expand Down
2 changes: 1 addition & 1 deletion src/connection/secret_connection/kdf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl Kdf {
pub fn derive_secrets_and_challenge(shared_secret: &[u8; 32], loc_is_lo: bool) -> Self {
let mut key_material = [0u8; 96];

Hkdf::<Sha256>::extract(None, shared_secret)
Hkdf::<Sha256>::new(None, shared_secret)
.expand(HKDF_INFO, &mut key_material)
.unwrap();

Expand Down

0 comments on commit ea16f76

Please sign in to comment.