Atsuko Miyaji Tomoaki Mimoto Editors

Security Infrastructure Technology for Integrated Utilization of Big Data

Applied to the Living Safety and Medical Fields

Security Infrastructure Technology for Integrated Utilization of Big Data

Atsuko Miyaji • Tomoaki Mimoto Editors

# Security Infrastructure Technology for Integrated Utilization of Big Data

Applied to the Living Safety and Medical Fields

Editors Atsuko Miyaji Osaka University Suita, Osaka, Japan

Tomoaki Mimoto KDDI Research, Inc. Fujimino, Japan

#### ISBN 978-981-15-3653-3 ISBN 978-981-15-3654-0 (eBook) https://doi.org/10.1007/978-981-15-3654-0

© The Editor(s) (if applicable) and The Author(s) 2020. This book is an open access publication. Open Access This book is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this book are included in the book's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the book's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use.

The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

This Springer imprint is published by the registered company Springer Nature Singapore Pte Ltd. The registered company address is: 152 Beach Road, #21-01/04 Gateway East, Singapore 189721, Singapore

## Foreword

The Japan Science and Technology Agency (JST) is an independent public body of the Ministry of Education, Culture, Sports, Science and Technology (MEXT). JST plays a key role in implementing science and technology policies formulated in line with the nation's Science and Technology Basic Plan. The Basic Research Programs at JST focus on fundamental research areas that help developing technological breakthroughs, which in turn lead to the advance of S&T and creation of new industries. The programs also encourage researches that trigger, through innovations, reformation of social and economic structures. Core Research for Evolutionary Science and Technology (CREST) program is one of the Basic Research Programs at JST. With an aim to promote and encourage the development of breakthrough technologies that contribute to the attainment of the country's strategic objectives, JST provides a variety of research funding programs for promising research projects. CREST is one of JST's major undertakings for stimulating achievement in fundamental science fields. In addition, returning the fruits of such research to society through innovations is another important responsibility of JST.

"Advanced Core Technologies for Big Data Integration" study area will aim for the creation, advancement, and systematization of next-generation core technology solving of essential issues common among a number of data domains, and integrated analysis of big data in a variety of fields. Specific development targets include technology for stable operation of large-scale data management systems that compress, transfer, and store big data, technology for efficiently retrieving truly necessary knowledge by means of search, comparison, and visualization across diverse information, and the mathematical methods and algorithms enabling such services. In pursuing these studies, with a view to overall system design up to the creation of value for society from big data, the creation, advancement, and systematization of next-generation common core technology highly acceptable to the public will be undertaken, through active efforts at fusion with fields outside of information and communication technology. There are total 11 projects. Especially, "The Security Infrastructure Technology for Integrated Utilization of Big Data," by Atsuko Miyaji (Research director), focuses on secure well-balanced utilization of big data. Many existing security researches focus on technologies of "fast encrypted calculation" since they focus on statistical computation such as sum and average. However, the big data are varied, and thus, there are many usages. It cannot be said that use only for statistical data such as sum and average is enough. It would not be limited to statistical data in the case of medical image data, picture data, etc. What should be the security infrastructure for the utilization of such a wide variety of big data? In addition, extremely secure technologies often may give any benefit to neither the data owner nor the data user. Her project builds a technology to realize balanced security and utilization of big data from the viewpoint of three organizations of the data owner, analyst, and user. Their technology can be combined with fast encrypted calculation, which is a typical target of existing cryptographic researches. We really hope that their concept of security infrastructure technology for the utilization of big data would open up the world of big data utilization in various fields such as the medical and living safety field.

January 2020 Prof. Masaru Kitsuregawa The University of Tokyo Tokyo, Japan

## Preface

A project of "The Security Infrastructure Technology for Integrated Utilization of Big Data" started in October 2014. Our team consists of four groups: security primitive group under the guidance of Atsuko Miyaji at Osaka university, security management primitive group under Kiyomoto at KDDI Laboratory, the living safety field under Kitamura at AIST and Nishida at Tokyo Institute of Technology, and the medical field under Tanaka at the National Cancer Center and Yamamoto at MEDIS. Concretely, both Kiyomoto and Miyaji have investigated the security infrastructure necessary for the utilization of big data. Based on this security infrastructure, Kitamura and Nishida made testbed systems in the living safety field; Tanaka and Yamamoto made testbed systems in the medical field. All studies combined aim to ensure the good working of the security infrastructure in the real world. Furthermore, after both Kitamura and Nishida will integrate the necessary big data excluding privacy information using our security infrastructure, they will analyze why serious injuries occur at elementary schools. In contrast, both Tanaka and Yamamoto have made an open medical network using our security infrastructure, which enables patients to check the usage of their medical records distributed in different hospitals.

One of the features of our project is that it builds security infrastructure for big data utilization based not on security researchers but on issues from the living safety and medical fields that actually use big data. In other words, it is an important feature that the required specifications do not deviate from actual problems. In addition, we report the results of actual research in both fields using the security infrastructure constructed according to their requirements. Thus, the analysis has been performed on only the available and acceptable data from the point of view of privacy policy until our security infrastructure was realized. Furthermore, the evaluation or analysis of security primitives is often based on dummy data. However, our security primitives have been evaluated by researchers who actually use big data. Furthermore, we clarify how to introduce such security solutions into living safety and medical fields. We also provide guidance on how to use the security infrastructure. We hope that this book will be used by companies, schools, and public organizations that are considering using big data.

Acknowledgements Finally, we would like to thank Prof. Masaru Kitsuregawa at the University of Tokyo who is a research supervisor of "Advanced Core Technologies for Big Data Integration" at JST. We would like to appreciate valuable comments given by Prof. Etsuya Shibayama at the University of Tokyo who is a deputy research supervisor. We also would like to extend our gratitude to useful advice by advisors in the research area: Prof. Kaoru Arakawa (School of Interdisciplinary Mathematical Sciences, Meiji University), Prof. Mitsuru Ishizuka (The University of Tokyo), Naonori Ueda Fellow, NTT Communication Science Laboratories, Hidehiko Tanaka, Director, IWASAKI GAKUEN, Jun'ichi Tsujii, Fellow of Advanced Industrial Science and Technology (AIST), Hideyuki Tokuda, President, National Institute of Information and Communication Technology, Prof. Takeshi Tokuyama, Kwansei Gakuin University, Prof. Teruo Higashino, Osaka University, Prof. Koichi Hori, the University of Tokyo, Prof. Hiroyuki Kitagawa, University of Tsukuba, Prof. Kenji Yamanishi, the University of Tokyo, Prof. Calton Pu, Georgia Institute of Technology, and Nozha Boujemaa, Median Technologies. Finally, we express thanks to our project members: Yuuki Takano, Shinya Okumura, Chen-Mou Cheng, Akinori Kawachi, Sinsaku Kiyomoto, Tomoaki Mimoto, Touru Nakamura, Yoshifumi Nishida, Koji Kitamura, Mikiko Oono, Katsuya Tanaka, and Ryuichi Yamamoto.

Osaka, Japan January 2020 Prof. Atsuko Miyaji

## Contents

## **Chapter 1 Introduction**

**Atsuko Miyaji, Shinsaku Kiyomoto, Katsuya Tanaka, Yoshifumi Nishida, and Koji Kitamura**

## **1.1 Purpose of Miyaji-CREST**

Recently, big data analysis results are expected to be used in various situations such as medical or industrial fields for new medicine or product development. For this reason, it is important to establish a secure infrastructure of the collection, analysis, and use of big data. We need to consider mainly three entities for the infrastructure: data owner, analysis institutions, and users. This research pays attention to a balance between privacy and utilization and also realizes appropriate reduction and feedback of the data analysis results to the data owners.

To build a secure big data infrastructure that connects data owners, analysis institutions, and user institutions in a circle of trust, we construct security technologies necessary for big data utilization. Our main security technologies are oblivious RAM (ORAM), private set intersection (PSI), privacy-preserving classification,

A. Miyaji (B)

S. Kiyomoto KDDI Research, Inc., 2-1-15 Ohara, Fujimino-shi, Saitama 356-8502, Japan e-mail<EMAIL_ADDRESS>
K. Tanaka National Cancer Center Japan, 5-1-1 Tsukiji, Chuo-ku, Tokyo 104-0045, Japan e-mail<EMAIL_ADDRESS>
Y. Nishida

Tokyo Institute of Technology, 2-12-1 Ookayama, Meguro-ku, Tokyo 152-8550, Japan e-mail<EMAIL_ADDRESS>
K. Kitamura National Institute of Advanced Industrial Science and Technology, 2-4-7, Aomi, Koto, Tokyo 135-0064, Japan e-mail<EMAIL_ADDRESS>
© The Author(s) 2020 A. Miyaji and T. Mimoto (eds.), *Security Infrastructure Technology for Integrated Utilization of Big Data*, https://doi.org/10.1007/978-981-15-3654-0\_1

Osaka University, 1-1 Yamadaoka, Suita, Osaka 565-0871, Japan e-mail<EMAIL_ADDRESS>
**Fig. 1.1** Overview of security infrastructure from data collections to utilization

privacy configuration support, privacy risk assessment, and traceability. Furthermore, we consider the robustness against various attacks such as cyber attacks and postquantum security.

We construct a safe and privacy-preserving big data distribution platform that realizes the collection, analysis, utilization, and return of owners of big data in a secure and fair manner.

In addition, we demonstrate our secure big data infrastructure in a medical and living safety field. Figure 1.1 shows an overview of our research.

## **1.2 Roles of Each Group**

## *1.2.1 Security Core Group*

We constructed security primitives in the following fields with the aim of realizing an infrastructure for big data utilization that conducts collection, analysis, and utilization of big data securely: 1. Analysis of security basis: Any security primitive which is used for an infrastructure of big data utilization is based on cryptology algorithms. That is, a security primitive becomes compromised if the underground cryptology algorithm is attacked. Therefore, security analysis on cryptographic primitives is important. In this research, we focus on elliptic curve cryptosystems, which achieve a compact public key cryptosystem, and learning with error (LWE)-based cryptosystems, which are types of post-quantum cryptosystems. 2. Privacy-preserving data integration among databases distributed in different organizations: This primitive integrates the same data among databases kept in different organizations while keeping any different data in an organization secret to other organizations. 3. A privacy-preserving classification: This primitive executes a procedure for the server's classification rule to the client's input database and outputs only a result to the client while keeping client's input database secret to the server and server's classification rule to the client.

## *1.2.2 Security Management Group*

Our group focuses on research on data anonymization techniques. First, we analyze the existing anonymization techniques and adversary models for the techniques and clarify our research motivation. Then, we propose our adversary model applicable to several anonymization methods and propose a novel privacy risk analysis method. An implementation of our data anonymization tool based on the risk analysis method is introduced in the chapter.

## *1.2.3 Living Safety Testbed Group*

The Living Safety Group deals with developing new technologies for injury prevention in daily environments such as school safety and home safety based on the security platform developed by the Security Core Group and the Security Management Group. This group has devoted itself to not only developing technology for handing the big data related to injury but also empowering practitioners through social implementation utilizing the developed technologies in cooperation with multiple stakeholders.

## *1.2.4 Health Testbed Group*

Health Testbed Group is focused on implementing a secure clinical data collection and analysis infrastructure for clinical research using the cloud by applying the security primitives developed by the Security Core Group and Security Management Group. This group is working on standardization of data storage, cross-institutional collection, and analysis for electronic medical record data, management mechanism of patient consent information, and traceability for secondary use of medical data, for the development of our health testbed.

**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

## **Chapter 2 Cryptography Core Technology**

**Chen-Mou Cheng, Kenta Kodera, Atsuko Miyaji, and Shinya Okumura**

**Abstract** In this chapter, we describe the analysis of security basis. One is the analysis of elliptic curve discrete logarithm problem (ECDLP). ECDLP is one of the public-key cryptosystems that can achieve a short key size but it is not a post-quantum cryptosystem. Another is analysis to learning with error (LWE), which is a postquantum cryptosystem and has the functionality of *homomorphic encryption*. These two security bases have important roles in each protocol described in Sect. <IP_ADDRESS>

## **2.1 Analysis on ECDLP**

## *2.1.1 Introduction*

In recent years, elliptic curve cryptography is gaining momentum in deployment because it can achieve the same level of security as RSA using much shorter keys and ciphertexts. The security of elliptic curve cryptography is closely related to the computational complexity of the elliptic curve discrete logarithm problem (ECDLP). Let *p* be a prime number and *E*, a nonsingular elliptic curve over F*pn* , which is a finite field of *pn* elements. That is, *E* is a plane algebraic curve defined by the equation *y*2 = *x* 3 + *ax* + *b* for *a*, *b* ∈ F*pn* such that - = −16(4*a*3 + 27*b*2) = 0. Along with a point O at infinity, the set of rational points *E*(F*pn* ) forms an abelian group with O as the identity. Given *P* ∈ *E*(F*pn* ) and *Q* in the subgroup generated by *P*, ECDLP is the problem of finding an integer α such that *Q* = α*P*.

C.-M. Cheng · K. Kodera · A. Miyaji (B) · S. Okumura Osaka University, Suita, Japan

e-mail<EMAIL_ADDRESS>
C.-M. Cheng e-mail<EMAIL_ADDRESS>
K. Kodera e-mail<EMAIL_ADDRESS>
S. Okumura e-mail<EMAIL_ADDRESS>
© The Author(s) 2020 A. Miyaji and T. Mimoto (eds.), *Security Infrastructure Technology for Integrated Utilization of Big Data*, https://doi.org/10.1007/978-981-15-3654-0\_2

Today, the best practical attacks against ECDLP are exponential-time, generic discrete logarithm algorithms such as Pollard's rho method [34]. However, recently, a line of research has been dedicated to the index calculus for ECDLP which was started by Semaev, Gaudry, and Diem [25, 30, 35]. Under certain heuristic assumptions, such algorithms could lead to subexponential attacks to ECDLP in some cases [27, 31, 33]. The interested reader is referred to a survey paper by Galbraith and Gaudry for a more comprehensive and in-depth account of the recent development of ECDLP algorithms along various directions [28].

In this section, we investigate the computational complexity of ECDLP for elliptic curves in various forms—including Hessian [36], Montgomery [32], (twisted) Edwards [23, 24], and Weierstrass, using index calculus. Recently, elliptic curves of various forms such as Curve25519 [22] have been drawing considerable attention in deployment partly because some of them allow fast implementation and security against timing-based side-channel attacks. Furthermore, we can construct these curves not only over prime fields (such as the field of 2255 − 19 elements as used in Curve25519) but also over extension fields. In this section, we will focus on curves over optimal extension fields (OEFs) [21]. An OEF is an extension field from a prime field F*p* with *p* close to 28, 216, 232, 264, etc. Such primes fit nicely into the processor words of 8-, 16-, 32-, or 64-bit microprocessors and hence are particularly suitable for software implementation, allowing efficient utilization of fast integer arithmetic on modern microprocessors [21]. As we will see, our experimental results show considerably significant differences in the computational complexity of ECDLP for elliptic curves in various forms over OEFs.

## *2.1.2 Previous Works*

#### **<IP_ADDRESS> Index Calculus for ECDLP**

Let *E* be an elliptic curve defined over a finite field F*pn* . For cryptographic applications, we are mostly interested in a prime-order subgroup generated by a rational point *P* ∈ *E*(F*pn* ). Here, we first give a high-level overview of a typical index-calculus algorithm for finding an integer α such that *Q* = α*P* for *Q* ∈ *P*.

$$\mathcal{R} = \left\{ a\_i P + b\_i \mathcal{Q} = \sum\_j P\_{i,j} \; ; \; P\_{i,j} \in \mathcal{F} \right\} \; .$$

3. When |R|≈|F |, eliminate the right-hand side using linear algebra to obtain an equation of the form *a P* + *bQ* = O and α = −*a*/*b* mod ord *P*.

The last step of linear algebra is relatively well studied in the literature, so we will focus on the subproblem in the second step, namely, the point decomposition problem (PDP) on an elliptic curve in the rest of this section.

**Definition 2.1** (*Point Decomposition Problem of mth Order*) Given a rational point *R* ∈ *E*(F*pn* ) on an elliptic curve *E* and a factor base F ⊂ *E*(F*pn* ), find, if they exist, *P*1,..., *Pm* ∈ F such that

$$\mathcal{R} = P\_1 + \dots + P\_m.$$

#### **<IP_ADDRESS> Semaev's Summation Polynomials**

We can solve PDP by considering when the sum of a set of points becomes zero on an elliptic curve. It is straightforward that if two points sum to zero on an elliptic curve *E* : *y*2 = *x* 3 + *ax* + *b* in Weierstrass form, then their *x*-coordinates must be equal. Let us now consider the simplest yet nontrivial case where three points on *E* sum to zero. Let

$$Z = \left\{ \begin{aligned} (\mathbf{x}\_1, \mathbf{y}\_1, \mathbf{x}\_2, \mathbf{y}\_2, \mathbf{x}\_3, \mathbf{y}\_3) \in \mathbb{F}\_{p^u}^6 : (\mathbf{x}\_i, \mathbf{y}\_i) \in E(\mathbb{F}\_{p^u}), i = 1, 2, 3; \\ (\mathbf{x}\_1, \mathbf{y}\_1) + (\mathbf{x}\_2, \mathbf{y}\_2) + (\mathbf{x}\_3, \mathbf{y}\_3) = \mathcal{O} \end{aligned} \right\}.$$

Clearly, *Z* is in the variety of the ideal *I* ⊂ F*pn* [*X*1, *Y*1, *X*2, *Y*2, *X*3, *Y*3] generated by

$$\left\{ \begin{array}{l} Y\_i^2 - (X\_i^3 + aX\_i + b), i = 1, 2, 3; \\ (X\_3 - X\_1)(Y\_2 - Y\_1) - (X\_2 - X\_1)(Y\_3 - Y\_1) \end{array} \right\}.$$

Now let *J* = *I* ∩ F*pn* [*X*1, *X*2, *X*3]. Using MAGMA's EliminationIdeal function, we find that *J* is actually a principal ideal generated by the polynomial (*X*2 − *X*3)(*X*1 − *X*3)(*X*1 − *X*2) *f*3, where

$$\begin{aligned} f\_3 &= X\_1^2 X\_2^2 - 2X\_1^2 X\_2 X\_3 + X\_1^2 X\_3^2 - 2X\_1 X\_2^2 X\_3 - 2X\_1 X\_2 X\_3^2 - 2aX\_1 X\_2 - 2aX\_1 X\_3 \\ &- 4bX\_1 + X\_2^2 X\_3^2 - 2aX\_2 X\_3 - 4bX\_2 - 4bX\_3 + a^2. \end{aligned}$$

Clearly, the linear factors of this generator correspond to the degenerated case where two or more points are the same or of opposite signs, and *f*3 is the 3rd *summation polynomial*, that is, the summation polynomial for three distinct points summing to zero.

Starting from the 3rd summation polynomial, we can recursively construct the subsequent summation polynomials *fm* for *m* > 3 by taking resultants. As a result, the degree of each variable in *fm* is 2*m*−2, which grows exponentially as *m*. This is the observation Semaev made in his seminal work [35]. In short, his proposal is to consider factor bases of the following form:

$$\mathcal{F} = \left\{ (\mathbf{x}, \mathbf{y}) \in E(\mathbb{F}\_{\mathcal{P}^n}) \, : \, \mathbf{x} \in V \subset \mathbb{F}\_{\mathcal{P}^n} \right\},$$

where *V* is a subset of F*pn* . Then, we solve PDP of *m*th order by solving the corresponding (*m* + 1)th summation polynomial *fm*+1(*X*1,..., *Xm*, *x*˜) = 0, where *x*˜ is the *x*-coordinate of the point to be decomposed.

Note that this factor base is naturally invariant under point negation. That is, *Pi* ∈ F implies −*Pi* ∈ F . In this case, we have about |F |/2 (trivial) relations *Pi* + (−*Pi*) = O for free, so we only need to find the other |F |/2 nontrivial relations. In general, we will only discuss factor bases that are invariant under point negation, so by abuse of language, both F and F modulo point negation may be referred to as a factor base in the rest of this section.

#### **<IP_ADDRESS> Weil Restriction**

Restricting the *x*-coordinates of the points in a factor base to a subset of F*pn* is important from the viewpoint of polynomial system solving. Take *f*3 as an example. When decomposing a random point *a P* + *bQ*, we first substitute its *x*-coordinate into say *X*3, projecting the ideal onto F*pn* [*X*1, *X*2]. The dimension of the variety of this ideal is nonzero. Therefore, we would like to pose some restrictions on *X*1 and *X*2 to reduce the dimensions to zero so that the solving time can be more manageable.

When looking for solutions to a polynomial *f* = *ai Xi* ∈ F*pn* [*X*] in F*pn* , we can view F*pn* [*X*] as a commutative affine algebra A = F*pn* [*X*]/(*X pn* − *X*) ∼= F*pn* [*X*1,..., *Xn*]/(*X p* 1 − *X*1,..., *X p n* − *Xn*). This can be done by identifying the indeterminate *X* as *X*1θ1 +···+ *Xn*θ*n*, where (θ1,...,θ*n*)is a basis for F*pn* over F*p*. Hence, *f* can be identified as a polynomial *f*1θ1 +···+ *fn*θ*n*, where *f*1,..., *fn* ∈ A = F*p*[*X*1,..., *Xn*]/(*X p* 1 − *X*1,..., *X p n* − *Xn*), by appropriately sending each coefficient *ai* ∈ F*pn* to *a*(1) *i* θ1 +···+ *a*(*n*) *i* θ*n* for *a*(1) *i* ,..., *a*(*n*) *i* ∈ F*p*. Therefore, an equation *f* = 0 over F*pn* will give rise to a system of equations *f*1 =···= *fn* = 0 over F*p*. This technique is known as the *Weil restriction* and is used in the Gaudry– Diem attack, where the factor base is chosen to consist of points whose *x*-coordinates lie in a subspace *V* of F*pn* over F*p* [25, 30].

#### **<IP_ADDRESS> Exploiting Symmetry**

Naturally, the symmetric group *Sm* acts on a point decomposition *P*1 +···+ *Pm* because elliptic curve groups are abelian. As noted by Gaudry in his seminal work [30], we can therefore rewrite the variables *x*1,..., *xm* ∈ F*pn* by elementary symmetric polynomials *e*1,..., *em*, where *e*1 = *xi* , *e*2 = *i*= *j xi x j* , *e*3 = *i*= *j*,*i*=*k*,*j*=*k xi x j xk* , etc. Such rewriting can reduce the degree of summation polynomials and significantly speed up point decomposition [27, 31].

We might be able to exploit additional symmetry brought by actions of other groups, e.g., when the factor base is invariant under addition of small torsion points. For example, consider a decomposition of a point *R* under the action of addition of a 2-torsion point *T*2:

#### 2 Cryptography Core Technology 9

$$R = P\_1 + \dots + P\_n = (P\_1 + u\_1 T\_2) + \dots + (P\_{n-1} + u\_{n-1} T\_2) + \left( P\_n + \left( \sum\_{l=1}^{n-1} u\_l \right) T\_2 \right).$$

Clearly, this holds for any *u*1,..., *un*−1 ∈ {0, 1}, so a decomposition can give rise to 2*n*−1 − 1 other decompositions. Similar to rewriting using the elementary symmetric polynomials for the action of *Sm*, we can also take advantage of this additional symmetry by appropriately rewriting [26].

Naturally, such speedup is curve-specific. Furthermore, even if the factor base is invariant under additional group actions, we may or may not be able to exploit such symmetry to speed up the point decomposition depending on whether the action is "easy to handle in the polynomial system solving process" [26].

#### **<IP_ADDRESS> PDP on (Twisted) Edwards Curves**

Faugère, Gaudry, Hout, and Renault studied PDP on twisted Edwards, twisted Jacobi intersections, and Weierstrass curves [26]. For the sake of completeness, we include some of their results here. An Edwards curve over F*pn* for *p* = 2 is defined by the equation *x* 2 + *y*2 = 1 + *dx* 2 *y*2 for certain *d* ∈ F*pn* [24]. A twisted Edwards curve *t Ea*,*d* over F*pn* for *p* = 2 is defined by the equation *ax* 2 + *y*2 = 1 + *dx* 2 *y*2 for certain *a*, *d* ∈ F*pn* [23]. A twisted Edwards curve is a quadratic twist of an Edwards curve by *a*0 = 1/(*a* − *d*). For *P* = (*x*, *y*) ∈ *t Ea*,*d* , −*P* = (−*x*, *y*). Furthermore, the addition and doubling formulae for (*x*3, *y*3) = (*x*1, *y*1) + (*x*2, *y*2) are given as follows:

$$\text{When } (\mathbf{x}\_1, \mathbf{y}\_1) \neq (\mathbf{x}\_2, \mathbf{y}\_2): \begin{cases} \mathbf{x}\_3 = \frac{\mathbf{x}\_1 \mathbf{y}\_2 + \mathbf{y}\_1 \mathbf{x}\_2}{1 + dx\_1 \mathbf{x}\_2 \mathbf{y}\_1 \mathbf{y}\_2}, \\ \mathbf{y}\_3 = \frac{\mathbf{y}\_1 \mathbf{y}\_2 - ax\_1 x\_2}{1 - dx\_1 x\_2 \mathbf{y}\_1 \mathbf{y}\_2}. \end{cases}$$

$$\text{When } (\mathbf{x}\_1, \mathbf{y}\_1) = (\mathbf{x}\_2, \mathbf{y}\_2): \begin{cases} \mathbf{x}\_3 = \frac{2\mathbf{x}\_1 \mathbf{y}\_1}{1 + dx\_1^2 \mathbf{y}\_1^2}, \\ \mathbf{y}\_3 = \frac{\mathbf{y}\_1^2 - ax\_1^2}{1 - dx\_1^2 \mathbf{y}\_1^2}. \end{cases}$$

The 3rd summation polynomial for twisted Edwards curves is [26]:

$$\begin{aligned} f\_{IE,3}(Y\_1, Y\_2, Y\_3) &= \left(Y\_1^2 Y\_2^2 - Y\_1^2 - Y\_2^2 + \frac{a}{d}\right) Y\_3^2 \\ &+ 2\frac{d-a}{d} Y\_1 Y\_2 Y\_3 + \frac{a}{d} \left(Y\_1^2 + Y\_2^2 - 1\right) - Y\_1^2 Y\_2^2. \end{aligned}$$

Again, the subsequent summation polynomials are obtained by taking resultants.

#### **<IP_ADDRESS> Symmetry and Decomposition Probability**

Symmetry brought by group action on point decomposition will inevitably be accompanied by a *decrease in decomposition probability*. For example, if a factor base F is invariant under addition of a 2-torsion point, then the decomposition probability for PDP of the *m*th order should decrease by a factor of 2*m*−1. This is due to the same reason that the decomposition probability decreases by a factor of *m*! because the symmetric group *Sm* acts on F .

However, this simple fact seems to have been largely ignored in the literature. For example, Faugère, Gaudry, Hout, and Renault explicitly stated in Sect. 5.3 of their study that "[the] probability to decompose a point [into a sum of *n* points from the factor base] is 1 *n*! " for twisted Edwards or twisted Jacobi intersections curves, despite the fact that the factor base is invariant under the addition of 2-torsion points [26]. At first glance, this may not seem a problem, as we would expect to obtain 2*n*−1 solutions if we can successfully solve a PDP instance. (Unfortunately, this is also *not true* in general. We will return to it in more detail in Sect. <IP_ADDRESS>.) However, when estimating the cost of a complete ECDLP attack, they proposed to *collapse* these 2*n*−1 relations into one to reduce the size of the factor base and thus the cost of the linear algebra, cf. Remark 5 of the paper. In this case, the decrease in decomposition probability *does* have an adverse effect, and their estimation for the overall ECDLP cost ended up being overoptimistic by a factor of at least 2*n*−1.

## *2.1.3 Montgomery and Hessian Curves*

#### **<IP_ADDRESS> Montgomery Curves**

A Montgomery curve *MA*,*B* over F*pn* for *p* = 2 is defined by the equation

$$\text{By}^2 = \text{x}^3 + \text{Ax}^2 + \text{x} \tag{2.1}$$

for *A*, *B* ∈ F*pn* such that *A* = ±2, *B* = 0, and *B*(*A*2 − 4) = 0 [32]. For *P* = (*x*, *y*) ∈ *MA*,*B*, −*P* = (*x*, −*y*). Furthermore, the addition and doubling formulae for (*x*3, *y*3) = (*x*1, *y*1) + (*x*2, *y*2) are given as follows. When (*x*1, *y*1) = (*x*2, *y*2):

$$\begin{cases} \mathbf{x}\_{3} = B \left( \frac{\mathbf{y}\_{2} - \mathbf{y}\_{1}}{\mathbf{x}\_{2} - \mathbf{x}\_{1}} \right)^{2} - A - \mathbf{x}\_{1} - \mathbf{x}\_{2} = \frac{B(\mathbf{x}\_{2}\mathbf{y}\_{1} - \mathbf{x}\_{1}\mathbf{y}\_{2})^{2}}{\mathbf{x}\_{1}\mathbf{x}\_{2}(\mathbf{x}\_{2} - \mathbf{x}\_{1})^{2}}, \\\ \mathbf{y}\_{3} = \frac{(2\mathbf{x}\_{1} + \mathbf{x}\_{2} + A)(\mathbf{y}\_{2} - \mathbf{y}\_{1})}{\mathbf{x}\_{2} - \mathbf{x}\_{1}} - \frac{B(\mathbf{y}\_{2} - \mathbf{y}\_{1})^{3}}{(\mathbf{x}\_{2} - \mathbf{x}\_{1})^{3}} - \mathbf{y}\_{1}. \end{cases}$$

#### 2 Cryptography Core Technology 11

When (*x*1, *y*1) = (*x*2, *y*2):

$$\begin{cases} x\_3 = \frac{(\mathbf{x}\_1^2 - 1)^2}{4\mathbf{x}\_1(\mathbf{x}\_1^2 + A\mathbf{x}\_1 + 1)}, \\\ y\_3 = \frac{(2\mathbf{x}\_1 + \mathbf{x}\_1 + A)(3\mathbf{x}\_1^2 + 2A\mathbf{x}\_1 + 1)}{2B\mathbf{y}\_1} - \frac{B(3\mathbf{x}\_1^2 + 2A\mathbf{x}\_1 + 1)^3}{(2B\mathbf{y}\_1)^3} - y\_1. \end{cases}$$

It was noted by Montgomery himself in his original paper that such curves can give rise to efficient scalar multiplication algorithms [32]. That is, consider a random point *P* ∈ *MA*,*B*(F*pn* ) and *n P* = (*Xn* : *Yn* : *Zn*) in projective coordinates for some integer *n*. Then

$$\begin{cases} X\_{m+n} = Z\_{m-n} [ (X\_m - Z\_m)(X\_n + Z\_n) + (X\_m + Z\_m)(X\_n - Z\_n) ]^2, \\ Z\_{m+n} = X\_{m-n} [ (X\_m - Z\_m)(X\_n + Z\_n) - (X\_m + Z\_m)(X\_n - Z\_n) ]^2. \end{cases}$$

In particular, when *m* = *n*

$$\begin{cases} \begin{aligned} X\_{2n} &= \left(X\_n + Z\_n\right)^2 \left(X\_n - Z\_n\right)^2, \\ Z\_{2n} &= \left(4X\_n Z\_n\right) \left(\left(X\_n - Z\_n\right)^2 + ((A+2)/4)(4X\_n Z\_n)\right), \\ 4X\_n Z\_n &= \left(X\_n + Z\_n\right)^2 - (X\_n - Z\_n)^2. \end{aligned} \end{cases}$$

In this way, scalar multiplication on the Montgomery curve can be performed without using *y*-coordinates, leading to fast implementation.

#### **<IP_ADDRESS> Summation Polynomials for Montgomery Curves**

Following Semaev's approach [35], we can construct summation polynomials for Montgomery curves. Like Weierstrass curves, the 2nd summation polynomial for Montgomery curves is simply *fM*,2 = *X*1 − *X*2. Now, we consider *P*, *Q* ∈ *MA*,*B* for *P* = (*x*1, *y*1) and *Q* = (*x*2, *y*2). Let *P* + *Q* = (*x*3, *y*3) and *P* − *Q* = (*x*4, *y*4). By the addition formula, we have

$$\mathbf{x}\_3 = \frac{\mathbf{B}(\mathbf{x}\_2\mathbf{y}\_1 - \mathbf{x}\_1\mathbf{y}\_2)^2}{\mathbf{x}\_1\mathbf{x}\_2(\mathbf{x}\_2 - \mathbf{x}\_1)^2}, \mathbf{x}\_4 = \frac{\mathbf{B}(\mathbf{x}\_2\mathbf{y}\_1 - \mathbf{x}\_1\mathbf{y}\_2)^2}{\mathbf{x}\_1\mathbf{x}\_2(\mathbf{x}\_2 + \mathbf{x}\_1)^2}.$$

It follows that

$$\begin{cases} \mathbf{x}\_3 + \mathbf{x}\_4 = \frac{2\left( (\mathbf{x}\_1 + \mathbf{x}\_2)(\mathbf{x}\_1 \mathbf{x}\_2 + 1) + 2A\mathbf{x}\_1 \mathbf{x}\_2 \right)}{(\mathbf{x}\_1 - \mathbf{x}\_2)^2}, \\\quad \mathbf{x}\_3 \mathbf{x}\_4 = \frac{(1 - \mathbf{x}\_1 \mathbf{x}\_2)^2}{(\mathbf{x}\_1 - \mathbf{x}\_2)^2}. \end{cases}$$

Using the relationship between the roots of a quadratic polynomial and its coefficients, we obtain

$$\left( (\mathbf{x}\_1 - \mathbf{x}\_2)^2 \mathbf{x}^2 - 2 \left( (\mathbf{x}\_1 + \mathbf{x}\_2)(\mathbf{x}\_1 \mathbf{x}\_2 + 1) + 2A\mathbf{x}\_1 \mathbf{x}\_2 \right) \mathbf{x} + \left( 1 - \mathbf{x}\_1 \mathbf{x}\_2 \right)^2 \mathbf{x} \right)$$

From here, we can obtain for Montgomery curve which is the 3rd summation polynomial:

$$\begin{aligned} f\_{M,3}(X\_1, X\_2, X\_3) &= (X\_1 - X\_2)^2 X\_3^2 - 2((X\_1 + \chi\_2)(X\_1 X\_2 + 1)) \\ &+ 2AX\_1X\_2)X\_3 + (1 - X\_1X\_2)^2, \end{aligned}$$

as well as the subsequent summation polynomials by taking resultants:

$$\begin{aligned} f\_{M,m}(X\_1, \dots, X\_m) &= \operatorname{Res}\_X \left( f\_{M,m-k}(X\_1, \dots, X\_{m-k-1}, X), \right) \\ &\times \left( f\_{M,k+2}(X\_{m-k}, \dots, X\_m, X) \right). \end{aligned}$$

#### **<IP_ADDRESS> Small Torsion Points on Montgomery Curves**

A Montgomery curve always contains an affine 2-torsion point *T*2. Because *T*2 + *T*2 = 2*T*2 = O, −*T*2 = *T*2. If we write *T*2 = (*x*, *y*), then we can see that *y* = 0 in order for −*T*2 = *T*2 as *p* = 2. Substituting *y* = 0 into Eq. (2.1), we get an equation *x* 3 + *Ax* 2 + *x* = 0. The left-hand side factors into *x*(*x* 2 + *Ax* + 1) = 0, so we get

$$x = 0, \frac{-A \pm \sqrt{A^2 - 4}}{2}.$$

Therefore, the set of rational points over the definition field *Fpn* of a Montgomery curve includes at least two 2-torsion points, namely O and (0, 0). The other 2-torsion points may or may not be rational, so we will focus on (0, 0) in this section. Substituting (*x*2, *y*2) = (0, 0) into the addition formula for Montgomery curves, we get that for any point *P* = (*x*, *y*) ∈ *MA*,*B*, *P* + (0, 0) = (1/*x*, −*y*/*x* 2).

To be able to exploit the symmetry of addition of *T*2 = (0, 0), we need to choose the factor baseF = {(*x*, *y*) ∈ *E*(F*pn* ) : *x* ∈ *V* ⊂ F*pn* }invariant under addition of *T*2. This means that *V* needs to be closed by undertaking multiplicative inverses. In other words, *V* needs to be a *subfield* of F*pn* , i.e., *V* = F*p* for some integer that divides *n*. In this case, *fm* is invariant under the action of *xi* → 1/*xi* . Unfortunately, such an action is not linear and hence not easy to handle in polynomial system solving. How to take advantage of such kind of symmetry in PDP is still an open research problem.

#### **<IP_ADDRESS> Hessian Curves**

A Hessian curve *Hd* over F*pn* for *pn* = 2 mod 3 is defined by the equation

#### 2 Cryptography Core Technology 13

$$\mathbf{x}^3 + \mathbf{y}^3 + 1 = \mathbf{3} \text{dxy} \tag{2.2}$$

for *d* ∈ F*pn* such that 27*d*3 = 1 [36]. For *P* = (*x*, *y*) ∈ *Hd* , −*P* = (*y*, *x*). Furthermore, the addition and doubling formulae for(*x*3, *y*3) = (*x*1, *y*1) + (*x*2, *y*2) are given as follows.

$$\text{When } (\mathbf{x}\_1, \mathbf{y}\_1) \neq (\mathbf{x}\_2, \mathbf{y}\_2): \begin{cases} \mathbf{x}\_3 = \frac{\mathbf{y}\_1^2 \mathbf{x}\_2 - \mathbf{y}\_2^2 \mathbf{x}\_1}{\mathbf{x}\_2 \mathbf{y}\_2 - \mathbf{x}\_1 \mathbf{y}\_1}, \\ \mathbf{y}\_3 = \frac{\mathbf{x}\_1^2 \mathbf{y}\_2 - \mathbf{x}\_2^2 \mathbf{y}\_1}{\mathbf{x}\_2 \mathbf{y}\_2 - \mathbf{x}\_1 \mathbf{y}\_1}. \end{cases}$$

$$\text{When } (\mathbf{x}\_1, \mathbf{y}\_1) = (\mathbf{x}\_2, \mathbf{y}\_2): \begin{cases} \mathbf{x}\_3 = \frac{\mathbf{y}\_1(1 - \mathbf{x}\_1^3)}{\mathbf{x}\_1^3 - \mathbf{y}\_1^3}, \\\\ \mathbf{y}\_3 = \frac{\mathbf{x}\_1(\mathbf{y}\_1^3 - 1)}{\mathbf{x}\_1^3 - \mathbf{y}\_1^3}. \end{cases}$$

#### **<IP_ADDRESS> Summation Polynomials for Hessian Curves**

Following a similar approach outlined by Galbraith and Gebregiyorgis [29], we can construct summation polynomials for Hessian curves. First, we introduce a new variable *T* = *X* + *Y* , which is invariant under point negation. The 2nd summation polynomial for Hessian curves is simply *fH*,2 = *T*1 − *T*2. Now let

$$Z = \left\{ \begin{aligned} (\mathbf{x}\_1, \mathbf{y}\_1, t\_1, \mathbf{x}\_2, \mathbf{y}\_2, t\_2, \mathbf{x}\_3, \mathbf{y}\_3, t\_3) \in \mathbb{F}\_{p^s}^9 : (\mathbf{x}\_i, \mathbf{y}\_i) \in H\_d(\mathbb{F}\_{p^s}), i = 1, 2, 3; \\ (\mathbf{x}\_1, \mathbf{y}\_1) + (\mathbf{x}\_2, \mathbf{y}\_2) + (\mathbf{x}\_3, \mathbf{y}\_3) = O; \mathbf{x}\_i + \mathbf{y}\_i = t\_i, i = 1, 2, 3 \end{aligned} \right\}.$$

Clearly, *Z* is in the variety of the ideal *I* ⊂ F*pn* [*X*1, *Y*1, *T*1, *X*2, *Y*2, *T*2, *X*3, *Y*3, *T*3] generated by

$$\left\{ \begin{aligned} X\_i^3 + Y\_i^3 + 1 - 3dX\_iY\_i, i &= 1,2,3; \\ (X\_3 - X\_1)(Y\_2 - Y\_1) - (X\_2 - X\_1)(Y\_3 - Y\_1); \\ X\_i + Y\_i - T\_i, i &= 1,2,3 \end{aligned} \right\}.$$

Again, we compute the elimination ideal *I* ∩ F*pn* [*T*1, *T*2, *T*3] and obtain a principal ideal generated by some polynomial. After removing the degenerate factors, we can obtain for Hessian curve the 3rd summation polynomial:

$$\begin{aligned} f\_{H,3}(T\_1, T\_2, T\_3) &= T\_1^2 T\_2^2 T\_3 + d T\_1^2 T\_2^2 + T\_1^2 T\_2 T\_3^2 + d T\_1^2 T\_2 T\_3 + d T\_1^2 T\_3^2 - T\_1^2 + \\ T\_1 T\_2^2 T\_3^2 &+ d T\_1 T\_2^2 T\_3 + d T\_1 T\_2 T\_3^2 + 3 d^2 T\_1 T\_2 T\_3 + 2 T\_1 T\_2 + 2 T\_1 T\_3 + \\ 2 d T\_1 + d T\_2^2 T\_3^2 &- T\_2^2 + 2 T\_2 T\_3 + 2 d T\_2 - T\_3^2 + 2 d T\_3 + 3 d^2, \end{aligned}$$

as well as the subsequent summation polynomials by taking resultants:

$$f\_{H,m}(T\_1, \dots, T\_m) = \operatorname{Res}\_T \left\{ f\_{H,m-k}(T\_1, \dots, T\_{m-k-1}, T), f\_{H,k} \pm (T\_{m-k}, \dots, T\_m, T) \right\} \dots$$

#### **<IP_ADDRESS> Small Torsion Points on Hessian Curves**

As we shall see in Sect. <IP_ADDRESS>, we will compare elliptic curves in various forms that are isomorphism to one another over the same definition field. As a result, we will only experiment with those Hessian curves that include 2-torsion points like Montgomery or (twisted) Edwards curves. Because *T*2 + *T*2 = 2*T*2 = O, it follows that −*T*2 = *T*2. If we write *T*2 = (*x*, *y*), then we can see that *x* = *y* in order for −*T*2 = *T*2 as −*T*2 = (*y*, *x*). Substituting *x* = *y* into Eq. (2.2), we get an equation 2*x* 3 − 3*dx* 2 + 1 = 0. Therefore, a Hessian curve *Hd* (F*pn* ) has a 2-torsion point(ζ, ζ ) if the polynomial 2*X*3 − 3*d X*2 + 1 has a root ζ in F*pn* . In this case, the addition of this 2-torsion point to a point (*x*, *y*) would give a point (*x* , *y* ), where

$$ \begin{cases} x' = \frac{\xi \mathbf{y}^2 - \xi^2 \mathbf{x}}{\xi^2 - \mathbf{x} \mathbf{y}}, \\ y' = \frac{\xi \mathbf{x}^2 - \xi^2 \mathbf{y}}{\xi^2 - \mathbf{x} \mathbf{y}}. \end{cases} $$

Obviously, the typical factor bases are not invariant under addition of this 2-torsion point in general.

A Hessian curve always contains a 3-torsion point *T*3 such that 3*T*3 = O [36]. If we let *T*3 = (*x*, *y*), then we see that 2(*x*, *y*) = −(*x*, *y*) = (*y*, *x*), substituting which into the doubling formula, we get

$$\begin{cases} \frac{\mathbf{y}(1-x^3)}{x^3-y^3} = \mathbf{y},\\ \frac{\mathbf{x}(\mathbf{y}^3-1)}{x^3-y^3} = x. \end{cases}$$

Because *x* and *y* cannot be zero at the same time, we have *x* 3 − *y*3 = 1 − *x* 3 = *y*3 − 1, or *x* 3 = *y*3 = 1. Now because *pn* = 2 mod 3,F*pn* does not have any primitive cubic roots of unity, *x* = *y* = 1 and *T*3 = (1, 1). By the addition formula, if *P* = (*x*, *y*), then

$$P + T\_3 = (x, y) + (1, 1) = \left(\frac{y^2 - x}{1 - xy}, \frac{x^2 - y}{1 - xy}\right).$$

However, for *P* ∈ F , we only know that *t* = *x* + *y* ∈ *V* ⊂ F*pn* , but we know nothing about 1 − *x y*, which can lie outside of *V*. Therefore, again, typical factor bases are not invariant under addition of this 3-torsion point in general. Therefore, it is not

**Fig. 2.1** Experimental results on PDP solving for the case of *n* = 5

clear how to exploit such symmetry brought by addition of small torsion points for Hessian curves.

## *2.1.4 Experiments on PDP Solving*

This section shows the results of our experiments conducted to compare the computational complexity of PDP on four different curves: Hessian(*H*), Weierstrass(*W*), Montgomery(*M*), and twisted Edwards(*t E*).

## **<IP_ADDRESS> Experimental Setup**

As explained in Sect. <IP_ADDRESS>, we focus on PDP in these experiments as the linear algebra step is already well understood. Furthermore, we focus on the bottleneck computation in PDP, namely, the cost of the F4 algorithm for computing Gröbner bases of the polynomial systems obtained after rewriting using the elementary symmetric polynomials and applying the Weil restriction technique to summation polynomials. This way we will be taking advantage of the symmetry of *Sm* acting on point decompositions. However, we *did not* exploit symmetry of any other group actions. This is because we want to compare the *intrinsic* computational complexity of PDP and hence only consider the symmetry that is present in *all* curves. Exploiting further curve-specific symmetry whenever possible will result in a further speedup, but it would be independent of our findings here.

#### **<IP_ADDRESS> Experimental Results**

Figure 2.1 presents our experimental results for the case of *n* = 5. Here, we choose our factor base by taking *V* as the base field F*p* of F*pn* . All our experiments were performed using the MAGMA computation algebra system (version 2.23-1) on a single core of an Intel Xeon CPU E7-4830 v4 running at 2 GHz. Comparisons to solve each PDP were performed by running time (in second), Dreg, Matcost, and Rank. The "Dreg" is the maximum step degree reached during the execution of the F4 algorithm, which is referred to as the "degree of regularity" in the literature [29] and provides an upper bound for the sizes of the Macaulay submatrices involved in the computation, the "Matcost" is a number output by the MAGMA implementation of the F4 algorithm and provides an estimate of the linear algebra cost during the execution of the F4 algorithm, and finally, the "Rank" is the number of linearly independent relations we obtain once successfully solving a PDP instance. It is an important factor to consider, as it determines how many PDP instances we need to successfully solve to have enough relations for a complete ECDLP attack using index calculus. We can clearly see that the PDP solving time and Matcost for twisted Edwards curves are much smaller than those for the other curves. In contrast, the degrees of regularity for Montgomery and twisted Edwards curves are smaller than those of the other curves in the case of *m* = 4. In addition, we can see that the rank for Hessian and Weierstrass curves is 1 in all cases, whereas for Montgomery and twisted Edwards curves, it is 4 and 5 in the case of *m* = 3 and *m* = 4, respectively. Last but not least, although we only present the results for small *p* (around 8-bit long), here, we have some preliminary results for larger *p* (around 16-bit and 32-bit long). Apart from the slight difference in the absolute running time, all other results such as Dreg, Matcost, and Rank are similar, so we do not repeat them here.

## *2.1.5 Analysis*

#### **<IP_ADDRESS> Revisit Summation Polynomial in Each Form**

As we have seen in Sect. <IP_ADDRESS>, PDP on (twisted) Edwards curves seems easier to solve than on other curves. The explanation offered by Faugère, Gaudry, Hout, and Renault is "due to the smaller degree appearing in the computation of Gröbner basis of *SDn* in comparison with the Weierstrass case," cf. Sect. 4.1.1 of their paper [26]. Unfortunately, this *cannot* explain the difference between (twisted) Edwards and Montgomery curves as the highest degrees appearing in the computation of Gröbner bases are *the same* for these two curves. Therefore, there must be other reasons. We have found that the total number of terms for twisted Edwards curves is significantly lower than that for the other curves in all cases. Naturally, this could lead to faster solving time with the F4 algorithm. We also note that, except for the twisted Edwards curves, the summation polynomials before Weil restriction for the other curves are all 100% dense without any missing terms.

### **<IP_ADDRESS> Missing Terms of Summation Polynomials in (Twisted) Edwards Curves**

In this section, we will show that the summation polynomials for (twisted) Edwards curves *mainly* have terms of *even* degrees. The set of terms of even degrees is closed under multiplication, so intuitively, such polynomials are easier to solve, which can be the main reason for the efficiency gain observed in the case of (twisted) Edwards curves.

We shall make this intuition precise in Theorem 2.1, but before we state the main result, we need to clarify our terminology for ease of exposition. When a multivariate polynomial is regarded as a univariate polynomial in one of its variables *T* , we say that the coefficient *ai* of a term *ai T i* is an *even or odd-degree coefficient* depending on whether *i* is even or odd, respectively. Note that these coefficients are themselves multivariate polynomials in one fewer variable.

We say that a monomial *m* = *n i*=1 *xei i* , *ei* ≥ 0 in a multivariate polynomial in *n* variables is *of even degree* or simply an *even-degree monomial* if *i ei* is even; that it is *of odd degree* or simply an *odd-degree monomial* otherwise. In contrast, a monomial is *of (homogeneous) even parity* if all *ei* are even; it is *of (homogeneous) odd parity* if all *ei* are odd. A monomial is *of homogeneous parity* if it is either of homogeneous even or odd parity. Note that the definition of monomials of odd parity depends on the total number of variables in the polynomial, which is not the case for monomials of even parity because we regard 0 as even. For example, the monomial *x*1*x*2 is a monomial of odd parity in a polynomial in *x*1 and *x*2 but not so in another polynomial in *x*1,..., *xn* for *n* > 2.

By abuse of language, we say that a polynomial is *of even or odd parity* if it is a linear combination of monomials of even or odd parity, respectively; that a polynomial is *of homogeneous parity* if it is a linear combination of monomials of homogeneous parity. The set of polynomials of even parity is closed under polynomial addition and multiplication and hence forms a subring. In contrast, a polynomial *f* in *x*1,..., *xn* of odd parity must have the form *i ci j*=1 *x ei j j* , for *ei j* odd. Therefore, if *f* is a polynomial of odd parity and *g*, a polynomial of even parity, then *f g* must be of odd parity.

**Theorem 2.1** *Let* E *be a family of elliptic curves such that its 3rd summation polynomial f*E,3(*X*1, *X*2, *X*3) *is of degree 2 in each variable Xi and of homogeneous parity. Let g*E,*m be the polynomial corresponding to the PDP of mth order for* E *as described in Sect.<IP_ADDRESS>. That is, g*E,*m*(*X*1,..., *Xm*) = *f*E,*m*+1(*X*1,..., *Xm*, *x*)*, where x is a constant depending on the point to be decomposed.*

Among the four forms of elliptic curves that we investigated in this section, only the (twisted) Edwards form satisfies the premises of Theorem 2.1. As we have seen in Sect. 2.1.4, the PDP solving time for the (twisted) Edwards form is thus significantly faster than that for the other forms.

We will prove Theorem 2.1 in the rest of this section, for which we will need the following lemmas.

**Lemma 2.1** *Let f*1(*T*1,..., *Tr*, *T* ) = *a*0 + *a*1*T* +···+ *am T m and f*2(*T*1,..., *Tr*, *T* ) = *b*0 + *b*1*T* +···+ *bnT n be two polynomials in r* + 1 *variables, where ai and bi are polynomials in T*1,..., *Tr. Let f* (*T*1,..., *Tr*) = Res*T* ( *f*1, *f*2) *be the resultant of f*1 *and f*2 *regarded as two univariate polynomials in T . If both m and n are even, then every monomial of f is a product of an even number or none of the odddegree coefficients of f*1 *and f*2 *and some or none of the even-degree coefficients of f*1 *and f*2*. Specifically, the odd-degree coefficients a*2*k*+1 *and b*2*k*+1 *of f*1 *and f*2*, respectively, appear in total an even number of times in each monomial of f .*

*Proof* The resultant Res*T* ( *f*1, *f*2) of *f*1 and *f*2 is the determinant of the following (*m* + *n*) × (*m* + *n*) matrix *S*:

$$S = \begin{bmatrix} a\_m \ a\_{m-1} & \dots & a\_0 \\ & a\_m \ a\_{m-1} & \dots & a\_0 \\ & \ddots & & \ddots \\ & & a\_m \ a\_{m-1} & \dots & a\_0 \\ & & b\_n \ b\_{n-1} & \dots & b\_0 \\ & & b\_n \ b\_{n-1} & \dots & b\_0 \\ & & & \ddots & & \ddots \\ & & & & b\_n \ b\_{n-1} & \dots & b\_0 \end{bmatrix} \cdot \begin{array}{c} \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \end{array} \tag{2.3}$$

We denote *si j* as the entry at the *i*th row and *j*th column of *S* for 1 ≤ *i*, *j* ≤ *m* + *n*. Because both *m* and *n* are even, an even-degree coefficient *a*2*k* or *b*2*k* will appear in *si j* for which the sum of indices *i* + *j* is even. Similarly, an odd-degree coefficient *a*2*k*+1 or *b*2*k*+1 will appear in *si j* for which the sum of indices*i* + *j* is odd. Now recall that the determinant of *S* is defined as

$$\sum\_{\sigma \in S\_{n+m}} \text{sgn}(\sigma) s\_{1,\sigma(1)} \cdot s\_{2,\sigma(2)} \cdot \dots \cdot s\_{m+n,\sigma(m+n)} \cdot$$

We note that the sum of the indices of any summand is

$$\sum\_{i}^{m+n} i + \sigma(i) = (m+n)(m+n+1),$$

which is always even. Therefore, the odd-degree coefficients must appear an even number of times, thus completing the proof.

**Lemma 2.2** *Let* E *be a family of elliptic curves such that its 3rd summation polynomial f*E,3(*X*1, *X*2, *X*3) *is of degree 2 in each variable Xi and of homogeneous parity. Then, any subsequent summation polynomial f*E,*m*(*X*1,..., *Xm*) *for m* > 3 *is of homogeneous parity.*

*Proof* As the summation polynomial *f*E,*m*+1 for *m* ≥ 3 is defined recursively from *f*E,*m* and *f*E,3 by taking resultants

$$f\_{\mathcal{E}, \mathfrak{m}+1}(X\_1, \dots, X\_{\mathfrak{m}+1}) = \operatorname{Res}\_X \left( f\_{\mathcal{E}, \mathfrak{m}}(X\_1, \dots, X\_{\mathfrak{m}-1}, X), f\_{\mathcal{E}, \mathfrak{k}}(X\_{\mathfrak{m}}, X\_{\mathfrak{m}+1}, X) \right),$$

we shall prove this lemma by induction on *m*. Let *f*E,*m*(*X*1,..., *Xm*−1, *X*) = *a*2*m*−2 *X*2*m*−2 +···+ *a*1*X* + *a*0 and *f*E,3(*Xm*, *Xm*+1, *X*) = *b*2*X*2 + *b*1*X* + *b*0. By the premise that *f*E,3 is of homogeneous parity, *b*0 and *b*2 must consist only of monomials (in *Xm* and *Xm*+1) of even parity. Furthermore, *b*1 = *cXm Xm*+1 for some constant *c*. This is because *f*E,3 is of degree 2 in each variable, for which the only monomial of odd parity is *Xm Xm*+1*X*.

Now consider a term *ck Xk m*+1 of

$$\,\_1f\_{\mathbb{R},m+1}(X\_1,\dots,X\_m,X\_{m+1}) = c\_{2^{m-1}}X\_{m+1}^{2^{m-1}} + \dots + c\_1X\_{m+1} + c\_0$$

as a univariate polynomial in *Xm*+1. Again as *f*E,3 is of degree 2 in *X*, we have the case of *n* = 2 in Eq. 2.3. Now *Xm*+1 must come from *b*1, so we can conclude that

$$c\_k X\_{m+1}^k = \sum\_i \alpha\_i a\_{\beta\_i} a\_{\gamma} b\_0^{\delta\_i} b\_2^{\epsilon\_i} X\_m^k X\_{m+1}^k,$$

where α*i* a constant, β*i*, γ*i* ∈ {0,..., 2*m*−2}, and δ*i*, *i* nonnegative integers such that δ*i* + *i* + *k* = 2*m*−2. We will complete the proof by showing that *ck Xk m*+1 is a polynomial in *X*1,..., *Xm*+1 of homogeneous parity for all *k* as follows.

By Lemma 2.2, *g*E,*m*(*X*1,..., *Xm*) = *f*E,*m*+1(*X*1,..., *Xm*, *x*) is of homogeneous parity. Obviously, the monomials of even parity will remain of even degree after *x* is substituted. If *m* is even, then the monomials of odd parity in *f*E,*m*+1 will become of even degree after *x* is substituted because an even number of odd numbers sum to an even number. Similarly, if *m* is odd, then the monomials of odd parity in *f*E,*m*+1 will become of odd degree after *x* is substituted. However, those odd-degree monomials that are *not* of homogeneous parity, e.g., *X*2 1 *X*2, cannot appear in *g*E,*m* by Lemma 2.2. This completes the proof of Theorem 2.1.

#### **<IP_ADDRESS> What Price for a Highly Symmetric Factor Base?**

Last but not least, we discuss the price needed to pay to have a highly symmetric factor base F that is invariant under more group actions in addition to that of the symmetric group *Sm*. As previewed in Sect. <IP_ADDRESS>, we would expect that the effect of the decrease in decomposition probability due to additional symmetry in F could be offset by that of the increase in number of solutions. For example, let us reconsider the group action of addition of *T*2 in Sect. <IP_ADDRESS>. If we could get 2*m*−1 solutions, then the loss of the factor of 2*m*−1 in decomposition probability would be compensated. This way everything would be the same as if there were no such symmetry, and we could exploit the additional symmetry at no cost.

Unfortunately, this proposition is*false* in general. Consider an example of *m* = 4. Let *Qi* = *Pi* + *T*2 for *i* = 1, 2, 3, 4. We can write down all 2*m*−1 = 8 possible ways of a point decomposition under this group action:

$$\begin{aligned} P\_1 + P\_2 + P\_3 + P\_4 &= Q\_1 + Q\_2 + P\_3 + P\_4 \\ = Q\_1 + P\_2 + Q\_3 + P\_4 &= Q\_1 + P\_2 + P\_3 + Q\_4 \\ = P\_1 + Q\_2 + Q\_3 + P\_4 &= P\_1 + Q\_2 + P\_3 + Q\_4 \\ = P\_1 + P\_2 + Q\_3 + Q\_4 &= Q\_1 + Q\_2 + Q\_3 + Q\_4. \end{aligned}$$

It is easy to find that we have only five linearly independent relations from these eight relations, as there are nontrivial linear combinations summing to zero, e.g.:

$$\begin{aligned} &(P\_1 + P\_2 + P\_3 + P\_4) - (Q\_1 + Q\_2 + P\_3 + P\_4) - (P\_1 + P\_2 + Q\_3 + Q\_4) \\ &+ (Q\_1 + Q\_2 + Q\_3 + Q\_4) = \mathcal{O}. \end{aligned}$$

As explained in Sect. <IP_ADDRESS>, the factor bases for Montgomery and twisted Edwards curves are invariant under addition of 2-torsion points. For *m* = 3, we achieve maximum rank of 2*m*−1 = 4. For *m* = 4, as we have explained above, we can only have rank 5, which is strictly less than the maximum possible rank 2*m*−1 = 8.

Finally, we note that we have not exploited any symmetry for Hessian curves in our experiments. However, the rank for Hessian curves is always 1 in all our experiments. This shows that the factor base we have chosen for Hessian curves is *not* invariant under addition of small torsion points, as the rank would be > 1 otherwise.

## *2.1.6 Concluding Remarks*

In this section, we experimentally explored index-calculus attack on ECDLP over different forms such as twisted Edwards, Montgomery, Hessian, and Weierstrass curves under the totally fair conditions as they are isomorphic to each other over the same definition field F*pn* and showed that twisted Edwards curves are clearly faster than others. We investigated the summation polynomials of all forms in detail, found that big differences exist in the number of terms, and proved that monomials of odd degrees in summation polynomials on twisted Edwards curves do not exist. We showed that this difference causes less solving time of index-calculus attack on ECDLP over twisted Edwards than others.

## **2.2 Analysis on Ring-LWE over Decomposition Fields**

## *2.2.1 Introduction*

The ring variant of learning with errors (Ring-LWE) based cryptography [15, 16] is one of the most attractive research areas in cryptography. Ring-LWE has provided efficient and provably secure post-quantum cryptographic protocols, which include homomorphic encryption (HE) schemes [4, 5, 9]. The development of the efficiency and security of both post-quantum cryptography and HE is strongly desirable. In fact, the standardization of post-quantum cryptography is under development by the National Institute of Standards and Technology. Moreover, HE schemes that enable us to execute the computation on encrypted data without decryption have many applications in cloud computing.

Ring-LWE is characterized by two probabilistic distributions, modulus parameters (integers) and number fields, as detailed in Sect. <IP_ADDRESS>. Usually, cyclotomic fields are used as the underlying number fields to increase efficiency and security [17]. However, especially in the case of HE schemes, improving the efficiency of the encryption/decryption procedures and homomorphic arithmetic operations on encrypted data while ensuring security remain important tasks.

To construct an HE scheme that can simultaneously encrypt many plaintexts efficiently, Arita and Handa proposed the use of a decomposition field, which is contained in a cyclotomic field with prime conductors, as an underlying number field for Ring-LWE [1]. (Sect. 2.2.3 presents the details of decomposition fields and of Arita and Handa's idea.) Arita and Handa's HE scheme, which is called the subring HE scheme, is indistinguishably secure under a chosen-plaintext attack if the decision variant of Ring-LWE over the decomposition fields is computationally infeasible. Arita and Handa's experiments [1, Sect. 5] showed that the performance of the subring HE scheme is much better than that of the FV scheme based on Ring-LWE over th cyclotomic fields with prime numbers , as implemented in HElib [11].

As for the security of the subring HE scheme, Arita and Handa remarked that in the case of decomposition fields, some of the security properties of Ring-LWE in the case of cyclotomic fields are also satisfied. More concretely, there exists a quantum polynomial-time reduction from the approximate shortest vector problem on certain ideal lattices to Ring-LWE over decomposition fields, and the equivalence between the decision and search variants of Ring-LWE over decomposition fields is satisfied.

However, solving Ring-LWE is reduced to solving certain problems on lattices, such as the closest vector problem (CVP) and the shortest vector problem, and the difficulty of problems on lattices depends heavily on the structure and given bases of the underlying lattices. For example, if the shortest vector is much shorter than the second shortest vector in a certain lattice L, then the shortest vector problem for lattice L would be easy. This means that the underlying number fields affect the difficulty of lattice problems arising in Ring-LWE. Hence, to ensure the security of the subring HE scheme, experimental or theoretical analyses of (lattice) attacks should be performed. However, [1] does not provide any such analysis.

In this study, we provide an experimental analysis of the security of Ring-LWE over decomposition fields. More precisely, we compare the security of Ring-LWE over decomposition fields and of Ring-LWE over the th cyclotomic fields with some prime numbers . In our experiments, we reduce the search Ring-LWE to the (approximate) CVP on certain lattices in the same way as Bonnoron et al.'s analysis [3] because the target of Bonnoron et al.'s analysis is Ring-LWE optimized for HE. We use Babai's nearest plane algorithm [2] and Kannan's embedding technique [12] to solve the CVP. We then compare the running times, success rates, and Hermite root factors. (The root Hermite factor [10] is usually used to evaluate the quality of lattice attacks.) We also compare the experimental results of lattice attacks against Ring-LWE over various decomposition fields to find those fields that provide weak Ring-LWE.

Our experimental results indicate that the success rates and Hermite root factors for the decomposition fields are almost the same as those for the cyclotomic fields. However, the running time for decomposition fields is longer than that for cyclotomic fields. Moreover, the difference in running time increases as the rank of the lattices increases.

Therefore, we believe that Ring-LWE over decomposition fields is more secure against the above lattice attacks than that over cyclotomic fields because the ranks of the lattices occurring in our experiments are much lower than the ranks of the lattices used in practice. This means that to construct HE schemes (or schemes of other types), fewer parameters are needed for Ring-LWE over decomposition fields than for Ring-LWE over cyclotomic fields. Therefore, as a result of our analysis, we believe that Ring-LWE over decomposition fields can be used to construct more efficient HE schemes.

## *2.2.2 Preliminaries*

In this section, we briefly review the notation of lattices, Galois theory, number fields, and Ring-LWE. Throughout this study, Z, Q, R, and C denote the ring of (rational) integers, field of rational numbers, field of real numbers, and field of complex numbers, respectively. For a positive integer *m* ∈ Z, we suppose that any element of Z/*m*Z is represented by an integer contained in the interval (−*m*/2, *m*/2] ∩ Z.

#### **<IP_ADDRESS> Lattices**

An *m*-dimensional lattice is defined as a discrete additive subgroup of R*m*. It is well known that for any lattice L ⊂ R*m*, there exist R-linearly independent vectors **b**1,..., *and* **b***n* ∈ R*m* such that L = 1≤*i*≤*n* Z**b***i* := { 1≤*i*≤*n ai***b***i* | *ai* ∈ Z }. In other words, for a matrix **B** = (**b**1,..., **b***n*) whose *i*th column vector is **b***j* , we have L = {**Bx** | **x** ∈ Z*n*}. Then, we say that {**b**1,..., **b***n*} is a lattice basis of L, and **B** is the basis matrix of L with respect to {**b**1,..., **b***n*}. The value *n* is called the rank of L, and it is denoted by rank(L). There are infinite bases for a lattice. In fact, for any unimodular matrix **U**, all column vectors of **UB** also form a basis of L. An important invariant of L is the determinant defined as det(L) := √det (**BB***t*). This determinant is independent of basis.

There are various computationally hard problems on lattices. Here, we explain the CVP, which is a well-known problem on lattices. Given a lattice L and target vector **t** ∈ R*m* - L, the CVP on (L,**t**) is the problem of finding a vector **x** ∈ L such that for all vectors **y** ∈ L, we have **t** − **x**≤**t** − **y**. For a real number γ > 1, the approximate CVP on (L,**t**,γ) is the problem of finding a vector **x** ∈ L such that for all vectors **y** ∈ L, we have **t** − **x** ≤ γ **t** − **y**. Babai's nearest plane algorithm and Kannan's embedding technique are basic algorithms for solving the approximate CVP. Almost all known problems on lattices that are useful for constructing cryptographic protocols become more difficult as the ranks of the underlying lattices increase, and the quality of the two algorithms mentioned earlier depends on ranks of input lattices.

Breaking some cryptographic protocols can be reduced to solving certain computational problems on lattices, including the (approximate) CVP [3, 8]. To solve such problems on lattices, we usually use lattice basis reduction algorithms, which transform a given basis of a lattice into a basis of the same lattice that consists of nearly orthogonal and relatively short vectors. In fact, an input of Babai's nearest plane algorithm is an (LLL) reduced basis, and Kannan's embedding technique outputs an appropriate vector from the reduced basis. In our experiments, to solve CVP using Babai's nearest plane algorithm and Kannan's embedding technique, we use the LLL algorithm [13] and BKZ algorithm [7, 19], which are well-known algorithms for computing such bases.

The quality of basis reduction algorithms is usually estimated by the root Hermite factor, which is defined as follows: Let **b** be the shortest vector of a basis of a lattice L with rank *n*, which has been reduced by a basis reduction algorithm A. Then, the root Hermite factor δA,L is defined as a constant satisfying δ*n* A,L := **b**/ det(L)1/*n*. Better basis reduction algorithms provide smaller Hermite root factors.

#### **<IP_ADDRESS> Galois Theory**

To describe decomposition fields, we need to describe Galois theory.

Let *K* be a field and *L* an extension field of *K*; we denote this situation by *L*/*K*. The field *L* is a *K*-vector space, and the degree of extension of *L*/*K*, denoted by [*L* : *K*], is defined as the dimension of *L* as *K*-vector space. If *M* is a subfield of *L* containing *K* as a subfield, i.e., *K* ⊂ *M* ⊂ *L*, then we call *M* an intermediate field of *L*/*K*. If *L*/*K* satisfies [*L* : *K*] < ∞, then *L*/*K* is called a finite extension of *K*. If *M* is an intermediate field of *L*/*K* with [*L* : *K*] < ∞, then we have [*L* : *K*] = [*L* : *M*][*M* : *K*]. If for any α ∈ *L*, there exists a nonzero polynomial *f* (*x*) ∈ *K*[*x*] such that *f* (α) = 0, then *L*/*K* is called an algebraic extension of *K*. It is known that all finite extensions are algebraic extensions.

From now on, we suppose that *L*/*K* is a finite algebraic extension. For any α ∈ *L*, the minimal polynomial over *K* of α is defined as the monic polynomial *f* (*x*) ∈ *K*[*x*] with the lowest degree of all polynomials in *K*[*x*] that vanish at α. We denote Irr(α, *K*)(*x*) as the minimal polynomial over *K* of α. Note that the minimal polynomial over *K* of α coincides with the monic irreducible polynomial over *K* that vanishes at α. For a subset *S* ⊂ *L*, we denote *K*(*S*) as the smallest subfield of *L* among subfields containing *K* and *S*. We call *K*(*S*) the field generated by *S* over *K*. If *L* is generated by one element θ ∈ *L* over *K*, i.e., *L* = *K*(θ ), then we have an isomorphism *L* ∼= *K*[*x*]/ (Irr(θ , *K*)(*x*)) by θ → *x* (mod. (Irr(θ , *K*)(*x*)). This implies that [*K*(θ ) : *K*] = deg Irr(α, *K*).

Next, we describe separable, normal, and Galois extensions of fields. If Irr(α, *K*)(*x*) for any α that has no multiple roots, then *L*/*K* is called a separable extension of *K*. If *L* contains all roots of Irr(α, *K*)(*x*) for any α ∈ *L*, then *L*/*K* is called a normal extension of *K*. If all algebraic extensions of *K*, including infinite algebraic extensions, are separable, then *K* is called a perfect (field). It is known that fields with characteristic zero and any finite field are perfect, and that any finite separable extension field can be generated by one element. If *L*/*K* is a separable and normal extension of *K*, then *L*/*K* is called a Galois extension of *K*. Let  be a sufficiently large field containing *K* such that any ring-homomorphism φ fixing *K*, i.e., φ(*a*) = *a* for any *a* ∈ *K*, to *L* satisfies φ(*L*) ⊂ . We define the set of all ring-homomorphisms by fixing *K* to the range *L* to  as follows:

$$\operatorname{Hom}\_K(L,\Omega) := \{ \sigma : L \hookrightarrow \Omega \mid \sigma(a) = a, \forall a \in K \} \dots$$

(Note that any nonzero ring-homomorphism between fields is injective.) Let *L*/*K* be separable with [*L* : *K*] = *n* and *L* = *K*(θ ). Let θ = θ1,...,θ*n* be all roots of Irr(θ , *K*)(*x*). For any σ ∈ Hom*K* (*L*, ), we have σ (Irr(θ , *K*)(θ )) = Irr(θ , *K*) (σ (θ )) = 0. This means that σ (θ ) = θ*i* for some *i* = 1,..., *n*. This then implies #Hom*K* (*L*) = *n*. (Any τ ∈ Hom*K* (*L*, ) is completely determined by the image of θ under τ because τ fixes *K*.)

Moreover, if *L*/*K* is normal, then σ induces an isomorphism *L* ∼= *L*. Note that *L* = *K*(θ ) ∼= *K*(θ*i*) for any *i* = 1,..., *n* because these fields are isomorphic to *K*[*X*]/ (Irr(θ , *K*)). Therefore, we may take *L* as  and can write Aut*K* (*L*) = Hom*K* (*L*, ).

Now, we can describe the fundamental theorem of Galois theory (for finite field extensions). Let *L*/*K* be a finite Galois extension of *K*. Then, we can write Gal(*L*/*K*) = Aut*K* (*L*). For any subgroup *H* ⊂ Gal(*L*/*K*) and an intermediate field *M* of *L*/*K*, we define

$$\begin{aligned} L^H &:= \{ a \in L \mid \sigma(a) = a, \forall \sigma \in H \}, \\ G\_M &:= \{ \sigma \in \text{Gal}(L/K) \mid \sigma(a) = a, \forall a \in M \}. \end{aligned}$$

We note that *L*/*M* is a Galois extension with Gal(*L*/*M*) = *G M* . It is not difficult to see that *L H* is an intermediate field of *L*/*K* and that *G M* is a subgroup of Gal(*L*/*K*). We can define two maps with respect to *L*/*K*. One is a map from *A* := {*M* ⊂ *L* | *M* is an intermediate field of *L*/*K*}to *B* := {*H* ⊂ Gal(*L*/*K*)| *H* is a subgroup of Gal(*L*/*K*)} by *M* → *G M* . The other is a map from *B* to *A* by *H* → *L H* . The fundamental theorem of Galois theory is as follows:

**Theorem 2.2** *Let L*/*K, A, B, , and be as above. Then, the following statements are true:*

$$\operatorname{Gal}(L/K)/\operatorname{Gal}(L/M) \cong \operatorname{Gal}(M/K).$$

*In particular, if* Gal(*L*/*K*) *is an abelian group, then all subfields of L*/*K are Galois extensions of K .*

For a proof of Theorem 2.2, see [18] for example. (It is easy to prove (2) of Theorem 2.2 from the definitions of and .)

#### **<IP_ADDRESS> Number Fields**

To describe Ring-LWE and decomposition fields, which play central roles in this paper, we need some notations from algebraic number theory.

An (algebraic) number field is a finite extension field of Q. Let *K* be a number field with extension degree [*K* : Q] = *n*. An element *a* ∈ *K* is called an algebraic integer if there exists a monic polynomial *f* ∈ Z[*x*] such that *f* (*a*) = 0. The ring of integers *OK* of *K* is defined as a subring of *K* consisting of all algebraic integers of *K*. The ring *OK* has an integral basis (Z-basis) {*u*1,..., *un*}, i.e., for any element *u* ∈ *OK* , there exist integers *a*1,..., *an* such that *u* is uniquely written as *u* = 1≤*i*≤*n aiui* . It is well known that any (integral) ideal *I* of *OK* is uniquely factored into products of some prime ideals, i.e., there exist prime ideals P1,..., P*m* satisfying *I* = P*e*1 1 ··· P*em m* for *ei* ≥ 1. If *I* = *pOK* for a prime number *p* and *K* is a Galois extension of Q, then we have *OK* /P*i* = F*pd* for some *d* ∈ N and all *ei*'s are mutually equal. Moreover, we have *med* = *n*, where *e* := *ei* , and if all *ei*'s are equal to 1 (resp. all *ei*'s and *d* are equal to 1), then we say that *p* is unramified (resp. splits completely) in *K*. Any prime ideal of *OK* is a maximal ideal in *OK* , and thus we have *Pi* + *Pj* = *OK* for any *i* = *j*. This induces an isomorphism of rings *OK* /P1 ··· P*m* ∼= *OK* /P1 ×···× *OK* /P*m*.

#### **<IP_ADDRESS> Ring-LWE Problem**

Let *K* and *OK* be as above. Let χsecret and χerror be probabilistic distributions on *OK* and let *p* be an integer. We denote by *OK*,*p* the residue ring *OK* /*pOK* . For a probabilistic distribution χ on a set *X*, we write *a* ← χ when *a* ∈ *X* is chosen according to χ. We denote *U*(*X*) as the uniform distribution on *X*. The Ring-LWE distribution on *OK*,*p*, denoted by RLWE*K*,*p*,χerror,χsec , is defined as a probabilistic distribution that takes elements of the form (*a*, *as* + *e*) with *a* ← *U*(*OK*,*p*), *s* ← χsecret, and with *e* ← χerror. The Ring-LWE problem has two variants. One is the problem of distinguishing RLWE*K*,*p*,χerror,χsec from *U*(*OK*,*p* × *OK*,*p*), which is called the decision Ring-LWE problem. The other is a problem of finding *s* ∈ *OK*,*p*, given arbitrarily many samples(*ai*, *ais* + *ei*) ∈ *OK*,*p* × *OK*,*p* chosen according to RLWE*K*,*p*,χerror,χsec , which is called the search Ring-LWE problem.

The Ring-LWE problem is expected to be computationally difficult even with quantum computers. It is proved that the decision Ring-LWE problem is equivalent to the search problem if *K* is a cyclotomic field and if *p* is a prime number and (almost) splits completely in *K* [16]. In addition, this equivalence is generalized to the cases where *K*/Q is a Galois extension and where *p* is unramified in *K* [6]. Moreover, there is a quantum polynomial-time reduction from the search Ring-LWE to the shortest vector problem on certain ideal lattices.

## *2.2.3 Ring-LWE over Cyclotomic and Decomposition Fields*

In this section, we describe why Arita and Handa proposed the use of decomposition fields as the underlying number fields of Ring-LWE to construct efficient HE schemes.

#### **<IP_ADDRESS> Cyclotomic Fields and Decomposition Fields**

First, we briefly review cyclotomic fields. For a positive integer *m*, let ζ*m* ∈ C be a primitive *m*th root of unity and *n* = ϕ(*m*), where ϕ(·) denotes Euler's totient function. Then, *K* := Q (ζ*m*) is called the *m*th cyclotomic field. The ring of integers of *K* coincides with *R* := Z[ζ*m*]. Any prime number *p* that does not divide *m* is unramified in *K*, and if *p* ≡ 1 (mod. *m*), then *p* splits completely in *K*. Here, *K*/Q is a Galois extension of degree [*K* : Q] = *n*, and its Galois group Gal(*K*/Q) is isomorphic to (Z/*m*Z) ∗ .

Next, we describe the decomposition fields of number fields. Let *L* be a number field, and suppose that *L*/Q is a Galois extension and that its Galois group *G* := Gal(*L*/Q) is a cyclic group. Let *p* be a prime number that is unramified in *L* and satisfies *pOL* = P1 ··· P*g*, where the P*i*'s are the prime ideals of *OL* . Let *GZ* be a subgroup of *G* that consists of all elements ρ fixing all P*i* , i.e., ρ(P*i*) = P*i* for 1 ≤ *i* ≤ *g*, and *Z* is the fixed field of *GZ* . Then, we call *Z* the decomposition field with respect to *p*. The field *Z* is a number field and the ring of integers of *Z* is *OZ* = *OL* ∩ *Z*. Suppose p*i* := *OZ* ∩ P*i* . Then, we have *pOZ* = p1 ··· p*g*. A generator σ of *GZ* acts on *OL* /P*i* ∼= F*pd* as the *p*th Frobenius map, i.e., σ (*x*) ≡ *x p* (mod. P*i*) for all *x* ∈ *OL* and for 1 ≤ *i* ≤ *g*. Therefore, we have *OZ* /p*i* ∼= F*p* and [*Z* : Q] = *g*, i.e., *p* splits completely in *Z*.

#### **<IP_ADDRESS> Cyclotomic Fields Versus Decomposition Fields**

Let *K*, *L*, and *Z* be as above and *p* be a prime number that is unramified in *K* and splits completely in *Z*. Assume that *L* is the th cyclotomic field with a prime number . As we mentioned in Sect. 2.2.1, cyclotomic fields are usually used as the underlying number fields of Ring-LWE. From the viewpoint of the efficiency of Ring-LWE based schemes, there are good Z-bases of the rings of integers of *K* and *Z* [1, 17]. As for the security of the Ring-LWE, in the cases of *K* and *Z*, both the equivalence and the reduction mentioned in Sect. <IP_ADDRESS> are satisfied because both *K*/Q and *Z*/Q are Galois extensions.

The main difference between *K* and *Z* is the algebraic structures of their rings of integers modulo *p*. Because *p* is unramified in *K*, we have *OK*,*p* ∼= *OK* /P1 ×···× *OK* /P*k* and *OK* /P*i* ∼= F*pd* for 1 ≤ *i* ≤ *k* and for *d* > 1, where the P*i*'s are prime ideals in *OK* lying over *p*, i.e., *pOK* = P1 ··· P*k* . The FV scheme [9], which is an HE scheme based on Ring-LWE, uses *OK*,*p* as its plaintext space, and thus, the FV scheme (or any HE scheme with the same plaintext space) can encrypt and execute several additions of *dk* = *n* = [*K* : Q] plaintexts in F*p* simultaneously. However, the FV scheme cannot execute the multiplication of the same number of plaintexts in F*p* simultaneously. To execute the multiplication of plaintexts in F*p*, we can only use F*p* ×···× F*p* (the direct product of *k* finite fields) as the plaintext space.

In contrast, because *p* splits completely in *Z*, we have *OZ*,*p* ∼= *OZ* /p1 ×···× *OZ* /p*g* and *OZ* /p*i* ∼= F*p* for any 1 ≤ *i* ≤ *g*, where the p*i*'s are prime ideals in *OZ* lying over *p*. This means that one can encrypt *g* = [*Z* : Q] plaintexts simultaneously. Moreover, one can execute additions and multiplications of the same number of plaintexts in F*p* simultaneously. Because the extension degrees *g* and *n* are directly related to the ranks of the lattices occurring in known lattice attacks, we should set *g* ≈ *n* to compare the security of Ring-LWE over these fields. Therefore, the HE scheme over *Z* can encrypt and operate *d* times as many plaintexts as the FV scheme over *K* simultaneously.

## *2.2.4 Our Experimental Analysis*

In this section, we present our experimental results on lattice attacks against Ring-LWE over decomposition fields and cyclotomic fields. First, we explain lattice attacks in our experiments.

#### **<IP_ADDRESS> Lattice Attack in Our Experiments**

In our experiments, we reduce the search Ring-LWE to a CVP (or approximate CVP) in the same way as Bonnoron et al.'s analysis [3] because the target of Bonnoron et al.'s analysis is Ring-LWE optimized for HE. We describe this approach briefly in the case of decomposition fields. Let *OZ* and *p* be as in Sect. <IP_ADDRESS>. Set *q* := *pr* for *r* > 1. Let {μ1,...,μ*g*} be a Z-basis of *OZ* , which is a good basis, as shown in [1, Lemma 3]. We sample vectors **a** = (*a*1,..., *ag*), **s** = (*s*1,...,*sg*) and **e** = (*e*1,..., *eg*) from *U*(Z*g*), *D*Z*g* ,σs , and *D*Z*g* ,σe , respectively, where *D*Z*g* ,σ denotes the discrete Gaussian distribution with mean 0 and variance σ2.

We put *a* := 1≤*i*≤*g ai*μ*i* , *s* := 1≤*i*≤*g si*μ*i* , *e* := 1≤*i*≤*g ei*μ*i* , and *b* := *as* + *e* = 1≤*i*≤*g bi*μ*i* (mod. *q*). Then, (*a*, *b*) is a Ring-LWE instance over *Z*. Note that to use Ring-LWE to construct HE schemes, the value σs and σe should be sufficiently small because the ∞-norm **s**∞ directly affects the growth of noise after multiplication. In our experiments, we set σs = 1 and σ2 e = 8 according to [14]. By comparing all coefficients of both sides, we get **As** + **e** = (*b*1,..., *bg*)*t* = **b**, where **A** is a matrix. (For any vector **v**, **v***t* means its transpose.) If we set **A** as (**A I**), then we have **A** (**s e**)*t* = **b** (mod. *q*), where **I** denotes the *g* × *g* identity matrix. From the choice of *si*'s and *ei*'s, our target vector (**s e**)*t* is a very short vector from among all solutions to *A* **y** = **b**, and thus, we can expect that our target vector can be found by solving the (approximate) CVP on the lattice L = {**x** ∈ Z2*g* | **A x** = **0** (mod. *q*)} and on **w** := (**0 b**)*t* , which is a solution to **A y** = **b**.

We take

$$\mathbf{B} = \begin{pmatrix} \mathbf{I} & \mathbf{0}\_{\mathbf{g}, \mathbf{g}} \\ -\mathbf{A} & q\mathbf{I} \end{pmatrix}.$$

as a basis matrix of L, where **0***g*,*g* denotes the *g* × *g* zero matrix. We reduce the basis matrix **B** using the LLL and BKZ algorithms with block size β = 10. (In practice, β should be 10 or 20.) Let **B**red be a reduced basis of **B**. We input **B**red and **w** to Babai's nearest plane algorithm. The quality of the results of Babai's nearest plane algorithm depends on the quality of the basis reduction algorithms used to compute the reduced input bases, and thus, we compute the root Hermite factor for **B**red.

In contrast, Kannan's embedding technique takes a basis matrix

$$\mathbf{C} = \begin{pmatrix} \mathbf{B} & -\mathbf{w} \\ \mathbf{0}\_{1\times2\text{g}} & M \end{pmatrix}.$$

as input, and we set *M* = 1 according to the result of an experimental study on Kannan's embedding technique for LWE [20]. We also use the LLL and BKZ algorithms with β = 10 to reduce the above basis matrix.

**Remark 2.2** In the case of -cyclotomic fields with prime numbers , we use {1, ζ,...,ζ −2 } as a Z-basis, which is also a good basis [17].

**Remark 2.3** For 1 ≤ *r* < *r* and *q* := *pr* , we can obtain samples of RLWE*K*,*q* ,χerror,χsec from samples of RLWE*K*,*q*,χerror,χsec by a natural projection *OZ*,*q* → *OZ*,*q* by *a* → *a* (mod. *q* ). In our experiments, we use a small *r* to reduce running times. In our experimental results, we only show *r* .

#### **<IP_ADDRESS> Experimental Results**

We used a computer with 2.00 GHz CPUs (Intel(R) Xeon(R) CPU E7-4830 v4 (2.00GHz)x111) and 3 TB memory to conduct the experiments. The OS was Ubuntu 16.04.4. We implemented the code for sampling Ring-LWE instances in SageMath version 7.5.1. We also used Magma V2.23-1 to execute lattice attacks. We took 100 samples and performed lattice attacks on them.

We show our experimental results in Tables 2.1 and 2.2 for *p* = 2. Table 2.1 shows that there is not a considerable difference between the experimental results of cyclotomic fields and those for decomposition fields. In contrast, Table 2.2 shows that Kannan's embedding technique is much faster than Babai's nearest plane algorithm.

This implies that the behaviors of the basis reduction algorithms heavily depend on the structure of the input lattices. This is a reason why experimental analyses are necessary for ensuring the security of lattice-based schemes (or other problems). Table 2.2 also shows that the running times for the decomposition fields become longer than those for cyclotomic fields as *g* (or − 1) increases. Therefore, we can expect that decomposition fields provide Ring-LWE that is more secure against the lattice attacks described in Sect. <IP_ADDRESS> than th cyclotomic fields because the ranks of the lattices occurring in our experiments are very low compared to the ranks of lattices used in practice. This means that we can use decomposition fields with lower extension degrees than would be needed for th cyclotomic fields, and the use of such number fields makes Ring-LWE-based schemes more efficient. Therefore, as a

**Table 2.1** Experimental results on Babai's nearest plane algorithm for *p* = 2

The columns for which the values *g* are indicated show the results for decomposition fields; the other columns show the results for cyclotomic fields

The "ratio of running times" is the ratio of the average of running time for a decomposition field to that of a cyclotomic field for each *g*

**Table 2.2** Experimental results on Kannan's embedding technique for *p* = 2

We computed the root Hermite factor for the reduced bases, but we do not show them because the success rates in these results are 100%

**Fig. 2.2** Average running times of Kannan's embedding technique for cyclotomic and decomposition fields with respect to *p* = 2, 3, 5, 7, 11. The label "*p* = 2\_cyclotomic" indicates the results of the cyclotomic fields shown in Table 2.2, and the other labels indicate the results for decomposition fields with respect to the corresponding prime numbers *p*. We set modulus parameter *q* = *pr* so that these moduli have the almost same bit sizes. We only show the average results on at least 10 samples

result of our analysis, we believe that Ring-LWE over decomposition fields can be used to construct more efficient HE schemes.

We also conducted experiments for decomposition fields with respect to *p* = 3, 5, 7, 11 to find decomposition fields that provide weak Ring-LWE instances (Fig. 2.2). In these experiments, we could not find decomposition fields that provide weak Ring-LWE.

## **References**

*Conference on Cryptology in India, New Delhi, India, December 14-17, 2014, Proceedings* (Springer, 2014), pp. 409–427

**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

## **Chapter 3 Secure Primitive for Big Data Utilization**

**Akinori Kawachi, Atsuko Miyaji, Kazuhisa Nakasho, Yiying Qi, and Yuuki Takano**

**Abstract** In this chapter, we describe two security primitives for big data utilization. One is a privacy-preserving data integration among databases distributed in different organizations. This primitive integrates the same data among databases kept in different organizations while keeping any different data in an organization secret to other organizations. Another is a privacy-preserving classification. This primitive executes a procedure for server's classification rule to client's input database and outputs only the result to the client while keeping the client's input database secret to the server and server's classification rule to the client. These primitives can be executed not only independently but also jointly. That is, after we integrate databases from distributed organization by executing the privacy-preserving data integration, we can execute a privacy-preserving classification.

## **3.1 Privacy-Preserving Data Integration**

## *3.1.1 Introduction*

Medical organizations often store the data accumulated through medical analyses. However, detailed data analysis sometimes requires separate datasets to be integrated without violating patient or commercial privacy. Consider the scenario in which the

A. Kawachi

A. Miyaji (B) · Y. Qi · Y. Takano Osaka University, 1-1 Yamadaoka, Suita, Osaka 565-0871, Japan e-mail<EMAIL_ADDRESS>
Y. Takano e-mail<EMAIL_ADDRESS>
Mie University, 1577 Kurimamachiya-cho, Tsu City, Mie 514-8507, Japan e-mail<EMAIL_ADDRESS>
K. Nakasho Yamaguchi University, 1677-1 Yoshida, Yamaguchi City, Yamaguchi 753-8511, Japan e-mail<EMAIL_ADDRESS>
occurrence of similar accidents can be attributed to a particular defective product. Such defective products should be identified as quickly as possible. However, the databases related to accidents are maintained separately by different organizations. Thus, investigating the causes of accidents is often time-consuming. For example, assume child *A* has broken her/his leg at school, but it is not clear whether the accident was caused by defective equipment. In this case, information relating to *A*'s injury, such as the patient's name and type of injury, is stored in hospital database *S*1. Information pertaining to *A*'s accident, such as their name and the location of the swing at the school, is stored in database *S*2, which is held by the fire department. Finally, information relating to the insurance claim following *A*'s accident, such as the name and medical costs, is maintained in the insurance company's database, *S*3. Computing the intersection of these databases, *S*1 ∩ *S*2 ∩ *S*3, without compromising privacy would enable us to combine the separate sets of information, which may allow the cause of the accident to be identified. Let us consider another situation. Several clinics, denoted as P*i* , maintain separate databases, represented as *Si* . The clinics wish to know the patients they have in common to enable them to share treatment details; however, P*i* should not be able to access any information about patients not stored in their own dataset. In this case, the intersection of the set must not reveal private information.

These examples illustrate the need for the Multiparty Private Set Intersection (MPSI) protocol [1–4]. MPSI is executed by multiple parties who jointly compute the intersection of their private datasets. Ultimately, only designated parties can access this intersection. Previous protocols are impractical because the bulk of the computation depends on the number of players. One previous study required the size of the datasets maintained by the different players to be equal [1, 2]. Another study [3] computed only the approximate number of intersections, whereas other researchers [4] required more than two trusted third-parties.

In this section, we propose a practical MPSI with the following features:

1. The size of the datasets maintained by each party is independent of those maintained by the other parties.

2. The computational complexity for each party is independent of the number of parties. This is accomplished by introducing an outsourcing provider, O. In fact, all computations related to the number of parties are carried out by O. Thus, the number of parties is irrelevant.

## *3.1.2 Preliminaries*

In this section, we summarize the DDH assumption, Bloom filter, and ElGamal encryption. We consider security according to the honest-but-curious model [5]: all players act according to their prescribed actions in the protocol. A protocol that is secure in an honest-but-curious model does not allow any player to gain information about other players' private input sets, besides that that can be deduced from the result of the protocol. Note that the term *adversary* here refers to insiders, i.e., protocol participants. Outsider adversaries are not considered. In fact, behavior by outsider adversaries can be mitigated via standard network security techniques.

Our protocol is based on the following security assumption.

**Definition 3.1** (*DDH Assumption*) Let *t* be a security parameter. A decisional Diffie– Hellman (DDH) parameter generator IG is a probabilistic polynomial time (ppt) algorithm, a finite field F*p*, and a basepoint *g* ∈ F*p* with prime order *q*. We say that IG satisfies the *DDH assumption* if |*p*1 − *p*2| is negligible (in κ) for all ppt algorithms *A*, where *p*1 = Pr[(F*p*, *g*) ← IG(1κ); *y*1 = *gx*1 , *y*2 = *gx*2 ← F*p* : *A*(F*p*, *g*, *y*1, *y*2, *gx*1 *x*2 ) = 0] and *p*2 = Pr[(F*p*, *g*) ← IG(1κ); *y*1 = *gx*1 , *y*2 = *gx*2 , *z* ← F*p* : *A*(F*p*, *g*, *y*1, *y*2,*z*) = 0].

A Bloom filter [6], denoted by BF, consists of *m* arrays and has a space-efficient probabilistic data structure. The BF can check whether an element *x* is included in a set *S* by encoding *S* with at most *w* elements. The encoded Bloom filter of *S* is denoted by BF(*S*).

The BF uses a set of *k* independent uniform hash functions H = {*H*0,..., *Hk*−1}, where *Hi* : {0, 1}∗ −→ {0, 1,..., *m* − 1} for 0 ≤ ∀*i* ≤ *k* − 1. The BF consists of two functions: Const embeds a given set *S* into BF(*S*) and ElementCheck checks whether an element *x* is included in *S*. SetCheck, an extension of ElementCheck, checks whether an element *x* in *S* is in *S* ∩ *S* (see Algorithm 3.3). In Const (see Algorithm 3.1), BF(*S*) is constructed for a given set *S* by first setting all bits in the array to 0. To embed an element *x* ∈ *S* into the filter, the element is hashed using *k* hash functions to obtain *k* index numbers, and the bits at these indexes are set to 1, i.e., set BF[*Hi*(*x*)] = 1 for 0 ≤ *i* ≤ *k* − 1. In ElementCheck (see Algorithm 3.2), we check all locations where *x* is hashed; *x* is considered to be not in *S* if any bit at these locations is 0; otherwise, *x* is probably in *S*.

Some false positive matches may occur, i.e., it is possible that all BF[*Hi*(*y*)] are set to 1, but *y* is not in *S*. The false positive rate FPR is given by FPR = - 1 − 1 − 1 *m kwk* ≈ 1 − *e*−*kw*/*mk* [7]. However, false negatives are not possible, and so Bloom filters have a 100% recall rate.

Homomorphic encryption under addition is useful for processing encrypted data. A typical homomorphic encryption under addition was proposed by Paillier [8]. However, because Paillier encryption cannot reduce the order of a composite group, it is computationally expensive compared with the following ElGamal encryption. Our protocol requires matching without revealing the original messages, for which exponential ElGamal encryption (exElGamal) is sufficient [9]. In fact, the decrypted results of exElGamal encryption can distinguish whether two messages *m*1 and *m*2 are equal, although the exElGamal scheme cannot decrypt messages itself. Furthermore, exElGamal can be used in (*n*, *n*)-threshold distributed decryption [10], where the decryption must be performed by *all players acting together*. An exElGamal encryption with (*n*, *n*)-threshold distributed decryption consists of three functions: **Key generation**:

Let F*p* be a finite field, *g* ∈ F*p*, with prime order *q*. Each player P*i* chooses *xi* ∈ Z*q* at random and computes *yi* = *gxi* (mod *p*). Then, *y* = *n i*=1 *yi* (mod *p*) is a public key and each *xi* is a share for each player to decrypt a ciphertext.

## **Encryption**: thrEnc[*m*] → (*u*, *v*)

Let *m* ∈ Z∗ *q* be a message. Choose *r* ∈ Z*q* at random, and compute both *u* = *gr* (mod *p*) and *v* = *gm yr* (mod *p*) for the input message *m* ∈ Z*q* and a public key *y*. Output (*u*, *v*) as a ciphertext of *m*.

**Decryption**: thrDec[(*u*, *v*)] → *gm*

Each player P*i* computes *zi* = *uxi* (mod *p*). All players then compute *z* = *n i*=1 *zi* (mod *p*) jointly.1 Finally, each player can decrypt the ciphertext as *gm* = *v*/*z* (mod *p*).

ExElGamal encryption with (*n*, *n*)-threshold decryption has the following features: (1) homomorphic under addition: Enc(*m*1)Enc(*m*2) = Enc(*m*1 + *m*2)for messages *m*1, *m*2 ∈ Z*p*.

(2) homomorphic under scalar operations: Enc(*m*)*k* = Enc(*km*) for a message *m* and *k* ∈ Z*q* .

## *3.1.3 Previous Work*

This section summarizes prior works on PSI between a server and a client and MPSI among *n* players. In PSI, let *S* = {*s*1,...,*sv*} and *C* = {*c*1,..., *cw*} be server and client datasets, respectively, where |*S*| = *v* and |*C*| = *w*. In MPSI [1], we assume that each player holds the same number of datasets.

**PSI protocol based on polynomial representation:** The main idea is to represent the elements in *C* as the roots of a polynomial. The encrypted polynomial is sent to the server, where it is evaluated on the elements in *S*, as originally proposed by

1The computational complexity of *z* for each player can be made independent of the number of players in various ways. For example, set *z* = 1. P1 computes *z* = *z* · *z*1 and sends *z* to P2, P2 computes *z* = *z* · *z*2 and sends *z* to P3, and, finally, P*n* computes *z* = *z* · *zn* and shares *z* among all players. If we place all players in a binary tree, the communication complexity can be reduced, but each player's computational complexity is still independent of the number of players.

Freedman [11]. This is secure against honest-but-curious adversaries under secure public key encryption. The computational complexity is *O*(*vw*) exponentiations, and the communication overhead is *O*(*v* + *w*). The computational complexity can be reduced to *O*(*v* log log *w*) exponentiations using the balanced allocation technique [12]. Kissner and Song extended this protocol to MPSI [1], which requires *O*(*nw*2) exponentiations and *O*(*nw*) communication overhead. The MPSI version is secure against honest-but-curious and malicious adversaries (in the random oracle model) using generic zero-knowledge proofs.

**PSI protocol based on DH-key agreement:** The main objective here is to apply the DH-key agreement protocol [13]: after representing the server and client datasets as hash values {*h*(*si*)} and {*h*(*ci*)}, respectively, the client encrypts the dataset as {*h*(*ci*) *ri*} using a random number *ri* and sends the encrypted set to the server. The server encrypts the client set {*h*(*ci*) *ri*} and the server set {*h*(*si*)} using a random number *r*, which gives {*h*(*ci*) *rri*} and {*h*(*si*) *r*}, respectively, and returns these sets to the client. Finally, the client evaluates *S* ∩ *C* by decrypting to {*h*(*ci*) *r*}. This is secure against honest-but-curious adversaries under the DDH assumption. The total computational complexity is *O*(*v* + *w*) exponentiations, and the total communication overhead is *O*(*v* + *w*). The security of this approach can be enhanced against malicious adversaries in the random oracle model [14] by using a blind signature. However, no extensions to MPSI based on the DH-key agreement protocol have been proposed.

**PSI protocol based on** BF**:** This protocol was originally proposed in [4]. As the Bloom filter itself reveals information about the other player's dataset, the set of players is separated into two groups: input players who have datasets and privacy players who perform private computations under shared secret information. In [15], the privacy of each player's dataset is protected by encrypting each array of the Bloom filter using Goldwasser–Micali encryption [16]. In an honest-but-curious version, the computational complexity is *O*(*kw*) hash operations and *O*(*m*) public key operations, and the communication overhead is *O*(*m*), where *m* and *k* are the number of arrays and hash functions, respectively, used in the Bloom filter. The Bloom filter is used in the Oblivious transfer extension [17, 18] and the newly constructed garbled Bloom filter [19]. The main novelty in the garbled Bloom filter is that each array requires λ bits rather than the single bit needed for the conventional Bloom filter. To embed an element *x* ∈ *S* to a garbled Bloom filter, *x* is split into *k* shares with λ bits using XOR-based secret sharing (*x* = *x*1 ··· *xk* ). The *xi* are then mapped to an index of *Hi*(*x*). An element *y* is queried by subjecting all bit strings at *Hi*(*y*) to an XOR operation. If the result is *y*, then *y* is in *S*; otherwise, *y* is not in *S*. The client uses a Bloom filter BF(*C*), and the server uses a garbled Bloom filter GBF(*S*). If *x* is in *C* ∩ *S*, then for every position *i* it hashes to, BF(*C*)[*i*] must be 1 and GBF(*S*)[*i*] must be *xi* . Thus, the client can compute *C* ∩ *S*. The computational complexity of this method is *O*(*kw*) hash operations and *O*(*m*) public key operations, and the communication overhead is *O*(*m*). The number of public key operations can be changed to *O*(λ) using the Oblivious transfer extension. This is secure against honestbut-curious adversaries if the Oblivious transfer protocol is secure. Finally, some researchers have computed the approximate number of multiparty set unions [3].

## *3.1.4 Practical MPSI*

This section presents a practical MPSI that is secure under the honest-but-curious model.

#### **<IP_ADDRESS> Notation and Privacy Definition**

In the remainder of this paper, the following notations are used.

We introduce an outsourcing provider O to reduce the computational burden on all players. The dealer has no information regarding the elements of any player's set. The privacy issues faced by MPSI with an outsourcing provider can be informally written as follows.

**Definition 3.2** (*MPSI privacy*) An MPSI scheme with an outsourcing provider O is player-private if the following two conditions hold:

#### **<IP_ADDRESS> Proposed MPSI**

Our MPSI comprises four phases: (i) initialization, (ii) Bloom filter construction and the encryption of P*i* data, (iii) the O's randomization of thrEnc(IBF(∪*Si*) − **n**), and (iv) the computation of ∩P*i* . The computation of ∩P*i* consists of three steps: (a) joint decryption of an (*n*, *n*)-threshold exElGamal among *n* players, (b) Bloom filter check, and (c) output intersection.

Figure 3.1 shows an overview of our protocol after the initialization phase. The system parameters of a finite field F*p* and a basepoint *g* ∈ F*p* with order *q* for an

**Fig. 3.1** Overview of our MPSI

(*n*, *n*)-threshold exElGamal encryption (thrEnc, thrDec) are provided to both P*i* and O. For the Bloom filter, Const(*S*) and SetCheck(BF, *S* ) are only provided to P*i* , where the array size is *m* and *k* independent hash functions are used.

To encrypt, randomize, or subtract a vector such as a Bloom filter BF = [*a*0,..., *am*−1], each location is encrypted, randomized, or subtracted independently:

> thrEnc(BF) = [thrEnc(*a*0), . . . , thrEnc(*am*−1)], **r**BF = [*r*0*a*0,...,*rm*−1*am*−1], or BF − **r** = [*a*0 − *r*0,..., *am*−1 − *rm*−1]

for **r** = [*r*0,...,*rm*−1] ∈ Z*m q* .

Our protocol proceeds as follows.

## **Initialization:**

## **Construction and encryption of** BF(*Si*) **− 1:**

$$\mathsf{thrEnc}\_{\mathsf{V}}(\mathsf{BF}(S\_{l})-\mathbf{1}) = [\mathsf{thrEnc}\_{\mathsf{V}}(\mathsf{BF}\_{l}[0]-\mathbf{1}), \dots, \mathsf{thrEnc}\_{\mathsf{V}}(\mathsf{BF}\_{l}[m-1]-\mathbf{1})],$$

where *y* is an *n*-player public key.

3. P*i* sends thrEnc*y* (BF(*Si*) − **1**) to O.

## **Randomization of** thrEnc(IBF(∩*Si*) − **n**)**:**

1. O encrypts IBF(∩*Si*) − **n** without knowing IBF(∩*Si*) using an additive homomorphic feature and multiplying by thrEnc*y* (BF(*Si*) − **1**) as follows:

$$\text{thrEnc}\_{\mathbf{y}}(\mathsf{lBF}(\cap S\_{i}) - \mathbf{n}) = \prod\_{i=1}^{n} \mathsf{thrEnc}\_{\mathbf{y}}(\mathsf{BF}(S\_{i}) - \mathbf{1}) \dots$$

2. O randomizes thrEnc*y* (IBF(∩*Si*) − **n**) by **r** = [*r*0,...,*rm*−1] ∈ Z*m q* :

$$(\mathfrak{thrFun}\_{\circ}(\mathfrak{r}(\mathsf{lBF}(\cap S\_{i}) - \mathsf{n})) = (\mathfrak{thrFun}\_{\circ}(\mathsf{lBF}(\cup S\_{i}) - \mathsf{n}))^{\mathsf{r}}.$$

3. O broadcasts thrEnc*y* (**r**(IBF(∩*Si*) − **n**)) to P*i* .

## **Computation of** ∩*Si***:**

The above protocol satisfies the correctness requirement. This is because each array position of thrEnc*y* (**r**(IBF(∩*Si*) − **n**))is decrypted to 1, where *x* ∈ ∩*Si* is embedded by each hash function; however, each array position for which *x* ∈ ∩/ *Si* is embedded by each hash function is decrypted to a random value.

## **<IP_ADDRESS> Security Proof**

The security of our MPSI protocol is as follows.

**Theorem 3.1** *For any coalition of fewer than n players, the MPSI is player-private against an honest-but-curious adversary under the DDH assumption.*

*Proof* The views of P*i* and O, that is,

thrEnc*y* (BF*m*,*k* (*Si*)) = [thrEnc*y* (BF*i*[0]), . . . , thrEnc*y* (BF*i*[*m* − 1])],

are shown to be indistinguishable from a random vector **r** = [*r*0,...,*rm*−1] ∈ Z*m q* . Assume that a polynomial-time distinguisher D outputs 0 when the views are presented as a random vector and outputs 1 when they are constructed in MPSI, thrEnc(BF*i*[0]), . . . , thrEnc(BF*i*[*m* − 1]). We show that a simulator SIM that solves the DDH assumption can be constructed as follows.

Upon receiving a DDH challenge (*g*, *g*α, *g*β, *g*γ), SIM executes the following:

1. Set *n*-player public key *y* = *g*β and choose random numbers *d*0,..., *dm*−1 and *r*1,...,*rm*−1 from Z*q* .

2. Send [(*g*α, *gd*0 · *g*γ), ((*g*α) *r*1 , *gd*1 · (*g*γ) *r*1 ), . . . , ((*g*α) *rm*−1 , *gdm*−1 · (*g*γ) *rm*−1 )] as thrEnc*y* (BF*m*,*k* (*Si*)) to D.

If (*g*, *g*α, *g*β, *g*γ) is a DH-key-agreement-protocol element, i.e., γ = αβ, then thrEnc*y* (BF*m*,*k* (*Si*)) is distributed in the same way as when constructed by the MPSI scheme. Thus, D must output 1. If (*g*, *g*α, *g*β, *g*γ) is not a DH tuple, then thrEnc*y* (BF*m*,*k* (*Si*)) is randomly distributed, and D has to output 0. Therefore, SIM can use the output of D to respond to the DDH challenge correctly. Therefore, D can answer correctly with negligible advantage over random guessing. Furthermore, as all inputs of each player are encrypted until the decryption is performed, and decryption cannot be performed by fewer than *n* players, nothing can be learned by any player prior to decryption.

As for the views of thrEnc*y* (**r**(IBF*m*,*k* (∩*Si*) − **n**)), the same argument holds. Therefore, for any coalition of fewer than *n* players, MPSI is player-private under the honest-but-curious model.

Next, we present *d*-and-over MPSI. The procedures of *d*-and-over MPSI are the same as those of MPSI until O computes thrEnc*y* (IBF(∩*Si*)). Thus, we describe the procedure after O computes thrEnc*y* (IBF(∩*Si*)).

**Encryption of** -**-subtraction of** IBF(∩*Si*)**:** O executes the following:

*d***-and-over MPSI computation:** P*i* executes the following:

The correctness of *d*-and-over MPSI follows from the fact that if an element *x* ∈ ∩-*S* for *d* ≤ ∃- ≤ *n*, the corresponding array locations in IBF(∩*Si*) − **j** for - ≤ ∃ *j* ≤ *n*, where *x* is mapped by *k* hashes, are an encryption of 0, which are decrypted to 1; otherwise, it is an encryption of randomized value.

## *3.1.5 Efficiency*

Although many PSI protocols have been proposed, to the best of our knowledge, relatively few consider the multiparty scenario [1–4]. Our target is multiparty private set intersection, and the final result must be obtained by *all* players acting together, without a trusted third-party (TTP). Among previous MPSI protocols, the approach in [3] computes only the approximate number of intersections, and that in [4] requires

**Table 3.1** Efficiency of [1] and the proposed protocol

more than two TTPs. In contrast, [2] follows almost the same method as [1] and thus has a similar complexity. The only difference exists in the security model. Hence, we only compare our scheme with that of [1].

The computational and communication efficiency of the proposed protocol and [1] are compared in Table 3.1. These approaches are secure against honest-but-curious adversaries without a TTP under exElGamal encryption (DDH security) and Paillier encryption (Decisional Composite Residue (DCR) security), respectively. The Bloom filter parameters (*m*, *k*) used in our protocol are set as follows: *k* = 80 and *m* = 80ω/ ln 2, where ω is the maximum |*Si*| = ω*i* . Then, the probability of false positives is given by *p* = 2−80.

Our MPSI uses the Bloom filter for the computations performed by P*i* and the integrations performed by the O. The use of a Bloom filter eliminates the restriction on set size. Thus, in our MPSI, the set size of each player is flexible. However, P*i*'s computations consist of Bloom filter construction, joint decryption, and Bloom filter check. Neither the computations related to the Bloom filter nor the joint decryption depends on the number of players, as shown in Sect. 3.1.2. In summary, the computational complexity of operations performed by P*i* is *O*(ω*i*). All player-dependent data are sent to O, who integrates *n i*=1 thrEnc*y* (IBF(∩*Si*)) without decryption. Therefore, the computational complexity of operations performed by O is *O*(*n*ω).

## *3.1.6 System and Performance*

PSI or MPSI implicitly assumes that every attendee can provide data, any attendee can retrieve data from the shared data, and all attendees can communicate with each other. If PSI or MPSI is implemented straightforwardly, such implementation should become a system like a peer-to-peer (P2P) network system. Although a fully distributed system like P2P network has attractive features, such as high availability and scalability, it incurs some unfavorable features.

The network address and port translation (NAPT) is a major obstacle for P2P network systems. Modern P2P network systems take advantage of NAPT traversal technologies to overcome NAPT, but it should be costly to make the architecture complex. The absence of trusted node is also an obstacle for attendee or group management. Making consensus on a P2P network system is difficult or highly

**Fig. 3.2** P2P and client server model

costly. Additionally, unpredictable node joining and leaving are reasons that make the P2P network systems complex. To avoid the complexities of P2P networks, we designed a system based on the client server model.

Then, we discuss the design of PSI or MPSI's client server model. There are 2 main functionalities of PSI or MPSI: (1) First, the data sharing is a functionality for sharing data among attendees. (2) Next, the data retrieving from the shared data is a functionality. Any attendee can retrieve data from the shared data, but the retrieving avoids correcting privacy sensitive data by using privacy preserving techniques described above.

However, we do not assume that every attendee provides and retrieves data. Imagine that an incident analysis situation in which data are provided by several organizations which employ labor and operate some machines, and a research institute collects data from the organizations and analyzes it. In such a situation, data providers do not need the data retrieving functionality, and data analysts do not need the data sharing functionality.

Therefore, we define 3 roles for our MPSI application design as follows.

From the perspective of privilege separation, defining and separating roles are significant. Figure 3.2 shows a P2P network model and our client server model. As show in this figure, every P2P network node is connected to each other and can provide and retrieve data, but parties only provide data and clients only retrieve data in the client server model. The dealer forwards requests from parties and clients and provides other functionalities that are not specified by PSI or MPSI. For example, attendee or group management, user authentication, and data logging should be performed by the dealer.

Figure 3.3 shows an example sequence diagram of our MPSI application. In this figure, there are 2 parties, 1 client, and 1 dealer. First of all, parties 1 and 2 join the dealer (join p1 and p2). A party must join before providing data, and it must be performed only once at initialization. After that, the client sends a request of data retrieval to the dealer (cl req), and parties send a request to confirm whether the dealer

**Fig. 3.3** Sequence diagram of MSPI application

**Fig. 3.4** Performance

received data retrieval requests by clients (new-req p1 and p2). Then, the parties and the dealer generate keys, share the keys, encrypt data, and decrypt data (gpk p1 and p2, enc p1 and p2, and dec p1 and p2). Finally, the client gets the result from the dealer.

We measured performance of our MPSI application written in Python language on an Amazon's EC2 server (2.4 GHz CPU, 1 GB Memory). Figure 3.4 shows the results when there are from 2 to 4 parties which provide data including 10,000 entries. The results show that it takes approximately 280 s to accomplish data retrieval and that the computational amount does not depend on the number of parties.

## **3.2 Classification**

In this section, we present a secure classification protocol, a type of secure computation protocols. We assume two participants Alice and Bob of the protocol. Alice has private data *x*, and Bob has a classification model *C*. The task is that Alice learns *C*(*x*) at the end of the protocol while preserving the privacy of *x* and *C*. That is, Alice can learn only *C*(*x*) and Bob can learn nothing. Our construction is based on a code-based public-key encryption scheme called HQC [20], which is a candidate of NIST's Post-Quantum Cryptography standardization [21].

## *3.2.1 Error-Correcting Code*

We start with several fundamental notions for error-correcting codes.

**Definition 3.3** (*Linear code*) A code C such that *c*1 + *c*2 ∈ C always holds for any codeword *c*1, *c*2 ∈ C is called a linear code. The code C of code length *n* and information bit number *k* is described as "a" code.

**Definition 3.4** (*Generation matrix*) For matrices G ∈ F*k*×*n*,G that satisfy

$$\mathbb{C} = \{\mathfrak{m} \cdot \mathbb{G} | \mathfrak{m} \in \mathbb{F}^k\} \tag{3.1}$$

is called a generator matrix. The generator matrix is the basis of linear codes and generates all codewords.

**Definition 3.5** (*Parity check matrix*) For a matrix **H** ∈ F(*n*−*k*)×*n*, **H** that satisfies

$$\mathbb{C} = \{ \mathbf{x} \in \mathbb{F}^n | \mathbf{H} \cdot \mathbf{x}^\top = \mathbf{0} \}\tag{3.2}$$

is called a parity check matrix.

**Definition 3.6** (*Cyclic matrix*) When *x* = (*x*1,..., *xn*) ∈ F*n*, the circulant matrix for *x* is defined as

$$\mathbf{rot}(\mathbf{x}) = \begin{pmatrix} \boldsymbol{x}\_{1} & \boldsymbol{x}\_{n} & \cdots & \boldsymbol{x}\_{2} \\ \boldsymbol{x}\_{2} & \boldsymbol{x}\_{1} & \cdots & \boldsymbol{x}\_{3} \\ \vdots & \vdots & \ddots & \vdots \\ \boldsymbol{x}\_{n} & \boldsymbol{x}\_{n-1} & \cdots & \boldsymbol{x}\_{1} \end{pmatrix} \in \mathbb{F}^{n \times n} \tag{3.3}$$

In addition, the multiplication of two polynomials *x*, *y* has the following properties:

$$\begin{aligned} \mathbf{x} \cdot \mathbf{y} &= \mathbf{x} \times \mathbf{rot}(\mathbf{y})^\top \\ &= (\mathbf{rot}(\mathbf{x}) \times \mathbf{y}^\top)^\top \\ &= \mathbf{y} \times \mathbf{rot}(\mathbf{x})^\top \\ &= \mathbf{y} \cdot \mathbf{x} .\end{aligned} \tag{3.4}$$

**Definition 3.7** (*Cyclic shift*) The operation of shifting (*c*0,..., *cn*−1) to the right by one position with respect to *n*-dimensional vector *ci* (*i* = 0,..., *n* − 2) and moving *cn*−1 to the beginning of the vector is called cyclic shift. That is, for any *n* dimensional vector (*c*0,..., *cn*−1), it is a mapping σ : (*c*0, *c*1,..., *cn*−1) → (*cn*−1, *c*0,..., *cn*−2).

**Definition 3.8** (*Quasi-cyclic code*) Let *c* = (*c*0,..., *cs*−1) ∈ (F*n* 2)*s* be an arbitrary codeword of code C and let σ be a cyclic shift operation. If (σ(*c*0), . . . , σ(*cs*−1) ∈ C, C is called the *s*-quasi-cyclic code. In particular, when *s* = 1, C is called a cyclic code.

**Definition 3.9** (*Systematic quasi-cyclic code*) An *s*-quasi-cyclic [*sn*, *n*] code is called a systematic quasi-cyclic code if it has a parity check matrix of the form.

$$H = \begin{bmatrix} I\_n & 0 & \cdots & 0 & A\_1 \\ 0 & I\_n & & A\_2 \\ & & \ddots & & \vdots \\ 0 & & \cdots & I\_n & A\_{s-1} \end{bmatrix} \tag{3.5}$$

Here, *A*1,..., *As*−1 is an *n* × *n* circulant matrix.

## *3.2.2 Security Assumptions*

As mentioned above, the security of the public-key cryptosystem HQC is based on the computational difficulty of the quasi cyclic syndrome decoding problem. More specifically, its security is proved under the following quasi cyclic syndrome decoding decision assumptions.

**Definition 3.10** (*quasi-cyclic syndrome decoding assumption*) The quasi-cyclic syndrome decoding decision problem of a *s*-quasi-cyclic code in which *n* and *w* are integers and the number of blocks is *s* ≥ 2 is (**H**, *y*) when the parity check matrix **H** \$ ←− F(*sn*−*n*)×*sn* and the matrix *y* \$ ←− F*sn*−*n* of random systematic quasi-cyclic code are given, every efficient algorithm distinguish only with negligible probability whether it is quasi-cyclic syndrome decoding distribution or the uniform distribution over F(*sn*−*n*)×*sn* × F(*sn*−*n*) .

As will be described later, since the security of the secure computation protocol proposed in this section is reduced to the security of HQC, the secure computation protocol of this section is proved to be secure under this assumption as well as under HQC.

## *3.2.3 Security Requirements for 2PC*