diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f7e0000..a2495a8 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -9,6 +9,7 @@ on: env: CARGO_TERM_COLOR: always CARGO_NET_GIT_FETCH_WITH_CLI: true + RUSTFLAGS: -D warnings jobs: build: @@ -125,22 +126,6 @@ jobs: with: header: bench path: pr-comment - - check-publish: - runs-on: ubuntu-latest - strategy: - matrix: - package: - - key-share - - cggmp21-keygen - - cggmp21 - steps: - - uses: actions/checkout@v3 - - uses: Swatinem/rust-cache@v2 - with: - cache-on-failure: "true" - - name: Dry-run publish - run: cargo publish --dry-run -p ${{ matrix.package }} check-changelog: runs-on: ubuntu-latest steps: diff --git a/Cargo.lock b/Cargo.lock index d1628e2..153dd91 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -932,9 +932,9 @@ dependencies = [ [[package]] name = "generic-ec" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10cc122ac7a2ebc45550f766cd23a9040f6d15db440230b0888e5645e8eb2cb4" +checksum = "0a88871287d5618d728c21ef0bea4dc5dc3097cbfa2efd3e1b6e85a33df74083" dependencies = [ "curve25519-dalek", "digest", @@ -985,9 +985,9 @@ dependencies = [ [[package]] name = "generic-ec-zkp" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f360d09b920f154726c654363cef62ba3497c8037b82f94aa17df215fc05d6f9" +checksum = "1743ab486bf2fd0a82fa36c3df29b7a32f3870dbab57cd2d49c420b8342031dd" dependencies = [ "generic-array", "generic-ec", @@ -1357,7 +1357,7 @@ dependencies = [ [[package]] name = "key-share" -version = "0.4.0" +version = "0.4.1" dependencies = [ "displaydoc", "generic-ec", @@ -1490,9 +1490,9 @@ dependencies = [ [[package]] name = "paillier-zk" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd33253a2a0403d52c54716f409bd181b423b02fe8b4fffb28b891820c1ee2f3" +checksum = "41f7666e5a36fe77ef28a4f8306367a759c7caacbdf8eeea89f524ccc2ade933" dependencies = [ "digest", "fast-paillier", @@ -2557,9 +2557,9 @@ checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] name = "udigest" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a435a16abb7029ba807a45242367b087dd767e87e2e5ebc5f0e4189ea114a23" +checksum = "0f8c862324ffd970533e7fde91b00bf06cd973e2023bfa6c7df5f96a1c959a9d" dependencies = [ "digest", "udigest-derive", @@ -2567,9 +2567,9 @@ dependencies = [ [[package]] name = "udigest-derive" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee6296c12e792dbc59565a58920d8d1842997ad5a72ddf2a51f70d70bd7af2ba" +checksum = "d6132fb8382b1bdec1cd01062dbe1e88074610e8fe37c2d504043a45f6400108" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 7595223..e42a6cf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,12 +15,12 @@ cggmp21 = { version = "0.4", path = "cggmp21" } cggmp21-keygen = { version = "0.3", path = "cggmp21-keygen" } key-share = { version = "0.4", path = "key-share", default-features = false } -generic-ec = { version = "0.4", default-features = false } -generic-ec-zkp = { version = "0.4", default-features = false } +generic-ec = { version = "0.4.1", default-features = false } +generic-ec-zkp = { version = "0.4.1", default-features = false } round-based = { version = "0.3", default-features = false } -paillier-zk = "0.4" -udigest = { version = "0.2", default-features = false } +paillier-zk = "0.4.1" +udigest = { version = "0.2.1", default-features = false } digest = { version = "0.10", default-features = false } sha2 = { version = "0.10", default-features = false } diff --git a/cggmp21-keygen/src/non_threshold.rs b/cggmp21-keygen/src/non_threshold.rs index 17318dd..d18cd03 100644 --- a/cggmp21-keygen/src/non_threshold.rs +++ b/cggmp21-keygen/src/non_threshold.rs @@ -68,7 +68,7 @@ pub struct MsgRound2 { /// Party contribution to chain code #[cfg(feature = "hd-wallets")] #[serde_as(as = "Option")] - #[udigest(with = utils::encoding::maybe_bytes)] + #[udigest(as = Option)] pub chain_code: Option, /// $u_i$ #[serde(with = "hex::serde")] diff --git a/cggmp21-keygen/src/threshold.rs b/cggmp21-keygen/src/threshold.rs index 30a0feb..614e506 100644 --- a/cggmp21-keygen/src/threshold.rs +++ b/cggmp21-keygen/src/threshold.rs @@ -71,7 +71,7 @@ pub struct MsgRound2Broad { /// Party contribution to chain code #[cfg(feature = "hd-wallets")] #[serde_as(as = "Option")] - #[udigest(with = utils::encoding::maybe_bytes)] + #[udigest(as = Option)] pub chain_code: Option, /// $u_i$ #[serde(with = "hex::serde")] diff --git a/cggmp21-keygen/src/utils.rs b/cggmp21-keygen/src/utils.rs index 8ca79f5..02ec485 100644 --- a/cggmp21-keygen/src/utils.rs +++ b/cggmp21-keygen/src/utils.rs @@ -25,6 +25,7 @@ where /// In the future we might want to replace the data_message and proof_message /// with a generic vec of messages. #[derive(Debug)] +#[allow(dead_code)] // removes false-positive warnings pub struct AbortBlame { /// Party which can be blamed for breaking the protocol pub faulty_party: PartyIndex, @@ -89,15 +90,3 @@ where pub fn iter_peers(i: u16, n: u16) -> impl Iterator { (0..n).filter(move |x| *x != i) } - -/// Unambiguous encoding for different types for which it was not defined -pub mod encoding { - #[cfg(feature = "hd-wallets")] - pub fn maybe_bytes( - m: &Option>, - encoder: udigest::encoding::EncodeValue, - ) { - use udigest::Digestable; - m.as_ref().map(udigest::Bytes).unambiguously_encode(encoder) - } -} diff --git a/cggmp21/src/key_refresh/aux_only.rs b/cggmp21/src/key_refresh/aux_only.rs index f592b7d..8eff76a 100644 --- a/cggmp21/src/key_refresh/aux_only.rs +++ b/cggmp21/src/key_refresh/aux_only.rs @@ -65,13 +65,13 @@ pub struct MsgRound1 { #[serde(bound = "")] pub struct MsgRound2 { /// $N_i$ - #[udigest(with = utils::encoding::integer)] + #[udigest(as = utils::encoding::Integer)] pub N: Integer, /// $s_i$ - #[udigest(with = utils::encoding::integer)] + #[udigest(as = utils::encoding::Integer)] pub s: Integer, /// $t_i$ - #[udigest(with = utils::encoding::integer)] + #[udigest(as = utils::encoding::Integer)] pub t: Integer, /// $\hat \psi_i$ // this should be L::M instead, but no rustc support yet diff --git a/cggmp21/src/key_refresh/non_threshold.rs b/cggmp21/src/key_refresh/non_threshold.rs index a0d4401..53daea4 100644 --- a/cggmp21/src/key_refresh/non_threshold.rs +++ b/cggmp21/src/key_refresh/non_threshold.rs @@ -77,13 +77,13 @@ pub struct MsgRound2 { /// $\vec A_i$ pub sch_commits_a: Vec>, /// $N_i$ - #[udigest(with = utils::encoding::integer)] + #[udigest(as = utils::encoding::Integer)] pub N: Integer, /// $s_i$ - #[udigest(with = utils::encoding::integer)] + #[udigest(as = utils::encoding::Integer)] pub s: Integer, /// $t_i$ - #[udigest(with = utils::encoding::integer)] + #[udigest(as = utils::encoding::Integer)] pub t: Integer, /// $\hat \psi_i$ // this should be L::M instead, but no rustc support yet diff --git a/cggmp21/src/key_share.rs b/cggmp21/src/key_share.rs index 4594df6..bda7e38 100644 --- a/cggmp21/src/key_share.rs +++ b/cggmp21/src/key_share.rs @@ -3,7 +3,7 @@ use std::ops; use std::sync::Arc; -use generic_ec::{Curve, NonZero, Point, SecretScalar}; +use generic_ec::{Curve, NonZero, Point}; use paillier_zk::paillier_encryption_in_range as π_enc; use paillier_zk::rug::{Complete, Integer}; use serde::{Deserialize, Serialize}; @@ -346,7 +346,7 @@ impl>> AnyKeyShare for T {} #[cfg(feature = "spof")] pub fn reconstruct_secret_key( key_shares: &[impl AnyKeyShare], -) -> Result, ReconstructError> { +) -> Result, ReconstructError> { key_share::reconstruct_secret_key(key_shares) } diff --git a/cggmp21/src/signing.rs b/cggmp21/src/signing.rs index 514614c..d5eee69 100644 --- a/cggmp21/src/signing.rs +++ b/cggmp21/src/signing.rs @@ -153,10 +153,10 @@ pub mod msg { #[udigest(tag = prefixed!("round1"))] pub struct MsgRound1a { /// $K_i$ - #[udigest(with = utils::encoding::integer)] + #[udigest(as = utils::encoding::Integer)] pub K: fast_paillier::Ciphertext, /// $G_i$ - #[udigest(with = utils::encoding::integer)] + #[udigest(as = utils::encoding::Integer)] pub G: fast_paillier::Ciphertext, } diff --git a/cggmp21/src/utils.rs b/cggmp21/src/utils.rs index a70764d..7bf4831 100644 --- a/cggmp21/src/utils.rs +++ b/cggmp21/src/utils.rs @@ -64,6 +64,7 @@ where /// In the future we might want to replace the data_message and proof_message /// with a generic vec of messages. #[derive(Debug)] +#[allow(dead_code)] // removes false-positive warnings pub struct AbortBlame { /// Party which can be blamed for breaking the protocol pub faulty_party: PartyIndex, @@ -218,22 +219,13 @@ pub fn generate_blum_prime(rng: &mut impl rand_core::RngCore, bits_size: u32) -> pub mod encoding { use paillier_zk::rug; - pub fn integer( - x: &rug::Integer, - encoder: udigest::encoding::EncodeValue, - ) { - encoder - .encode_leaf() - .chain(x.to_digits(rug::integer::Order::Msf)); - } - - pub fn integers_list( - list: impl AsRef<[rug::Integer]>, - encoder: udigest::encoding::EncodeValue, - ) { - let mut encoder = encoder.encode_list(); - for x in list.as_ref() { - integer(x, encoder.add_item()) + pub struct Integer; + impl udigest::DigestAs for Integer { + fn digest_as( + x: &rug::Integer, + encoder: udigest::encoding::EncodeValue, + ) { + encoder.encode_leaf_value(x.to_digits(rug::integer::Order::Msf)) } } } diff --git a/cggmp21/src/zk/ring_pedersen_parameters.rs b/cggmp21/src/zk/ring_pedersen_parameters.rs index 4cdccee..477bc87 100644 --- a/cggmp21/src/zk/ring_pedersen_parameters.rs +++ b/cggmp21/src/zk/ring_pedersen_parameters.rs @@ -17,11 +17,11 @@ struct Challenge { /// Data to construct proof about #[derive(Clone, Copy, udigest::Digestable)] pub struct Data<'a> { - #[udigest(with = crate::utils::encoding::integer)] + #[udigest(as = &crate::utils::encoding::Integer)] pub N: &'a Integer, - #[udigest(with = crate::utils::encoding::integer)] + #[udigest(as = &crate::utils::encoding::Integer)] pub s: &'a Integer, - #[udigest(with = crate::utils::encoding::integer)] + #[udigest(as = &crate::utils::encoding::Integer)] pub t: &'a Integer, } @@ -34,10 +34,10 @@ pub struct Data<'a> { #[derive(Clone, Serialize, Deserialize, udigest::Digestable)] pub struct Proof { #[serde_as(as = "[_; M]")] - #[udigest(with = crate::utils::encoding::integers_list)] + #[udigest(as = [crate::utils::encoding::Integer; M])] pub commitment: [Integer; M], #[serde_as(as = "[_; M]")] - #[udigest(with = crate::utils::encoding::integers_list)] + #[udigest(as = [crate::utils::encoding::Integer; M])] pub zs: [Integer; M], } @@ -51,7 +51,7 @@ fn derive_challenge( struct Seed<'a, S: udigest::Digestable, const M: usize> { shared_state: &'a S, data: Data<'a>, - #[udigest(with = crate::utils::encoding::integers_list)] + #[udigest(as = &[crate::utils::encoding::Integer; M])] commitment: &'a [Integer; M], } diff --git a/key-share/src/lib.rs b/key-share/src/lib.rs index 44b7688..7bdc02a 100644 --- a/key-share/src/lib.rs +++ b/key-share/src/lib.rs @@ -204,7 +204,7 @@ pub struct DirtyKeyInfo { // `crate::serde_fix` as well! // /// Guard that ensures curve consistency for deseraization - #[cfg_attr(feature = "udigest", udigest(with = utils::encoding::curve_name))] + #[cfg_attr(feature = "udigest", udigest(as = utils::encoding::CurveName))] pub curve: CurveName, /// Public key corresponding to shared secret key. Corresponds to _X_ in paper. #[cfg_attr(feature = "serde", serde(with = "As::"))] @@ -231,7 +231,7 @@ pub struct DirtyKeyInfo { serde(skip_serializing_if = "Option::is_none"), serde(with = "As::>") )] - #[cfg_attr(feature = "udigest", udigest(with = utils::encoding::maybe_bytes))] + #[cfg_attr(feature = "udigest", udigest(as = Option))] pub chain_code: Option, } diff --git a/key-share/src/utils.rs b/key-share/src/utils.rs index c73ddf1..7448f15 100644 --- a/key-share/src/utils.rs +++ b/key-share/src/utils.rs @@ -12,20 +12,14 @@ use hex as _; #[cfg(feature = "udigest")] pub mod encoding { - pub fn curve_name( - _value: &generic_ec::serde::CurveName, - encoder: udigest::encoding::EncodeValue, - ) { - encoder.encode_leaf_value(E::CURVE_NAME) - } - - #[cfg(feature = "hd-wallets")] - pub fn maybe_bytes( - m: &Option>, - encoder: udigest::encoding::EncodeValue, - ) { - use udigest::Digestable; - m.as_ref().map(udigest::Bytes).unambiguously_encode(encoder) + pub struct CurveName; + impl udigest::DigestAs> for CurveName { + fn digest_as( + _value: &generic_ec::serde::CurveName, + encoder: udigest::encoding::EncodeValue, + ) { + encoder.encode_leaf_value(E::CURVE_NAME) + } } } diff --git a/wasm/no_std/Cargo.lock b/wasm/no_std/Cargo.lock index 5f6c64f..a7f81aa 100644 --- a/wasm/no_std/Cargo.lock +++ b/wasm/no_std/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "autocfg" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "base64" @@ -31,7 +31,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cggmp21-keygen" -version = "0.2.0" +version = "0.3.0" dependencies = [ "digest", "displaydoc", @@ -50,9 +50,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.35" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf5903dcbc0a39312feb77df2ff4c76387d591b9fc7b04a238dcf8bb62639a" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "num-traits", "serde", @@ -60,9 +60,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] @@ -108,14 +108,14 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.75", ] [[package]] name = "darling" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ "darling_core", "darling_macro", @@ -123,27 +123,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.53", + "syn 2.0.75", ] [[package]] name = "darling_macro" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.53", + "syn 2.0.75", ] [[package]] @@ -168,13 +168,13 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.75", ] [[package]] @@ -199,7 +199,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.75", ] [[package]] @@ -258,14 +258,17 @@ dependencies = [ [[package]] name = "generic-ec" -version = "0.4.0-rc4" -source = "git+https://github.com/dfns/generic-ec?branch=update-udigest#8fbc75205c10dd9677fb67cf6eea67c6b44d836e" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a88871287d5618d728c21ef0bea4dc5dc3097cbfa2efd3e1b6e85a33df74083" dependencies = [ "curve25519-dalek", + "digest", "generic-ec-core", "hex", "phantom-type 0.4.2", "rand_core", + "rand_hash", "serde", "serde_with", "subtle", @@ -276,7 +279,8 @@ dependencies = [ [[package]] name = "generic-ec-core" version = "0.2.0" -source = "git+https://github.com/dfns/generic-ec?branch=update-udigest#8fbc75205c10dd9677fb67cf6eea67c6b44d836e" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f156564cc8aa47456da807826b1a0aa9cf420474d9f41593ffbdde65133d4bea" dependencies = [ "generic-array", "rand_core", @@ -287,8 +291,9 @@ dependencies = [ [[package]] name = "generic-ec-zkp" -version = "0.4.0-rc4" -source = "git+https://github.com/dfns/generic-ec?branch=update-udigest#8fbc75205c10dd9677fb67cf6eea67c6b44d836e" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1743ab486bf2fd0a82fa36c3df29b7a32f3870dbab57cd2d49c420b8342031dd" dependencies = [ "generic-array", "generic-ec", @@ -324,13 +329,13 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "key-share" -version = "0.3.0" +version = "0.4.1" dependencies = [ "displaydoc", "generic-ec", @@ -345,17 +350,22 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.153" +version = "0.2.158" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" + +[[package]] +name = "memchr" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", "num-traits", ] @@ -377,9 +387,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] @@ -422,18 +432,18 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "proc-macro2" -version = "1.0.79" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -444,6 +454,17 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +[[package]] +name = "rand_hash" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "257d7a1ad5533c1faca40f34d4a1ead75b414f16611c0ec210b7fd23e440475f" +dependencies = [ + "digest", + "rand_core", + "udigest", +] + [[package]] name = "round-based" version = "0.3.0" @@ -479,9 +500,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "semver" @@ -491,31 +512,32 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.197" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.75", ] [[package]] name = "serde_json" -version = "1.0.114" +version = "1.0.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" +checksum = "83c8e735a073ccf5be70aa8066aa984eaf2fa000db6c8d0100ae605b366d31ed" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -544,7 +566,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.75", ] [[package]] @@ -560,8 +582,9 @@ dependencies = [ [[package]] name = "slip-10" -version = "0.4.0-rc4" -source = "git+https://github.com/dfns/slip-10?branch=update-generic-ec#6d6f00ff44f228144c4494b7eb6404ed7341b563" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10c50b6de806a216bce1d98e9107e03f60b54abcfbe6be3935a528ab57c19f6a" dependencies = [ "generic-array", "generic-ec", @@ -572,15 +595,15 @@ dependencies = [ [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" @@ -595,9 +618,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.53" +version = "2.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032" +checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9" dependencies = [ "proc-macro2", "quote", @@ -606,9 +629,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.34" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "num-conv", @@ -647,8 +670,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "udigest" -version = "0.2.0-rc4" -source = "git+https://github.com/dfns/udigest?branch=proc-macro-clippy#16e6d99f6a5dc7639c4256359ff6350961364a33" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f8c862324ffd970533e7fde91b00bf06cd973e2023bfa6c7df5f96a1c959a9d" dependencies = [ "digest", "udigest-derive", @@ -656,12 +680,13 @@ dependencies = [ [[package]] name = "udigest-derive" -version = "0.2.0-rc3" -source = "git+https://github.com/dfns/udigest?branch=proc-macro-clippy#16e6d99f6a5dc7639c4256359ff6350961364a33" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6132fb8382b1bdec1cd01062dbe1e88074610e8fe37c2d504043a45f6400108" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.75", ] [[package]] @@ -672,15 +697,15 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" dependencies = [ "zeroize_derive", ] @@ -693,15 +718,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.75", ] - -[[patch.unused]] -name = "paillier-zk" -version = "0.4.0" -source = "git+https://github.com/dfnsco/paillier-zk-private?branch=unambiguous-challenge#aea2eba48cae13af949d6ac8134d49ddbc3974c2" - -[[patch.unused]] -name = "rand_hash" -version = "0.1.0-rc4" -source = "git+https://github.com/dfns/rand_hash?branch=udigest-rc3#dc3e204b60c15b06387186c284fef18f407ffbc2" diff --git a/wasm/no_std/Cargo.toml b/wasm/no_std/Cargo.toml index 3c9d006..b89379c 100644 --- a/wasm/no_std/Cargo.toml +++ b/wasm/no_std/Cargo.toml @@ -14,3 +14,4 @@ features = ["serde", "hd-wallets", "spof", "udigest"] path = "../../cggmp21-keygen" default-features = false features = ["hd-wallets", "state-machine"] +