// Exp computes base^exponent in QR_N. This means base^exponent mod rsa.N.
Exp computes base^exponent in QR_N. This means base^exponent mod rsa.N.
// Exp computes base^exponent in QR_N . This means base^exponent mod rsa . N .
func (group *QRRSA) Exp(base, exponent *big.Int) *big.Int {
	expAbs := new(big.Int).Abs(exponent)
	if expAbs.Cmp(exponent) == 0 {
		return new(big.Int).Exp(base, exponent, group.N)
	} else {
		t := new(big.Int).Exp(base, expAbs, group.N)
		return group.Inv(t)
	}
}
func ( group * QRRSA ) Exp ( base , exponent * big . Int ) * big . Int { expAbs := new ( big . Int ) . Abs ( exponent ) if expAbs . Cmp ( exponent ) == 0 { return new ( big . Int ) . Exp ( base , exponent , group . N ) } else { t := new ( big . Int ) . Exp ( base , expAbs , group . N ) return group . Inv ( t ) } }
Exp computes base^exponent in QR_N.
Exp computes base^exponent in QR_N .