Function elgamal::rerandomize

source ·
pub fn rerandomize(
    enc_key: P256Point,
    ctx: Ciphertext,
    randomness: &mut Randomness
) -> Result<Ciphertext, Error>
Expand description

Given the correct public encryption key, it is possible to rerandomize Elgamal ciphertexts without changing the message that is encrypted. To do so, the encryption is multiplied by the fresh randomizer and the result is added to the blinded message component of the ciphertext.

The auxillary element of the ciphertext is similarly updated by adding the result of multiplying the generator by the fresh randomizer.