make_power_basis
Engine.make_power_basis(ciphertext, max_power, relinearization_key)- 멱 기저(power basis)를 생성합니다. 주어진 암호문 x에 대해 \([x, x^2, \dots, x^{max\_power}]\) 를 생성합니다.
- 인풋:
Ciphertext- max_power:
int. 멱급수의 최대 차수 RelinearizationKey
- 아웃풋:
- 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)- 연산 키에 포함된 재선형화 키를 사용하여 멱 기저(power basis)를 생성합니다. 주어진 암호문 x에 대해 \([x, x^2, \dots, x^{max\_power}]\) 를 생성합니다.
- 인풋:
Ciphertext- max_power:
int. 멱급수의 최대 차수 EvaluationKey
- 아웃풋:
- power_basis:
list[Ciphertext]
- power_basis:
Warning
- 행렬 엔진은 이 연산을 아직 지원하지 않습니다.
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
)