// NewRSABasedCommitter takes n, q, y parameters which are generated by RSABasedCommitReceiver.
NewRSABasedCommitter takes n, q, y parameters which are generated by RSABasedCommitReceiver.
// NewRSABasedCommitter takes n q y parameters which are generated by RSABasedCommitReceiver .
func NewRSABasedCommitter(homomorphism func(*big.Int) *big.Int, homomorphismInv func(*big.Int) *big.Int,
	H *groups.RSA, q, y *big.Int) (*RSABasedCommitter, error) {
	yIsValid := H.IsElementInGroup(y)
	if !yIsValid {
		return nil, fmt.Errorf("y is not valid")
	}
	return &RSABasedCommitter{
		Homomorphism:    homomorphism,
		HomomorphismInv: homomorphismInv,
		H:               H,
		Q:               q,
		Y:               y,
	}, nil
}
func NewRSABasedCommitter ( homomorphism func ( * big . Int ) * big . Int , homomorphismInv func ( * big . Int ) * big . Int , H * groups . RSA , q , y * big . Int ) ( * RSABasedCommitter , error ) { yIsValid := H . IsElementInGroup ( y ) if ! yIsValid { return nil , fmt . Errorf ( " " ) } return & RSABasedCommitter { Homomorphism : homomorphism , HomomorphismInv : homomorphismInv , H : H , Q : q , Y : y , } , nil }
NewRSABasedCommitter takes n, q, y parameters which are generated by RSABasedCommitReceiver.
NewRSABasedCommitter takes n q y parameters which are generated by RSABasedCommitReceiver .
// y must be from Im(f) where f(x) = x^q mod n, that means gcd(y, n) must be 1: // Note that for other q-one-way homomorphisms this validation would be different: