conjugate

Ciphertext Conjugation

Engine.conjugate(ciphertext, conjugation_key)
Returns the conjugate of the input ciphertext. In general, does not consume any level. A level is consumed only if the engine is not configured for bootstrapping and the ciphertext is at the maximum allowable level for a given parameter.
  • 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)
Engine.conjugate(ciphertext, evaluation_key)
Returns the conjugate of the input ciphertext, using the conjugation key bundled in the evaluation key. In general, does not consume any level. A level is consumed only if the engine is not configured for bootstrapping and the ciphertext is at the maximum allowable level for a given parameter.
  • Input:
    • Ciphertext
    • EvaluationKey
  • Output:
    • Ciphertext

Warning

  • The matrix form does not yet support this operation.
from desilofhe import Engine

engine = Engine()
secret_key = engine.create_secret_key()
public_key = engine.create_public_key(secret_key)
evaluation_key = engine.create_evaluation_key(secret_key)

message = [1, 2, 3]
ciphertext = engine.encrypt(message, public_key)
conjugated_ciphertext = engine.conjugate(ciphertext, evaluation_key)

Plaintext Conjugation

Engine.conjugate(plaintext)
Returns the conjugate of the input plaintext.
  • Input:
    • Plaintext
  • Output:
    • Plaintext
from desilofhe import Engine

engine = Engine()

message = [1, 2, 3]
plaintext = engine.encode(message)
conjugated_plaintext = engine.conjugate(plaintext)