2
$\begingroup$

In the paper Homomorphic Encryption from Learning with Errors: Conceptually-Simpler, Asymptotically-Faster, Attribute-Based Gentry introduces the following identity $\mathbf{a} \in \mathbb Z^n,\mathbf{b} \in \mathbb Z_q^n$

$$\langle \mathbf{a}, \text{PowersOfTwo}(\mathbf{b})\rangle =\langle \text{BitDecomp}^{-1}(\mathbf{a}), \mathbf{b}\rangle = \langle \text{Flatten}(\mathbf{a}), \text{PowersOfTwo}(\mathbf{b})\rangle$$

The given functions are defined as follows using Brakerski (2012) complementary

Let $l = \lfloor \log_{2} q \rfloor +1$

  1. PowersOfTwo Let $\mathbf{b} \in \mathbb{Z}_{q}^n$ and $l \in \mathbb{Z}$, then $$\text{PowersOfTwo}(\mathbf{b}):=\Big(\mathbf{b}, 2 \cdot \mathbf{b}, \dots, 2^{l-1}\cdot \mathbf{b}\Big)$$

  2. BitDecomp For $\mathbf{a} \in \mathbb{Z}^n$ let $\mathbf{w}_{i}\in\{ 0,1 \}^n$ such that $$\mathbf{a}= \sum_{i=0}^{l-1} 2^i \cdot \mathbf{w}_{i} \;\;(\text{mod } q)$$ and outputting the determined coefficients $\mathbf{w}_{i}$ with $0 \leq i \leq l-1$ $$\text{BitDecomp}(\mathbf{a}) := (\mathbf{w}_{0}, \dots, \mathbf{w}_{l-1})$$

  3. Flatten
    Let $\mathbf{b} \in \mathbb{Z}^n$, then $$\text{Flatten}(\mathbf{b}):= \text{BitDecomp}\Big(\text{BitDecomp}^{-1}(\mathbf{b})\Big)$$

Using information from this math.stackexchange answer on the extension of the codomain of BitDecomp on $\mathbf w_i \in \mathbb Z^n$, I try to see how these identities hold. So far I got the following

$$\begin{alignat}{2} \left\langle \mathbf{a}\,,\, \text{PowersOfTwo}(\mathbf{b}) \right\rangle &= \sum_{i=0}^{n-1} a_{i} \cdot 2^{i} b_{i} &&\;\;(\text{mod } q) \\ &= \sum_{i=0}^{n-1} 2^ia_{i} \cdot b_{i} &&\;\;(\text{mod } q) \\ &= \left\langle \text{BitDecomp}^{-1}(\mathbf{a})\,,\, \mathbf{b}\right\rangle &&\;\;(\text{mod } q) \end{alignat}$$

Now somehow the $a_i$ must be reduced by the binary transformation, but I don't see how to justify this mathematically. I would be greatful for a bump into the right direction. More specifically, how to finish this proof to get the second part of the identity?

$\endgroup$
4
  • 1
    $\begingroup$ Shouldn't $a \in \mathbb{Z}^{n \cdot \ell}$ to match the dimensions? And what is $x$ in the BitDecomp description? Could you also give the description of BitDecomp$^{-1}$? $\endgroup$
    – Mahesh S R
    Commented Jul 1 at 11:45
  • $\begingroup$ About the $x$ you are right, this is a typo on my side mixing these papers, I will correct. I am not sure about $a \in \mathbb Z^{n \times l}$, because the paper does not state it like that as far as I can tell. $\endgroup$ Commented Jul 1 at 11:48
  • 1
    $\begingroup$ Actually, it must be in $\mathbb{Z}^{n \cdot \ell}$. See page 5 and 6 in Homomorphic Encryption from Learning with Errors: Conceptually-Simpler, Asymptotically-Faster, Attribute-Based paper. $\endgroup$
    – Mahesh S R
    Commented Jul 1 at 11:50
  • $\begingroup$ you are right, this makes more sense, since we split $k$ of the components of $a$ each into its $l$ bits, therefore getting a matrix representation of $a$ split into its binary representation. $\endgroup$ Commented Jul 1 at 11:56

1 Answer 1

1
$\begingroup$

Assuming that $a \in \mathbb{Z}^{n \cdot \ell}$ and $b \in \mathbb{Z}_q^{n}$ where $a = (a_{1,0}, \dots, a_{1, \ell-1}, \dots, a_{n, 0}, \dots, a_{n, \ell-1})$ and $b = (b_1, \dots, b_n)$. Then using the definitions provided in Gentry's paper,

  • $\mathsf{Powersof2}(b) = (b_1, 2b_1, \dots, 2^{\ell-1}b_1, \dots, b_n, 2b_n, \dots, 2^{\ell-1}b_n)$
  • $\mathsf{BitDecomp}(b) = (b_{1,0}, \dots, b_{1, \ell - 1}, \dots, b_{n,0}, \dots, b_{n,\ell-1})$ where $b_{i,j}$ is the $j$-th bit in $b_i$'s binary representation.
  • $\mathsf{BitDecomp}^{-1}(a) = (\sum 2^j \cdot a_{1,j}, \dots, \sum 2^{j} a_{n, j})$.
  • $\mathsf{Flatten}(a) = \mathsf{BitDecomp}(\mathsf{BitDecomp}^{-1}(a) \bmod{q}) \in \{0,1\}^{n \cdot \ell}$.

An interesting point to note is that $\mathsf{Flatten}$ gives a vector with entries either 0 or 1. Another interesting point is $<\mathsf{BitDecomp}(c), \mathsf{Powersof2}(b)> = <c,b> \bmod{q}$ where $c \in \mathbb{Z}_q^n$. This immediately gives us

$$ \begin{align*} <\mathsf{BitDecomp^{-1}}(a), b> &= <\mathsf{BitDecomp^{-1}}(a) \bmod{q}, b> \bmod{q}\\ &=<\mathsf{BitDecomp} (\mathsf{BitDecomp^{-1}}(a) \bmod{q}), \mathsf{Powersof2}(b)> \bmod{q}\\ &= <\mathsf{Flatten}(a), \mathsf{Powersof2}(b) > \bmod{q} \end{align*} $$

$\endgroup$
5
  • $\begingroup$ There is still one thing missing for me, that is, part of the identity is also $\left\langle \mathbf{a}\,,\, \text{PowersOfTwo}(\mathbf{b}) \right\rangle = \left\langle \text{Flatten}(\mathbf{a})\,,\,\text{PowersOfTwo}(\mathbf{b}) \right\rangle$ while $\mathbf{a} \neq \text{Flatten}(\mathbf{a})$ if the coefficients of $\mathbf{a}$ are outside of $\{ 0,1 \}$. This is the interesting part to me, why does the dot product still hold? I can't see it. $\endgroup$ Commented Jul 1 at 12:32
  • 1
    $\begingroup$ We have $<a, \mathsf{Powersof2}(b) >= <\mathsf{BitDecomp^{-1}}(a), b>$. Consider $c = \mathsf{BitDecomp^{-1}}(a)$, and you are done. I believe you are confused because these equalities are true over mod $q$ only. $\endgroup$
    – Mahesh S R
    Commented Jul 1 at 12:38
  • $\begingroup$ You are right, this confuses me and I don't see why this holds true. If you could elaborate on this very specific fact, I would be very greatful and give you the "answered" mark, if you can. $\endgroup$ Commented Jul 1 at 13:51
  • 1
    $\begingroup$ The equality does not say that $a = \mathsf{Flatten}(a) \bmod{q}$. It only says that rather than using $a$, which is a vector in $\mathbb{Z}^{n \cdot \ell}$, it suffices to use $\mathsf{Flatten}(a)$, which is just a 0/1 vector. This is by combining the above equations together (i.e., if $x \equiv y \bmod q$ and $y \equiv z \bmod q$, then $x \equiv z \bmod q$). If you could specify your confusion, I can help you. $\endgroup$
    – Mahesh S R
    Commented Jul 1 at 14:21
  • 1
    $\begingroup$ @ThomasChristopherDavies Another important point to note is when $q$ is prime, if $x\cdot y \equiv z \cdot y \bmod{q}$, then we have $x \equiv z \bmod{q}$ where $x,y,z \in \mathbb{Z}$ provided $y \neq 0 \bmod{q}$. But, this is not true when $x,y,z \in \mathbb{Z}^n$ where $n > 1$ or $q$ is not a prime. $\endgroup$
    – Mahesh S R
    Commented Jul 1 at 14:44

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.