create_individual_roll_key
Engine.create_individual_roll_key(secret_key, public_key, level)- Creates an individual roll key, used to create a common roll key for multiparty computation. Requires a secret key and a public key as inputs. The individual roll key is internally composed of individual fixed roll keys of size \(2^n\). The value of n ranges from
0tolog_coeff_count - 1.
- Input
- SecretKey
- PublicKey
- 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)
level_3_roll_key1 = engine.create_individual_roll_key(
secret_key1, public_key, level=3
)