Dynamic-key ElGamal encryption
The dynamic-key ElGamal encryption is a variant of the ElGamal encryption that allows for updating keys and ciphertexts. This is useful for applications where the key pair needs to be updated periodically to enhance security. ECLib implements the following algorithms.
Key generation
The key generation algorithm is the same as the ElGamal encryption.
Encryption
The encryption algorithm is the same as the ElGamal encryption.
Decryption
The decryption algorithm is the same as the ElGamal encryption.
Multiplication
The multiplication algorithm is the same as the ElGamal encryption.
Key update
The key updating algorithm takes public parameters \((q, p, g)\), a public key \(h\), and a secret key \(s\) as input and outputs an updated public key \(h'\), updated secret key \(s'\), and token \(t\),
where \(r \in \mathbb{Z}_q\) is a random number.
Ciphertext update
The ciphertext update algorithm takes the public parameters \((q, p, g)\), a ciphertext \(c = (c_1, c_2)\), and the token \(t = (r, h)\) and outputs an updated ciphertext \(c'\),
where \(u \in \mathbb{Z}_q\) is a random number.