How to pack the inputs using hybrid encoding?

cn flag

I'm reading Gazelle. This paper proposes a matrix multiplication vector(encrypted) method using the SIMD property of RLWE-based FHE. It proposed a hybrid encoding. For $n_o \times n_i$ matrix, when $n_o < n, n_i <n$ where n is the slot count.

The author said that using the input packing, the number of $\text{SIMDScMult}$ and the hoisted rotation is $\frac{n_o\cdot n_i}{n}$. Without input packing, the number is just $n_o$, I want to know how to pack the inputs using the hybrid method?

For example, suppose the matrix W is $\left[ \begin{matrix} w_{00} & w_{01} & w_{02} & w_{03}\\ w_{10} & w_{11} & w_{12} & w_{13} \end{matrix} \right]$ , and the vector X is $(x_0,x_1,x_2,x_3)^T$, then $n_i = 4, n_o = 2$, let $n = 8$, how to pack?


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.