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. 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)

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. 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)

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