Function ergotree_interpreter::sigma_protocol::dht_protocol::interactive_prover::compute_commitment
source · pub fn compute_commitment(
proposition: &ProveDhTuple,
challenge: &Challenge,
second_message: &SecondDhTupleProverMessage
) -> (EcPoint, EcPoint)
Expand description
The function computes initial prover’s commitment to randomness (“a” message of the sigma-protocol, which in this case has two parts “a” and “b”) based on the verifier’s challenge (“e”) and prover’s response (“z”)
g^z = au^e, h^z = bv^e => a = g^z/u^e, b = h^z/v^e