/// Generates the group commitment which is published as part of the joint
/// Schnorr signature.
Generates the group commitment which is published as part of the joint
Schnorr signature.
Generates the group commitment which is published as part of the joint Schnorr signature .
fn gen_group_commitment(
    signing_package: &SigningPackage,
    bindings: &HashMap<u64, Scalar>,
) -> Result<GroupCommitment, &'static str> {
    let identity = jubjub::ExtendedPoint::identity();
    let mut accumulator = identity;
    for commitment in signing_package.signing_commitments.iter() {
        // The following check prevents a party from accidentally revealing their share.
        // Note that the '&&' operator would be sufficient.
        if identity == commitment.binding || identity == commitment.hiding {
            return Err("Commitment equals the identity.");
        }
        let rho_i = bindings
            .get(&commitment.index)
            .ok_or("No matching commitment index")?;
        accumulator += commitment.hiding + (commitment.binding * rho_i)
    }
    Ok(GroupCommitment(jubjub::AffinePoint::from(accumulator)))
}
fn gen_group_commitment ( signing_package : & SigningPackage , bindings : & HashMap < u64 , Scalar > , ) -> Result < GroupCommitment , & ' static str > { let identity = jubjub :: ExtendedPoint :: identity ( ) ; let mut accumulator = identity ; for commitment in signing_package . signing_commitments . iter ( ) { // The following check prevents a party from accidentally revealing their share. // Note that the '&&' operator would be sufficient. if identity == commitment . binding || identity == commitment . hiding { return Err ( " " ) ; } let rho_i = bindings . get ( & commitment . index ) . ok_or ( " " ) ? ; accumulator += commitment . hiding + ( commitment . binding * rho_i ) } Ok ( GroupCommitment ( jubjub :: AffinePoint :: from ( accumulator ) ) ) }
Generates the group commitment which is published as part of the joint
Schnorr signature.
Generates the group commitment which is published as part of the joint Schnorr signature .
signing_package
&SigningPackage
<not_specific>
bindings
&HashMap<u64, Scalar>
<not_specific>