// Mul homomorphically multiplies an encrypted integer (cipher text) by a
// constant. We do this by raising our cipher text to the power of the passed
// constant. Upon decryption, the resulting plain text will be the product of
// the plaintext integer and the constant.
Mul homomorphically multiplies an encrypted integer (cipher text) by a
constant. We do this by raising our cipher text to the power of the passed
constant. Upon decryption, the resulting plain text will be the product of
the plaintext integer and the constant.
// Mul homomorphically multiplies an encrypted integer ( cipher text ) by a // constant . We do this by raising our cipher text to the power of the passed // constant . Upon decryption the resulting plain text will be the product of // the plaintext integer and the constant .
func Mul(pubKey *PublicKey, cipher []byte, constant []byte) []byte {
	c := new(big.Int).SetBytes(cipher)
	x := new(big.Int).SetBytes(constant)
	return new(big.Int).Exp(c, x, pubKey.NSquared).Bytes()
}
func Mul ( pubKey * PublicKey , cipher [ ] byte , constant [ ] byte ) [ ] byte { c := new ( big . Int ) . SetBytes ( cipher ) x := new ( big . Int ) . SetBytes ( constant ) return new ( big . Int ) . Exp ( c , x , pubKey . NSquared ) . Bytes ( ) }
Mul homomorphically multiplies an encrypted integer (cipher text) by a
constant.
Mul homomorphically multiplies an encrypted integer ( cipher text ) by a constant .
// c ^ x mod n^2