make_power_basis
Engine.make_power_basis(ciphertext, max_power, relinearization_key)- Make a power basis, which is \([x, x^2, \dots, x^{max\_power}]\) for the given ciphertext \(x\).
- Input:
Ciphertext- max_power:
int. The maximum power of the power basis. RelinearizationKey
- Output:
- power_basis:
list[Ciphertext]
- power_basis:
from desilofhe import Engine
engine = Engine()
secret_key = engine.create_secret_key()
public_key = engine.create_public_key(secret_key)
relinearization_key = engine.create_relinearization_key(secret_key)
message = [1, 2, 3]
ciphertext = engine.encrypt(message, public_key)
power_basis = engine.make_power_basis(
ciphertext, max_power=3, relinearization_key=relinearization_key
)
Engine.make_power_basis(ciphertext, max_power, evaluation_key)- Make a power basis, which is \([x, x^2, \dots, x^{max\_power}]\) for the given ciphertext \(x\), using the relinearization key bundled in the evaluation key.
- Input:
Ciphertext- max_power:
int. The maximum power of the power basis. EvaluationKey
- Output:
- power_basis:
list[Ciphertext]
- power_basis:
Warning
- 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)
evaluation_key = engine.create_evaluation_key(secret_key)
message = [1, 2, 3]
ciphertext = engine.encrypt(message, public_key)
power_basis = engine.make_power_basis(
ciphertext, max_power=3, evaluation_key=evaluation_key
)