apache / incubator-milagro-crypto-c

Apache milagro (Incubating)
Other
36 stars 15 forks source link

Use trick for g = n+1 in Paillier encryption #73

Closed samuele-andreoli closed 4 years ago

samuele-andreoli commented 4 years ago

In the Paillier encryption the form of g = n+1 can be exploited to reduce the modular exponentiation g^pt to a simple multiplication.

g^pt mod n^2 = (n+1)^pt mod n^2 = 1 + npt + n^2(other terms) mod n^2 = 1 + n * pt