make_chebyshev_basis
Engine.make_chebyshev_basis(ciphertext, max_power, relineraization_key)
- Make a Chebyshev basis, which is \([T_1(x), T_2(x), \dots, T_{max\_power}(x)]\) for the given ciphertext \(x\), where \(T_n(x)\) is the \(n\)th Chebyshev polynomial.
- Input:
- Ciphertext
- max_power: the maximum power of the power basis
- RelinearizationKey
- Output:
- chebyshev_basis: an array of Ciphertexts
from liberate 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)
chebyshev_basis = engine.make_chebyshev_basis(
ciphertext, max_power=3, relinearization_key
)