I have those SEAL settings in my SEAL v2.3.1:
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);
I've saved the public_key
, secret_key
and parms
into files for later use. I've used the public_key
to encrypt some data and store it in a database. I use the saved parms
on the server with the database to execute some mathematical operations on the stored Ciphertexts
e.g. evaluator.add(stored_ciphertext1, stored_ciphertext2, result_ciphertext3);
.
Now let's say another person wants:
- To do calculations on the
Ciphertexts
stored by me. - Upload some new encrypted
Ciphertexts
to the database next to mine.
For option 1 the second person only needs my stored parms
to execute evaluator.add()
on my Ciphertexts
or can he create new once for this purpose?
For option 2 the second person has to have access to my stored public_key
because creating new_public_key
, new_secret_key
set will not allow me to decrypt any data encrypted with new_public_key
correctly, right?
Now to make things more confusing :-) let's say the second person has created his own new_public_key
, new_secret_key
and uploaded his own Ciphertexts
in some other table on the same database. Now I want to execute some cross calculations using his and my Ciphertexts
. Is there a way for this to work or it can never work because each of us used a different public_key
for encryption?