Skip to content
BY-NC-ND 3.0 license Open Access Published by De Gruyter May 8, 2019

Polynomial expressions of p-ary auction functions

  • Shizuo Kaji ORCID logo , Toshiaki Maeno , Koji Nuida ORCID logo EMAIL logo and Yasuhide Numata ORCID logo

Abstract

One of the common ways to design secure multi-party computation is twofold: to realize secure fundamental operations and to decompose a target function to be securely computed into them. In the setting of fully homomorphic encryption, as well as some kinds of secret sharing, the fundamental operations are additions and multiplications in the base field such as the field 𝔽2 with two elements. Then the second decomposition part, which we study in this paper, is (in theory) equivalent to expressing the target function as a polynomial. It is known that any function over the finite prime field 𝔽p has a unique polynomial expression of degree at most p-1 with respect to each input variable; however, there has been little study done concerning such minimal-degree polynomial expressions for practical functions. This paper aims at triggering intensive studies on this subject, by focusing on polynomial expressions of some auction-related functions such as the maximum/minimum and the index of the maximum/minimum value among input values.

MSC 2010: 94A60; 68R05; 12Y05

1 Introduction

Secure multi-party computation (or simply secure computation) is a cryptographic technology that enables two or more parties to jointly compute some function value(s) from their local inputs in a way that, during a computation, each party can know the party’s local output value but cannot learn anything about the other parties’ local inputs/outputs. Among several existing frameworks to realize secure computation, some of the major directions in this area are those based on fully homomorphic encryption (FHE) [5] and on secret sharing (SS) [8]. In FHE-based secure computation (e.g., [2, 4]), the primitive data type is usually the binary field 𝔽2, and a target function to be securely computed has to be implemented by combining the addition and multiplication in 𝔽2 (each being equivalent to bit operations XOR and AND, respectively). On the other hand, in SS-based secure computation (e.g., [1]), a major primitive data type is again 𝔽2 and a target function has also to be implemented by combining the addition and multiplication. We note that there is also an FHE scheme that can directly handle the finite prime field 𝔽p for small prime p>2 as well [7]; and the basic idea of SS-based secure computation can be extended straightforwardly to the primitive data type 𝔽p instead of 𝔽2. Regarding this, in this paper we treat 𝔽p for a general prime p (not just 𝔽2) as the base field of the argument.

In the two frameworks for secure computation mentioned above, a target function is supposed to be decomposed into a combination of addition and multiplication in the field 𝔽p; this is (in theory) equivalent to expressing the function as a polynomial over the field 𝔽p. Moreover, the multiplication in 𝔽p is significantly more expensive than the addition in 𝔽p when realized as secure computation. Indeed, in the FHE-based framework, the multiplication increases the “noise” of the ciphertexts (to be cancelled later by an inefficient “bootstrapping” procedure) much more rapidly than the addition; while in the SS-based framework, the multiplication requires communication between the parties, in contrast to the addition which can be done by local computation at each party only. Hence, we may naively expect that an expression of the target function as a low degree polynomial would involve less multiplications, and thus yield efficient secure computation for the function. On the other hand, it is known that any function over the prime field 𝔽p can be expressed, in a unique manner, as a polynomial over 𝔽p having degree at most p-1 with respect to each input variable. We refer to such a polynomial as the minimal polynomial of the function.

However, such minimal polynomial expressions for practical functions were not studied well in the literature. One of the aims of this paper is to trigger intensive studies on this subject. We emphasize that, though the existence of the minimal polynomial expression of any function over 𝔽p is theoretically guaranteed, it is still a non-trivial task to concretely compute the minimal polynomial expression. Among the rare studies of the minimal polynomials in the literature, the most successful and theoretically interesting result to the authors’ best knowledge is the one by Sturtivant and Frandsen [9, Theorems 9.1 (a) and 11.2]; they showed that the carry function in multiplication of p-ary integers has a polynomial expression consisting of significantly fewer monomials, which uses number-theoretic objects such as the Bernoulli numbers and Wilson’s quotient. (See also [6] for a different approach to the result and also for an expression of the carry function in the case of addition of p-ary integers.)

In this paper, we study minimal polynomial expressions of a certain kind of functions specified below. These functions are expected to be useful in some practical procedures such as auction and voting; here we refer to those functions as “auction functions”. The types of auction functions considered in this paper and our results are summarized as follows.

In Section 3, we deal with the maximum function max(x) for inputs x=(x0,x1,,xn-1)(𝔽p)n. We provide a general (but less concrete) formula for the minimal polynomial for max(x) for any prime p, and also give more concrete minimal polynomial expressions of max(x) for p=2,3. Similar results are also given for the minimum function min(x).

In Section 4, we deal with the function argmax(x) that returns the least index i satisfying xi=max(x). More precisely, to handle the integer-valued function argmax(x), we consider each, say r-th, digit argmax(r)(x) of the p-ary expression of the value argmax(x). We provide a general formula for the minimal polynomial for argmax(r)(x) for any r0 and any prime p, and also write down the formula for the special cases p=2,3. Similar results are also given for the function argmin(x) that returns the least index i satisfying xi=min(x).

In Section 5, we focus on the case of two inputs, x=(x0,x1), and provide minimal polynomial expressions of argmax(x0,x1)=argmax(0)(x0,x1) and max(x0,x1) for any p. (We note that, only the cases for small p such as p=2,3 for the function max(x) are discussed in Section 3.)

In Section 6, we briefly study two other functions ismax(y;x) and nummax(x), where ismax(y;x) for y𝔽p and x=(x0,,xn-1)(𝔽p)n returns 1 if y=max(x) and returns 0 otherwise, and nummax(x) returns the number of indices i satisfying xi=max(x). We also discuss the cases for small p such as p=2,3 in slightly more detail.

Finally, in Section 7, we discuss about the possible extension of our results on the auction functions with single-digit inputs xi𝔽p to the case of multi-digit inputs such as xi=(xi,0,xi,1,,xi,-1)(𝔽p) which is regarded as an integer xi,0+xi,1p++xi,-1p-1. While leaving most of the cases as future research topics, in Section 7 we provide as an example a general formula for the multi-digit version of the function argmax(x) and write down the minimal polynomial expression for the smallest case p==2. We also give the minimal polynomial expression for the multi-digit version of the function ismax(y;x) for the smallest case p==2 as well.

2 Notation and Basic functions

In this section, we fix some notations used throughout the paper. Let p be a prime. A vector (x0,x1,,xn-1) of length n over the field 𝔽p is often denoted by x. We introduce a linear ordering < on 𝔽p by naturally identifying 𝔽p with the (naturally ordered) subset {0,1,,p-1} of . We define an involution on 𝔽p by x¯=p-1-x for x𝔽p, and extend it coordinate-wisely on (𝔽p)n. We denote by ei(x) the i-th elementary symmetric polynomial of x0,x1,,xn-1 so that i=0n-1(1+xi)=i=0nei(x). For an integer k0, its r-th digit in the p-ary expansion is denoted by k(r); that is, k=r=0k(r)pr with k(r){0,1,,p-1} for each r.

Given any logical proposition P(x) for an object x, we define its truth function by

χP(x)={1(P(x) is true),0(otherwise),

which is often abbreviated as χP(x)=χ(P). We frequently use the same symbol for a function and its polynomial expression; see below for some examples.

Example 2.1.

For t𝔽p and a variable x, Fermat’s little theorem implies that the minimal polynomial for the delta functionδt(x)=χ(x=t) is given by

δt(x)=1-(x-t)p-1=-i=1p-1(x-t+i)

(the last equality follows from Wilson’s theorem: (p-1)!-1(modp)). Similarly, the minimal polynomial for the low-pass functionLt(x)=χ(x<t) is given by

Lt(x)=0k<tδk(x)=0k<t(1-(x-k)p-1).

For notational convenience, we extend the definition of the low-pass function Lt(x) to the case t=p, by setting Lp(x)=1 (note that the relation x<pas integers holds for any x𝔽p).

3 Polynomial expressions of the max and the min functions

For a vector x=(x0,x1,,xn-1)(𝔽p)n, let max(x) (respectively, min(x)) denote the maximum (respectively, minimum) among the n values x0,x1,,xn-1.

First, we note that for each a𝔽p, the condition at is satisfied for precisely a of the p-1 values t=1,,p-1. Based on this fact and using the functions in Example 2.1, we obtain the minimal polynomial of max(x) as follows.

Proposition 3.1.

The minimal polynomial of max is given by

max(x)=1tp-1χ(xit for some i)=1tp-1(1-i=0n-1Lt(xi)).

In particular, when p=2 this simplifies (by noticing L1(xi)=1+xi):

Corollary 3.2.

When p=2, the minimal polynomial of max(x) is given by

max(x)=i=0n-1(1+xi)-1=i=1nei(x).

However, when p>2, the general expression in Proposition 3.1 consists of a lot of terms. We compute a more concise expression for p=3 later.

On the other hand, we note that max(x)+1=0 if xi=p-1 for some xi. This implies that the minimal polynomial of max(x)+1 has 1+xi as a factor for every i. Therefore, we have

max(x)=fn(x)i=0n-1(1+xi)-1=fn(x)i=0nei(x)-1

for some polynomial fn(x) in which each variable xi has degree at most p-2. In particular, this observation yields another proof of Corollary 3.2 (where p=2).

Now we give the following result for the case p=3.

Proposition 3.3.

When p=3, a minimal polynomial expression for max(x) is given by

max(x)=i=0n/2e2i(x)i=0nei(x)-1.

Proof.

Write the right-hand side as P(x). As the minimality condition on the degree is satisfied for P(x), it suffices to verify max(x)=P(x) for any x(𝔽p)n. First note that i=0n-1(1-xi)=i=0nei(-x)=i=0n(-1)iei(x), where we write -x=(-x0,-x1,,-xn-1), therefore i=0n-1(1+xi)+i=0n-1(1-xi)=2i=0n/2e2i(x). This implies (since 2-1=2 in 𝔽3)

P(x)=i=0n/2e2i(x)i=0nei(x)-1=2(i=0n-1(1+xi)2+i=0n-1(1-xi2))-1.

When max(x)=2, there exists an index i with xi=2, and we have 1+xi=0 and 1-xi2=0 for such i. This implies that P(x)=-1=2 in this case. When max(x)=1, we have i=0n-1(1+xi)2=1 as xi{0,1} for every i, and i=0n-1(1-xi2)=0 as xi=1 for at least one i. This implies that P(x)=2-1=1 in this case. Finally, when max(x)=0, we have i=0n-1(1+xi)2=1 and i=0n-1(1-xi2)=1 as xi=0 for every i. This implies that P(x)=22-1=0 in this case. Hence, the claim holds. ∎

To obtain a minimal polynomial expression for min(x), we exploit the following duality between the functions max and min: min(x)¯=max(x¯) for any x(𝔽p)n. Thus, a minimal polynomial expression for max converts to that of min and vice versa. For example, Corollary 3.2 and Proposition 3.3 imply the following.

Corollary 3.4.

When p=2, a minimal polynomial expression for min(x) is given by

min(x)=i=0n-1xi=en(x).

When p=3, a minimal polynomial expression for min(x) is given by

min(x)=i=0n-1xi2+i=0n-1xi(1-xi)=en(1+i=1n(-1)iei+en).

For the next case p=5, minimal polynomial expressions of max(x) for small values of n in terms of elementary symmetric polynomials can be determined by direct calculation:

Example 3.5.

When p=5, the following are minimal polynomial expressions:

max(x0,x1)=(1+e1+e2)(1+2e12e2+4e1e2+e2)-1,
max(x0,x1,x2)=(1+e1+e2+e3)(1+2e12e2+e1e2e3+2e1e32+e22e3
+2e2e32+4e1e2+3e1e3+e2e3+3e32+e2)-1.

However, it seems to be difficult to obtain a general formula (such as Proposition 3.3) for p5. The function max(x) with n=2 for any p will be revisited in Section 4.

Remark 3.6.

The function max(x) is a symmetric function (in the variables x0,x1,,xn-1), and satisfies max(x,0)=max(x) and an “associativity” in the following sense:

max(x0,x1,,xn-1,xn)=max(max(x0,,xn-1),xn)=max(x0,max(x1,,xn)).

By using this property recursively, a minimal polynomial expression of the function max with two variables (i.e., for n=2) yields a polynomial expression of the function max with any number of variables (i.e., for any n). However, the polynomial thus obtained is not the minimal polynomial for max(x) in general.

4 Polynomial expressions of the argmax function

Let argmax(x) be the least integer i0 with xi=max(x). Note that argmax(x) takes a value in {0,1,,n-1}; to handle this function as a function over 𝔽p, we define, for r0,

argmax(r):(𝔽p)n𝔽p,argmax(r)(x)=argmax(x)(r),

where argmax(x)(r) is the r-th digit in the p-ary expansion of argmax(x).

We note that argmax(x) is equal to the number of integers 0in-2 such that xj<max(x) for every 0ji; indeed, the latter condition is satisfied if and only if 0iargmax(x)-1. This implies (since argmax(x)=0 if max(x)=0) that

argmax(x)=t=1p-1(χ(max(x)=t)i=0n-2jiχ(xj<t))=t=1p-1i=0n-2χ(max(x)=t)jiχ(xj<t),

which is considered as an integer rather than an element of 𝔽p. We note moreover that, conditioned on the case where xj<t for every ji, we have max(x)=t if and only if xj<t+1 for every j>i and xj=t for some j>i. Now the equality above implies

(4.1)argmax(x)=t=1p-1i=0n-2(jiχ(xj<t)j>iχ(xj<t+1)-j=0n-1χ(xj<t)),

again as an integer rather than an element of 𝔽p. Considering the right-hand side of (4.1) in 𝔽p yields the minimal polynomial of argmax(0)(x). Now we also have the following fact implied directly by the definition of argmax(r)(x):

(4.2)argmax(r)(x)=argmax(0)(max(x0,x1,,xpr-1),,max(xipr,xipr+1,,x(i+1)pr-1),),

where, in the right-hand side, the tuple x=(x0,,xn-1) is divided into blocks of pr consecutive components (the last block may consist of less than pr elements). Let S(r,n) be the set of indices for the last elements of all but the last blocks in x, namely,

S(r,n)={hpr-11h(n-1)/pr}.

Then, by combining (4.2) with (4.1), we have (in 𝔽p)

argmax(r)(x)=t=1p-1iS(r,n)(jiχ(xj<t)j>iχ(xj<t+1)-j=0n-1χ(xj<t))

where we used the fact (for any h, h, and s) that max(xh,xh+1,,xh)<s if and only if xj<s for every hjh. Since |S(r,n)|(n-1)(r)(modp), the equality above can be rewritten as

argmax(r)(x)=t=1p-1(iS(r,n)jiχ(xj<t)j>iχ(xj<t+1)-(n-1)(r)j=0n-1χ(xj<t)).

Hence, we have the following result.

Proposition 4.1.

Let S(r,n)={hpr-11h(n-1)/pr}. Then for x=(x0,,xn-1), the minimal polynomial for argmax(r)(x) is given by

argmax(r)(x)=t=1p-1(iS(r,n)j=0iLt(xj)k=i+1n-1Lt+1(xk)-(n-1)(r)j=0n-1Lt(xj)).

Remark 4.2.

Let argmin(x) be the function that returns the least index i with min(x)=xi. A minimal polynomial expression of the function argmin is obtained from that of the function argmax via the duality argmin(x)=argmax(x¯), similar to the case of the function min discussed in Section 3.

Below we write down the general formula in Proposition 4.1 for the case p{2,3}.

Example 4.3.

We consider the case p=2. Now the set S(r,n) is S(r,n)={h2r-11h(n-1)/2r}, and the relations L1(xj)=1+xj and L2(xj)=1 hold. Then Proposition 4.1 implies (since the characteristic of 𝔽p is now 2)

argmax(r)(x)=iS(r,n)j=0iL1(xj)+χ((n-1)(r)=1)j=0n-1L1(xj).

Moreover, by setting S(r,n)=S(r,n) if (n-1)(r)=0 and S(r,n)=S(r,n){n-1} if (n-1)(r)=1, we have the following minimal polynomial expression of argmax(r):

argmax(r)(x0,x1,,xn-1)=iS(r,n)(1+x0)(1+x1)(1+xi).

Example 4.4.

We consider the case p=3. Now the set S(r,n) is S(r,n)={h3r-11h(n-1)/3r}, and the relations L1(xj)=1-xj2, L2(xj)=(1+xj)2 and L3(xj)=1 hold. Then Proposition 4.1 yields the following minimal polynomial expression of argmax(r):

argmax(r)(x0,x1,,xn-1)=iS(r,n)j=0i(1-xj2)k=i+1n-1(1+xk)2-(n-1)(r)j=0n-1(1-xj2)
+iS(r,n)j=0i(1+xj)2-(n-1)(r)j=0n-1(1+xj)2,

or, equivalently,

argmax(r)(x0,x1,,xn-1)=iS(r,n)(j=0i(1-xj2)k=i+1n-1(1+xk)2+j=0i(1+xj)2)
-(n-1)(r)(j=0n-1(1-xj2)+j=0n-1(1+xj)2).

Finally, we also mention the following recursive relation:

argmax(r)(x0,,xn-1,xn)=argmax(r)(x0,,xn-1)(1-argmax(0)(max(x0,,xn-1),xn))
+n(r)argmax(0)(max(x0,,xn-1),xn),

implied by the definition of argmax(r) and the following fact:

argmax(x0,,xn-1,xn)={argmax(x0,,xn-1)if max(x0,,xn-1)xn,nif max(x0,,xn-1)<xn.

This formula yields a (in general, not minimal) polynomial expression of argmax(r)(x) from those of argmax(0)(x0,x1) and max(x).

5 Polynomial expressions of max and argmax functions for two variables

First we note that x0<x1 if and only if we have (as integers) x0¯+x1p, that is, argmax(0)(x0,x1) is equal to the carry to the next digit by the p-ary addition of two single-digit values x0¯ and x1. A minimal polynomial expression of this carry function, denoted by φ1, has been determined in [6, 7].

Lemma 5.1 ([6, 7]).

For y0,y1Fp, we have

φ1(y0,y1)=d=1p-1(-1)dd-1y0(y0-1)(y0-d+1)y1(y1-1)(y1-(p-d)+1),

where the d-1 in the right-hand side means the inverse of d as an element of Fp.

Combining this with argmax(0)(x0,x1)=φ1(x0¯,x1), we obtain the following proposition.

Proposition 5.2.

When n=2, a minimal polynomial expression of argmax(0)(x0,x1) is given by

argmax(0)(x0,x1)=d=1p-1d-1(x0+1)(x0+2)(x0+d)x1(x1-1)(x1-(p-d)+1).

Example 5.3.

By using Proposition 5.2, for small primes p, we have the following minimal polynomial expressions of argmax(0)(x0,x1):

when p=2,argmax(0)(x0,x1)=(x0+1)x1,
when p=3,argmax(0)(x0,x1)=-(x0+1)(x0-x1)x1,
when p=5,argmax(0)(x0,x1)=-(x0+1)(x02-x0x1+x0+x12)(x0-x1)x1,
when p=7,argmax(0)(x0,x1)=-(x04+5x03x1+2x03+3x02x12+x02x1+4x02+5x0x13
+6x0x12+3x0+x14)(x0+1)(x0-x1)x1.

We also have the following relation between the functions max and argmax deduced from their definitions.

Lemma 5.4.

We have

max(x)=i=0n-1xiχ(argmax(x)=i)

for any n. In particular, we have

max(x0,x1)=x0(1-argmax(x0,x1))+x1argmax(x0,x1).

A straightforward substitution of the result of Proposition 5.2 into the right-hand side of Lemma 5.4 yields an almost, but not yet minimal, polynomial expression of max(x0,x1). This expression can be converted to a minimal polynomial expression. Indeed, for p=2, the results above imply that max(x0,x1)=x0(1-(x0+1)x1)+x1(x0+1)x1, which is equal to the correct value x0+x1+x0x1 for any x0,x1𝔽p due to the relations x02=x0 and x12=x1. On the other hand, we have the following result for p>2.

Theorem 5.5.

When p3, we have the following minimal polynomial expression of max(x0,x1):

max(x0,x1)=(x1-x0)d=2p-2d-1(x0+1)(x0+2)(x0+d)x1(x1-1)(x1-(p-d)+1)
+x0+(x0+1)2(1-(x1+1)p-1)+(1-x0p-1)x12.

Proof.

Throughout the proof, a notation fg means that f and g define an identical function on 𝔽p. First, since p3, Proposition 5.2 implies

x0argmax(x0,x1)=x0d=1p-1d-1(x0+1)(x0+2)(x0+d)x1(x1-1)(x1-(p-d)+1)
=x0d=2p-2d-1(x0+1)(x0+2)(x0+d)x1(x1-1)(x1-(p-d)+1)
+x0(x0+1)x1(x1-1)(x1-(p-2))
-x0(x0+1)(x0+2)(x0+p-1)x1,

and we have x0(x0+1)(x0+2)(x0+p-1)x10 for the last term above. Similarly, we have

x1argmax(x0,x1)=x1d=1p-1d-1(x0+1)(x0+2)(x0+d)x1(x1-1)(x1-(p-d)+1)
=x1d=2p-2d-1(x0+1)(x0+2)(x0+d)x1(x1-1)(x1-(p-d)+1)
+(x0+1)x12(x1-1)(x1-(p-2))
-(x0+1)(x0+2)(x0+p-1)x12,

and, for the last two terms above, we have

(x0+1)x12(x1-1)(x1-(p-2))-(x0+1)x1(x1-1)(x1-(p-2)),
(x0+1)(x0+2)(x0+p-1)x12(p-1)!δ0(x0)x12=-(1-x0p-1)x12,

where we used x12x1((xi-(p-1))-1) and Wilson’s theorem (p-1)!-1(modp).

By combining these results to Lemma 5.4, we have

max(x0,x1)=x0-x0argmax(x0,x1)+x1argmax(x0,x1)
(x1-x0)d=2p-2d-1(x0+1)(x0+2)(x0+d)x1(x1-1)(x1-(p-d)+1)
+x0-x0(x0+1)x1(x1-1)(x1-(p-2))
-(x0+1)x1(x1-1)(x1-(p-2))+(1-x0p-1)x12
=(x1-x0)d=2p-2d-1(x0+1)(x0+2)(x0+d)x1(x1-1)(x1-(p-d)+1)
+x0-(x0+1)2x1(x1-1)(x1-(p-2))+(1-x0p-1)x12,

and, for the second last term above, we have

(x0+1)2x1(x1-1)(x1-(p-2))(x0+1)2(p-1)!δp-1(x1)=-(x0+1)2(1-(x1+1)p-1),

where we used Wilson’s theorem again. Hence, we have

max(x0,x1)(x1-x0)d=2p-2d-1(x0+1)(x0+2)(x0+d)x1(x1-1)(x1-(p-d)+1)
+x0+(x0+1)2(1-(x1+1)p-1)+(1-x0p-1)x12,

which is our claim in the statement. ∎

6 Polynomial expressions of some other functions

In this section, we study the following two 𝔽p-valued functions relevant to functions max and argmax:

ismax(y;x)=χ(max(x)=y),
nummax(r)(x)=#{ximax(x)=xi)}(r),

where x(𝔽p)n and y𝔽p. These functions would be useful in practical situations where there can be “ties” in the vote.

By a careful interpretation of the definitions, we obtain minimal polynomials of these functions (which, however, consist of a lot of terms).

Proposition 6.1.

Using the notation from Section 2, the following are minimal polynomial expressions:

ismax(y;x)=t=0p-1δt(y)i=0n-1(j<iLt(xj)δt(xi)k>iLt+1(xk)),
nummax(0)(x)=i=0n-1χ(max(x)=xi)
=i=0n-10tp-1(δt(xi)jiLt+1(xj)),
nummax(r)(x)=k=1nk(r)χ(#{imax(x)=xi}=k)
=k=1nk(r)(I(nk)0tp-1(iIδt(xi)jILt(xj))),

where the notation “I(nk)” means that I is a k-element subset of {0,1,,n-1}.

Proof.

For the function ismax, given a constant t𝔽p, we have max(x)=t if and only if there is an index i such that xj<t for every j<i, xi=t, and xkt for every k>i; such an index i is unique if it exists. This observation (in particular, the uniqueness of i) implies our claim.

For the function nummax(0), the function value is obtained by first counting the number of indices i with max(x)=xi (or equivalently, χ(max(x)=xi)=1) and then taking the remainder of the number modulo p (i.e., just considering the number in 𝔽p). Moreover, given a constant t𝔽p, we have max(x)=xi=t if and only if xi=t and xjt for every ji. This observation implies our claim.

For the function nummax(r), given an integer k1 and a constant t𝔽p, we have max(x)=t and #{imax(x)=xi}=k if and only if there is a k-element set I of indices such that xi=t for every iI and xj<t for every jI; such a set I is unique if it exists. This observation (in particular, the uniqueness of I) implies our claim (note that 0(r)=0 for any r). ∎

When p{2,3}, we give the following explicit minimal polynomial expressions of ismax(y;x).

Proposition 6.2.

When p=2, a minimal polynomial expression of ismax(y;x) is given by

ismax(y;x)=y+i=0n-1(1+xi).

When p=3, a minimal polynomial expression of ismax(y;x) is given by

ismax(y;x)=-y2+y(i=0n-1(1+xi)2+i=0n-1(1-xi2)+1)+i=0n-1(1-xi2).

Proof.

First, we note that ismax(y;x)=1-(y-max(x))p-1, by the definition of the function. When p=2, the right-hand side becomes y+max(x)+1 and now the claim follows from Corollary 3.2.

On the other hand, when p=3, we have

ismax(y;x)=1-(y-max(x))2=-y2-ymax(x)+1-max(x)2.

Now we have 1-max(x)2=1 if xi=0 for all i, and =0 otherwise. This implies that

1-max(x)2=i=0n-1δ0(xi)=i=0n-1(1-xi2),

and now the claim follows from Proposition 3.3. ∎

Example 6.3.

When p=2, a minimal polynomial expression of nummax(r)(x) is given by

nummax(r)(x)=e2r+n(r)i=0n-1(1-xi).

This can be seen by the following argument. When max(x)=0, i.e., xi=0 for all i, we have nummax(r)=n(r) for any r, which accounts for the second term. As (i=0n-1xi)(r)e2r(x)mod2 by the result of [3] (see also [6, Example 1]), we obtain the equality.

7 Future subject: Multi-digit cases

We note that the previous sections studied functions with single-digit input values taken from 𝔽p; in such a formulation, to handle larger input values we have to choose a larger prime p as well, which will result in polynomial expressions of the functions with higher degrees and much more involved structures. Another option to handle larger values is to express the input values in multi-digit forms; now each component of the input is identified with its p-ary expansion, therefore the entire input is regarded as a two-dimensional matrix over 𝔽p rather than a one-dimensional vector (over a larger field). In the latter model, the base field 𝔽p can be kept small even if the input values become larger. On the other hand, a large input value will then increase the total number of components of the input matrix, but this shortcoming might sometimes be avoidable in practice by implementation techniques such as parallel computation. This suggests that polynomial expressions of functions with multi-digit inputs are important as well. However, even if the polynomial expression of a given function is understood well for single-digit input cases, it is in general a non-trivial task to deduce a polynomial expression of the function for multi-digit input cases.

To study multi-digit versions of the functions, for an -digit parameter t=t-1p-1++t1p+t0{0,,p-1}, with t0,t1,,t-1{0,,p-1}, and a tuple z of variables z0,z1,,z-1 over 𝔽p, we define the multi-digit low-pass function Lt(z) by

Lt(z)=χ(z-1p-1++z1p+z0<t as integers).

We also extend the definition to the case t=p by setting Lp(z)=1 for any z.

Here we consider the multi-digit version of the function argmax(r) as an example that is relatively easier to handle. For 1 and for -digit input values 0xip-1 (i=0,,n-1), argmax(r)(x0,,xn-1) is defined to be the r-th digit of the least index i with xi=max(x0,,xn-1). Then the same argument as that in Section 4 implies the following result.

Proposition 7.1.

Let 1. For 0in-1, let the i-th component xi of the input be given by xi=xi,-1p-1++xi,1p+xi,0, with xi,0,xi,1,,xi,-1Fp(naturally identified with {0,1,,p-1}). Let S(r,n)={hpr-11h(n-1)/pr}. Then we have

argmax(r)(x)=1tp-1(iS(r,n)0jiLt(xj)i+1kn-1Lt+1(xk)-(n-1)(r)0jn-1Lt(xj)).

To obtain a polynomial expression of argmax(r)(x) in terms of the input components xi,j, we study polynomial expressions of the -digit low-pass function Lt(z), where t=(t0,t1,,t-1) and z=(z0,z1,,z-1) are naturally identified with t0+t1p++t-1p-1 and z0+z1p++z-1p-1, respectively. We note that, we have z<t if and only if there is an integer h{0,,-1} such that zj=tj for any h+1j-1 and zh<th; and this condition is satisfied for at most one h. This implies that

(7.1)Lt(z)=h=0-1Lth(zh)j=h+1-1δtj(zj)

and, similarly,

(7.2)Lt+1(z)=Lt0+1(z0)j=1-1δtj(zj)+h=1-1Lth(zh)j=h+1-1δtj(zj)

(we recall that we have extended the definition of the single-digit low-pass function as Lp(zj)=1). Substituting the minimal polynomials for Lt(z) and Lt+1(z) in (7.1) and (7.2) into the equality in Proposition 7.1 yields the minimal polynomial for the multi-digit version of argmax(r). However, the expression thus obtained will consist of too many terms as the number of input digits increases; we give an example only for a small case below and leave a more concise expression for the function in the general case as a future research topic.

Example 7.2.

Let p=2 and =2. Then the set S(r,n) is S(r,n)={h2r-11h(n-1)/2r}. By setting S(r,n)=S(r,n) if (n-1)(r)=0 and S(r,n)=S(r,n){n-1} if (n-1)(r)=1, in the same way as Example 4.3, it follows from Proposition 7.1 and relations (7.1) and (7.2) that

argmax(r)(x)
(7.3)=1t3(iS(r,n)0ji(Lt0(xj,0)δt1(xj,1)+Lt1(xj,1))i+1kn-1(Lt0+1(xk,0)δt1(xk,1)+Lt1(xk,1))).

By the relations L0(xj,h)=0, δ0(xj,h)=L1(xj,h)=1+xj,h, δ1(xj,h)=xj,h and L2(xj,h)=1, the summand in the right-hand side of (7.3) for each t{1,2,3} is: when t=1 (i.e., (t0,t1)=(1,0)),

iS(r,n)0ji(L1(xj,0)δ0(xj,1)+L0(xj,1))i+1kn-1(L2(xk,0)δ0(xk,1)+L0(xk,1))
=iS(r,n)0ji(1+xj,0)(1+xj,1)i+1kn-1(1+xk,1),

when t=2 (i.e., (t0,t1)=(0,1)),

iS(r,n)0ji(L0(xj,0)δ1(xj,1)+L1(xj,1))i+1kn-1(L1(xk,0)δ1(xj,1)+L1(xj,1))
=iS(r,n)0ji(1+xj,1)i+1kn-1(1+xk,0xk,1),

when t=3 (i.e., (t0,t1)=(1,1)),

iS(r,n)0ji(L1(xj,0)δ1(xj,1)+L1(xj,1))i+1kn-1(L2(xk,0)δ1(xk,1)+L1(xk,1))=iS(r,n)0ji(1+xj,0xj,1).

Summarizing, we have the following minimal polynomial expression for argmax(r)(x):

argmax(r)(x)=iS(r,n)(0ji(1+xj,0)(1+xj,1)i+1kn-1(1+xk,1)
+0ji(1+xj,1)i+1kn-1(1+xk,0xk,1)+0ji(1+xj,0xj,1)).

Such multi-digit extensions of the results on the other functions in this paper seem to be difficult, which we leave as a future research topic. Here we just conclude this section with a small example.

Proposition 7.3.

Let p=2, and consider the two-bit inputs y=2y1+y0{0,1,2,3} and xi=2xi,1+xi,0{0,1,2,3} for 0in-1, where yj,xi,jF2. Then the following is a minimal polynomial expression of the two-bit version of the function ismax:

ismax(y;x)=ismax(y;x0,x1,,xn-1)
=y1y0+y1i=0n-1(1+xi,1xi,0)+(y1+y0)i=0n-1(1+xi,1)+(y1+1)i=0n-1(1+xi,1)(1+xi,0).

Proof.

As the right-hand side of the statement satisfies the minimality conditions for the degrees, it suffices to verify that the values of both terms are equal for any input values.

First we note that, for any set I of index pairs (i,j), we have

(i,j)I(1+xi,j)=χ(xi,j=0 for all (i,j)I).

Similarly, we have

i(1+xi,1xi,0)=χ(for any i, either xi,1=0 or xi,0=0 holds).

We divide the argument according to the values of y1 and y0. When y1=y0=0, we have ismax(y;x)=1 if and only if xi,1=xi,0=0 for every index i. Now the right-hand side of the statement becomes i=0n-1(1+xi,1)(1+xi,0), which coincides with ismax(y;x) by the remark above.

When y1=0 and y0=1, the right-hand side of the statement becomes i=0n-1(1+xi,1)+i=0n-1(1+xi,1)(1+xi,0). Now if at least one of xi,1 is 1, then we have ismax(y;x)=0 by definition, while the value of the polynomial becomes 0 as well, by the remark above, as desired. In the remaining case where xi,1=0 for every i, we have ismax(y;x)=1 if and only if xi,0=1 for some i; while the polynomial now becomes 1+i=0n-1(1+xi,0). By the remark above, the value of the polynomial coincides with ismax(y;x), as desired.

When y1=1 and y0=0, the right-hand side of the statement becomes i=0n-1(1+xi,1xi,0)+i=0n-1(1+xi,1). Now if xi,1=0 for every i, then we have ismax(y;x)=0 by definition, while the value of the polynomial becomes 1+1=0 as well, by the remark above, as desired. In the remaining case where xi,1=1 for some i, let I denote the set of indices i with xi,1=1 (hence now I). In this case, we have ismax(y;x)=1 if and only if xi,0=0 for every iI; while the polynomial now becomes iI(1+xi,0). By the remark above, the value of the polynomial coincides with ismax(y;x), as desired.

Finally, when y1=y0=1, the right-hand side of the statement becomes 1+i=0n-1(1+xi,1xi,0). By the remark above, this polynomial takes the value 1 if and only if xi,1=xi,0=1 for some index i; this condition is precisely the same as the condition for ismax(y;x) in the present case to take the value 1, by definition. This completes the proof. ∎

Award Identifier / Grant number: JPMJPR14E8

Award Identifier / Grant number: JPMJPR16E3

Award Identifier / Grant number: 16K05083

Award Identifier / Grant number: JP25800009

Funding statement: The first named author was partially supported by JST PRESTO Grant Number JPMJPR16E3. The second named author was partially supported by KAKENHI, Grant-in-Aid for Scientific Research (C) 16K05083. The third named author was partially supported by JST PRESTO Grant Number JPMJPR14E8. The fourth named author was partially supported by KAKENHI, Grant-in-Aid for Young Scientists (B) JP5800009.

Acknowledgements

The authors would like to thank Takuro Abe for fruitful discussions.

References

[1] T. Araki, J. Furukawa, Y. Lindell, A. Nof and K. Ohara, High-throughput semi-honest secure three-party computation with an honest majority, Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, ACM, New York (2016), 805–817. 10.1145/2976749.2978331Search in Google Scholar

[2] R. Bost, R. A. Popa, S. Tu and S. Goldwasser, Machine learning classification over encrypted data, IACR Cryptology ePrint Archive (2014), https://eprint.iacr.org/2014/331.pdf. 10.14722/ndss.2015.23241Search in Google Scholar

[3] J. Boyar, R. Peralta and D. Pochuev, On the multiplicative complexity of Boolean functions over the basis (cap, +, 1), Theoret. Comput. Sci. 235 (2000), no. 1, 43–57. 10.1016/S0304-3975(99)00182-6Search in Google Scholar

[4] J. H. Cheon, M. Kim and M. Kim, Search-and-compute on encrypted data, Proceedings of Financial Cryptography and Data Security 2015—FC 2015, Lecture Notes in Comput. Sci. 8976, Springer, Berlin (2015), 142–159. 10.1007/978-3-662-48051-9_11Search in Google Scholar

[5] C. Gentry, Fully homomorphic encryption using ideal lattices, Proceedings of the Forty-first Annual ACM Symposium on Theory of Computing—STOC’09, ACM, New York (2009), 169–178. 10.1145/1536414.1536440Search in Google Scholar

[6] S. Kaji, T. Maeno, K. Nuida and Y. Numata, Polynomial expressions of carries in p-ary arithmetics, preprint (2015), http://arxiv.org/abs/1506.02742. Search in Google Scholar

[7] K. Nuida and K. Kurosawa, (Batch) fully homomorphic encryption over integers for non-binary message spaces, Advances in Cryptology–EUROCRYPT 2015, Lecture Notes in Comput. Sci. 9056, Springer, Berlin (2015), 537–555. 10.1007/978-3-662-46800-5_21Search in Google Scholar

[8] A. Shamir, How to share a secret, Commun. ACM 22 (1979), no. 11, 612–613. 10.1145/359168.359176Search in Google Scholar

[9] C. Sturtivant and G. S. Frandsen, The computational efficacy of finite-field arithmetic, Theoret. Comput. Sci. 112 (1993), 291–309. 10.1016/0304-3975(93)90022-LSearch in Google Scholar

Received: 2018-04-05
Accepted: 2019-03-25
Published Online: 2019-05-08
Published in Print: 2019-06-01

© 2019 Walter de Gruyter GmbH, Berlin/Boston

This article is distributed under the terms of the Creative Commons Attribution Non-Commercial License, which permits unrestricted non-commercial use, distribution, and reproduction in any medium, provided the original work is properly cited.

Downloaded on 24.11.2024 from https://www.degruyter.com/document/doi/10.1515/jmc-2018-0016/html
Scroll to top button