]> git.lizzy.rs Git - PAKEs.git/commitdiff
update deps: hkdf-0.6
authorBrian Warner <warner@lothar.com>
Tue, 21 Aug 2018 04:36:33 +0000 (21:36 -0700)
committerBrian Warner <warner@lothar.com>
Tue, 21 Aug 2018 04:36:33 +0000 (21:36 -0700)
Cargo.toml
src/spake2.rs

index 2022d3cba6aff0fbb76d75d8e85bd953a7e0bb19..bbabe21816bd11f961e513b7761081f721cc7f84 100644 (file)
@@ -19,7 +19,7 @@ travis-ci = { repository = "warner/spake2.rs" }
 curve25519-dalek = "0.19"
 rand = "0.5"
 sha2 = "0.7"
-hkdf = "0.5"
+hkdf = "0.6"
 num-bigint = "0.2"
 hex = "0.3"
 
index fe416cbfee0ab937b4d20aa3c9ca1cf5d5d06521..67c2acce0d49375c92602ad867b64b302fbe469a 100644 (file)
@@ -185,7 +185,8 @@ fn ed25519_hash_to_scalar(s: &[u8]) -> c2_Scalar {
     //  i = int(h, 16)
     //  i % q
 
-    let okm = Hkdf::<Sha256>::extract(Some(b""), s).expand(b"SPAKE2 pw", 32 + 16);
+    let mut okm = [0u8; 32+16];
+    Hkdf::<Sha256>::extract(Some(b""), s).expand(b"SPAKE2 pw", &mut okm).unwrap();
     //println!("expanded:   {}{}", "................................", okm.iter().to_hex()); // ok
 
     let mut reducible = [0u8; 64]; // little-endian