我的 SEAL v2.3.1 中有这些 SEAL 设置:
seal::EncryptionParameters parms;
parms.set_poly_modulus("1x^2048 + 1");
parms.set_coeff_modulus(seal::coeff_modulus_128(2048));
parms.set_plain_modulus(1 << 8);
seal::SEALContext context(parms);
seal::IntegerEncoder encoder(context.plain_modulus());
seal::KeyGenerator keygen(context);
seal::PublicKey public_key = keygen.public_key();
seal::SecretKey secret_key = keygen.secret_key();
seal::Encryptor encryptor(context, public_key);
seal::Evaluator evaluator(context);
seal::Decryptor decryptor(context, secret_key);
我已将public_key,secret_key和保存parms到文件中以备后用。我用public_key来加密一些数据并将其存储在数据库中。我使用保存parms在服务器上的数据库对存储的Ciphertexts例如evaluator.add(stored_ciphertext1, stored_ciphertext2, result_ciphertext3);.
现在假设另一个人想要:
- 对
Ciphertexts我存储的数据进行计算。 - 上传一些新的加密
Ciphertexts到我旁边的数据库。
对于选项 1,第二个人只需要我的存储parms来执行evaluator.add()我的Ciphertexts,或者他可以为此目的创建一次新的吗?
对于选项 2,第二个人必须有权访问我存储的内容,public_key因为创建new_public_key、new_secret_key设置不允许我解密任何new_public_key正确加密的数据,对吗?
现在让事情变得更加混乱:-) 假设第二个人创建了自己的new_public_key,new_secret_key并将自己的上传Ciphertexts到同一数据库的其他表中。现在我想使用他和我的Ciphertexts. 有没有办法让它工作,或者它永远无法工作,因为我们每个人都使用不同public_key的加密方式?