同态加密是一种基于数学困难问题的计算复杂性密码学技术,对于经过同态加密的数据进行运算得到的结果与用相同方法处理未经加密的数据得到的结果一致。In other words, first calculation and then decryption are equivalent to first decryption and then calculation.
Homomorphic encryption methods provide a way to out-source computations to the cloud while protecting the confidentiality of the data
RSA体系就存在乘法同态性质
Palilier
Paillier算法(复合剩余类的困难问题Composite Residuosity Class Problem)是加法同态的,密文相乘等于明文相加。
Paillier scheme consists of a fixed basis modular exponentiation with the message as exponent, and the
generation of a noise factor(r) used to mask the message
测试
from phe import paillier
#key generate
public_key, private_key <