diff --git a/src/frost.rs b/src/frost.rs index 25640de4..20d8e906 100644 --- a/src/frost.rs +++ b/src/frost.rs @@ -73,7 +73,7 @@ pub struct Share { /// This is a (public) commitment to one coefficient of a secret polynomial used /// for performing verifiable secret sharing for a Shamir secret share. #[derive(Clone)] -struct Commitment(jubjub::ExtendedPoint); +struct Commitment(jubjub::AffinePoint); /// Contains the commitments to the coefficients for our secret polynomial _f_, /// used to generate participants' key shares. @@ -92,7 +92,7 @@ pub struct ShareCommitment(Vec); /// The product of all signers' individual commitments, published as part of the /// final signature. -pub struct GroupCommitment(jubjub::ExtendedPoint); +pub struct GroupCommitment(jubjub::AffinePoint); /// Secret and public key material generated by a dealer performing /// [`keygen_with_dealer`]. @@ -276,12 +276,14 @@ fn generate_shares( // Verifiable secret sharing, to make sure that participants can ensure their secret is consistent // with every other participant's. - commitment - .0 - .push(Commitment(SpendAuth::basepoint() * secret.0)); + commitment.0.push(Commitment(jubjub::AffinePoint::from( + SpendAuth::basepoint() * secret.0, + ))); for c in &coefficients { - commitment.0.push(Commitment(SpendAuth::basepoint() * c)); + commitment.0.push(Commitment(jubjub::AffinePoint::from( + SpendAuth::basepoint() * c, + ))); } // Evaluate the polynomial with `secret` as the constant term @@ -501,7 +503,7 @@ fn gen_group_commitment( accumulator += commitment.hiding + (commitment.binding * rho_i) } - Ok(GroupCommitment(accumulator)) + Ok(GroupCommitment(jubjub::AffinePoint::from(accumulator))) } /// Generates the challenge as is required for Schnorr signatures.