intt

Engine.intt(ciphertext)
Apply an INTT (Inverse Number Theoretic Transform) to a ciphertext in NTT (Number Theoretic Transform) form to restore the original ciphertext. Does not consume any level. In any operation, the engine will automatically apply an INTT 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)

ntt_form = engine.ntt(ciphertext)
intt_form = engine.intt(ntt_form)
Engine.intt(plaintext)
Apply an INTT to a plaintext in NTT form to restore the original plaintext. Does not consume any level. In any operation, the engine will automatically apply an INTT 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
from desilofhe import Engine

engine = Engine()

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

ntt_form = engine.ntt(plaintext)
intt_form = engine.intt(ntt_form)