negate

Engine.negate(ciphertext)
Returns the ciphertext with its sign inverted.
  • Input:
    • Ciphertext
  • Output:
    • Ciphertext
from desilofhe import Engine

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

message = [1, 2, 3]
ciphertext = engine.encrypt(message, public_key)
negated = engine.negate(ciphertext)