Skip to content

Commit

Permalink
Fix a few formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
romanz committed Sep 30, 2018
1 parent 986a59f commit 9f834e7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
6 changes: 4 additions & 2 deletions src/protocols/aggsig/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ impl KeyAgg {
vec.push(&x_coor_vec[i]);
}
HSha256::create_hash(&vec)
}).collect();
})
.collect();

let apk_vec: Vec<GE> = pks
.iter()
Expand All @@ -115,7 +116,8 @@ impl KeyAgg {
let pki: GE = pk.clone();
let a_i = pki.scalar_mul(&hash_t.get_element());
a_i
}).collect();
})
.collect();

let mut apk_vec_2_n = apk_vec.clone();
let pk1 = apk_vec_2_n.remove(0);
Expand Down
16 changes: 7 additions & 9 deletions src/protocols/multisig/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ impl Keys {
acc.extend(x);
acc
});
multisig::hash_4(&concat_vec)


multisig::hash_4(&concat_vec)
}
}

Expand All @@ -104,7 +102,7 @@ pub fn verify<'a>(I: &GE, sig: &Signature, e: &FE) -> Result<(), &'a str> {
}
}

fn hash_4(key_list: &[&GE]) -> FE {
fn hash_4(key_list: &[&GE]) -> FE {
let four_fe: FE = ECScalar::from(&BigInt::from(4));
let base_point: GE = ECPoint::generator();
let four_ge = base_point * four_fe;
Expand Down Expand Up @@ -164,11 +162,11 @@ pub struct Signature {
y: FE,
}

impl Signature{
pub fn set_signature(X: &GE, y: &FE) -> Signature {
Signature{
X:X.clone(),
y:y.clone(),
impl Signature {
pub fn set_signature(X: &GE, y: &FE) -> Signature {
Signature {
X: X.clone(),
y: y.clone(),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/protocols/multisig/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ mod tests {
use cryptography_utils::elliptic::curves::traits::*;
use cryptography_utils::{FE, GE, PK, SK};
use protocols::multisig;
use protocols::multisig::{partial_sign, verify,Signature, EphKey, KeyPair, Keys};
use protocols::multisig::{partial_sign, verify, EphKey, KeyPair, Keys, Signature};

#[test]
fn two_party_key_gen() {
Expand Down

0 comments on commit 9f834e7

Please sign in to comment.