// Used to evaluate c' parameter which combines individual share decryptions.
//
// Modulo division is performed on the computed exponent to avoid creating
// large numbers. This is possible because of the following property of modulo:
// A^B mod C = (A mod C)^B mod C
//
// Modulo division is performed on the computed coefficient because of the
// following property of modulo:
// (AB) mod C = (A mod C * B mod C) mod C
// Note, we need to combine coefficients into single c'.
Used to evaluate c' parameter which combines individual share decryptions.

Modulo division is performed on the computed exponent to avoid creating
large numbers. This is possible because of the following property of modulo:
A^B mod C = (A mod C)^B mod C

Modulo division is performed on the computed coefficient because of the
following property of modulo:
(AB) mod C = (A mod C * B mod C) mod C
Note, we need to combine coefficients into single c'.
// Used to evaluate c ' parameter which combines individual share decryptions . // // Modulo division is performed on the computed exponent to avoid creating // large numbers . This is possible because of the following property of modulo : // A^B mod C = ( A mod C ) ^B mod C // // Modulo division is performed on the computed coefficient because of the // following property of modulo : // ( AB ) mod C = ( A mod C * B mod C ) mod C // Note we need to combine coefficients into single c ' .
func (tk *ThresholdPublicKey) updateCprime(cprime, lambda *big.Int, share *PartialDecryption) *big.Int {
	twoLambda := new(big.Int).Mul(TWO, lambda)
	ret := tk.exp(share.Decryption, twoLambda, tk.GetNSquare())
	ret = new(big.Int).Mul(cprime, ret)
	return new(big.Int).Mod(ret, tk.GetNSquare())
}
func ( tk * ThresholdPublicKey ) updateCprime ( cprime , lambda * big . Int , share * PartialDecryption ) * big . Int { twoLambda := new ( big . Int ) . Mul ( TWO , lambda ) ret := tk . exp ( share . Decryption , twoLambda , tk . GetNSquare ( ) ) ret = new ( big . Int ) . Mul ( cprime , ret ) return new ( big . Int ) . Mod ( ret , tk . GetNSquare ( ) ) }
Used to evaluate c' parameter which combines individual share decryptions.
Used to evaluate c ' parameter which combines individual share decryptions .