同态加密是一种基于数学困难问题的计算复杂性密码学技术,对于经过同态加密的数据进行运算得到的结果与用相同方法处理未经加密的数据得到的结果一致。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体系就存在乘法同态性质
PalilierPaillier算法(复合剩余类的困难问题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 = paillier.generate_paillier_keypair()
secret_number_list = [3.141592653, 300, -4.6e-12]
encrypted_number_list = [public_key.encrypt(x) for x in secret_number_list]
print(encrypted_number_list)
decrypted_number_list=[private_key.decrypt(x) for x in encrypted_number_list]
print(decrypted_number_list)
官方文档
import phe as paillier
import math
#加密
def encrypt_vector(public_key, x):
return [public_key.encrypt(i) for i in x]
#解密
def decrypt_vector(private_key, x):
return np.array([private_key.decrypt(i) for i in x])
def __generate__(self, key_length):
keypair = paillier.generate_paillier_keypair(n_length=key_length)
self.pubkey, self.privkey = keypair
改进的Paillier算法(论文)
然而,due to the high complexity of the Paillier algorithm when doing encryption and decryption,it will affect the efficiency of network training.
the throughput reached was between 30,000 and 190,000 encryptions per second
F(A)+F(B)=F(A*B),*可以是任何运算
自举Boot strapping算法指的就是利用有限的样本资料经由多次重复抽样,重新建立起足以代表母体样本分布的新样本
Pedersen承诺具有同态加法特性的密文形式
有别于哈希承诺,对于同一个v会产生相同的承诺H(v),Pedersen承诺通过引入随机致盲因子r,即便隐私数据v不变,最终的承诺c也会随着r的变化而变化,以此提供了信息论安全的隐匿性。
References欢迎分享,转载请注明来源:内存溢出
评论列表(0条)