0
$\begingroup$

I have come across the TenSEAL tutorial on implementing homomorphic encryption (HE) and they mention the global_scale parameter.

(https://github.com/OpenMined/TenSEAL/blob/main/tutorials/Tutorial%202%20-%20Working%20with%20Approximate%20Numbers.ipynb)

global_scale: the scaling factor, here set to 2^40.

I am struggling to understand what it means and how to set its value in relation to the polynomial degree (poly_modulus_degree). For example, if I want to choose poly_modulus_degree=64, what should be the value of global_scale? can someone explain it to me? thank you.

$\endgroup$

1 Answer 1

1
$\begingroup$

The scaling factor is the precision you get when encoding real values as integers.

In the tutorial you linked:

"The first step of the CKKS scheme is encoding a vector of real numbers into a plaintext polynomial. The scaling factor defines the encoding precision for the binary representation of the number."

So if you have a real number, say, $100.9391$ with a scaling factor $f=10000$, then it would be encoded as the integer $100.9391 * 10000 = 1009391$. To decode, you divide by the scaling factor: $1009391 / 10000 = 100.9391$. This encoding/decoding is required because homomorphic encryption schemes operate over the integers (or polynomials with integer coefficients) and so we need a way to represent real numbers.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.