diff --git a/crates/threshold-bls-ffi/src/ffi.rs b/crates/threshold-bls-ffi/src/ffi.rs index 2491f083..8a263267 100644 --- a/crates/threshold-bls-ffi/src/ffi.rs +++ b/crates/threshold-bls-ffi/src/ffi.rs @@ -581,7 +581,12 @@ pub unsafe extern "C" fn destroy_sig(signature: *mut Signature) { /// /// The seed MUST be at least 32 bytes long #[no_mangle] -pub unsafe extern "C" fn threshold_keygen(n: usize, t: usize, seed: *const Buffer, keys: *mut *mut Keys) { +pub unsafe extern "C" fn threshold_keygen( + n: usize, + t: usize, + seed: *const Buffer, + keys: *mut *mut Keys, +) { let seed = <&[u8]>::from(unsafe { &*seed }); let mut rng = get_rng(seed); let private = Poly::::new_from(t - 1, &mut rng); diff --git a/crates/threshold-bls-ffi/src/wasm.rs b/crates/threshold-bls-ffi/src/wasm.rs index bbcbf31a..821d357f 100644 --- a/crates/threshold-bls-ffi/src/wasm.rs +++ b/crates/threshold-bls-ffi/src/wasm.rs @@ -1,9 +1,9 @@ //! # BLS12-377 WASM Bindings for Blind Threshold Signatures. use wasm_bindgen::prelude::*; +use blake2::{Blake2s256, Digest}; use rand_chacha::ChaChaRng; use rand_core::{RngCore, SeedableRng}; -use blake2::{Blake2s256, Digest}; use threshold_bls::{ poly::{Idx as Index, Poly}, diff --git a/crates/threshold-bls/src/curve/bls12377.rs b/crates/threshold-bls/src/curve/bls12377.rs index 70f2afcc..926070a3 100644 --- a/crates/threshold-bls/src/curve/bls12377.rs +++ b/crates/threshold-bls/src/curve/bls12377.rs @@ -1,8 +1,8 @@ use crate::group::PrimeOrder; use crate::group::{self, Element, PairingCurve as PC, Point, Scalar as Sc}; use ark_bls12_377 as bls377; -use ark_ff::PrimeField; use ark_ec::{AffineCurve, PairingEngine, ProjectiveCurve}; +use ark_ff::PrimeField; use ark_ff::{Field, One, UniformRand, Zero}; use ark_serialize::{CanonicalDeserialize, CanonicalSerialize}; use bls_crypto::{