nvflare.lighter.impl.he module

class HEBuilder(poly_modulus_degree=8192, coeff_mod_bit_sizes=[60, 40, 40], scale_bits=40, scheme='CKKS')[source]

Bases: Builder

Build Homomorphic related contents.

Generates Tenseal homomorphic encryption context for server and client and writes them to server and client participant folders.

Parameters
  • poly_modulus_degree – defaults to 8192.

  • coeff_mod_bit_sizes – defaults to [60, 40, 40].

  • scale_bits – defaults to 40.

  • scheme – defaults to “CKKS”.

build(project, ctx)[source]
get_serialized_context(is_client=False)[source]
initialize(ctx)[source]