Score:0

Relationship between the scaling factor and polynomial degree in CKKS variant of homomorphic encryption?

in flag

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.

Score:1
sb flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.