According to my understanding, Concrete performs randomized encryption and the randomness is internally handled. For a particular use case, I want that the randomness used in a particular encryption can be revealed so that, using the same key and randomness, a user can encrypt a plaintext to the same ciphertext again (to verify that the encryption represent the given plaintext).
Is this possible? If not, are there any possible alternatives?
So, ciphertexts are like ({a_i}, b), where b = \sum a_i s_i + m + e, where s_i are bits of the secret key, m is the plaintext and e is the noise.
Which means:
a_i are already public
e is the noise
It would not be safe, to reveal the noise: with the noises and the ciphertexts, you can recover the private key.
Could you describe why you want to re-encrypt on the same ciphertext? Or, couldn’t you keep pairs of (clear, ciphertext) on the client side, to directly do what you want to do?
I require randomness to be revealed as I am implementing verifiable voting, which requires the user to have the ability to audit the system and the encryptions it generates. One particular use case is to check the vote tally. The system will encrypt all votes, perform homomorphic encryptions, and reveal the encrypted and decrypted total. In order to verify that the decrypted total is actually equal to the encrypted total, the user should be able to re-encrypt the plaintext, using the public key and the randomness, to see if it matches the original encryption.
I am not very aware of crypto protocols for voting. I can however imagine that you don’t want the randomness of individual votes to be revealed: else, it would leak the individual votes, right? You just want the randomness of the ciphertext which combines the individual votes. If you use an additive crypto scheme like Paillier for your voting system, yes you can recover the “combined randomness” and reveal it for reencryption+check. For FHE schemes, I’m not sure how it works. Maybe look at the literature for that.
Concrete (or here, TFHE-rs, the cryptography library which is used under the hood) is open source, so you can have a look there and try to modify them for your needs. But I would be very cautious here, for security reasons.