create_individual_fixed_roll_key
Engine.create_individual_fixed_roll_key(secret_key, public_key, shift, level)- Create an individual fixed roll key, which is used to create a common fixed roll key for a specific shift amount of roll in multiparty computation. Requires a secret key and a public key.
- Input
- SecretKey
- PublicKey
- shift: int. It is generated by modulo operation within the range
[0~slot count). - level: optional
- Creates the key with a reduced size to contain only the specified multiplication levels.
- Output
- FixedRollKey
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
)
fixed_roll_key1 = engine.create_individual_fixed_roll_key(
secret_key1, public_key, shift=1
)
level_3_fixed_roll_key1 = engine.create_individual_fixed_roll_key(
secret_key1, public_key, shift=1, level=3
)