pub fn sharing_proof_into_miracl(proof: &ZKProofShare) -> Result<ProofSharing, ()> {
    // TODO: Error type
    Ok(ProofSharing {
        ff: miracl_g1_from_bytes(proof.first_move_f.as_bytes())?,
        aa: miracl_g2_from_bytes(proof.first_move_a.as_bytes())?,
        yy: miracl_g1_from_bytes(proof.first_move_y.as_bytes())?,
        z_r: miracl_fr_from_bytes(proof.response_z_r.as_bytes())?,
        z_alpha: miracl_fr_from_bytes(proof.response_z_a.as_bytes())?,
    })
}
/// Parses a sharing proof into a miracl-compatible form.
///
/// # Errors
/// Returns an error if any of the supposed group elements is not a valid group
/// element.
Parses a sharing proof into a miracl-compatible form.
Parses a sharing proof into a miracl - compatible form .
pub fn sharing_proof_into_miracl(proof: &ZKProofShare) -> Result<ProofSharing, ()> {
    // TODO: Error type
    Ok(ProofSharing {
        ff: miracl_g1_from_bytes(proof.first_move_f.as_bytes())?,
        aa: miracl_g2_from_bytes(proof.first_move_a.as_bytes())?,
        yy: miracl_g1_from_bytes(proof.first_move_y.as_bytes())?,
        z_r: miracl_fr_from_bytes(proof.response_z_r.as_bytes())?,
        z_alpha: miracl_fr_from_bytes(proof.response_z_a.as_bytes())?,
    })
}
pub fn sharing_proof_into_miracl ( proof : & ZKProofShare ) -> Result < ProofSharing , ( ) > { // TODO: Error type Ok ( ProofSharing { ff : miracl_g1_from_bytes ( proof . first_move_f . as_bytes ( ) ) ? , aa : miracl_g2_from_bytes ( proof . first_move_a . as_bytes ( ) ) ? , yy : miracl_g1_from_bytes ( proof . first_move_y . as_bytes ( ) ) ? , z_r : miracl_fr_from_bytes ( proof . response_z_r . as_bytes ( ) ) ? , z_alpha : miracl_fr_from_bytes ( proof . response_z_a . as_bytes ( ) ) ? , } ) }
Parses a sharing proof into a miracl-compatible form.
Parses a sharing proof into a miracl - compatible form .
proof
&ZKProofShare
proof
&ZKProofShare
errors
Returns an error if any of the supposed group elements is not a valid group
element.
Returns an error if any of the supposed group elements is not a valid group element .