rescale

Engine.rescale(ciphertext)
Reduces the modulus by dividing by the scale factor before multiplication to lower the scale and noise. Consumes a level. In any operation, the engine will automatically rescale input ciphertexts if needed. This function is intended for experts who want the best possible performance.
  • 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)

rescaled = engine.rescale(ciphertext)
Engine.rescale(plaintext)
Reduces the modulus by dividing by the scale factor before multiplication to lower the scale and noise. Consumes a level. In any operation, the engine will automatically rescale input plaintexts if needed. This function is intended for experts who want the best possible performance.
  • Input:
    • Plaintext
  • Output:
    • Plaintext
from desilofhe import Engine

engine = Engine()

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

rescaled = engine.rescale(plaintext)