]> git.lizzy.rs Git - PAKEs.git/commitdiff
spake2: bump `hkdf` dependency to v0.11 (#63)
authorTony Arcieri <bascule@gmail.com>
Thu, 26 Aug 2021 01:29:02 +0000 (19:29 -0600)
committerGitHub <noreply@github.com>
Thu, 26 Aug 2021 01:29:02 +0000 (19:29 -0600)
Cargo.lock
spake2/Cargo.toml
spake2/src/lib.rs

index 2a21e428fd6eca0fa9b64d8bdcf67dd7876bf1da..04813770c1f072a69ffde327484a391a726954df 100644 (file)
@@ -1,5 +1,7 @@
 # This file is automatically @generated by Cargo.
 # It is not intended for manual editing.
+version = 3
+
 [[package]]
 name = "autocfg"
 version = "0.1.7"
@@ -24,18 +26,6 @@ version = "1.2.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
 
-[[package]]
-name = "block-buffer"
-version = "0.7.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b"
-dependencies = [
- "block-padding",
- "byte-tools",
- "byteorder",
- "generic-array 0.12.4",
-]
-
 [[package]]
 name = "block-buffer"
 version = "0.9.0"
@@ -45,21 +35,6 @@ dependencies = [
  "generic-array 0.14.4",
 ]
 
-[[package]]
-name = "block-padding"
-version = "0.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5"
-dependencies = [
- "byte-tools",
-]
-
-[[package]]
-name = "byte-tools"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7"
-
 [[package]]
 name = "byteorder"
 version = "1.4.3"
@@ -113,12 +88,12 @@ checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634"
 
 [[package]]
 name = "crypto-mac"
-version = "0.7.0"
+version = "0.11.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5"
+checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714"
 dependencies = [
- "generic-array 0.12.4",
- "subtle 1.0.0",
+ "generic-array 0.14.4",
+ "subtle",
 ]
 
 [[package]]
@@ -131,7 +106,7 @@ dependencies = [
  "clear_on_drop",
  "digest 0.8.1",
  "rand_core 0.3.1",
- "subtle 2.4.0",
+ "subtle",
 ]
 
 [[package]]
@@ -152,12 +127,6 @@ dependencies = [
  "generic-array 0.14.4",
 ]
 
-[[package]]
-name = "fake-simd"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
-
 [[package]]
 name = "fuchsia-cprng"
 version = "0.1.1"
@@ -191,22 +160,22 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
 
 [[package]]
 name = "hkdf"
-version = "0.8.0"
+version = "0.11.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3fa08a006102488bd9cd5b8013aabe84955cf5ae22e304c2caf655b633aefae3"
+checksum = "01706d578d5c281058480e673ae4086a9f4710d8df1ad80a5b03e39ece5f886b"
 dependencies = [
- "digest 0.8.1",
+ "digest 0.9.0",
  "hmac",
 ]
 
 [[package]]
 name = "hmac"
-version = "0.7.1"
+version = "0.11.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695"
+checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b"
 dependencies = [
  "crypto-mac",
- "digest 0.8.1",
+ "digest 0.9.0",
 ]
 
 [[package]]
@@ -251,12 +220,6 @@ dependencies = [
  "autocfg 1.0.1",
 ]
 
-[[package]]
-name = "opaque-debug"
-version = "0.2.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c"
-
 [[package]]
 name = "opaque-debug"
 version = "0.3.0"
@@ -384,23 +347,11 @@ version = "0.9.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "1a0c8611594e2ab4ebbf06ec7cbbf0a99450b8570e96cbf5188b5d5f6ef18d81"
 dependencies = [
- "block-buffer 0.9.0",
+ "block-buffer",
  "cfg-if",
  "cpufeatures",
  "digest 0.9.0",
- "opaque-debug 0.3.0",
-]
-
-[[package]]
-name = "sha2"
-version = "0.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69"
-dependencies = [
- "block-buffer 0.7.3",
- "digest 0.8.1",
- "fake-simd",
- "opaque-debug 0.2.3",
+ "opaque-debug",
 ]
 
 [[package]]
@@ -409,11 +360,11 @@ version = "0.9.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "fa827a14b29ab7f44778d14a88d3cb76e949c45083f7dbfa507d0cb699dc12de"
 dependencies = [
- "block-buffer 0.9.0",
+ "block-buffer",
  "cfg-if",
  "cpuid-bool",
  "digest 0.9.0",
- "opaque-debug 0.3.0",
+ "opaque-debug",
 ]
 
 [[package]]
@@ -426,7 +377,7 @@ dependencies = [
  "hkdf",
  "num-bigint",
  "rand",
- "sha2 0.8.2",
+ "sha2",
 ]
 
 [[package]]
@@ -439,15 +390,9 @@ dependencies = [
  "num-bigint",
  "rand",
  "sha-1",
- "sha2 0.9.3",
+ "sha2",
 ]
 
-[[package]]
-name = "subtle"
-version = "1.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee"
-
 [[package]]
 name = "subtle"
 version = "2.4.0"
index 3814c83cf463071175395c62692f369e138f3707..4436183813b713e30808b6de76c9d02d2a8c2333 100644 (file)
@@ -20,16 +20,11 @@ tag-message = "(cargo-release) spake2-v{{version}}"
 pre-release-commit-message = "(cargo-release) spake2-v{{version}}"
 pro-release-commit-message = "(cargo-release) start next development iteration spake2-v{{version}}"
 
-[badges]
-travis-ci = { repository = "RustCrypto/PAKEs" }
-is-it-maintained-issue-resolution = { repository = "RustCrypto/PAKEs" }
-is-it-maintained-open-issues = { repository = "RustCrypto/PAKEs" }
-
 [dependencies]
 curve25519-dalek = "1.2"
 rand = "0.6"
-sha2 = "0.8"
-hkdf = "0.8"
+sha2 = "0.9"
+hkdf = "0.11"
 hex = "0.4"
 
 [dev-dependencies]
index 24ba7726a5c5ec40e923683b68f13675259f80d9..562f3896798b3a5c6408e7bc16df94c443c63c56 100644 (file)
@@ -507,16 +507,16 @@ fn ed25519_hash_ab(
     let mut transcript = [0u8; 6 * 32];
 
     let mut pw_hash = Sha256::new();
-    pw_hash.input(password_vec);
-    transcript[0..32].copy_from_slice(&pw_hash.result());
+    pw_hash.update(password_vec);
+    transcript[0..32].copy_from_slice(&pw_hash.finalize());
 
     let mut ida_hash = Sha256::new();
-    ida_hash.input(id_a);
-    transcript[32..64].copy_from_slice(&ida_hash.result());
+    ida_hash.update(id_a);
+    transcript[32..64].copy_from_slice(&ida_hash.finalize());
 
     let mut idb_hash = Sha256::new();
-    idb_hash.input(id_b);
-    transcript[64..96].copy_from_slice(&idb_hash.result());
+    idb_hash.update(id_b);
+    transcript[64..96].copy_from_slice(&idb_hash.finalize());
 
     transcript[96..128].copy_from_slice(first_msg);
     transcript[128..160].copy_from_slice(second_msg);
@@ -526,8 +526,8 @@ fn ed25519_hash_ab(
 
     //let mut hash = G::TranscriptHash::default();
     let mut hash = Sha256::new();
-    hash.input(transcript.to_vec());
-    hash.result().to_vec()
+    hash.update(transcript.to_vec());
+    hash.finalize().to_vec()
 }
 
 fn ed25519_hash_symmetric(
@@ -554,12 +554,12 @@ fn ed25519_hash_symmetric(
     let mut transcript = [0u8; 5 * 32];
 
     let mut pw_hash = Sha256::new();
-    pw_hash.input(password_vec);
-    transcript[0..32].copy_from_slice(&pw_hash.result());
+    pw_hash.update(password_vec);
+    transcript[0..32].copy_from_slice(&pw_hash.finalize());
 
     let mut ids_hash = Sha256::new();
-    ids_hash.input(id_s);
-    transcript[32..64].copy_from_slice(&ids_hash.result());
+    ids_hash.update(id_s);
+    transcript[32..64].copy_from_slice(&ids_hash.finalize());
 
     if msg_u < msg_v {
         transcript[64..96].copy_from_slice(msg_u);
@@ -571,8 +571,8 @@ fn ed25519_hash_symmetric(
     transcript[128..160].copy_from_slice(key_bytes);
 
     let mut hash = Sha256::new();
-    hash.input(transcript.to_vec());
-    hash.result().to_vec()
+    hash.update(transcript.to_vec());
+    hash.finalize().to_vec()
 }
 
 /* "session type pattern" */