FHE math chatgpt discussions
2025-07-17 blogpage sketch fhe
A ChatGPT discussion about relinearization and modulus switching:
When is bootstrapping performed?
When noise grow too big
bootstrapping is the performance bottleneck of FHE, very expensive
When is relinearization performed?
- After each homomorphic multiplication
- After each homomorphic multiplication
When is modulus switching performed?
Very frequently, almost after each operation
computationally cheap
As each modulus switching decreases the modulus, doesn't modulus become too small after a while?
Yes.
When modulus became too small, you do bootstrapping, which resets the modulus to a new number.
Leveled FHE schemes, which uses modulus switches, become having a low modulus after a while. At that point, they just stop working. For that reason, you can do limited number of multiplications with leveled FHE's (Recall that multiplications increase the noise multiplicatively).
Another ChatGPT discussion:
Why does ciphertext have two components in FHE? e.g.
(A, b)
whereb = A*s + m + e
? WhereA
is random matrix,s
is secret key,m
is the message (plaintext), ande
is noise.It's a design for decryption. Decryption uses the random
A
matrix. The decryption equation is,b - A*s = m + e
. Thenm
is recoverd by rounding them+e
to the nearest integer. As you can see,e
is expected to be small, so that goes away by rounding. That's why FHE schemes strives to keepe
(noise) small by bootstrapping and modulus switching and other tricks.The reason CKKS uses a 'scaling factor' is to scale real numbers to integers, so that the noise is small enough to be rounded away. Lattice-based schemes assume working with integers.
- CKKS
rescales
the integers by the scaling factor after each multiplication, as multiplications also multiplies the scaling factor.
- CKKS
Why is matrix
A
chosen at random?- Because
A
is regenerated randomly for each encryption. So that each ciphertext is unique, even thought the plaintext and the secret key are the same. This is to avoid the attacker to learn the relationship between the plaintext and the ciphertext, which is calledknown-plaintext attack
, orciphertext distinguishability attack
orchosen-plaintext attack (CPA)
. The protection against this attack is calledsemantic security
, which is achieved by non-deterministically generating new ciphertext for each encryption.
- Because
FHE schemes keep track of Ratio of noise size to modulus. So that they will decrease the noise after exceeding a certain threshold.
Incoming Internal References (1)
Outgoing Internal References (0)
Outgoing Web References (2)
-
chatgpt.com/share/68778a5a-fd5c-8010-859f-ab4bdeb9ad50
- ChatGPT discussion
-
chatgpt.com/share/6877cd64-a018-8010-8ed4-9a12e5d023f7
- ChatGPT discussion