Transposition Key-Based Transposition
GLEngine.transpose(ciphertext, transposition_key)
- Returns the transposition of the input ciphertext.
Does not consume any level.
- Input:
- GLCiphertext
- GLTranspositionKey
- Output:
import numpy as np
from desilofhe import GLEngine
engine = GLEngine()
shape = engine.shape
secret_key = engine.create_secret_key()
transposition_key = engine.create_transposition_key(secret_key)
message = np.ones(shape, dtype=np.float64)
ciphertext = engine.encrypt(message, secret_key)
transposed = engine.transpose(ciphertext, transposition_key)
Plaintext Transposition
GLEngine.transpose(plaintext)
- Returns the transposition of the input plaintext.
import numpy as np
from desilofhe import GLEngine
engine = GLEngine()
shape = engine.shape
message = np.ones(shape, dtype=np.float64)
plaintext = engine.encode(message)
transposed = engine.transpose(plaintext)