create_individual_fixed_rotation_key

Engine.create_individual_fixed_rotation_key(secret_key, public_key, delta, level)
Create an individual fixed rotation key, which is used to create a common fixed rotation key for a specific delta amount of rotation in multiparty computation. Requires a secret key, a public key, and a delta as inputs.
  • Input
    • SecretKey
    • PublicKey
    • delta: 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
    • FixedRotationKey
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_rotation_key1 = engine.create_individual_fixed_rotation_key(secret_key1, public_key, delta=1)

level_3_fixed_rotation_key1 = engine.create_individual_fixed_rotation_key(secret_key1, public_key, delta=1, level=3)