Conjugation Key-Based Conjugation
Engine.conjugate(ciphertext, conjugation_key)
- Returns the conjugate of the input ciphertext. Requires a conjugation key if x is a ciphertext.
- Input:
- Ciphertext
- ConjugationKey
- Output:
- Ciphertext
from desilofhe import Engine
engine = Engine()
secret_key = engine.create_secret_key()
public_key = engine.create_public_key(secret_key)
conjugation_key = engine.create_conjugation_key(secret_key)
message = [1, 2, 3]
ciphertext = engine.encrypt(message, public_key)
conjugated_ciphertext = engine.conjugate(ciphertext, conjugation_key)
The levels of the input and output ciphertexts are usually equal. However, if the level of the input ciphertext is at the maximum possible value for a given parameter set, the level of the output ciphertext is reduced by one.
Plaintext Conjugation
Engine.conjugate(plaintext)
- Returns the conjugate of the input plaintext.
- Input:
- Plaintext
- Output:
- Plaintext