Open tcerqueira opened 1 month ago
If I understand the proposed functionality correctly, it's equivalent to adding a ciphertext of zero to the provided ciphertext. A ciphertext of zero can be obtained using PublicKey::encrypt
or PublicKey::encrypt_zero
(in the latter case, together with a ZKP that the ciphertext indeed encrypts zero). The only piece of functionality not immediately available is specifying the blinding factor; please, let me know if you need it specifically.
Correct! I was using the other interface to avoid one rng but it was not necessary, so: no, I don't need specifically.
Feature request
A
rerandomise
andrerandomise_with
methods to rerandomise a ciphertextWhy?
To easily rerandomise ciphertexts.
Alternatives
I'm not experienced and I'm having a hard time figuring out how to achieve this.
For reference here's how another crate implements it and how I was trying to implement it: https://docs.rs/rust-elgamal/latest/rust_elgamal/struct.EncryptionKey.html#method.rerandomise https://docs.rs/rust-elgamal/latest/rust_elgamal/struct.EncryptionKey.html#method.rerandomise_with