nvflare.lighter.impl.he module
- class HEBuilder(poly_modulus_degree=8192, coeff_mod_bit_sizes=None, scale_bits=40, scheme='CKKS')[source]
Bases:
BuilderBuild 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: Project, ctx: ProvisionContext)[source]
Execute the main build logic for this builder.
- Parameters:
project (Project) – The project to be provisioned.
ctx (ProvisionContext) – Context shared across builders.
- initialize(project: Project, ctx: ProvisionContext)[source]
Prepare the builder with any necessary pre-processing.
- Parameters:
project (Project) – The project to be provisioned.
ctx (ProvisionContext) – Context shared across builders.