create_individual_fixed_roll_key
Engine.create_individual_fixed_roll_key(secret_key, public_key, shift, axis, *, 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:
SecretKeyPublicKey- shift:
int. It is generated by modulo operation within the range[0~slot count). - axis:
None, optional. Must beNone, since the matrix form does not support multiparty computation. - level:
int, optional, keyword argument- 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(multiparty=True)
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
)