// ProveQR demonstrates how the prover can prove that y1^2 is QR.
ProveQR demonstrates how the prover can prove that y1^2 is QR.
// ProveQR demonstrates how the prover can prove that y1^2 is QR .
func ProveQR(y1 *big.Int, group *groups.SchnorrGroup) bool {
	y := group.Mul(y1, y1)
	prover := NewQRProver(group, y1)
	verifier := NewQRVerifier(y, group)
	m := group.P.BitLen()
	for i := 0; i < m; i++ {
		x := prover.GetProofRandomData()
		c := verifier.GetChallenge(x)
		z, _ := prover.GetProofData(c)
		proved := verifier.Verify(z)
		if !proved {
			return false
		}
	}
	return true
}
func ProveQR ( y1 * big . Int , group * groups . SchnorrGroup ) bool { y := group . Mul ( y1 , y1 ) prover := NewQRProver ( group , y1 ) verifier := NewQRVerifier ( y , group ) m := group . P . BitLen ( ) for i := 0 ; i < m ; i ++ { x := prover . GetProofRandomData ( ) c := verifier . GetChallenge ( x ) z , _ := prover . GetProofData ( c ) proved := verifier . Verify ( z ) if ! proved { return false } } return true }
ProveQR demonstrates how the prover can prove that y1^2 is QR.
ProveQR demonstrates how the prover can prove that y1^2 is QR .