Fully homomorphic encryption (FHE) promises to unlock computation on encrypted data, but practical schemes face fundamental limitations that constrain their real-world applicability. The BFV (Brakerski-Fan-Vercauteren) scheme, one of the most widely used FHE constructions, exemplifies a critical trade-off that has shaped the field: you can either pack large amounts of data per ciphertext or perform deep computations, but not both.
This limitation isn't merely a technical inconvenience, it fundamentally constrains the types of applications FHE can serve. Machine learning inference on encrypted data, secure database queries, and privacy-preserving analytics all demand both high data throughput and substantial computational depth. Yet classical BFV forces practitioners into an uncomfortable choice between these requirements.
Recent advances in generalized BFV schemes offer a path beyond this trade-off. By replacing the traditional integer plaintext modulus with carefully chosen polynomial quotients, these constructions can maintain large plaintext spaces while achieving multiplicative depths that scale with the ciphertext modulus rather than being inversely related to the plaintext size.
This article explores how the quotient-by-t(X)=Xk−b construction breaks free from classical BFV's fundamental limitations, examining both the mathematical foundations and practical implications of this approach.
Classical BFV: The Foundation
Let N=2n be the cyclotomic index. The classical BFV scheme operates over:
Ciphertext ring:Rq=Zq[X]/(XN+1)
Plaintext modulus: an integer t≪q
Scaling factor:Δ=⌊q/t⌋≃q/t
Secret/error:s←R2 and e←χ
Centered reduction:⌊x⌉t∈(−t/2,t/2]
The core operations follow a familiar pattern:
KeyGen: Pick a←Rq, s←R2, e←χ;
set b=−(as+e)∈Rq. Public key (b,a); secret key s.
Encryptm∈Zt[X]/(XN+1):
ct=([Δm+as+e]q,−a)∈Rq2
Decryptct=(c0,c1):
m=⌊Δc0+c1s⌉t
The Fundamental Bottleneck
The core limitation of classical BFV stems from its noise growth behavior. Increasing the plaintext modulus t to pack more data per ciphertext comes at a steep cost: the maximum multiplicative depth is roughly bounded by logq/logt, so larger plaintext spaces directly reduce computational capacity. To maintain depth while increasing t, we must grow q proportionally, but larger ciphertext moduli make every operation more expensive: more memory for keys, slower NTTs for polynomial arithmetic, and costlier key-switching.
The result is an unavoidable choice: high-throughput applications with large t sacrifice multiplicative depth, while deep computations are constrained to small plaintext spaces.
The breakthrough comes from recognizing that the plaintext modulus need not be an integer. Instead of working modulo t∈Z, we can construct plaintext rings using polynomial quotients of the form t(X)=Xk−b, where b is a small integer and k divides certain structural parameters of the cyclotomic polynomial.
This seemingly simple change has profound implications for noise growth and multiplicative depth, offering a path to escape classical BFV's fundamental limitations.
The Mathematical Setup
We keep the ciphertext ring exactly as in classical BFV, using one NTT-friendly prime:
Rq=Zq[X]/(XN+1),q≡1(mod2N)
For the plaintext ring, we introduce a binomial relation.
Write m=2N and let:
r=rad(m) - the radical of m (product of distinct primes dividing m)
k∣(m/r) - our chosen binomial degree
t(X)=Xk−b with a small base ∣b∣≪q
Constructing the New Plaintext Space
We leverage a classical identity for cyclotomic polynomials:
Φm(X)=Φr(Xm/r)Proof
Notation and basic definitions
rad(n):=∏p∣np (the product of distinct primes dividing n); equivalently rad(n) is the largest square-free divisor of n.
Euler’s totientφ(n)=∣{1≤k≤n:gcd(k,n)=1}∣.
Möbius functionμ(1)=1; μ(n)=0 if n is divisible by a square;
μ(n)=(−1)r if n is a product of r distinct primes.
n-th cyclotomic polynomialΦn(X):=1≤k≤ngcd(k,n)=1∏(X−e2πik/n)
the unique monic polynomial whose roots are the primitiven-th roots of unity. It has degree φ(n) and integer coefficients.
Theorems used in the proof
Theorem
If arithmetic functions f,g satisfy f(n)=∏d∣ng(d)for every n≥1, then g(n)=∑d∣nf(n/d)μ(d).
Proof. Assume f(n)=∏d∣ng(d). Consider P:=∏d∣nf(n/d)μ(d). Insert the definition of f: P=∏d∣n(∏e∣n/dg(e))μ(d).
Re-index: each pair (d,e) with de∣n appears once; write n=de⋅m with m=1. P=∏e∣ng(e)∑d∣n/eμ(d).
But ∑d∣mμ(d)=0 for m>1 and =1 for m=1. Hence all exponents vanish except when e=n, giving P=g(n).
Theorem
For every n≥1, Xn−1=∏d∣nΦd(X).
Proof. A primitive n-th root ζ is also a d-th root whenever d∣n, so ζ is a root of the product on the right. Both polynomials are monic of degree n, hence equal.
Theorem
For n≥1 and X=±1,
Φn(X)=d∣n∏(Xn/d−1)μ(d)=d∣n∏(Xd−1)μ(n/d).
Proof. Apply the first theorem to the arithmetic function f(n)=Xn−1.
Main Theorem
Statement. For every n≥1, Φn(X)=Φrad(n)(Xn/rad(n)).
Proof.
Write r=rad(n) and k=n/r (so k≥1 and gcd(k,r)=1).
We have Φn(X)=∏d∣n(Xn/d−1)μ(d).
Because μ(d)=0 whenever d is not square-free, the only divisors d that contribute are square-free, i.e. d∣r. Replace n/d by (kr)/d:
Φn(X)=d∣r∏(Xkr/d−1)μ(d)=d∣r∏((Xk)r/d−1)μ(d).
Now compare with the formula of the 3rd theorem for Φr, evaluated at Xk:
Φr(Xk)=∏d∣r((Xk)r/d−1)μ(d).
Hence Φn(X)=Φr(Xk)=Φr(Xn/r), as claimed.
To construct our new plaintext ring, we reduce Φm(X)modulo t(X) by substituting Xk=b.
Because k∣(m/r), this substitution yields a constant:
p=Φr(bm/(rk))∈Z
Hence the joint ideal (Φm(X),t(X))⊂Z[X] collapses to (t(X),p), giving us:
Rp,t=Z[X]/(t(X),p)≅Zp[X]/(Xk−b)
Lemma: Let m≥3 and r=rad(m). Choose 0<k<φ(m) with k∣(m/r), and set t(X)=Xk−b. For p=Φr(bm/(rk)), assume p is prime and p∤m. Write d=ordm(p).
Then t(X) splits over Fp into ℓ′=dk distinct irreducible factors of degree d.
The Galois group is G={x↦xi∣i≡1(modm/k)}.
Why the Noise Stays Small
The crucial advantage of generalized BFV emerges from how we represent plaintexts in the new ring. When encrypting μ∈Rp,t, we use the relation Xk=b to find a representation with small coefficients:
∥[μ]R∥∞≤b
This is possible because the binomial relation lets us "carry" large powers into exponential form, keeping all coefficients bounded by b−1.
After L multiplications, the worst-case coefficient grows like bL, giving a depth bound:
L≲logblogq
Since logb≪logt (we choose b to be small), this dramatically improves upon classical BFV's logq/logt bound. The binomial modulus t(X)=Xk−b enables far greater multiplicative depth without enlarging the ciphertext prime q.
Adding the binomial relation Xk=b fundamentally changes this structure. We can understand the effect by thinking slot-wise:
For each slot, we "apply the quotient by t(X)" locally:
Evaluatet(X) at the root of unity α that generates that slot
Quotient the slot's factor ring by the ideal (t(α))
This creates two possibilities:
Condition on t(α)
Resulting ideal
Effect on the slot
t(α)=0
the zero ideal (0)
The slot remains unchanged
t(α)=0
the whole ring (1)
The slot is completely eliminated
Consequently, a slot survives if and only if its root of unity α is a k-th root of b. Counting these roots yields exactly dk surviving slots, each operating over Fpd.
Viewing GBFV as a Subspace of Classical BFV
The relationship between generalized and classical BFV can be understood through the auxiliary prime p=Φr(bm/(rk)).
Since p lies in the ideal (Φm(X),t(X)), we can express it as:
a(X)Φm(X)+b(X)t(X)=p
where a(X) and b(X) are integer polynomials. Reducing modulo Φm, this becomes:
p=β⋅t(X)
where β is b(X) reduced modulo Φm(X). This gives us the fundamental relationship: (p)=(β)⋅(t) as ideals in R.
In the quotient ring Rp=R/(p), we have p≡0, which means:
0=p=β⋅t(X)
Since each slot behaves like a field, exactly one of β or t must be zero in each slot:
Slot type
Condition
Ideal
β-slot
β=0, t=0
(β)
t-slot
t=0, β=0
(t)
By the Chinese Remainder Theorem:
Rp≅R/(β)×R/(t)=Rβ×Rt
Generalized BFV makes its crucial choice here: it keeps only the Rt block, eliminating all β-slots and preserving only the t-slots where t(X)=0.
Hensel-Lifted Slots
Some applications, particularly bootstrapping, require a plaintext space defined modulo a prime power pe rather than just a prime p.
Our binomial ring construction adapts seamlessly to this requirement. Hensel's lemma allows us to lift the factorization:
Φm(X)=β(X)t(X)(modp)
to every power pewithout changing the CRT slot structure.
We transition from field-level slots Fpd to Galois rings:
R/(Φm,pe,t)≅i∈S∏GR(pe,d)
This preserves the same dk SIMD lanes while providing coefficients modulo pe. The Hensel lift provides the p-adic precision that bootstrapping requires, yet introduces no additional noise. After the ciphertext is refreshed, we can reduce back to modulus p and continue the GBFV computation with all its low-noise advantages intact.
Bootstrapping Generalized BFV
The primary challenge with bootstrapping generalized BFV stems from its restricted structure: GBFV operates in a subringR/(p,t)⊂R/(p), which severely limits the automorphisms available for bootstrapping.
The Core Problem: Missing Rotations
Standard BFV bootstrapping relies on access to the complete automorphism group:
{σℓ:X↦Xℓ∣ℓ∈(Z/mZ)×}
These rotations are essential for:
Slot-wise permutations in digit extraction
Baby-step/giant-step linear transforms
Trace maps and diagonalization
However, in GBFV's quotient ring R/(p,t) where t(X)=Xk−b, only rotations that preserve the ideal (t) remain valid. This dramatically reduces the available automorphism group to:
G={σℓ:ℓ≡1(modm/k)}
We can only rotate within the Rt block, we cannot access the rotations that would move between the Rt and Rβ components of the full BFV ring.
The Solution: Lift, Pack, Bootstrap, Project
The key insight is to temporarily lift GBFV ciphertexts back to the full BFV ringR/(p), where all necessary rotations become available.
Step 1: Pack Multiple GBFV Ciphertexts
Rather than bootstrapping a single GBFV ciphertext (which would waste the Rβ slots), we pack multiple GBFV ciphertexts into one BFV ciphertext. This ensures that every BFV slot contains meaningful data from some GBFV ciphertext, maximizing the efficiency of the bootstrap operation.
Step 2: Execute Standard BFV Bootstrap
With all slots filled, we run the standard BFV bootstrapping procedure. The bootstrap operation is agnostic to our packing scheme, it simply refreshes all slots in the full R/(p) ring, where all required rotations are available.
Step 3: Project Back and Unpack
To recover individual GBFV ciphertexts:
Project the refreshed BFV ciphertext back to R/(p,t) using the quotient map
Rotate as needed to extract the specific GBFV instance desired
The projection naturally eliminates the Rβ block while preserving the Rt block. By performing appropriate rotations during unpacking, we can retrieve any of the GBFV ciphertexts that were packed into the original BFV ciphertext.
This approach transforms GBFV's fundamental limitation, its restricted automorphism group, into an advantage by enabling batch bootstrapping of multiple ciphertexts simultaneously.
Concrete Example
Let's work through a concrete example to illustrate the theory in practice.
Residue degree: Since p≡1(modm), we have d=ordm(p)=1
BFV slots:n=φ(m)/d=φ(8)/1=4
Classical BFV Slot Structure
We work in:
Rp=Z[X]/(Φ8(X),p)≅F17[X]/(X4+1)
There is a primitive 8-th root α=2∈F17 since 28≡1 and 24≡−1(mod17).
The four BFV slots correspond to evaluations at αj for j∈{1,3,5,7}=Z8∗:
f(X)⟼(f(α),f(α3),f(α5),f(α7))∈F174
Equivalently, we have the complete factorization:
X4+1=(X−2)(X−8)(X−15)(X−9)
Determining Slot Survival
To determine which slots survive after quotienting by t(X), we use the rigorous slot-wise analysis: the quotient by t(X) eliminates exactly those BFV slots where t(α)=0 and preserves those where t(α)=0.
Step 1: Reduce t(X)=X2−4mod17 and evaluate at the four roots α∈{2,8,15,9}:
t(X)=X2−4,t⟼(t(2),t(8),t(15),t(9))=(0,9,0,9)
Step 2: Under the Chinese Remainder Theorem, the principal ideal generated by t corresponds to:
⟨t⟩⟷⟨t(2)⟩×⟨t(8)⟩×⟨t(15)⟩×⟨t(9)⟩⊂F174
Step 3: In a field F, we have ⟨a⟩={0} if a=0 and ⟨a⟩=F if a=0. Therefore:
This shows that slots 1 and 3 survive (corresponding to roots α=2 and α5=15), while slots 2 and 4 are eliminated.
Available Automorphisms in GBFV
Classical BFV automorphisms are σi:X↦Xi for i∈Z8∗={1,3,5,7}.
After quotienting by t(X), only those automorphisms that preserve the (t)-block remain valid. For t(X)=Xk−b, the surviving subgroup is:
{i∈(Z/mZ)∗:i≡1(modm/k)}
Here m/k=8/2=4, so i∈{1,5}.
Indeed, σ5 swaps the two surviving slots, while σ3 and σ7 would send surviving slots to eliminated positions (making them invalid in R/(p,t)).
m =8p =17k =2b =4Fp = GF(p)# the base field F_pR.<x>= Fp[]# polynomial ring F_p[x]Phi = cyclotomic_polynomial(m).change_ring(Fp)# X^4 + 1 in F_p[x]Rp = R.quotient(Phi,'Xbar')# Rp = F_p[x]/(Phi_m)Xbar = Rp.gen()### Find a primitive m-th root of unity α in F_p (requires m | p-1)g = Fp.multiplicative_generator()# generator of F_p^*alpha = g^((p -1)//m)assert alpha.multiplicative_order()== m,"No primitive m-th root in F_p; need extension field."print("\nFound primitive %d-th root α in F_%d:"%(m, p),int(alpha))### Classical BFV slot exponents: units mod mslot_exps =[j for j inrange(1, m)if gcd(j, m)==1]alphas =[alpha^e for e in slot_exps]print("\nBFV slot points α^j for j in (Z/%dZ)^* = %s:"%(m, slot_exps),[int(a)for a in alphas])### Factorization over F_p (use Phi for clarity)print("\nFactorization of Phi_%d(X) over F_%d:"%(m, p))fac = Phi.factor()print(" ", fac)### Extract linear roots from the factorization and verify they match {alpha^j}roots =[]for f, e in fac:# linear factors f = x - rif f.degree()!=1:raise RuntimeError("Phi_m did not split linearly over F_p; need extension field.") r =-f[0]# r = -constant term roots.append(r)### Check sets match (as multisets)assertset(roots)==set(alphas),"Factorization roots != {alpha^j : j∈(Z/mZ)^*}"print("Roots (some order):",[int(r)for r in roots])### Survival under t(X) = X^k - b (here k=2, b=4)t = x^k - b
t_vals =[t(a)for a in alphas]survivor_mask =[(tv == Fp(0))for tv in t_vals]# survive iff t(α)=0print("\nEvaluate t(X)=X^%d-%d at slot points:"%(k, b))for j, a, tv inzip(slot_exps, alphas, t_vals): status ="SURVIVES"if tv ==0else"KILLED"print(f" t(α^{j}) = t({int(a)}) = {int(tv):2d} -> {status}")
Conclusion
Generalized BFV with polynomial quotients represents a significant advance in practical fully homomorphic encryption. By replacing the classical integer plaintext modulus with carefully chosen binomial relations t(X)=Xk−b, we escape the fundamental trade-off between data packing and multiplicative depth that has constrained classical BFV.
The key insights are:
Noise control: The binomial relation enables coefficient representations bounded by b, leading to noise growth ∼bL rather than ∼tL
Depth scaling: Multiplicative depth scales as logq/logb instead of logq/logt, dramatically improving when b≪t
Structured slots: The quotient construction naturally creates a subspace of classical BFV slots with well-understood algebraic structure
Bootstrapping solution: Temporary lifting to the full BFV ring enables batch bootstrapping of multiple GBFV ciphertexts
These advances open new possibilities for applications requiring both high throughput and deep computation, bringing FHE closer to practical deployment in privacy-preserving machine learning, secure database operations, and encrypted analytics.
The generalized BFV construction demonstrates that fundamental limitations in cryptographic schemes can sometimes be overcome not by abandoning existing frameworks, but by recognizing and exploiting the deeper algebraic structures they contain.
Acknowledgments
This work builds upon the foundational research presented in two key papers that introduced and developed the generalized BFV framework. We gratefully acknowledge the contributions of the authors of "Fully Homomorphic Encryption for Cyclotomic Prime Moduli" and "MatriGear: Accelerating Authenticated Matrix Triple Generation with Scalable Prime Fields via Optimized HE Packing". Their innovative approach to polynomial quotient constructions and rigorous analysis of noise behavior provided the theoretical foundation that made this exposition possible. The mathematical insights and practical considerations presented in these works have significantly advanced the field of fully homomorphic encryption and enabled new possibilities for privacy-preserving computation.