diff --git a/Cargo.lock b/Cargo.lock index fb821ce4..c96b7c2d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -295,12 +295,11 @@ dependencies = [ [[package]] name = "curve25519-dalek" version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8492de420e9e60bc9a1d66e2dbb91825390b738a388606600663fc529b4b307" +source = "git+https://github.com/PaulGrandperrin/curve25519-dalek.git?branch=patch-1#ed176c9cbf2d57e8e87efaac5b97ed445eea4ef8" dependencies = [ "byteorder", "digest", - "rand_core", + "rand_core 0.6.0", "subtle", "zeroize", ] @@ -414,6 +413,17 @@ dependencies = [ "wasi", ] +[[package]] +name = "getrandom" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4" +dependencies = [ + "cfg-if 0.1.10", + "libc", + "wasi", +] + [[package]] name = "half" version = "1.6.0" @@ -583,8 +593,8 @@ dependencies = [ "hmac", "lazy_static", "proptest", - "rand", - "rand_core", + "rand 0.8.0", + "rand_core 0.6.0", "rustyline", "scrypt", "serde_json", @@ -634,8 +644,7 @@ dependencies = [ [[package]] name = "proptest" version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12e6c80c1139113c28ee4670dc50cc42915228b51f56a9e407f0ec60f966646f" +source = "git+https://github.com/PaulGrandperrin/proptest.git?branch=master#291908ac22a4c05f9fcad31cb460c502723b22ae" dependencies = [ "bit-set", "bitflags", @@ -643,8 +652,8 @@ dependencies = [ "lazy_static", "num-traits", "quick-error", - "rand", - "rand_chacha", + "rand 0.8.0", + "rand_chacha 0.3.0", "rand_xorshift", "regex-syntax", "rusty-fork", @@ -672,11 +681,23 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "getrandom", + "getrandom 0.1.14", "libc", - "rand_chacha", - "rand_core", - "rand_hc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc 0.2.0", +] + +[[package]] +name = "rand" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a76330fb486679b4ace3670f117bbc9e16204005c4bde9c4bd372f45bed34f12" +dependencies = [ + "libc", + "rand_chacha 0.3.0", + "rand_core 0.6.0", + "rand_hc 0.3.0", ] [[package]] @@ -686,7 +707,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.0", ] [[package]] @@ -695,7 +726,16 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "getrandom", + "getrandom 0.1.14", +] + +[[package]] +name = "rand_core" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8b34ba8cfb21243bd8df91854c830ff0d785fff2e82ebd4434c2644cb9ada18" +dependencies = [ + "getrandom 0.2.0", ] [[package]] @@ -704,16 +744,25 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" dependencies = [ - "rand_core", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_hc" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" +dependencies = [ + "rand_core 0.6.0", ] [[package]] name = "rand_xorshift" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77d416b86801d23dde1aa643023b775c3a462efc0ed96443add11546cdf1dca8" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" dependencies = [ - "rand_core", + "rand_core 0.6.0", ] [[package]] @@ -753,7 +802,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d" dependencies = [ - "getrandom", + "getrandom 0.1.14", "redox_syscall", "rust-argon2", ] @@ -884,8 +933,8 @@ dependencies = [ "base64", "hmac", "pbkdf2", - "rand", - "rand_core", + "rand 0.7.3", + "rand_core 0.5.1", "salsa20", "sha2", "subtle", @@ -994,7 +1043,7 @@ checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" dependencies = [ "cfg-if 0.1.10", "libc", - "rand", + "rand 0.7.3", "redox_syscall", "remove_dir_all", "winapi", @@ -1199,11 +1248,10 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "x25519-dalek" version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc614d95359fd7afc321b66d2107ede58b246b844cf5d8a0adcca413e439f088" +source = "git+https://github.com/PaulGrandperrin/x25519-dalek.git?branch=patch-1#050034c98c84bfc6ed185147f3e769d0c38c702b" dependencies = [ "curve25519-dalek", - "rand_core", + "rand_core 0.6.0", "zeroize", ] diff --git a/Cargo.toml b/Cargo.toml index d3c63002..1dc65d04 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ generic-bytes = { version = "0.1.0" } generic-bytes-derive = { version = "0.1.0" } hkdf = "0.10.0" hmac = "0.10.1" -rand_core = "0.5.1" +rand_core = { version = "0.6.0", features = ["getrandom"] } scrypt = { version = "0.5.0", optional = true } sha2 = "0.9.2" subtle = { version = "2.3.0", default-features = false } @@ -42,10 +42,16 @@ hex = "0.4.2" lazy_static = "1.4.0" serde_json = "1.0.60" proptest = "0.10.1" -rand = "0.7" +rand = "0.8" rustyline = "7.0.0" [[bench]] name = "oprf" harness = false required-features = ["bench"] + +# TEMPORARY, DO NOT MERGE +[patch.crates-io] +x25519-dalek = { git = "https://github.com/PaulGrandperrin/x25519-dalek.git", branch="patch-1" } +curve25519-dalek = { git = "https://github.com/PaulGrandperrin/curve25519-dalek.git", branch="patch-1" } +proptest = { git = "https://github.com/PaulGrandperrin/proptest.git", branch="master" } diff --git a/src/serialization/tests.rs b/src/serialization/tests.rs index 5e06710d..bdbeac89 100644 --- a/src/serialization/tests.rs +++ b/src/serialization/tests.rs @@ -273,8 +273,8 @@ fn login_third_message_roundtrip() { fn client_login_roundtrip() { let pw = b"hunter2"; let mut rng = OsRng; - let id_u_length: usize = rng.gen_range(0, MAX_ID_LENGTH); - let id_s_length: usize = rng.gen_range(0, MAX_ID_LENGTH); + let id_u_length: usize = rng.gen_range(0..MAX_ID_LENGTH); + let id_s_length: usize = rng.gen_range(0..MAX_ID_LENGTH); let mut id_u = [0u8; MAX_ID_LENGTH]; rng.fill_bytes(&mut id_u); let mut id_s = [0u8; MAX_ID_LENGTH];