create_individual_rotation_key

Engine.create_individual_rotation_key(secret_key, public_key, level)
Creates an individual rotation key, used to create a common rotation key for multiparty computation. Requires a secret key and a public key as inputs. The individual rotation key is internally composed of individual fixed rotation keys of size \(2^n\). The value of n ranges from 0 to log_coeff_count - 1.
  • Input
    • SecretKey
    • PublicKey
    • level: optional
      • Creates the key with a reduced size to contain only the specified multiplication levels.
  • Output
    • RotationKey
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)

rotation_key1 = engine.create_individual_rotation_key(secret_key1, public_key)

level_3_rotation_key1 = engine.create_individual_rotation_key(secret_key1, public_key, level=3)