From da1b97d483010479cdd21e6a021e1924cd73e944 Mon Sep 17 00:00:00 2001 From: Denis Varlakov Date: Mon, 25 Mar 2024 16:51:10 +0100 Subject: [PATCH 1/7] Reduce size of serialized share --- Cargo.lock | 13 +++++-------- Cargo.toml | 4 ++++ key-share/src/lib.rs | 9 +++++++++ 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 57f63253..bd887657 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -933,9 +933,8 @@ dependencies = [ [[package]] name = "generic-ec" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f27328a31bb6dcce5ab6539cb13d5d206cd18c1f4a1b36e680129b037d6ea9a" +version = "0.2.3" +source = "git+https://github.com/dfns/generic-ec?branch=prefer-compact#98b179e206ee68c4b245c6e13a41d867134a6fbc" dependencies = [ "generic-ec-core", "generic-ec-curves", @@ -952,8 +951,7 @@ dependencies = [ [[package]] name = "generic-ec-core" version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cab102fc88bfc017c16e69d21edae6f41ab58bfe69eed09ed0a2cf10ec923f" +source = "git+https://github.com/dfns/generic-ec?branch=prefer-compact#98b179e206ee68c4b245c6e13a41d867134a6fbc" dependencies = [ "generic-array", "rand_core", @@ -965,8 +963,7 @@ dependencies = [ [[package]] name = "generic-ec-curves" version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a133d38cde4fef7aea4e367ca51f291db0248495a424ec4208cdace08ba59f4" +source = "git+https://github.com/dfns/generic-ec?branch=prefer-compact#98b179e206ee68c4b245c6e13a41d867134a6fbc" dependencies = [ "crypto-bigint", "curve25519-dalek", @@ -1356,7 +1353,7 @@ dependencies = [ [[package]] name = "key-share" -version = "0.2.1" +version = "0.2.2" dependencies = [ "displaydoc", "generic-ec", diff --git a/Cargo.toml b/Cargo.toml index f6a22869..890e4299 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,3 +9,7 @@ members = [ exclude = [ "wasm/no_std", ] + +[patch.crates-io.generic-ec] +git = "https://github.com/dfns/generic-ec" +branch = "prefer-compact" diff --git a/key-share/src/lib.rs b/key-share/src/lib.rs index ad7f9e52..b62f2440 100644 --- a/key-share/src/lib.rs +++ b/key-share/src/lib.rs @@ -215,12 +215,17 @@ pub struct DirtyKeyInfo { )] pub public_shares: Vec>>, /// Verifiable secret sharing setup, present if key was generated using VSS scheme + #[cfg_attr( + feature = "serde", + serde(default, skip_serializing_if = "Option::is_none") + )] pub vss_setup: Option>, /// Chain code associated with the key, if HD wallets support was enabled #[cfg(feature = "hd-wallets")] #[cfg_attr( feature = "serde", serde(default), + serde(skip_serializing_if = "Option::is_none"), serde(with = "As::>") )] #[cfg_attr(feature = "udigest", udigest(with = utils::encoding::maybe_bytes))] @@ -240,6 +245,10 @@ pub struct VssSetup { /// Key shares indexes /// /// `I[i]` corresponds to key share index of a $\ith$ signer + #[cfg_attr( + feature = "serde", + serde(with = "As::>") + )] pub I: Vec>>, } From eb6af171c70e7ff06852aaae669f62a24916cbe8 Mon Sep 17 00:00:00 2001 From: Denis Varlakov Date: Mon, 25 Mar 2024 16:54:00 +0100 Subject: [PATCH 2/7] Bump key-share version and update changelog --- Cargo.lock | 2 +- key-share/CHANGELOG.md | 5 +++++ key-share/Cargo.toml | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bd887657..111b0919 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1353,7 +1353,7 @@ dependencies = [ [[package]] name = "key-share" -version = "0.2.2" +version = "0.2.3" dependencies = [ "displaydoc", "generic-ec", diff --git a/key-share/CHANGELOG.md b/key-share/CHANGELOG.md index b3ebd367..773b9345 100644 --- a/key-share/CHANGELOG.md +++ b/key-share/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## v0.2.3 +* Reduce size of serialized key share [#96] + +[#96]: https://github.com/dfns/cggmp21/pull/96 + ## v0.2.2 * Add `no_std` support [#92] diff --git a/key-share/Cargo.toml b/key-share/Cargo.toml index b1328779..a6e0e974 100644 --- a/key-share/Cargo.toml +++ b/key-share/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "key-share" -version = "0.2.2" +version = "0.2.3" edition = "2021" license = "MIT OR Apache-2.0" description = "Key share of any Threshold Signature Scheme (TSS)" From 74e6f14e5ef9cdf2e0873c9d1536b6233f09a74c Mon Sep 17 00:00:00 2001 From: Denis Varlakov Date: Mon, 25 Mar 2024 16:56:02 +0100 Subject: [PATCH 3/7] Update wasm/no_std --- wasm/no_std/Cargo.lock | 10 ++++------ wasm/no_std/Cargo.toml | 3 +++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/wasm/no_std/Cargo.lock b/wasm/no_std/Cargo.lock index 32ef017a..b4fccb5b 100644 --- a/wasm/no_std/Cargo.lock +++ b/wasm/no_std/Cargo.lock @@ -174,9 +174,8 @@ dependencies = [ [[package]] name = "generic-ec" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f27328a31bb6dcce5ab6539cb13d5d206cd18c1f4a1b36e680129b037d6ea9a" +version = "0.2.3" +source = "git+https://github.com/dfns/generic-ec?branch=prefer-compact#98b179e206ee68c4b245c6e13a41d867134a6fbc" dependencies = [ "generic-ec-core", "hex", @@ -192,8 +191,7 @@ dependencies = [ [[package]] name = "generic-ec-core" version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cab102fc88bfc017c16e69d21edae6f41ab58bfe69eed09ed0a2cf10ec923f" +source = "git+https://github.com/dfns/generic-ec?branch=prefer-compact#98b179e206ee68c4b245c6e13a41d867134a6fbc" dependencies = [ "generic-array", "rand_core", @@ -248,7 +246,7 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "key-share" -version = "0.2.1" +version = "0.2.3" dependencies = [ "displaydoc", "generic-ec", diff --git a/wasm/no_std/Cargo.toml b/wasm/no_std/Cargo.toml index fb66d5af..ead345e2 100644 --- a/wasm/no_std/Cargo.toml +++ b/wasm/no_std/Cargo.toml @@ -7,3 +7,6 @@ edition = "2021" # Only the crates below have wasm/no_std support key-share = { path = "../../key-share", default-features = false, features = ["serde", "hd-wallets", "spof", "udigest"] } +[patch.crates-io.generic-ec] +git = "https://github.com/dfns/generic-ec" +branch = "prefer-compact" From 723c738f24a5a726b5c299e07579a244d9d1c283 Mon Sep 17 00:00:00 2001 From: Denis Varlakov Date: Mon, 25 Mar 2024 18:36:56 +0100 Subject: [PATCH 4/7] Update key_share::serde_fix as well --- Cargo.lock | 8 ++++---- cggmp21/Cargo.toml | 2 +- key-share/src/lib.rs | 3 +++ key-share/src/serde_fix.rs | 10 +++++----- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 111b0919..06b7c2d8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1951,18 +1951,18 @@ checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4" [[package]] name = "serde" -version = "1.0.188" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.188" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", diff --git a/cggmp21/Cargo.toml b/cggmp21/Cargo.toml index 8020c436..363d7d6f 100644 --- a/cggmp21/Cargo.toml +++ b/cggmp21/Cargo.toml @@ -13,7 +13,7 @@ readme = "../README.md" [dependencies] cggmp21-keygen = { path = "../cggmp21-keygen", version = "0.1" } -key-share = { path = "../key-share", version = "0.2" } +key-share = { path = "../key-share", version = "0.2", features = ["serde"] } generic-ec = { version = "0.2", features = ["serde", "udigest"] } generic-ec-zkp = { version = "0.2", features = ["serde", "udigest"] } diff --git a/key-share/src/lib.rs b/key-share/src/lib.rs index b62f2440..c5756a8b 100644 --- a/key-share/src/lib.rs +++ b/key-share/src/lib.rs @@ -200,6 +200,9 @@ impl<'de, E: Curve> serde::Deserialize<'de> for DirtyCoreKeyShare { #[cfg_attr(feature = "serde", serde(bound = ""))] #[cfg_attr(feature = "udigest", derive(udigest::Digestable))] pub struct DirtyKeyInfo { + // NOTE: on changing any of `serde` attributes, remember to change + // `crate::serde_fix` as well! + // /// Guard that ensures curve consistency for deseraization #[cfg_attr(feature = "udigest", udigest(with = utils::encoding::curve_name))] pub curve: CurveName, diff --git a/key-share/src/serde_fix.rs b/key-share/src/serde_fix.rs index 4ab60e61..4a2b0a22 100644 --- a/key-share/src/serde_fix.rs +++ b/key-share/src/serde_fix.rs @@ -53,14 +53,14 @@ core_key_share! { pub shared_public_key: NonZero>, #[serde(with = "As::>")] pub public_shares: Vec>>, + #[serde(default, skip_serializing_if = "Option::is_none")] pub vss_setup: Option>, + #[cfg(feature = "hd-wallets")] - #[cfg_attr( - feature = "serde", - serde(default), - serde(with = "As::>") - )] + #[serde(default, skip_serializing_if = "Option::is_none")] + #[serde(with = "As::>")] pub chain_code: Option, + #[serde(with = "As::")] pub x: NonZero>, } From 1b5557e79f596798fa35c1c62a6458e8274e75d7 Mon Sep 17 00:00:00 2001 From: Denis Varlakov Date: Mon, 25 Mar 2024 18:38:42 +0100 Subject: [PATCH 5/7] Add new set of old shares --- .../secp256k1-threshold-false-hd-false.cbor | Bin .../secp256k1-threshold-false-hd-false.json | 0 .../secp256k1-threshold-false-hd-true.cbor | Bin .../secp256k1-threshold-false-hd-true.json | 0 .../secp256k1-threshold-true-hd-false.cbor | Bin .../secp256k1-threshold-true-hd-false.json | 0 .../secp256k1-threshold-true-hd-true.cbor | Bin .../secp256k1-threshold-true-hd-true.json | 0 .../secp256r1-threshold-false-hd-false.cbor | Bin .../secp256r1-threshold-false-hd-false.json | 0 .../secp256r1-threshold-false-hd-true.cbor | Bin .../secp256r1-threshold-false-hd-true.json | 0 .../secp256r1-threshold-true-hd-false.cbor | Bin .../secp256r1-threshold-true-hd-false.json | 0 .../secp256r1-threshold-true-hd-true.cbor | Bin .../secp256r1-threshold-true-hd-true.json | 0 .../stark-threshold-false-hd-false.cbor | Bin .../stark-threshold-false-hd-false.json | 0 .../stark-threshold-false-hd-true.cbor | Bin .../stark-threshold-false-hd-true.json | 0 .../stark-threshold-true-hd-false.cbor | Bin .../stark-threshold-true-hd-false.json | 0 .../stark-threshold-true-hd-true.cbor | Bin .../stark-threshold-true-hd-true.json | 0 .../secp256k1-threshold-false-hd-false.cbor | Bin 0 -> 299 bytes .../secp256k1-threshold-false-hd-false.json | 13 ++++++++++ .../secp256k1-threshold-false-hd-true.cbor | Bin 0 -> 344 bytes .../secp256k1-threshold-false-hd-true.json | 14 ++++++++++ .../secp256k1-threshold-true-hd-false.cbor | Bin 0 -> 496 bytes .../secp256k1-threshold-true-hd-false.json | 23 +++++++++++++++++ .../secp256k1-threshold-true-hd-true.cbor | Bin 0 -> 541 bytes .../secp256k1-threshold-true-hd-true.json | 24 ++++++++++++++++++ .../secp256r1-threshold-false-hd-false.cbor | Bin 0 -> 299 bytes .../secp256r1-threshold-false-hd-false.json | 13 ++++++++++ .../secp256r1-threshold-false-hd-true.cbor | Bin 0 -> 344 bytes .../secp256r1-threshold-false-hd-true.json | 14 ++++++++++ .../secp256r1-threshold-true-hd-false.cbor | Bin 0 -> 496 bytes .../secp256r1-threshold-true-hd-false.json | 23 +++++++++++++++++ .../secp256r1-threshold-true-hd-true.cbor | Bin 0 -> 541 bytes .../secp256r1-threshold-true-hd-true.json | 24 ++++++++++++++++++ .../stark-threshold-false-hd-false.cbor | Bin 0 -> 295 bytes .../stark-threshold-false-hd-false.json | 13 ++++++++++ .../v0.2.3/stark-threshold-false-hd-true.cbor | Bin 0 -> 340 bytes .../v0.2.3/stark-threshold-false-hd-true.json | 14 ++++++++++ .../v0.2.3/stark-threshold-true-hd-false.cbor | Bin 0 -> 492 bytes .../v0.2.3/stark-threshold-true-hd-false.json | 23 +++++++++++++++++ .../v0.2.3/stark-threshold-true-hd-true.cbor | Bin 0 -> 537 bytes .../v0.2.3/stark-threshold-true-hd-true.json | 24 ++++++++++++++++++ 48 files changed, 222 insertions(+) rename test-data/old-shares/{v0.2 => v0.2.1}/secp256k1-threshold-false-hd-false.cbor (100%) rename test-data/old-shares/{v0.2 => v0.2.1}/secp256k1-threshold-false-hd-false.json (100%) rename test-data/old-shares/{v0.2 => v0.2.1}/secp256k1-threshold-false-hd-true.cbor (100%) rename test-data/old-shares/{v0.2 => v0.2.1}/secp256k1-threshold-false-hd-true.json (100%) rename test-data/old-shares/{v0.2 => v0.2.1}/secp256k1-threshold-true-hd-false.cbor (100%) rename test-data/old-shares/{v0.2 => v0.2.1}/secp256k1-threshold-true-hd-false.json (100%) rename test-data/old-shares/{v0.2 => v0.2.1}/secp256k1-threshold-true-hd-true.cbor (100%) rename test-data/old-shares/{v0.2 => v0.2.1}/secp256k1-threshold-true-hd-true.json (100%) rename test-data/old-shares/{v0.2 => v0.2.1}/secp256r1-threshold-false-hd-false.cbor (100%) rename test-data/old-shares/{v0.2 => v0.2.1}/secp256r1-threshold-false-hd-false.json (100%) rename test-data/old-shares/{v0.2 => v0.2.1}/secp256r1-threshold-false-hd-true.cbor (100%) rename test-data/old-shares/{v0.2 => v0.2.1}/secp256r1-threshold-false-hd-true.json (100%) rename test-data/old-shares/{v0.2 => v0.2.1}/secp256r1-threshold-true-hd-false.cbor (100%) rename test-data/old-shares/{v0.2 => v0.2.1}/secp256r1-threshold-true-hd-false.json (100%) rename test-data/old-shares/{v0.2 => v0.2.1}/secp256r1-threshold-true-hd-true.cbor (100%) rename test-data/old-shares/{v0.2 => v0.2.1}/secp256r1-threshold-true-hd-true.json (100%) rename test-data/old-shares/{v0.2 => v0.2.1}/stark-threshold-false-hd-false.cbor (100%) rename test-data/old-shares/{v0.2 => v0.2.1}/stark-threshold-false-hd-false.json (100%) rename test-data/old-shares/{v0.2 => v0.2.1}/stark-threshold-false-hd-true.cbor (100%) rename test-data/old-shares/{v0.2 => v0.2.1}/stark-threshold-false-hd-true.json (100%) rename test-data/old-shares/{v0.2 => v0.2.1}/stark-threshold-true-hd-false.cbor (100%) rename test-data/old-shares/{v0.2 => v0.2.1}/stark-threshold-true-hd-false.json (100%) rename test-data/old-shares/{v0.2 => v0.2.1}/stark-threshold-true-hd-true.cbor (100%) rename test-data/old-shares/{v0.2 => v0.2.1}/stark-threshold-true-hd-true.json (100%) create mode 100644 test-data/old-shares/v0.2.3/secp256k1-threshold-false-hd-false.cbor create mode 100644 test-data/old-shares/v0.2.3/secp256k1-threshold-false-hd-false.json create mode 100644 test-data/old-shares/v0.2.3/secp256k1-threshold-false-hd-true.cbor create mode 100644 test-data/old-shares/v0.2.3/secp256k1-threshold-false-hd-true.json create mode 100644 test-data/old-shares/v0.2.3/secp256k1-threshold-true-hd-false.cbor create mode 100644 test-data/old-shares/v0.2.3/secp256k1-threshold-true-hd-false.json create mode 100644 test-data/old-shares/v0.2.3/secp256k1-threshold-true-hd-true.cbor create mode 100644 test-data/old-shares/v0.2.3/secp256k1-threshold-true-hd-true.json create mode 100644 test-data/old-shares/v0.2.3/secp256r1-threshold-false-hd-false.cbor create mode 100644 test-data/old-shares/v0.2.3/secp256r1-threshold-false-hd-false.json create mode 100644 test-data/old-shares/v0.2.3/secp256r1-threshold-false-hd-true.cbor create mode 100644 test-data/old-shares/v0.2.3/secp256r1-threshold-false-hd-true.json create mode 100644 test-data/old-shares/v0.2.3/secp256r1-threshold-true-hd-false.cbor create mode 100644 test-data/old-shares/v0.2.3/secp256r1-threshold-true-hd-false.json create mode 100644 test-data/old-shares/v0.2.3/secp256r1-threshold-true-hd-true.cbor create mode 100644 test-data/old-shares/v0.2.3/secp256r1-threshold-true-hd-true.json create mode 100644 test-data/old-shares/v0.2.3/stark-threshold-false-hd-false.cbor create mode 100644 test-data/old-shares/v0.2.3/stark-threshold-false-hd-false.json create mode 100644 test-data/old-shares/v0.2.3/stark-threshold-false-hd-true.cbor create mode 100644 test-data/old-shares/v0.2.3/stark-threshold-false-hd-true.json create mode 100644 test-data/old-shares/v0.2.3/stark-threshold-true-hd-false.cbor create mode 100644 test-data/old-shares/v0.2.3/stark-threshold-true-hd-false.json create mode 100644 test-data/old-shares/v0.2.3/stark-threshold-true-hd-true.cbor create mode 100644 test-data/old-shares/v0.2.3/stark-threshold-true-hd-true.json diff --git a/test-data/old-shares/v0.2/secp256k1-threshold-false-hd-false.cbor b/test-data/old-shares/v0.2.1/secp256k1-threshold-false-hd-false.cbor similarity index 100% rename from test-data/old-shares/v0.2/secp256k1-threshold-false-hd-false.cbor rename to test-data/old-shares/v0.2.1/secp256k1-threshold-false-hd-false.cbor diff --git a/test-data/old-shares/v0.2/secp256k1-threshold-false-hd-false.json b/test-data/old-shares/v0.2.1/secp256k1-threshold-false-hd-false.json similarity index 100% rename from test-data/old-shares/v0.2/secp256k1-threshold-false-hd-false.json rename to test-data/old-shares/v0.2.1/secp256k1-threshold-false-hd-false.json diff --git a/test-data/old-shares/v0.2/secp256k1-threshold-false-hd-true.cbor b/test-data/old-shares/v0.2.1/secp256k1-threshold-false-hd-true.cbor similarity index 100% rename from test-data/old-shares/v0.2/secp256k1-threshold-false-hd-true.cbor rename to test-data/old-shares/v0.2.1/secp256k1-threshold-false-hd-true.cbor diff --git a/test-data/old-shares/v0.2/secp256k1-threshold-false-hd-true.json b/test-data/old-shares/v0.2.1/secp256k1-threshold-false-hd-true.json similarity index 100% rename from test-data/old-shares/v0.2/secp256k1-threshold-false-hd-true.json rename to test-data/old-shares/v0.2.1/secp256k1-threshold-false-hd-true.json diff --git a/test-data/old-shares/v0.2/secp256k1-threshold-true-hd-false.cbor b/test-data/old-shares/v0.2.1/secp256k1-threshold-true-hd-false.cbor similarity index 100% rename from test-data/old-shares/v0.2/secp256k1-threshold-true-hd-false.cbor rename to test-data/old-shares/v0.2.1/secp256k1-threshold-true-hd-false.cbor diff --git a/test-data/old-shares/v0.2/secp256k1-threshold-true-hd-false.json b/test-data/old-shares/v0.2.1/secp256k1-threshold-true-hd-false.json similarity index 100% rename from test-data/old-shares/v0.2/secp256k1-threshold-true-hd-false.json rename to test-data/old-shares/v0.2.1/secp256k1-threshold-true-hd-false.json diff --git a/test-data/old-shares/v0.2/secp256k1-threshold-true-hd-true.cbor b/test-data/old-shares/v0.2.1/secp256k1-threshold-true-hd-true.cbor similarity index 100% rename from test-data/old-shares/v0.2/secp256k1-threshold-true-hd-true.cbor rename to test-data/old-shares/v0.2.1/secp256k1-threshold-true-hd-true.cbor diff --git a/test-data/old-shares/v0.2/secp256k1-threshold-true-hd-true.json b/test-data/old-shares/v0.2.1/secp256k1-threshold-true-hd-true.json similarity index 100% rename from test-data/old-shares/v0.2/secp256k1-threshold-true-hd-true.json rename to test-data/old-shares/v0.2.1/secp256k1-threshold-true-hd-true.json diff --git a/test-data/old-shares/v0.2/secp256r1-threshold-false-hd-false.cbor b/test-data/old-shares/v0.2.1/secp256r1-threshold-false-hd-false.cbor similarity index 100% rename from test-data/old-shares/v0.2/secp256r1-threshold-false-hd-false.cbor rename to test-data/old-shares/v0.2.1/secp256r1-threshold-false-hd-false.cbor diff --git a/test-data/old-shares/v0.2/secp256r1-threshold-false-hd-false.json b/test-data/old-shares/v0.2.1/secp256r1-threshold-false-hd-false.json similarity index 100% rename from test-data/old-shares/v0.2/secp256r1-threshold-false-hd-false.json rename to test-data/old-shares/v0.2.1/secp256r1-threshold-false-hd-false.json diff --git a/test-data/old-shares/v0.2/secp256r1-threshold-false-hd-true.cbor b/test-data/old-shares/v0.2.1/secp256r1-threshold-false-hd-true.cbor similarity index 100% rename from test-data/old-shares/v0.2/secp256r1-threshold-false-hd-true.cbor rename to test-data/old-shares/v0.2.1/secp256r1-threshold-false-hd-true.cbor diff --git a/test-data/old-shares/v0.2/secp256r1-threshold-false-hd-true.json b/test-data/old-shares/v0.2.1/secp256r1-threshold-false-hd-true.json similarity index 100% rename from test-data/old-shares/v0.2/secp256r1-threshold-false-hd-true.json rename to test-data/old-shares/v0.2.1/secp256r1-threshold-false-hd-true.json diff --git a/test-data/old-shares/v0.2/secp256r1-threshold-true-hd-false.cbor b/test-data/old-shares/v0.2.1/secp256r1-threshold-true-hd-false.cbor similarity index 100% rename from test-data/old-shares/v0.2/secp256r1-threshold-true-hd-false.cbor rename to test-data/old-shares/v0.2.1/secp256r1-threshold-true-hd-false.cbor diff --git a/test-data/old-shares/v0.2/secp256r1-threshold-true-hd-false.json b/test-data/old-shares/v0.2.1/secp256r1-threshold-true-hd-false.json similarity index 100% rename from test-data/old-shares/v0.2/secp256r1-threshold-true-hd-false.json rename to test-data/old-shares/v0.2.1/secp256r1-threshold-true-hd-false.json diff --git a/test-data/old-shares/v0.2/secp256r1-threshold-true-hd-true.cbor b/test-data/old-shares/v0.2.1/secp256r1-threshold-true-hd-true.cbor similarity index 100% rename from test-data/old-shares/v0.2/secp256r1-threshold-true-hd-true.cbor rename to test-data/old-shares/v0.2.1/secp256r1-threshold-true-hd-true.cbor diff --git a/test-data/old-shares/v0.2/secp256r1-threshold-true-hd-true.json b/test-data/old-shares/v0.2.1/secp256r1-threshold-true-hd-true.json similarity index 100% rename from test-data/old-shares/v0.2/secp256r1-threshold-true-hd-true.json rename to test-data/old-shares/v0.2.1/secp256r1-threshold-true-hd-true.json diff --git a/test-data/old-shares/v0.2/stark-threshold-false-hd-false.cbor b/test-data/old-shares/v0.2.1/stark-threshold-false-hd-false.cbor similarity index 100% rename from test-data/old-shares/v0.2/stark-threshold-false-hd-false.cbor rename to test-data/old-shares/v0.2.1/stark-threshold-false-hd-false.cbor diff --git a/test-data/old-shares/v0.2/stark-threshold-false-hd-false.json b/test-data/old-shares/v0.2.1/stark-threshold-false-hd-false.json similarity index 100% rename from test-data/old-shares/v0.2/stark-threshold-false-hd-false.json rename to test-data/old-shares/v0.2.1/stark-threshold-false-hd-false.json diff --git a/test-data/old-shares/v0.2/stark-threshold-false-hd-true.cbor b/test-data/old-shares/v0.2.1/stark-threshold-false-hd-true.cbor similarity index 100% rename from test-data/old-shares/v0.2/stark-threshold-false-hd-true.cbor rename to test-data/old-shares/v0.2.1/stark-threshold-false-hd-true.cbor diff --git a/test-data/old-shares/v0.2/stark-threshold-false-hd-true.json b/test-data/old-shares/v0.2.1/stark-threshold-false-hd-true.json similarity index 100% rename from test-data/old-shares/v0.2/stark-threshold-false-hd-true.json rename to test-data/old-shares/v0.2.1/stark-threshold-false-hd-true.json diff --git a/test-data/old-shares/v0.2/stark-threshold-true-hd-false.cbor b/test-data/old-shares/v0.2.1/stark-threshold-true-hd-false.cbor similarity index 100% rename from test-data/old-shares/v0.2/stark-threshold-true-hd-false.cbor rename to test-data/old-shares/v0.2.1/stark-threshold-true-hd-false.cbor diff --git a/test-data/old-shares/v0.2/stark-threshold-true-hd-false.json b/test-data/old-shares/v0.2.1/stark-threshold-true-hd-false.json similarity index 100% rename from test-data/old-shares/v0.2/stark-threshold-true-hd-false.json rename to test-data/old-shares/v0.2.1/stark-threshold-true-hd-false.json diff --git a/test-data/old-shares/v0.2/stark-threshold-true-hd-true.cbor b/test-data/old-shares/v0.2.1/stark-threshold-true-hd-true.cbor similarity index 100% rename from test-data/old-shares/v0.2/stark-threshold-true-hd-true.cbor rename to test-data/old-shares/v0.2.1/stark-threshold-true-hd-true.cbor diff --git a/test-data/old-shares/v0.2/stark-threshold-true-hd-true.json b/test-data/old-shares/v0.2.1/stark-threshold-true-hd-true.json similarity index 100% rename from test-data/old-shares/v0.2/stark-threshold-true-hd-true.json rename to test-data/old-shares/v0.2.1/stark-threshold-true-hd-true.json diff --git a/test-data/old-shares/v0.2.3/secp256k1-threshold-false-hd-false.cbor b/test-data/old-shares/v0.2.3/secp256k1-threshold-false-hd-false.cbor new file mode 100644 index 0000000000000000000000000000000000000000..d45822362bfdbc49cc21e33cc7890a40ff67660c GIT binary patch literal 299 zcmZ3Qnp|2`mYP|dnp|LHYL;!7n8{FBoRL_Rni5}7nv|279G{(98KKA|WR~Q(j8$UE zC#SW?!Xv_ri}!vislVaoBcnUCg(y`gY_1-0(G=6`Db4;b@FcO6M0&{s_TRw z%v~Uzu`Te(k*Pt`3}-ff04m}3SzKwjNq}j~(RxMWSr_uUx0ioC`he@cF|)($1iuxD z5sJ*Ku1x=Y@%M}!LTx)9N`L97xOO-9VPQ7+ik(+$Lr>+tPz5SE@m0%Y)vf3_b>F28td4 literal 0 HcmV?d00001 diff --git a/test-data/old-shares/v0.2.3/secp256k1-threshold-false-hd-false.json b/test-data/old-shares/v0.2.3/secp256k1-threshold-false-hd-false.json new file mode 100644 index 00000000..ac46a09f --- /dev/null +++ b/test-data/old-shares/v0.2.3/secp256k1-threshold-false-hd-false.json @@ -0,0 +1,13 @@ +{ + "curve": "secp256k1", + "i": 0, + "shared_public_key": "0212366241a60518a4f242adc65758563373bdf2747fd84beb70ea0decbff88293", + "public_shares": [ + "0287a4fe3f749593bb3bc86e2afa7b7e13e09da01b68b651c4c4955296319983f0", + "020b4ca37931b21002b4c57f21339ad06e8bb777f5c5e00adf3303409b604ea861", + "03aad497f3d1fb98b81286b8e11bf48878d6dd6de1716b0ba8b9d57d55ca6de825", + "03c8f52a34aada5b5e274d6e931bb490543f308bba61d7fd390ee54edd6090aca9", + "03c5105f63e739c8017c10513c78468e93c24780f8f2fb02663f5f42959a614a5d" + ], + "x": "498777e41b6bd35d8af3cf0dd48f4cc99599108f1f3a03e6623f6cfb1804a00a" +} \ No newline at end of file diff --git a/test-data/old-shares/v0.2.3/secp256k1-threshold-false-hd-true.cbor b/test-data/old-shares/v0.2.3/secp256k1-threshold-false-hd-true.cbor new file mode 100644 index 0000000000000000000000000000000000000000..a89001ec2a9303fcebba0d5aa59096406293e86e GIT binary patch literal 344 zcmV-e0jK_^Wn*=6c4cXEWn*wMH8yK8VQBzyb7*05Wn^D)bz*F3V_$1!c~~I=Ly}jH ztp! zrldecA&{Y5-dG_5%uztn@;|)CB0(_%3o+1W#I{)>aMTtxjQ(QcLg#^Oq@n@~=U z<_P#z+-v4`klt!zXklq?Ut@1%Wmq6yAEXi8N&p1jl7G$&0O|{e@U;SOO8o=FjcvQS qhj{y8cvv8n&GYN9ysqY9af;)kmi8Z6Qo3<=D|$%+R%)vGU0zeR>g&;b>yO>9ZkH}CyT4;Y)%~q9 zR?lAj5XmenE{-owEh#Nnl%1QI7hjy2o|jrw%$(@i8lk{|A21SB!9-96GeH$B1XZvm pRzxW5-F1WU)SgnF@2QWxqE&-U>y@S1FGSyV5Z~w_IP24@NB|`io`(Pc literal 0 HcmV?d00001 diff --git a/test-data/old-shares/v0.2.3/secp256k1-threshold-true-hd-false.json b/test-data/old-shares/v0.2.3/secp256k1-threshold-true-hd-false.json new file mode 100644 index 00000000..806f9f8a --- /dev/null +++ b/test-data/old-shares/v0.2.3/secp256k1-threshold-true-hd-false.json @@ -0,0 +1,23 @@ +{ + "curve": "secp256k1", + "i": 0, + "shared_public_key": "039079502269cf8fdaabf1bf91a7c363cfca1a3eb5c2e4a84a8bbde38d21c96cd0", + "public_shares": [ + "034a24a8884dd564f40c3f8be173b7002088609544318824dc6f5c4b305f3d9ee8", + "02e8e02546d595c58183d54564e27508ebfc3c0c62203717df88c6b7b6b6874f17", + "02aa7f587cc9a3dc52585ddd745dc9edd3c6f1cfcd2b01aa33b5fd861ab5887e05", + "03d4b05cf3838d9a1c6ef443fb38753e1db7e9b10523c3b1913fcbb6421b8079fa", + "0267fbead366d3ac76aaf5c56f3bf18beadb75a576dfb8b07adfb51c3ae6eaf814" + ], + "vss_setup": { + "min_signers": 3, + "I": [ + "0000000000000000000000000000000000000000000000000000000000000001", + "0000000000000000000000000000000000000000000000000000000000000002", + "0000000000000000000000000000000000000000000000000000000000000003", + "0000000000000000000000000000000000000000000000000000000000000004", + "0000000000000000000000000000000000000000000000000000000000000005" + ] + }, + "x": "bdbad801cabc750cf765e24a5b2553357f231b07d05bdb4017b148119af2aa59" +} \ No newline at end of file diff --git a/test-data/old-shares/v0.2.3/secp256k1-threshold-true-hd-true.cbor b/test-data/old-shares/v0.2.3/secp256k1-threshold-true-hd-true.cbor new file mode 100644 index 0000000000000000000000000000000000000000..0e1bb98fdb960ef44a101225c132bdd51e0b997a GIT binary patch literal 541 zcmZ3Unp|2`mYP|dnp|LHYL;!7n8{FBoRL_Rni5}7nv|279G{(98KKD3{3(p@_=ly< zGY;3Bw#c4dob}_K(wFex-K9s8Cl@qJKhA}!2J0KmhtSA-|=S}pDwePdvR{nlY0PP6s)xX literal 0 HcmV?d00001 diff --git a/test-data/old-shares/v0.2.3/secp256k1-threshold-true-hd-true.json b/test-data/old-shares/v0.2.3/secp256k1-threshold-true-hd-true.json new file mode 100644 index 00000000..47981841 --- /dev/null +++ b/test-data/old-shares/v0.2.3/secp256k1-threshold-true-hd-true.json @@ -0,0 +1,24 @@ +{ + "curve": "secp256k1", + "i": 0, + "shared_public_key": "0283f2560ec7f0a58398c37ccb386b97736af8ee22f457fb8b75c4639370831be3", + "public_shares": [ + "021169919b3a5d2c27a8b0f7b0c061a362dd7dade5985c6fd3a120bd0f349c3ca3", + "03f56a0fcec9f5ec695adbd3f073909cc69085ced62f03689739cdec055a00a8d7", + "02146f2715951159002d710f9d03a936a2ce9ec3ee3b667aa52c15fd5c8150795b", + "0389387de43d1e5ad2e91f21ba86a990450f7acd68c45b30a0c53c30e24d1fb0c6", + "0220c52dd258ff4b8a714ce7752bdcdb4b157480780a7bdb0d4e137f31d5e76b31" + ], + "vss_setup": { + "min_signers": 3, + "I": [ + "0000000000000000000000000000000000000000000000000000000000000001", + "0000000000000000000000000000000000000000000000000000000000000002", + "0000000000000000000000000000000000000000000000000000000000000003", + "0000000000000000000000000000000000000000000000000000000000000004", + "0000000000000000000000000000000000000000000000000000000000000005" + ] + }, + "chain_code": "101a1820569466d7836c89d05a89c70257179dbeeb7b3d4aeeedaf6ecf150cb0", + "x": "782087c8eda1007984f5bcec33f3446a339b64fb5fcc81e5a63f1ee8ceaae4de" +} \ No newline at end of file diff --git a/test-data/old-shares/v0.2.3/secp256r1-threshold-false-hd-false.cbor b/test-data/old-shares/v0.2.3/secp256r1-threshold-false-hd-false.cbor new file mode 100644 index 0000000000000000000000000000000000000000..8e0c78ad7855225283dc2369425a7b85097d04fd GIT binary patch literal 299 zcmZ3Qnp|2`mYP|dnp|LHYF1>Jn8{FBoRL_Rni5}7nv|279G{(98KKC$`rDab`vU&$ zei7liK0j<$!(*Xz=cAlLGkEm3TZyRhs^&sfgY_1-Mkq2(vQTEQxYY4MTIUMSm*=c& zW_4VixG}osWv*+Reb$u3SwKT~S$kFaID1%}`pL4;s%GWX!>APn)8gt3Z4TFw%mL%zorFpc%2Ua@z_WhXi>6+@~<%Y_{m{27GKeh zjJoc;cV{H`?PZJKxO^(ix)F06Xo}ChbzAmVres}xU8>$TGwA4g!|6|)j%9gSGyRP< uJKwV_w{&`Z$rCfnzPhmd{OI5!QAA%h%MGNHtHTZE$sBY-wX(b7*05WpjmCAp^7yGi2ga z`Tt1NQWbqECVinz^Atq(_(sM%6s3+hh}u{o0)OnZ{7SA}@!+h&f2;d0zuU121vq2b zx7!352j1VRpI9LSWc@~zFe+&}OY03@YnIbPDuW^|JjkPh-|b;g@w5uLSRn$v{uh%w zMv8QMx5Pb=L16tZS%9e&m#-Pmk;(> zoY~(ik+KW4Pb6w%Xklq?Ut@1%Wmq7=->43T++$*o;bcHdBIV&)JtLCW6y8|Lyl_4c qE(2>}cvv6`M8>L)R!$9~);k0bJn8{FBoRL_Rni5}7nv|279G{(98KKC$M&0M3Y2ck# zcO4H~-W0sN#qo0d=ZX`u%6s~()(Y3>xaLAtgY_1-0(G36C0l&fZ}FaqUQ4R8zRphW zs;c|`@|kqP(uCDlZcYp=iBM$Hsh2xmw7EXd{#H;-t;m<41MUkpick6Im@j3NtmdrF z3RDu5p)&KqfegNRx*U3IiVo)7_FtE)tEr@&8!Pj7DWjk$(4td4$32A`$_19p@}cAI_%Dv^@E{ncT+#1D%nUnEnLrk|?X)6K`{vB|COBGbN^ zFDJanEGsUKFHS8fEm)MDo0%71oSB}NT2#!O=-C>fz&xNPz5tV6)Xf*uqIYS nC@7^WE?Q_Ku(Ray4&{8SnU5cdN5#CHp0+*4z3R6!fBtU(;cb$H literal 0 HcmV?d00001 diff --git a/test-data/old-shares/v0.2.3/secp256r1-threshold-true-hd-false.json b/test-data/old-shares/v0.2.3/secp256r1-threshold-true-hd-false.json new file mode 100644 index 00000000..39081250 --- /dev/null +++ b/test-data/old-shares/v0.2.3/secp256r1-threshold-true-hd-false.json @@ -0,0 +1,23 @@ +{ + "curve": "secp256r1", + "i": 0, + "shared_public_key": "03ac274ce13551dceadd41c339d911d3b441d35ff378c81d23bc8e3aad137f6c45", + "public_shares": [ + "03c99a1d73cd4ea3bc914aa47b6af59b638a7a7ef7e9e61b60a560abd4d9915174", + "022c7f1ec772b37f6e3fda525c7d14f452c047a0b11794f1416f1a326326432705", + "0252682499e0c0680e9e2d082eac72c16cdb4fae6d2d29222b6d5d1cfda5011115", + "03ca8cc749138077117a9e46ef580aaf5862411bf3cc54479e8c1b66f7ecbb35f3", + "031a1fdbf540b718f838e4f419656297ca7abc8b0e0e48b2467ed102be99e990e8" + ], + "vss_setup": { + "min_signers": 3, + "I": [ + "0000000000000000000000000000000000000000000000000000000000000001", + "0000000000000000000000000000000000000000000000000000000000000002", + "0000000000000000000000000000000000000000000000000000000000000003", + "0000000000000000000000000000000000000000000000000000000000000004", + "0000000000000000000000000000000000000000000000000000000000000005" + ] + }, + "x": "226521a2a13c10b974d3b8236f3a99e3e2175a5ce99766b75c477afb430f6ffb" +} \ No newline at end of file diff --git a/test-data/old-shares/v0.2.3/secp256r1-threshold-true-hd-true.cbor b/test-data/old-shares/v0.2.3/secp256r1-threshold-true-hd-true.cbor new file mode 100644 index 0000000000000000000000000000000000000000..6dfb84b67936a832ae4c9b21f47298ccfb740bbf GIT binary patch literal 541 zcmZ3Unp|2`mYP|dnp|LHYF1>Jn8{FBoRL_Rni5}7nv|279G{(98KKDhCnzyd#6R|i z#%&jOubq|xZ-4HJd>?;1^YFaZroZbn#dD#m!Fr2ZfjV^FF0wSw(+=aX2%7jQGUno! zJ)FFsQx42H6kwbsyX`AKP>GuvW1NfZBfllNsj}4~QU-3KKAZhN%~5IY?x~BZ&0hvo z@@V$%UCJwt$j4f0yMKMLrH{dW={bYnIee?y9qksToOl6LA|$W!+jyr`Se5tv@0S+8 zzH8BUYtBmfC6BEPX5V~&w{JaAiMF-R??VpnY&G=Pz0{94|MYj(?1mR5-lv7*-2+UN z^;0v;ii_imQ%gz<7G>vV=EWChrst&=6*DJ#wniv0;0KHZRWK1$!AwvE3qcjES;-lR zK({C7r=&(Gh<+DXUT~td_4LAjwJ~1=p5tG%&8MtWigB f!(;Zd%kJG1zag$ObL9bThnRw(CnvanoSg^&KaQq? literal 0 HcmV?d00001 diff --git a/test-data/old-shares/v0.2.3/secp256r1-threshold-true-hd-true.json b/test-data/old-shares/v0.2.3/secp256r1-threshold-true-hd-true.json new file mode 100644 index 00000000..932d5763 --- /dev/null +++ b/test-data/old-shares/v0.2.3/secp256r1-threshold-true-hd-true.json @@ -0,0 +1,24 @@ +{ + "curve": "secp256r1", + "i": 0, + "shared_public_key": "03fc526161144f5dd828db44474ab93910edf9ba59ef5fdb69c39e8582fdae2917", + "public_shares": [ + "032ceda239376e2b5608385291f2595cd1f4bc090df364c098c250336a1db6f50f", + "034636015e441de24ea46d651d7b141a3046154cb34ff29c24838b8c7e5c7d6fa6", + "03e29bbbba23a8c41f5d392b47f5e8b48e003fa5ce30fb6c0eaa87413ea164c8e8", + "03121f24fb33b91a567a4bdff7d2a3ebdd388eda9ca91fa4e33a309bd9efdd8eaf", + "032b3b4cfbc240ee3d282faee92f5f37f2fd9a9b80e8744bcb135f475034232f65" + ], + "vss_setup": { + "min_signers": 3, + "I": [ + "0000000000000000000000000000000000000000000000000000000000000001", + "0000000000000000000000000000000000000000000000000000000000000002", + "0000000000000000000000000000000000000000000000000000000000000003", + "0000000000000000000000000000000000000000000000000000000000000004", + "0000000000000000000000000000000000000000000000000000000000000005" + ] + }, + "chain_code": "15f710a770c88585cba1fe7d5cf4111e001166a161ef6b806dd4342d64247859", + "x": "005e8676812c11b0e307cda6dede17d8172c99a9c02b405c7052e4c80bf8cd91" +} \ No newline at end of file diff --git a/test-data/old-shares/v0.2.3/stark-threshold-false-hd-false.cbor b/test-data/old-shares/v0.2.3/stark-threshold-false-hd-false.cbor new file mode 100644 index 0000000000000000000000000000000000000000..becac03bc258d60146c9a8f34f6a5d0eb18fc8ea GIT binary patch literal 295 zcmV+?0oeYfWn*=6c4cLAbYXI9VQBzyb7*05Wn^D)bz*F3V_$1!c~~I>1K&d@VmwW5 zDD^wb;Q6PK*RkR7AjifV_RWgkq tmDsc5lHp-^SRe#%18O{ByL>_#6WWrzl%EH+veLZWG$yBjJo?#QE$Vpbiy#01 literal 0 HcmV?d00001 diff --git a/test-data/old-shares/v0.2.3/stark-threshold-false-hd-false.json b/test-data/old-shares/v0.2.3/stark-threshold-false-hd-false.json new file mode 100644 index 00000000..dffe78bd --- /dev/null +++ b/test-data/old-shares/v0.2.3/stark-threshold-false-hd-false.json @@ -0,0 +1,13 @@ +{ + "curve": "stark", + "i": 0, + "shared_public_key": "0303df4327623c4d6e28f53bcbe0f9a791d7b1e1f020caf9cdbdd8099320e58d02", + "public_shares": [ + "0300e91c19280a7babccbb39d045b64de4c5a3e7df64b3d4c2c7ca7515792cdec5", + "0200eabbf2a147d835c905dd487c7d8fb21dcaa79e779f6eb934d32e770c17fd4c", + "0307ff0e461c8872b1a9e302b71b7caf1fd3b5a390faba969a909fc47cb18ee0f0", + "0201e219c58e5e1623b8213f6bdba04cdc5316bff2806a48c609035000b92dcc87", + "02075928c94617584215255010a5adefd0f6d2eafbc05255328d1f95d8b3e292e1" + ], + "x": "046f036a3c61bb7c421a13da92bc949f07b5b2d2bcdd3426a7803cfad95e2dea" +} \ No newline at end of file diff --git a/test-data/old-shares/v0.2.3/stark-threshold-false-hd-true.cbor b/test-data/old-shares/v0.2.3/stark-threshold-false-hd-true.cbor new file mode 100644 index 0000000000000000000000000000000000000000..9e87d396da9141faf2ba9d3da2dcfd5e09168d37 GIT binary patch literal 340 zcmZ3Mnp|2`mYP~zl30|Tn8{FBoRL_Rni5}7nv|279G{(98KKC;9<{x6>Mpr@&W-ED zlI4#6nNd=|P+lxMpZA5zheVc3Cb>}6V7eHtlI$pSj;!H|$RcTg+uX z$uB+ntksr*i`3tHPzm3o%+ArWc8vw#afzTAL>>ITVI_tfjv0bZ+cd8 zMq*}Od~$wDYJ|dv%m>HsIeI5Adsh@)l@^c_G+nSzQXL$PTnMyrBW_{p3qy<#M`l?L!!8P^?itiMvWaA7| zyZq0cbh{BUV+l{4+&7K#)j%a|vSB;-*H8T~7?hf3^jhh6=CvbRuWVJ8ce|c&TGpZO zb7om_aeQ%VNom2N?A*+}_~Oj;ywsv%=0wld2n7cGfRUgICW0!M394WrsDd@IB0_=X l*0E81U=3J<1u-@WUpbi$TD2uFqQ3;E*BQ~yrtB*c9a;R0} zRY$KL|E72`5%25>MJCoAY}ce)eV)I$QdI6yQF!#g)sUE_nP*y;?Mc>qelM>Fq~zwF zj71xb+IReOzq9&H{_nDqZ3a~b7KhrHMY6p=m3|Ot5kt46+Xa@k|6k)%PkUFq=mP@wInOYaUXHh}e)$Yu) z;^O$?)RNMIMcKKTdGW=W>3OL|#mtGGtq}?g_yHq96-)$GFcVb4LQn;3R&qun(Cx|j zDX9?(?^nvLc*OK3#(vTXss1NDw_;cLB&+Y}pS!Lt{cD-rxlM@`5ekf%d#4(41~T<_ cE(}}pK>pCGnf3)~MxO Date: Wed, 27 Mar 2024 14:02:51 +0100 Subject: [PATCH 6/7] Update `generic-ec` dep & fix clippy warns --- Cargo.lock | 9 ++++++--- Cargo.toml | 4 ---- key-share/Cargo.toml | 2 +- key-share/src/utils.rs | 2 +- wasm/no_std/Cargo.toml | 4 ---- 5 files changed, 8 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 06b7c2d8..40448827 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -934,7 +934,8 @@ dependencies = [ [[package]] name = "generic-ec" version = "0.2.3" -source = "git+https://github.com/dfns/generic-ec?branch=prefer-compact#98b179e206ee68c4b245c6e13a41d867134a6fbc" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af0c68aa918e65f208d4d375ce7aed0d0c92c78cfa919f6efc8863190099080f" dependencies = [ "generic-ec-core", "generic-ec-curves", @@ -951,7 +952,8 @@ dependencies = [ [[package]] name = "generic-ec-core" version = "0.1.3" -source = "git+https://github.com/dfns/generic-ec?branch=prefer-compact#98b179e206ee68c4b245c6e13a41d867134a6fbc" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cab102fc88bfc017c16e69d21edae6f41ab58bfe69eed09ed0a2cf10ec923f" dependencies = [ "generic-array", "rand_core", @@ -963,7 +965,8 @@ dependencies = [ [[package]] name = "generic-ec-curves" version = "0.1.4" -source = "git+https://github.com/dfns/generic-ec?branch=prefer-compact#98b179e206ee68c4b245c6e13a41d867134a6fbc" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a133d38cde4fef7aea4e367ca51f291db0248495a424ec4208cdace08ba59f4" dependencies = [ "crypto-bigint", "curve25519-dalek", diff --git a/Cargo.toml b/Cargo.toml index 890e4299..f6a22869 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,3 @@ members = [ exclude = [ "wasm/no_std", ] - -[patch.crates-io.generic-ec] -git = "https://github.com/dfns/generic-ec" -branch = "prefer-compact" diff --git a/key-share/Cargo.toml b/key-share/Cargo.toml index a6e0e974..d6b3917a 100644 --- a/key-share/Cargo.toml +++ b/key-share/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["mpc", "threshold-signatures", "tss"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -generic-ec = { version = "0.2", default-features = false, features = ["alloc"] } +generic-ec = { version = "0.2.3", default-features = false, features = ["alloc"] } generic-ec-zkp = { version = "0.2", default-features = false, features = ["alloc"] } rand_core = { version = "0.6", optional = true } diff --git a/key-share/src/utils.rs b/key-share/src/utils.rs index 15bd9c65..c73ddf14 100644 --- a/key-share/src/utils.rs +++ b/key-share/src/utils.rs @@ -39,6 +39,6 @@ pub fn subset + Copy>( ) -> Option> { indexes .iter() - .map(|&i| list.get(i.into()).map(T::clone)) + .map(|&i| list.get(i.into()).cloned()) .collect() } diff --git a/wasm/no_std/Cargo.toml b/wasm/no_std/Cargo.toml index ead345e2..78fa4084 100644 --- a/wasm/no_std/Cargo.toml +++ b/wasm/no_std/Cargo.toml @@ -6,7 +6,3 @@ edition = "2021" [dependencies] # Only the crates below have wasm/no_std support key-share = { path = "../../key-share", default-features = false, features = ["serde", "hd-wallets", "spof", "udigest"] } - -[patch.crates-io.generic-ec] -git = "https://github.com/dfns/generic-ec" -branch = "prefer-compact" From aaed035cd3e4998cf6c8fadd99963661a584e4b5 Mon Sep 17 00:00:00 2001 From: Denis Varlakov Date: Wed, 27 Mar 2024 15:42:43 +0100 Subject: [PATCH 7/7] Fix clippy warns --- cggmp21/src/utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cggmp21/src/utils.rs b/cggmp21/src/utils.rs index 305940d1..cd37543f 100644 --- a/cggmp21/src/utils.rs +++ b/cggmp21/src/utils.rs @@ -191,7 +191,7 @@ where pub fn subset + Copy>(indexes: &[I], list: &[T]) -> Option> { indexes .iter() - .map(|&i| list.get(i.into()).map(T::clone)) + .map(|&i| list.get(i.into()).cloned()) .collect() }