Skip to content

Conjugate Transposition Key-Based Conjugate Transposition

GLEngine.conjugate_transpose(ciphertext, conjugate_transposition_key)
Returns the conjugate transposition of the input ciphertext. Does not consume any level.
  • Input:
    • GLCiphertext
    • GLConjugateTranspositionKey
  • Output:
    • GLCiphertext
import numpy as np

from desilofhe import GLEngine

engine = GLEngine()
shape = engine.shape
secret_key = engine.create_secret_key()
conjugate_transposition_key = engine.create_conjugate_transposition_key(
    secret_key
)

message = np.ones(shape, dtype=np.float64)
ciphertext = engine.encrypt(message, secret_key)

conjugate_transposed = engine.conjugate_transpose(
    ciphertext, conjugate_transposition_key
)

Plaintext Conjugate Transposition

GLEngine.conjugate_transpose(plaintext)
Returns the conjugate transposition of the input plaintext.
  • Input:
    • GLPlaintext
  • Output:
    • GLPlaintext
import numpy as np

from desilofhe import GLEngine

engine = GLEngine()
shape = engine.shape

message = np.ones(shape, dtype=np.float64)
plaintext = engine.encode(message)

conjugate_transposed = engine.conjugate_transpose(plaintext)