create_multiparty_roll_key
Engine.create_multiparty_roll_key(roll_keys, level)- Creates a common roll key used for general rolls in multiparty computation. Requires an array of individual roll keys as input. The common roll key is internally composed of common fixed roll keys of size \(2^n\). The value of n ranges from
0tolog_coeff_count - 1.
- Input
- roll_keys: an array of RollKeys
- level: optional
- Creates the key with a reduced size to contain only the specified multiplication levels.
- Output
- RollKey
Warning
- The matrix form does not yet support this operation.
from desilofhe import Engine
engine = Engine()
secret_key1 = engine.create_secret_key()
secret_key2 = engine.create_secret_key()
public_key_a = engine.create_public_key_a()
public_key_b1 = engine.create_public_key_b(secret_key1, public_key_a)
public_key_b2 = engine.create_public_key_b(secret_key2, public_key_a)
public_key = engine.create_multiparty_public_key(
[public_key_b1, public_key_b2], public_key_a
)
roll_key1 = engine.create_individual_roll_key(secret_key1, public_key)
roll_key2 = engine.create_individual_roll_key(secret_key2, public_key)
roll_key = engine.create_multiparty_roll_key([roll_key1, roll_key2])
level_3_roll_key = engine.create_multiparty_roll_key(
[roll_key1, roll_key2], level=3
)