Open lzjluzijie opened 7 months ago
Hi @lzjluzijie This library does not have shuffle functionality. If you want to improve ciphertext security, how about using this ?https://github.com/intel/pailliercryptolib/blob/fdc21350302117103452968ababc2f9676f0d383/ipcl/include/ipcl/pub_key.hpp#L91
What exactly is this function doing? My current use case is that Alice holds the private key and an array of ciphertext, sent the ciphertext of the array to Bob. Bob adds the an array of data to the ciphertext, shuffles the result ciphertext, and send back to Alice. So Alice and decrypt the results, but don't know what Bob's array is, since the order is changed.
In your usage scenario, the result returned by Bob cannot be decrypted. As you said, the order is changed. This library can adapt to this scenario:
A
. CT_A = pk.encrypt(A)
B
. CT_B = pk.encrypt(B)
CT_RES = CT_A + CT_B
CT_RES
to Alice.RES = sk.decrypt(CT_RES)
.Sorry I didn't explain my needs clearly. The steps you mentioned is exactly want I am doing now. However, I don't want Alice to decrypt the RES like this directly, since Alice would learn the values of B by RES-A
. If Bob can shuffle CT_RES
to CT_RES'
, Alice can still decrypt the same results RES'
, a permutation of RES
, but in a different order, so Alice cannot compute B directly since RES'-A
is meaningless.
Okay, I think I got your point. This library doesn't provide any related functions (shuffle
), so you can only implement it yourself.
I see. Can you give me any hint about how to get started?
Hi, I am new to homomorphic encryption. I didn't find how to shuffle ciphertexts in this library. Is there any way to do it? Thank you.