4.19 Greco

So the motivation of Greco [Bot24] is to prove the validity of some RLWE ciphertext, more specifically BFV ciphertext [Bra12, FV12] whose ciphertext is improved with CRT [HPS19, KPZ21]. The main idea of Greco is from [dLS19].

Throughout, coefficients in ℤq are lifted to their centered integer representation, unless stated otherwise.

Start with BFV ciphertext [Bra12, FV12] from 𝖱𝖫𝖶𝖤 over Rq2, where Rq=ℤq⁢[X]/(Xn+1). We have

(𝖼𝗍0,𝖼𝗍1)=(𝐚⋅𝐬+𝐞+k,−𝐚),

where 𝐚←rRq, 𝐬←r{−1,0,1}n, 𝐞←χn, all the computation are carried over Rq, and

k=⌊qt⌊m⌉t⌉=qt⌊m⌉t−1t⌊mq⌉t∈[−q2,q2)∩ℤ,

where ⌊⋅⌉ means rounding to the nearest integer, ⌊z⌉t means centered remainder of z modulo t, and t is the plaintext modulus. With the requirement that q and t are coprime, then

k≡−t−1⌊mq⌉tmodq,

which was described in [KPZ21]. With a composite ciphertext modulus q=∏qi, we have CRT splitting such that

(𝖼𝗍0,𝖼𝗍1)≅((𝖼𝗍0,0,𝖼𝗍1,0)modq0,…,(𝖼𝗍0,ℓ−1,𝖼𝗍1,ℓ−1)modqℓ−1),

and thus for the plaintext encoding,

k≡k0,i⁢k1modqi,

where k0,i≡−t−1modqi, and k1=⌊mq⌉t.

Greco [Bot24] extends from [dLS19] in the CRT modulus splitting setting. The gain is not taking advantage of the parallelism in BFV, but subtly allowing for the circuit arithmetic be simulated over ℤp as if it is over ℤ, where p is the order of elliptic curve commitment group, used by for example [KZG10].

Lifting all the polynomial arithmetics from Rqi over ℤ⁢[X], then we have

𝐚i⋅𝐬+𝐞+k0,i⁢k1+𝐫1,i⁢qi+𝐫2,i⁢(Xn+1)=𝖼𝗍0,i (4.76)

for all i∈[0,ℓ−1], such that for all 𝜶,𝜷∈ℤ⁢[X],

𝜶⁢qi+𝜷⁢(Xn+1)≡𝟎mod(qi,(Xn+1)). (4.77)

Given a sufficiently large modulus p such that the ℓ∞-norm does not wrap around over ℤp, namely the summation of the ℓ∞-norms of both sides of eq. 4.76 is strictly less than p, we can simulate eq. 4.76 over ℤp⁢[X].

Too Many Range Checks.

We now show how to decrease the number range checks in [Bot24]. Over ℤ⁢[X], let

𝐝i=𝖼𝗍0,i−(𝐚i⋅𝐬+𝐞+k0,i⁢k1)∈ℤ⁢[X], (4.78)

which must be of form 𝜶i⁢(Xn+1)+𝜷i, as Xn+1 is monic, division over ℤ⁢[X] gives unique quotient and remainder 𝜶i,𝜷i∈ℤ⁢[X], deg⁡𝜶i≤n−2, and deg⁡𝜷i≤n−1. For accepting relations, namely vaild ciphertexts, we have

𝐝i≡𝟎mod(qi,(Xn+1)),

then by eq. 4.77, 𝜷i=qi⁢𝜸i for some 𝜸i∈ℤ⁢[X] where deg⁡𝜸i≤n−1. Therefore, 𝐝i=𝜶i⁢(Xn+1)+qi⁢𝜸i.

Greco let 𝐫2,i be center reprepresented over ℤqi⁢[X]. We thus write 𝜶i=⌊𝜶i⌉qi+qi𝐮2,i for some 𝐮2,i∈ℤ⁢[X], then

𝐝i =𝜶i(Xn+1)+qi𝜸i=(⌊𝜶i⌉qi+qi𝐮2,i)(Xn+1)+qi𝜸i
=⌊𝜶i⌉qi(Xn+1)+qi(𝐮2,i(Xn+1)+𝜸i).

Essentially, the identity exhibits a witness pair with 𝐫2,i centered modulo qi, and the compensating multiple of Xn+1 in 𝐫1,i. Therefore, their deg⁡𝐫1,i is upper bounded by 2⁢n−2.

It means for the 𝐫1,i and 𝐫2,i, there are 3⁢n−2 elements range checked per qi by Greco, which is the same as [dLS19]. As of the ranges,

  • •

    For 𝐫2,i with centered representation modulo qi, we have

    ‖𝐫2,i‖∞≤qi−12. (4.79)
  • •

    For 𝐫1,i, we consider the following over ℤ⁢[X]:

    𝐫1,i=qi−1⁢(𝖼𝗍0,i−(𝐚i⋅𝐬+𝐞+k0,i⁢k1)−𝐫2,i⁢(Xn+1)),

    and let 𝐞 be B-bounded. The 𝖼𝗍0,i−(𝐚i⋅𝐬+𝐞+k0,i⁢k1) has ℓ∞-norm bounded by

    Di=qi−12+n⁢qi−12+B+|k0,i|⋅t−12, (4.80)

    as k0,i can be publicly derived, 𝐚i and k1 are centered represented, 𝐞 is not long enough to wrap back, and

    ‖𝐫2,i⁢(Xn+1)‖∞=‖𝐫2,i‖∞≤qi−12

    as deg⁡𝐫2,i≤n−2. Hence,

    ‖𝐫1,i‖∞≤qi−1⁢(qi−12+n⁢qi−12+B+|k0,i|⋅t−12+qi−12)=qi−1⁢((n+2)⋅qi−12+B+|k0,i|⋅t−12). (4.81)

To ensure that p is sufficiently large for the relation over ℤ⁢[X], such that the polynomial relation is simulatable over ℤp⁢[X], we require the summation of the ℓ∞-norms of both sides of the equation to be not exceeding p by

p>2⁢((n+2)⋅qi−12+B+|k0,i|⋅t−12). (4.82)

To sum up, we have bounds for 𝐫1,i and 𝐫2,i in eqs. 4.81 and 4.79 from eq. 4.82 for [Bot24, dLS19].

It is worth noticing the following fact about polynomial product over ℤ⁢[X] and modulo Xn+1.

Lemma 4.19.1.

Let 𝐟,𝐠∈ℤ⁢[X] have deg⁡𝐟≤n−1 and deg⁡𝐠≤n−1, then

‖𝐟𝐠‖∞ ≤n⁢‖𝐟‖∞⁢‖𝐠‖∞,
‖𝐟𝐠mod(Xn+1)‖∞ ≤n⁢‖𝐟‖∞⁢‖𝐠‖∞.
Proof.

For 𝐟𝐠 product over ℤ⁢[X],

‖𝐟𝐠‖∞≤∑j∈[0,n−1]|fj|⁢‖Xj⁢𝐠‖∞=∑j∈[0,n−1]|fj|⁢‖𝐠‖∞≤n⁢‖𝐟‖∞⁢‖𝐠‖∞.

For 𝐟𝐠mod(Xn+1) product over ℤ⁢[X],

‖𝐟𝐠mod(Xn+1)‖∞≤∑j∈[0,n−1]|fj|⁢‖Xj⁢𝐠mod(Xn+1)‖∞=∑j∈[0,n−1]|fj|⁢‖𝐠‖∞≤n⁢‖𝐟‖∞⁢‖𝐠‖∞.

∎

We use independently supplied witnesses 𝐫1,i,𝐫2,i with deg⁡𝐫1,i≤n−1 and deg⁡𝐫2,i≤n−2. It suffices to check the full polynomial relation eq. 4.76 over ℤ⁢[X] by

  • •

    checking qi⁢𝐫1,i≡𝐝imod(Xn+1),

  • •

    and checking 𝐫2,i=𝜶i, where 𝜶i is decomposed from 𝐝i.

By lemma 4.19.1, for eq. 4.78, ‖𝐝i‖∞ and ‖𝐝imod(Xn+1)‖∞ share the same ℓ∞-norm bound eq. 4.80, as all other terms have degree at most n−1, while lemma 4.19.1 applies to 𝐚i⋅𝐬 over ℤ⁢[X]. Hence,

‖𝐫1,i‖∞≤qi−1⁢((n+1)⋅qi−12+B+|k0,i|⋅t−12)=qi−1⁢Di

by eq. 4.80, as 𝐫2,i⁢(Xn+1) is filtered out. Then over ℤ⁢[X]/(Xn+1), if we relation is simulatable over ℤp⁢[X]/(Xn+1), we need

p>2⁢Di=2⁢((n+1)⋅qi−12+B+|k0,i|⋅t−12).

We pause by a philosophical question: Why do we need range checks here? We are essentially checking a ℤ⁢[X] relation over ℤp⁢[X], and thus all the computation over ℤ is within [−(p−1)/2,(p−1)/2] 282828 Greco [Bot24, dLS19] range checks both 𝐫1,i and 𝐫2,i to instantiate the p lower bound, but it confuses me about the point of range checks. .

  • •

    For 𝐫1,i case, it carries a scalar qi, and thus it needs to be range checked 292929 Think of an counterexample where p=101, qi=7, and r=29 not range checked, for invalid d=1. .

  • •

    But for 𝐫2,i, multiplying with a Xn+1, which is monic (highest degree coefficient being 1), and does not scale up the ℓ∞-norm for the coefficients of terms with degree at least n. Hence, for a sufficiently large p by

    p>2⁢Di>2⁢n⁢‖𝐚i‖∞⁢‖𝐬‖∞,

    the equality between 𝐫2,i and 𝜶i over ℤp⁢[X] can be lifted to ℤ⁢[X] in centered representation without range check.

Therefore, there are only n range checks need to be performed over 𝐫1,i, bounded by qi−1⁢Di, assuming that p>2⁢Di.

Degree-3 Trick Like [BLS19].

Inducing a lookup-based range check for entries in 𝐬 is a bit costly. Say 𝐬∈{−1,0,1}n, then each entries can be made into

(si−1)⁢si⁢(si+1)=0,

which is not exactly the same, but in the same spirit as [BLS19].

TODO: … [Bot24]