G parameter removed from ThresholdKey
G _MUST_ be always n+1 to make the threshold encryption algorithm safe. We assume G=n+1 both for standard and threshold version.
This commit is contained in:
5 files changed
+4
-5
No files matched your search
@@ -37,6 +37,9 @@ func (pub *PublicKey) Encrypt(m *big.Int, random io.Reader) (*Cypher, error) {
|
||||
}
|
||||
nSquare := pub.GetNSquare()
|
||||
|
||||
// g is _always_ equal n+1
|
||||
// Threshold encryption is safe only for g=n+1 choice.
|
||||
// See [DJN 10], section 5.1
|
||||
g := new(big.Int).Add(pub.N, big.NewInt(1))
|
||||
gm := new(big.Int).Exp(g, m, nSquare)
|
||||
rn := new(big.Int).Exp(r, pub.N, nSquare)
|
||||
|
||||
Reference in new issue
Block a user