From c07da6f93824fa1fa1599aececcfb1478fa18c88 Mon Sep 17 00:00:00 2001 From: moiseev-signal <122060238+moiseev-signal@users.noreply.github.com> Date: Tue, 15 Aug 2023 12:02:37 -0700 Subject: [PATCH] Update x25519-dalek to v2.0.0 --- Cargo.lock | 5 +++-- Cargo.toml | 1 - rust/attest/Cargo.toml | 2 +- rust/protocol/Cargo.toml | 2 +- rust/protocol/fuzz/Cargo.toml | 1 - rust/protocol/fuzz/fuzz_targets/interaction.rs | 6 +++--- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d96cf4df..4dc874ab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2647,8 +2647,9 @@ dependencies = [ [[package]] name = "x25519-dalek" -version = "2.0.0-rc.3" -source = "git+https://github.com/signalapp/curve25519-dalek?tag=signal-curve25519-4.0.0#463e5c7cba32561ffee8a281c4455ff3c25660d4" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" dependencies = [ "curve25519-dalek", "rand_core", diff --git a/Cargo.toml b/Cargo.toml index 10a05e4c..8ead719d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,7 +30,6 @@ resolver = "2" # so that our dev-dependency features don't leak into products [patch.crates-io] # Use our fork of curve25519-dalek for zkgroup support. curve25519-dalek = { git = 'https://github.com/signalapp/curve25519-dalek', tag = 'signal-curve25519-4.0.0' } -x25519-dalek = { git = 'https://github.com/signalapp/curve25519-dalek', tag = 'signal-curve25519-4.0.0' } boring = { git = 'https://github.com/signalapp/boring', branch = 'libsignal' } # This revision of snow is where curve25519-dalek v4.0.0 changes were merged in snow = { git = 'https://github.com/mcginty/snow.git', rev = '586292364a30ecc74c785228b41e60b3ef03e773' } diff --git a/rust/attest/Cargo.toml b/rust/attest/Cargo.toml index 0331e224..7f22f71b 100644 --- a/rust/attest/Cargo.toml +++ b/rust/attest/Cargo.toml @@ -36,7 +36,7 @@ snow = { version = "0.9.0", default-features = false } static_assertions = "1.1" uuid = "1.1.2" variant_count = "1.1" -x25519-dalek = "2.0.0-rc.3" +x25519-dalek = "2.0.0" [dev-dependencies] snow = { version = "0.9.0", features = ["default-resolver"] } diff --git a/rust/protocol/Cargo.toml b/rust/protocol/Cargo.toml index 9afaa9a8..50e6f9ca 100644 --- a/rust/protocol/Cargo.toml +++ b/rust/protocol/Cargo.toml @@ -27,7 +27,7 @@ prost = "0.9" rand = "0.8" sha2 = "0.10" subtle = "2.3" -x25519-dalek = { version = "2.0.0-rc.3", features = ["static_secrets"] } +x25519-dalek = { version = "2.0.0", features = ["static_secrets"] } hex = "0.4" log = "0.4" num_enum = "0.6.1" diff --git a/rust/protocol/fuzz/Cargo.toml b/rust/protocol/fuzz/Cargo.toml index 70fb9024..2ff92646 100644 --- a/rust/protocol/fuzz/Cargo.toml +++ b/rust/protocol/fuzz/Cargo.toml @@ -31,4 +31,3 @@ doc = false [patch.crates-io] # Use our fork of curve25519-dalek for zkgroup support. curve25519-dalek = { git = 'https://github.com/signalapp/curve25519-dalek', tag = 'signal-curve25519-4.0.0' } -x25519-dalek = { git = 'https://github.com/signalapp/curve25519-dalek', tag = 'signal-curve25519-4.0.0' } diff --git a/rust/protocol/fuzz/fuzz_targets/interaction.rs b/rust/protocol/fuzz/fuzz_targets/interaction.rs index 7c001e87..2e23d7a3 100644 --- a/rust/protocol/fuzz/fuzz_targets/interaction.rs +++ b/rust/protocol/fuzz/fuzz_targets/interaction.rs @@ -44,7 +44,7 @@ impl Participant { them.store .save_signed_pre_key( - signed_pre_key_id.into(), + signed_pre_key_id, &SignedPreKeyRecord::new( signed_pre_key_id, /*timestamp*/ 42, @@ -74,8 +74,8 @@ impl Participant { let their_pre_key_bundle = PreKeyBundle::new( them.store.get_local_registration_id().await.unwrap(), 1.into(), // device id - pre_key_info.into(), - signed_pre_key_id.into(), + pre_key_info, + signed_pre_key_id, their_signed_pre_key_pair.public_key, their_signed_pre_key_signature.into_vec(), *them