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.
- input:
- Ciphertext
- Output:
- Ciphertext
Warning
- This function is intended for experts who want the best possible performance.
- 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)
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.
Warning
- This function is intended for experts who want the best possible performance.
- The matrix form does not yet support this operation.
- Input:
- Plaintext
- Output:
- Plaintext