Parameterized TFHE

func.func @main(%arg0: !FHE.eint<6>, %arg1: !FHE.eint<6>) -> !FHE.eint<6> {
   %result = "FHE.add_eint"(%arg0, %arg1): (!FHE.eint<6>, !FHE.eint<6>) -> (!FHE.eint<6>)
   return %result: !FHE.eint<6>
}

Below is parameterised tfhe , can someone elaborate on the below output

module {
func.func @main(%arg0: !TFHE.glwe<sk<0,1,513>>, %arg1: !TFHE.glwe<sk<0,1,513>>) → !TFHE.glwe<sk<0,1,513>> {
%0 = “TFHE.add_glwe”(%arg0, %arg1) : (!TFHE.glwe<sk<0,1,513>>, !TFHE.glwe<sk<0,1,513>>) → !TFHE.glwe<sk<0,1,513>>
return %0 : !TFHE.glwe<sk<0,1,513>>
}
}

what is normalized tfhe?

A program in the tfhe dialect can be in different states:

  • Unparameterized: The secret key type attributes are none keys of the form sk?
  • Parameterized: The secret keys attributes are parameterized in polysize and dimension, plus they have an identifier.
  • Normalized: The secret keys attributes are parameterized, and are associated to an index in a table of keys that is used at runtime to encrypt/decrypt arguments and return values.

Mainly the difference is that before being normalized, the identifiers of the keys are not guaranteed to form a proper sequence of integers starting from zero. To put it simply, this is just a technicality related to how we handle the keys at runtime.

Thankyou @apere If I understood it correctly ,once the secret keys are parameterised (both glwe and lwe) suitable parameters are being assigned to the them depending on the max. and intermediate bidthwidth of the circuit by concrete optimizer and then an indexing of the keys are done which is called normalization

Absolutely. Normalization does not deal with crypto parameters basically, it just copies it.

1 Like