transpose
Engine.transpose(ciphertext, transposition_key)- Returns the transpose of the input ciphertext. A level is consumed only if the engine is not configured for bootstrapping and the ciphertext is at the maximum allowable level for a given parameter.
- Input:
- Ciphertext
- TranspositionKey
- Output:
- Ciphertext
Warning
- The vector form does not support this operation.
from desilofhe import Engine
engine = Engine(form="matrix")
secret_key = engine.create_secret_key()
public_key = engine.create_public_key(secret_key)
transposition_key = engine.create_transposition_key(secret_key)
message = [1, 2, 3]
ciphertext = engine.encrypt(message, public_key)
transposed_ciphertext = engine.transpose(ciphertext, transposition_key)