PDF 24
PDF 24
Codes?
1 Introduction
Error-correcting codes (ECCs) are being used in diverse application areas. They
have been developed for wireless communication systems in noisy channels and
?
This work was supported by Institute for Information & Communications Technology
Promotion (IITP) grant funded by the Korea government (MSIT) (R-20160229-
002941, Research on Lightweight Post-Quantum Crypto-systems for IoT and Cloud
Computing).
2 J. Cho et al.
digital storage systems [1, 2]. They are also widely used in other areas such as
distributed computing systems or public-key cryptography, also known as code-
based cryptography. The security of code-based cryptography is based on the
fact that the decoding problem of a random linear code is an NP-complete prob-
lem [3]. Especially, code-based cryptography is one of the candidates for post-
quantum cryptography that can resist attacks using operations over quantum
computers.
Recently, machine learning has become popular in many areas and a few
applications that employ this technology require the privacy of input data to
be maintained. For the security of machine learning, differential privacy and
fully homomorphic encryption (FHE) are considered as candidates. In the case
of differential privacy, the information on the individuals in the dataset is not
disclosed even though the entire dataset is available. However, when it comes to
FHE, both multiplication and addition can be performed for encrypted messages.
Thus, confidential messages can be securely manipulated on the untrusted cloud
server. In FHE, the encryption schemes can support both addition and multi-
plication without any limitations on the number of operations.
As Gentry proposed the first generation FHE in 2009 [4], there has been
extensive research on homomorphic encryption schemes based on lattice-based
hard problems [5–10]. The most promising recent research works on lattice-based
homomorphic encryption schemes are the homomorphic encryption for the arith-
metic of approximate numbers scheme, called the Cheon-Kim-Kim-Song (CKKS)
scheme [6] and the fast FHE over the torus (TFHE) scheme [7]. Despite sub-
stantial progress since Gentry’s first FHE scheme, the computational complexity
of FHEs is still too high to be used in privacy-preserving machine learning sys-
tems. For example, it takes almost 30 seconds for one bootstrapping operation
while using the CKKS library. As more than 105 bootstrappings are necessary
to sort hundreds of data packets, several days are needed for the homomorphic
sorting operation [10]. Therefore, we need to discover a new innovative approach
to achieve more efficient FHE.
Along with the extremely fast-growing data and computation sizes, the size
of distributed computing systems has also grown increasingly larger with time.
During computing, a certain amount of unpredictable system noise or straggler
nodes that cause delays cannot be avoided. To reduce these problems, we fre-
quently use coded computation, which is a method of using coding theoretic
techniques in distributed systems. In this regard, the first known study was
conducted on the computing matrix multiplication problem using erasure codes
and minimum distance separable codes [11]. Later, more studies with diverse
approaches to increase the speed of coded computations also appeared [12–14].
System components, such as sensors, are required to working efficiently even in
noisy conditions, such as high temperature. To ensure this, we need a coding
technique with high error tolerance, such as Reed-Muller (RM) codes, because
they can correct random erasures and errors with high probability [15].
Besides, we also expect these results to be used in quantum computing. There
are numerous studies on the application of ECCs in quantum computing [16–19].
Homomorphic Computation in Reed-Muller Codes 3
2 Preliminaries
2.1 RM codes
v0
v1
..
.
vm
v1 v2
v1 v3
..
Gr =
. ,
(1)
vm−1 vm
.
..
v1 · · · vr
v1 · · · vr−1 vr+1
..
.
vm−r+1 · · · vm
n−1
X
c(x) = ci x i
i=0
m
X
c = (c0 , c1 , · · · , cn−1 ) = aG = ai vi , (2)
i=0
Decrypt(Encrypt(m1 ) ∗ Encrypt(m2 ))
= Decrypt(Encrypt(m1 ♦m2 ))
= m1 ♦m2
Homomorphic operations are executed both on the message and codeword do-
mains. Although addition is performed identically in both the domains, the mul-
tiplication of the codewords must be defined as a new codeword of a message
that is defined as a polynomial multiplication with modulo xk − 1.
In our proposed scheme, we only consider the first-order RM codes for homo-
morphic operations because they have the maximum Hamming distance 2m−1
and can be efficiently used for related homomorphic computations. As described
in Subsection 2.1, the RM codes can be described as polynomials. Therefore,
for the homomorphic addition of two codewords, we perform a component-wise
addition ⊕ between the coefficients of the same order of the polynomial terms.
In the case of homomorphic multiplication, the codewords can be multiplied
by performing some multiplication , which corresponds to the codeword of
multiplication of two message polynomials of the order m, a(x) and a0 (x), as
a(x)a0 (x) mod (xm+1 − 1), as given in Table 1.
In the case of addition, it is evident that the computation on the message
domain and codeword domain are directly related because the RM codes are
linear. However, while multiplying two corresponding codewords, c(x) and c0 (x),
or c and c0 , we have two fundamental problems. The first problem is that just
multiplying c and c0 component-wisely does not completely match the codeword
corresponding to the multiplied message. Therefore, we need to apply the lin-
ear transformation for correctly matching the message and the code domains.
The second problem is that the multiplied codeword is a second-order RM code
6 J. Cho et al.
instead of the first one. To fix the relationship between the two domains and
reduce the order of codeword, we need a linear transformation of the multiplied
codewords. This linear transformation is described in the next subsection.
m
X X
a(x)a0 (x) mod (xm+1 − 1) = ( ai a0j )xl . (3)
l=0 i+j=l mod (m+1)
m
X m
X
( ai vi )( a0j vj ). (5)
i=0 j=0
Therefore, (4) and (5) are not the same even though they represent the same
message. Notably, (5) is a second-order RM code. Therefore, (5) should be mod-
ified to fit (4). This process is called bootstrapping in this paper.
The bootstrapping process comprises three steps as follows.
Homomorphic Computation in Reed-Muller Codes 7
RM(1,𝑚)
𝑎(𝑥) 𝒄
Bootstrapping technique
RM(1,𝑚) Step 1, Step 2, Step 3
𝑎′(𝑥) 𝒄′
1. Step 1: Represent the coefficients ai a0j +aj a0i of vi vj in (5) as the components
of the codewords c = (c0 , c1 , · · · , cn−1 ) and c0 = (c00 , c01 , · · · , c0n−1 ), whose
transformation is denoted by (nP + m) × (k2 + m) matrix V .
2. Step 2: Derive the coefficients i+j=l mod (m+1) ai a0j of xl in (3) by using
coef(vi vj ), whose transformation is denoted by (k2 + m) × k matrix X.
3. Step 3: Find the codeword cnew of the message a(x)a0 (x) mod (xm+1 − 1)
in RM(1,m) by using the generator matrix G.
The proposed bootstrapping procedure for homomorphic multiplication in
RM (1, m) code is depicted in Fig. 1, where notations of polynomials and vectors
are abused. Notably, the above three steps can be combined into an (n + m) × n
linear transformation V XG. We can do this as many times as necessary to finish
the arbitrary homomorphic computations. To perform Steps 1 and 2, we need
the following theorem and corollary.
where the
Ptranspose of (α0 , α1 , · · · , αm ) denotes the p-th column of G with p =
m
n − 1 − i=1 αi 2i−1 .
where gip denotes the (i, p) element of G. Clearly, the first row of G is all-one
vector, that is, α0 = 1, and thus every cp includes a0 . Then, for the remaining
rows of G, we should add ai if the (i + 1)-th component of p-th column of G is
’1’.
8 J. Cho et al.
It can be observed that the p-th column of the generator matrix of RM(1,m)
except the first row, is the one’s complement of the binary representation of p.
Let , α2 , · · · , αm )T be the p-th column of G. Then, we have p = 2m − 1 −
Pm (1, α1i−1
i=1 αi 2 . Thus, the theorem is proved.
From Theorem 1, it is straightforward to obtain the following corollary.
Corollary 1. In the first-order RM code, RM(1,m), we have
c0 + c2s−1 = as , s = 1, 2, · · · , m.
The three steps of the bootstrapping are explained in detail as follows.
Step 1: Coefficient mapping from c and c0 to the coef(vi vj )
Here, we will represent the coefficients of vi vj in (5) by using the components
of the codewords, c = (c0 , c1 , · · · , cn−1 ) and c0 = (c00 , c01 , · · · , c0n−1 ) as follows. In
another variation explained later, the coefficient of vi vj is denoted as a function
fij of components of c and c0
coef(vi vj ) = fij (c0 , c1 , · · · , cn−1 , c00 , c01 , · · · , c0n−1 ).
The coefficient of vi vj can be determined by considering the following four
cases.
Case 1-1) i 6= j and i, j 6= 0:
From (5), the coefficient of vi vj becomes ai a0j + aj a0i . We can express this as
Case 1-2) i 6= 0, j = 0:
From (5), the coefficient of vi v0 = vi becomes ai a00 + a0 a0i . We can express
this as
coef(vi ) = ai a00 + a0 a0i
= (a0 + ai )(a00 + a0i )
+ a0 a00
+ ai a0i
Homomorphic Computation in Reed-Muller Codes 9
to
Then, the new codeword cnew in RM(1,m), corresponding to a(x)a0 (x) mod
xm+1 − 1, is given as
cnew = z · V · X · G.
Homomorphic Computation in Reed-Muller Codes 11
3.3 Example
000000000000000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
0 0 0 0 1 0 0 1 0 1 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
V =
.
0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
0 0 0 1 0 0 1 0 1 0 1 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
0 0 1 0 0 1 0 0 1 1 0 0 0 0 0
0 1 0 0 0 1 1 1 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1 1 1 1 0 0 0 0
0 1 0 0 0 0 0 0 0 0 0 1 0 0 0
0 0 1 0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 1 0 0 0 0 0 0 0 0 0 1 0
000010000000001
This matrix is obtained by merging Cases 1-1), 1-2), 2-1), and 2-2), whose size
is 20 × 15. In this example, the 0, 1, 2, 4, and 8-th rows are ’0s.’
12 J. Cho et al.
Then, in Step 2, we can obtain the relations between coef(xl ) and coef(vi vj )
as
10000
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
0 0 0 1 0
0 0 0 0 1
1 0 0 0 0 ,
X=
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 1 0 0
0 0 0 0 1
0 1 0 0 0
00010
where the matrix size is 15 × 5. For Step 3, we obtain the 5 × 16 generator matrix
G from (1) as
1111111111111111
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 .
G=
1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0
1111111100000000
Homomorphic Computation in Reed-Muller Codes 13
we obtain a new message vector ”anew ” and this corresponds to the polynomial
multiplication of two messages, a(x)a0 (x) mod x5 − 1, also denoted as ”apm .”
Finally, we obtain a new codeword cnew of the first-order RM code from the
generator matrix G.
References
1. S. Lin and D. Costello, Error Control Coding, 2nd ed. Upper Saddle River, NJ,
USA: Prentice-Hall, 2001, pp. 105–118.
2. F. J. Macwilliams and N. J. A. Sloane, The Theory of Error Correcting Codes. vol.
16, New York, NY, USA: Elsevier/North-Holland Inc., 1977, pp. 370–479.
3. R.J. McEliece, “A public-key cryptosystem based on algebraic coding theory,” DSN
Progress Report, pp. 114–116, Jan. 1978.
4. C. Gentry, “A fully homomorphic encryption scheme,” Ph.D. dissertation, Dept.
Comput. Sci., Stanford Univ., Stanford, CA, USA, 2009.
5. R. Meissen, “A mathematical approach to fully homomorphic encryption,” Ph.D.
dissertation, Worcester Polytechnic Institute, 2012.
6. J. H. Cheon, A. Kim, M. Kim, and Y. Song, “Homomorphic encryption for arith-
metic of approximate numbers,” in Proc. Int. Conf. Theory Appl. Cryptol. Inf. Sec.
New York, NY, USA: Springer, 2017, pp. 409–437.
7. I. Chillotti, N. Gama, M. Georgieva, and M. Izabachene, “TFHE: Fast fully ho-
momorphic encryption over the torus,” Journal of Cryptology, vol. 33, no. 1, pp.
34–91, 2020.
8. H. Chen, I. Chillotti, and Y. Song, “Improved bootstrapping for approximate ho-
momorphic encryption,” Int. Assoc. Cryptol. Res., Tech. Rep. 2018/1043, 2018.
[Online]. Available: https://eprint.iacr.org/2018/1043.
Homomorphic Computation in Reed-Muller Codes 15