pub fn verify_opening<E: Engine>(com_params: &CSMultiParams<E>, com: &E::G1, proof: &CommitmentProof<E>, channelId: &E::Fr, init_cust: i64, init_merch: i64) -> bool {
    let xvec: Vec<E::G1> = vec![proof.T.clone(), com.clone()];
    let challenge = util::hash_g1_to_fr::<E>(&xvec);

    // compute the
    let com_equal = proof.verify_proof(com_params, com, &challenge, Some(vec!{None, Some(channelId.clone()), None, Some(util::convert_int_to_fr::<E>(init_cust as i64)), Some(util::convert_int_to_fr::<E>(init_merch as i64))}));

    return com_equal;
}
///
/// Verify PoK for the opening of a commitment during the establishment protocol
///
Verify PoK for the opening of a commitment during the establishment protocol
Verify PoK for the opening of a commitment during the establishment protocol
pub fn verify_opening<E: Engine>(com_params: &CSMultiParams<E>, com: &E::G1, proof: &CommitmentProof<E>, channelId: &E::Fr, init_cust: i64, init_merch: i64) -> bool {
    let xvec: Vec<E::G1> = vec![proof.T.clone(), com.clone()];
    let challenge = util::hash_g1_to_fr::<E>(&xvec);
    // compute the
    let com_equal = proof.verify_proof(com_params, com, &challenge, Some(vec!{None, Some(channelId.clone()), None, Some(util::convert_int_to_fr::<E>(init_cust as i64)), Some(util::convert_int_to_fr::<E>(init_merch as i64))}));
    return com_equal;
}
pub fn verify_opening < E : Engine > ( com_params : & CSMultiParams < E > , com : & E :: G1 , proof : & CommitmentProof < E > , channelId : & E :: Fr , init_cust : i64 , init_merch : i64 ) -> bool { let xvec : Vec < E :: G1 > = vec ! [ proof T clone ( ) com clone ( ) ] ; let challenge = util :: hash_g1_to_fr :: < E > ( & xvec ) ; // compute the let com_equal = proof . verify_proof ( com_params , com , & challenge , Some ( vec ! { None Some ( channelId clone ( ) ) None Some ( util convert_int_to_fr E ( init_cust as i64 ) ) Some ( util convert_int_to_fr E ( init_merch as i64 ) ) } ) ) ; return com_equal ; }
Verify PoK for the opening of a commitment during the establishment protocol
Verify PoK for the opening of a commitment during the establishment protocol
com_params
&CSMultiParams<E>
com
&E::G1
proof
&CommitmentProof<E>
channelId
&E::Fr
init_cust
i64
init_merch
i64
com_params
&CSMultiParams<E>
com
&E::G1
proof
&CommitmentProof<E>
channelId
&E::Fr
init_cust
i64
init_merch
i64