Skip to content

Commit

Permalink
Remove duplicate utilities modules (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmpfs authored Oct 19, 2023
1 parent 01e978d commit b7a73ab
Show file tree
Hide file tree
Showing 16 changed files with 28 additions and 1,727 deletions.
1 change: 1 addition & 0 deletions multi-party-ecdsa/src/protocols/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
@license GPL-3.0+ <https://github.com/KZen-networks/multi-party-ecdsa/blob/master/LICENSE>
*/

#[deprecated(note = "Use top level modules instead (eg: gg_2020).")]
pub mod multi_party_ecdsa;
18 changes: 9 additions & 9 deletions src/party_i.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,19 @@ use paillier::{
use serde::{Deserialize, Serialize};
use zk_paillier::zkproofs::{DLogStatement, NiCorrectKeyProof};

use crate::{
utilities::zk_pdl_with_slack::{
PDLwSlackProof, PDLwSlackStatement, PDLwSlackWitness,
},
ErrorType,
};
use crate::ErrorType;
use curv::cryptographic_primitives::proofs::sigma_valid_pedersen::PedersenProof;

use std::convert::TryInto;

pub use crate::mpc_ecdsa::gg_2020::party_i::{
KeyGenBroadcastMessage1, KeyGenDecommitMessage1, Parameters, SharedKeys,
SignBroadcastPhase1, SignDecommitPhase1, SignatureRecid,
pub use crate::mpc_ecdsa::{
gg_2020::party_i::{
KeyGenBroadcastMessage1, KeyGenDecommitMessage1, Parameters,
SharedKeys, SignBroadcastPhase1, SignDecommitPhase1, SignatureRecid,
},
utilities::zk_pdl_with_slack::{
PDLwSlackProof, PDLwSlackStatement, PDLwSlackWitness,
},
};
use multi_party_ecdsa::gg_2020::party_i::generate_h1_h2_N_tilde;
use multi_party_ecdsa::utilities::zk_composite_dlog::{
Expand Down
5 changes: 3 additions & 2 deletions src/utilities/aff_g/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,9 @@ impl<E: Curve, H: Digest + Clone>
#[cfg(test)]
mod tests {
use super::*;
use crate::utilities::{
mta::range_proofs::SampleFromMultiplicativeGroup, BITS_PAILLIER,
use crate::{
mpc_ecdsa::utilities::mta::range_proofs::SampleFromMultiplicativeGroup,
utilities::BITS_PAILLIER,
};
use curv::elliptic::curves::secp256_k1::Secp256k1;
use fs_dkr::ring_pedersen_proof::RingPedersenStatement;
Expand Down
5 changes: 3 additions & 2 deletions src/utilities/dec_q/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,9 @@ impl<E: Curve, H: Digest + Clone> PaillierDecryptionModQProof<E, H> {
#[cfg(test)]
mod tests {
use super::*;
use crate::utilities::{
mta::range_proofs::SampleFromMultiplicativeGroup, BITS_PAILLIER,
use crate::{
mpc_ecdsa::utilities::mta::range_proofs::SampleFromMultiplicativeGroup,
utilities::BITS_PAILLIER,
};
use curv::elliptic::curves::secp256_k1::Secp256k1;
use fs_dkr::ring_pedersen_proof::RingPedersenStatement;
Expand Down
5 changes: 3 additions & 2 deletions src/utilities/enc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,9 @@ impl<E: Curve, H: Digest + Clone> PaillierEncryptionInRangeProof<E, H> {
#[cfg(test)]
mod tests {
use super::*;
use crate::utilities::{
mta::range_proofs::SampleFromMultiplicativeGroup, BITS_PAILLIER,
use crate::{
mpc_ecdsa::utilities::mta::range_proofs::SampleFromMultiplicativeGroup,
utilities::BITS_PAILLIER,
};
use curv::elliptic::curves::secp256_k1::Secp256k1;
use fs_dkr::ring_pedersen_proof::RingPedersenStatement;
Expand Down
5 changes: 3 additions & 2 deletions src/utilities/log_star/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,9 @@ impl<E: Curve, H: Digest + Clone>
#[cfg(test)]
mod tests {
use super::*;
use crate::utilities::{
mta::range_proofs::SampleFromMultiplicativeGroup, BITS_PAILLIER,
use crate::{
mpc_ecdsa::utilities::mta::range_proofs::SampleFromMultiplicativeGroup,
utilities::BITS_PAILLIER,
};
use curv::elliptic::curves::secp256_k1::Secp256k1;
use fs_dkr::ring_pedersen_proof::RingPedersenStatement;
Expand Down
3 changes: 0 additions & 3 deletions src/utilities/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ pub mod aff_g;
pub mod dec_q;
pub mod enc;
pub mod log_star;
pub mod mta;
pub mod mul;
pub mod mul_star;
pub mod sha2;
pub mod zk_pdl;
pub mod zk_pdl_with_slack;

/// Extend or truncate a vector of bytes to a fixed length array.
///
Expand Down
237 changes: 0 additions & 237 deletions src/utilities/mta/mod.rs

This file was deleted.

Loading

0 comments on commit b7a73ab

Please sign in to comment.