// ProvePartialECDLogKnowledge demonstrates how prover can prove that he knows dlog_a2(b2) and
// the verifier does not know whether knowledge of dlog_a1(b1) or knowledge of dlog_a2(b2) was proved.
ProvePartialECDLogKnowledge demonstrates how prover can prove that he knows dlog_a2(b2) and
the verifier does not know whether knowledge of dlog_a1(b1) or knowledge of dlog_a2(b2) was proved.
// ProvePartialECDLogKnowledge demonstrates how prover can prove that he knows dlog_a2 ( b2 ) and // the verifier does not know whether knowledge of dlog_a1 ( b1 ) or knowledge of dlog_a2 ( b2 ) was proved .
func ProvePartialECDLogKnowledge(group *groups.ECGroup, secret1 *big.Int,
	a1, a2, b2 *groups.ECGroupElement) bool {
	prover := NewPartialECDLogProver(group)
	verifier := NewPartialECDLogVerifier(group)
	b1 := prover.Group.Exp(a1, secret1)
	triple1, triple2 := prover.GetProofRandomData(secret1, a1, b1, a2, b2)
	verifier.SetProofRandomData(triple1, triple2)
	challenge := verifier.GetChallenge()
	c1, z1, c2, z2 := prover.GetProofData(challenge)
	verified := verifier.Verify(c1, z1, c2, z2)
	return verified
}
func ProvePartialECDLogKnowledge ( group * groups . ECGroup , secret1 * big . Int , a1 , a2 , b2 * groups . ECGroupElement ) bool { prover := NewPartialECDLogProver ( group ) verifier := NewPartialECDLogVerifier ( group ) b1 := prover . Group . Exp ( a1 , secret1 ) triple1 , triple2 := prover . GetProofRandomData ( secret1 , a1 , b1 , a2 , b2 ) verifier . SetProofRandomData ( triple1 , triple2 ) challenge := verifier . GetChallenge ( ) c1 , z1 , c2 , z2 := prover . GetProofData ( challenge ) verified := verifier . Verify ( c1 , z1 , c2 , z2 ) return verified }
ProvePartialECDLogKnowledge demonstrates how prover can prove that he knows dlog_a2(b2) and
the verifier does not know whether knowledge of dlog_a1(b1) or knowledge of dlog_a2(b2) was proved.
ProvePartialECDLogKnowledge demonstrates how prover can prove that he knows dlog_a2 ( b2 ) and the verifier does not know whether knowledge of dlog_a1 ( b1 ) or knowledge of dlog_a2 ( b2 ) was proved .