The present disclosure relates to a technology for approximating an elementary function of a real number in secure computation.
In recent years, research on advanced statistics and machine learning using secure computation has been actively performed. However, most operations thereof include calculations of elementary functions such as a reciprocal function, a square root function, an exponential function, and a logarithmic function, that go beyond addition, subtraction, and multiplication that are good for secure computation. These are extremely severe obstacles from the viewpoint of making applied research of secure computation flourish.
NPL 1 discloses a method of calculating an elementary function such as a reciprocal, a square root and a reciprocal thereof, and an exponential function in secure computation.
NPL 1: Dai Ikarashi, “Secure Real Number Operations for Secure AI-O(|p|)-Bit Communication and O(1)-Round Right Shift Protocol-”, CSS2019, 2019.
However, in a method described in NPL 1, different schemes must be selected and applied according to characteristics of a function.
The present disclosure has been made in view of such a point, and an object of the present disclosure is to provide a secure computation technology capable of supporting many elementary functions for general purpose only by changing parameters.
A secret share value [y]=[δx2+ax] is obtained through secure computation using a secret share value [x] of a real number x, and a secret share value [func(x)]=[y(ζy+b)+cx] of an elementary function approximation value z=func(x) of the real number x is obtained and output through secure computation using the secret share value [x] and the secret share value [y]. Here, x, y, and z are real numbers, a, b, c, δ, and ζ are real number coefficients, and a secret share value of · is [·].
In the present disclosure, many elementary functions can be subjected to secure computation for general purposes only by changing parameters.
Hereinafter, embodiments of the present disclosure will be described with reference to the drawings.
A first embodiment will be described. In the present embodiment, elementary functions are approximated by a polynomial and secure computation is performed. Thus, many elementary functions can be subjected to secure computation for general purposes only by changing parameters. Further, the elementary functions handled in the present embodiment are not limited, but when exponential functions or logarithmic functions are approximated by a polynomial, higher-order coefficients become very small. In such a case, when the approximation is performed using only one polynomial, approximation precision of coefficients is degraded. Thus, in the present embodiment, a plurality of polynomials are used to gradually decrease a higher order. An elementary function is a one-variable function of a real number or a complex number, and is a function obtained by repeating creation of an algebraic function, an exponential function, a logarithmic function, a triangular function, an inverse triangular function, and a composite function thereof a finite number of times. Examples of the elementary function are a reciprocal function, a square root function, an exponential function, and a logarithmic function.
As illustrated in
As illustrated in
The secret share value [x] is input to the secure computation unit 11. The secure computation unit 11 obtains and outputs a secret share value [y]=[δx2+ax] through secure computation using the secret share value [x] (step S11).
The secret share values [x] and [y] are input to the secure computation unit 12. The secure computation unit 12 obtains and outputs a secret share value [func(x)]=[y(ζy+b)+cx] of an elementary function approximation value z=func(x) of the real number x through secure computation using the secret share value [x] and the secret share value [y] (step S12).
The secure computation unit 11 outputs the secret share value [func(x)] (step S13).
In the first embodiment, the elementary function is approximated by a fourth-order polynomial, whereas in a second embodiment, the elementary function is approximated by an eighth-order polynomial. Hereinafter, differences from matters described so far will be mainly described and common matters will be briefly described.
As illustrated in
As illustrated in
The secret share value [x] is input to the secure computation unit 11. The secure computation unit 11 obtains and outputs a secret share value [y]=[δx2+ax] through the secure computation using the secret share value [x] (step S11).
The secret share values [x] and [y] are input to the secure computation unit 22. The secure computation unit 22 obtains and outputs the secret share value [z]=[y(ζy+b)+cx] through secure computation using the secret share value [x] and the secret share value [y] (step S22).
The secret share values [x], [y], and [z] are input to the secure computation unit 23. The secure computation unit 23 obtains and outputs a secret share value [func(x)]=[γ(z(αz+d)+y(βx+f)+gx)] of an elementary function approximation value w=func(x) of the real number x through secure computation using the secret share value [x], the secret share value [y], and the secret share value [z] (step S23).
The secure computation device 2 outputs the secret share value [func(x)] (step S13).
In a third embodiment, an elementary function is approximated by a fourth-order polynomial, as in the first embodiment, but the third embodiment differs from the first embodiment in that a highest-order coefficient can be set.
As illustrated in
As illustrated in
The secret share value [x] is input to the secure computation unit 11. The secure computation unit 11 obtains and outputs a secret share value [y]=[δx2+ax] through secure computation using the secret share value [x] (step S11).
The secret share values [x] and [y] are input to the secure computation unit 32. The secure computation unit 32 obtains and outputs a secret share value [func(x)]=[γ(y(ζy+b)+cx)] of an elementary function approximation value z=func(x) of the real number x through secure computation using the secret share value [x] and the secret share value [y] (step S32).
The secure computation unit 31 outputs the secret share value [func(x)] (step S13).
Modification Examples of First to Third Embodiments
The secure computation device may approximate a desired elementary function with a polynomial function ft(x)=func(x), calculate a secret share value [ft(x)−f′t(x)] of a difference ft(x)−f′t(x) between a function ft(x) before right shift and an approximation function f′u(x) of the function ft(x), obtain a secret share value [ft(x)−f′t(x)]r of (ft(x)−f′t(x))r obtained by right-shifting ft(x)−f′t(x), and obtain a secret share value [ft(x)] of the function ft(x) obtained by adding f′t(x) to ft(x)−f′t(x) through secure computation of the secret share value [ft(x)−f′t(x)]r and the secret share value [f′t(x)]. Here, x is a real number, [·] is a secret share value of ·, n is an integer equal to or greater than 1 (for example, n is an integer equal to or greater than 2), t=0, . . . , n−1, u=1, . . . , n−1, ft(x) is a function of a real number x, f′t(x) is an approximation function of the function ft(x), a secret share value [f′0(x)] of the approximation function f′0(x) is [f′0(x)]=c0, 0+c0, 1[x], a secret share value [f′u(x)] of an approximation function f′u(x) is [f′u(x)]=cu, 0+cu, 1[x]+cu, 2[f0(x)]+ . . . +[fu−1(x)], ct, 0 is a public value, and ct, 1, . . . , ct, n+1 are coefficients. Here, ct, 1, . . . , ct, n+1 are values with small effective numbers of bits and are values that do not require a shift due to overflow even when ct, 1, . . . , ct, n+1 is multiplied. ft(x)−f′t(x) is positive. A secret sharing scheme is not limited, and examples thereof include an additive secret sharing scheme and a Shamir's secret sharing scheme. Here, because a magnitude of ft(x)−f′t(x) is smaller than a magnitude of ft(x), it is possible to curb an overflow of the secret share value [ft(x)−f′t(x)]. Further, because the secret share value [ft(x)−f′t(x)] of the difference ft(x)−f′t(x) between the function ft(x) before right shift and the approximation function f′u(x) of the function ft(x) is calculated, it is possible to maintain high precision. The overflow is a problem based on performance of a processor in which the secure computation is implemented, and the present scheme provides a scheme for solving a problem based on constraints on this hardware. Thus, the present scheme does not solve pure mathematics problems, but solves hardware implementation problems, and therefore has technical characteristics. For example, technical characteristics of the processor that overflows when the secret share value [ft(x)] is calculated but does not overflow when the secret share value [ft(x)−f′t(x)] is calculated are remarkable. Hereinafter, modification examples of the first to third embodiments will be specifically shown.
Modification Example of First Embodiment
In the case of the first embodiment, n=2, a, b, c, δ, i, j, k, s, and m are real numbers, f0(x)=y=δx2+ax, f1(x)=z=y(ζy+b)+cx, f2(x)=w=γ(z(αz+d)+y(βx+f)+gx), f′0(x)=ix+j, f′1(x)=ky+sx+m, and f′2(x)=nz+oy+px+q.
Input: [x]ϵ[L, R)
Modification Example of Second Embodiment
In the case of the second embodiment, n=3, and a, b, c, d, f, g, h, i, j, k, s, m, n, o, p, q, α, β, γ, δ, and ζ are real numbers, f0(x)=y=δx2+ax, f1(x)=Z=y(ζy+b)+cx, f2(x)=w=γ(z(αz+d)+y(βx+f)+gx), f′0(x)=ix+j, f′1(x)=ky+sx+m, and f′2(x)=nz+oy+px+q.
Input: [x]ϵ[L, R)
Modification Example of Third Embodiment
In the case of the third embodiment, n=2, a, b, c, γ, δ, i, j, k, s, and m are real numbers, f0(x)=y=δx2+ax, and f1(x)=z=γ(y(δy+b)+cx), f′0(x)=ix+j, and f′1(x)=ky+sx+m.
Input: [x]ϵ[L, R)
In a fourth embodiment, a logarithmic function is approximated as an elementary function. As illustrated in
As illustrated in
The secret share value [χ] is input to the secure computation unit 45. The secure computation unit 45 obtains and outputs secret share values {χ0}, . . . , {χL−1} of an L-bit representation χ0 . . . χL−1 of the real number χ through secure computation using the secret share value [χ] (step S45). χ0, . . . , χL−1 are integers.
The secret share values {χ0}, . . . , {χL−1} are input to the secure computation unit 46. The secure computation unit 46 obtains and outputs secret share values {η0}, . . . , {ηL−1} of the msb flag sequence η0, . . . , ηL−1 in which a bit ηmsb corresponding to a most significant bit (msb) χmsb of a bit sequence χ0 . . . χL−1 is 1 and bits ηξ(ξ ϵ{0, . . . , L−1}) other than the bit ηmsb are 0, through secure computation using the secret share values {χ0}, . . . , {χL−1} (step S46). Details of step S46 will be described below.
The secret share values {χ0}, . . . , {χL−1} are input to the secure computation unit 47. The secure computation unit 47 performs secure computation using the secret share values {χ0}, . . . , {χL−1} to obtain and output a secret share value {ρi}={ρi+1Vχi} where 0≤i<L−1 and a secret share value {ρL−1}={χL−1} (step S47). Details of step S47 will be described below.
The secret share values {ρ0}, . . . , {ρL−1} are input to the secure computation unit 48. The secure computation unit 48 obtains and outputs a secret share value [θ] of a count value θ indicating the number of elements that are 1 among ρ0, . . . , ρL−1 through secure computation using the secret share values {ρ0}, . . . , {ρL−1} (step S48).
The secret share values {η0}, . . . , {ηL−1} are input to the secure computation unit 49. The secure computation unit 49 obtains and outputs a secret share value [ν] of a msb flag value ν=η0 . . . ηL−1 obtained by bit-connecting the msb flag sequence η0, . . . , ηL−1 through secure computation using the secret share values {θ0}, . . . , {ηL−1} (step S49).
The secret share values [χ] and [ν] are input to the secure computation unit 410. The secure computation unit 410 obtains and outputs a secret share value [x]=[χ][ν] through secure computation using the secret share value [χ] and the secret share value [ν] (step S410).
The secret share value [x] is input to any one of the secure computation devices 1 to 3. Any one of the secure computation devices 1 to 3 or the secure computation device of the modification examples thereof to which the secret share value [x] has been input obtains and outputs a secret share value [func(x)] through processing of the first to third embodiments or the modification examples thereof (step S420).
The secret share values [func(x)] and [θ] are input to the secure computation unit 411. The secure computation unit 411 obtains and outputs [log χ]=[func(x)]−[θ] through secure computation using the secret share value [func(x)] and the secret share value [θ] (step S411).
The secure computation device 4 outputs a secret share value [log χ] (step S412).
Details of Steps S46 and S47
In a fifth embodiment, processing in a case in which an elementary function is a reciprocal function, a reciprocal function of a square root, a square root function, and an exponential function is illustrated.
In Example 1, a secret share value of a reciprocal function value 1/χ of the real number χ is calculated. A positive integer indicating a difference between a decimal point position of a bit sequence of 0.5 when the input real number χ is expressed in binary and a most significant bit (msb) of χ is e, and the following modification is performed on the real number χ.
That is, processing of multiplying by 2e to normalize to a section [0.5, 1), obtaining a reciprocal
and then multiplying by 2e is performed in secure computation. For the reciprocal, when normalization to standard [0.5, 1) is performed, a precision is about 21 bits in an eighth-order polynomial approximation. Because 23-bit precision is required in single precision typically, it is necessary to introduce a technique for further improving the precision. Although, a leftmost bit is moved to normalize to [0.5, 1) normally, after that, when one bit below a leftmost bit is 0 (that is, when a value is [0.5, 0.75)), an operation of multiplication by 1.5 is performed. Then, because [0.5, 0.75) moves to [0.75, 1.125), normalization to [0.75, 1.125) is performed when considering that [0.75, 1) would do nothing. Because [0.75, 1.125) is a section narrower than [0.5, 1), the above operation is an effective technique in interpolation polynomial approximation of which the precision is improved as an approximation section is narrower.
Normalization Protocol for Reciprocal
Reciprocal Protocol
In Example 2, a secret share value of a reciprocal function value 1/√χ of a square root of the real number χ is calculated. In a reciprocal function of the square root, normalization to [0.5, 1) is performed in the same way as the reciprocal function described above. Here, multiplication by √(2e) instead of 2e is performed. In Example 2, the following modification is performed on the real number χ.
That is, processing of multiplying the real number χ by 2e so that the real number χ is normalized, obtaining a reciprocal of the square root of 2eχ
and then multiplying the reciprocal by √(2e) is performed in secure computation.
Normalization Protocol for Reciprocal of Square Root
Square Root Reciprocal Protocol
Processing content of steps S23′ and S32′ is illustrated hereinafter.
Case in Which Method of Second Embodiment Is Used (Step S23′)
The secure computation unit executes steps S10, S11, and S22 of the second embodiment described above for the secret share value [x] of the value x normalized to [0.5, 1) as described above. Thereafter, the secure computation unit executes processing of step S232 below instead of step S23.
Step S232: The secure computation unit obtains and outputs a secret share value [func(x)]=[(√2)γ(z(αz+d)+y(βx+f)+gx)] when φ=1 and a secret share value [func(x)]=[γ(z(αz+d)+y(βx+f)+gx)] when φ=0 through secure computation using the secret share values [x], [y], [z], and [φ].
The secure computation unit executes processing of step S232 as follows (steps S232a to S232c).
The secure computation unit uses multipliers m0=1 and m1=√2 and positive integers σ1 and σ1 to obtain and output public values 2σ0/m0 and 2σ1/m1. Here, σ1 and σ1 are positive integers that are the number of bits indicating a right shift amount required when multipliers m0 and m1 are large (step S232a).
The secure computation device performs secure computations of public value division [γ(z(αz+d)+y(βx+f)+gx)]/(2σ0/m0) and [γ(z(αz+d)+y(βx+f)+gx)]/(2σ1/m1) using the secret share values [x], [y], and [z] and the public values 2σ0/m0 and 2σ1/m1 obtained in step S232a, to obtain and output a secret share value [m0γ(z(αz+d)+y(βx+f)+gx)]r of a value obtained by right-shifting m0γ(z(αz+d)+y(βx+f)+gx) by σ0 bits and a secret share value [m1γ(z(αz+d)+y(βx+f)+gx)]r of a value obtained by right-shifting m1γ(z(αz+d)+y(βx+f)+gx) by σ1 bits (step S232b).
The secure computation device obtains and outputs a secret share value [func(x)]=[φ?m0γ(z(αz+d)+y(βx+f)+gx):m1γ(z(αz+d)+y(βx+f)+gx)] of mφγ(z(αz+d)+y(βx+f)+gx) through secure computation using the secret share values [φ], [m0γ(z(αz+d)+y(βx+f)+gx)]r, and [m1γ(z(αz+d)+y(βx+f)+gx)]r. That is, the secure computation unit obtains and outputs [func(x)]=[y(z(αz+d)+y(βx+f)+gx)] when φ=0, and obtains and outputs [func(x)]=[(√2)γ(z(αz+d)+y(βx+f)+gx)] when φ=1 (step S232c).
Case in which Method of Modification Example of Second Embodiment Is Used (Step S23′)
The secure computation unit executes steps S10, S11, and S22 of the modification example of the second embodiment described above for the secret share value [x] of the value x normalized to [0.5, 1) as described above. Thereafter, the secure computation unit executes processing of step S232′ below instead of step S23.
Step S232′: The secure computation unit obtains a secret share value [w′/γ]=[z(αz+d−n/γ)+(βx+f−o/γ)y+(g−p)x+(H−q)/γ] through secure computation of a sum of products using the secret share values [x], [y], [z], and [φ], and performs multiplication by (√2)γ and lowering of a decimal point position when φ=1 and multiplication by γ and lowering of the decimal point position when φ=0 to obtain the secret share value [w′]. Further, the secure computation unit obtains a secret share value [func(x)]=[w′+(nz+oy+px+q)] through secure computation using the secret share values [w′], [x], [y], and [z].
The secure computation unit executes, for example, processing of step S232′ as follows (steps S232a′ to S232e′).
The secure computation unit obtains a secret share value [w′/γ]=[z(αz+d−n/γ)+(βx+f−o/γ)y+(g−p)x+(H−q)/γ] through secure computation of a sum of products using the secret share values [x], [y], and [z] (step S232a′).
The secure computation unit uses multipliers m0=1 and m1=√2 and positive integers σ0 and σ1 to obtain and output public values 2σ0/m0 and 2σ1/m1 (step S232b′).
The secure computation device performs secure computations [w′/γ]/(2σ0/γm0) and [w′/γ]/(2σ1/γm1) of public value division using the secret share value [w′/γ] and the public values 2σ0/m0 and 2σ1/m1 obtained in step S232b′ to obtain and output a secret share value [m0w′]r of a value obtained by right-shifting m0w′ by σ0 bits and a secret share value [m1w′]r of a value obtained by right-shifting m1w′ by σ1 bits (step S232c′).
The secure computation device obtains and outputs the secret share value [func(x)]=[φ?m0w′:m1w′] of mφw′ through secure computation using the secret share values [φ], [m0w′]r, and [m1w′]r. That is, the secure computation unit obtains and outputs a secret share value [func′(x)]=[w′] when φ=0, and obtains and outputs a secret share value [func′(x)]=[(√2)w′] when φ=1 (step S232d′).
The secure computation unit obtains a secret share value [func(x)]=[func′(x)+(nz+oy+px+q)] through secure computation using the secret share values [func′(x)], [x], [y], and [z] (step S232e′).
Case in Which Method of Third Embodiment Is Used (Step S32′)
The secure computation unit executes steps S10 and S11 of the third embodiment described above for the secret share value [x] of the value x normalized to [0.5, 1) as described above. Thereafter, the secure computation unit executes processing of step S323 below instead of step S32.
Step S323: The secure computation unit obtains and outputs a secret share value [func(x)]=[(√2)γ(y(ζy+b)+cx)] when φ=1 and the secret share value [func(x)]=[γ(y(ζy+b)+cx)] when φ=0 through secure computation using the secret share values [x], [y], and [φ].
The secure computation unit executes, for example, processing of step S323 as follows (steps S323a to S323c).
The secure computation unit uses multipliers m0=1 and m1=√2 and positive integers σ0 and σ1 to obtain and output public values 2σ0/m0 and 2σ1/m1 (step S323a).
The secure computation device performs secure computations [γ(y(ζy+b)+cx)]/(2σ0/m0) and [γ(y(ζy+b)+cx)]/(2σ1/m1) of public value division using the secret share values [x] and [y] and the public values 2σ0/m0 and 2σ1/m1 obtained in step S323a, to obtain and output a secret share value [m0γ(y(ζy+b)+cx)]r of a value obtained by right-shifting m0γ(y(ζy+b)+cx) by σ0 bits and a secret share value [m1γ(y(ζy+b)+cx)]r of a value obtained by right-shifting m1γ(y(ζy+b)+cx) by σ1 bits (step S323b).
The secure computation device obtains and outputs a secret share value [φ?m0γ(y(ζy+b)+cx):m1γ(y(ζy+b)+cx)] of mφγ(y(ζy+b)+cx) through secure computation using the secret share values [φ], [m0γ(y(ζy+b)+cx)]r, and [m1γ(y(ζy+b)+cx)]r. That is, the secure computation unit obtains and outputs [func(x)]=[γ(y(ζy+b)+cx)] when φ=0, and [func(x)]=[(√2)γ(y(ζy+b)+cx)] when φ=1 (step S323c).
Case in which Method of Modification Example of Third Embodiment Is Used (Step S32′)
The secure computation unit executes steps S10 and S11 of the modification example of the third embodiment described above for the secret share value [x] of the value x normalized to [0.5, 1) as described above. Thereafter, the secure computation unit executes processing of step S323′ below instead of step S32.
Step S323′: The secure computation unit obtains [z′/γ]=[y(ζy+b−k/γ)+(c−s/γ)x−m/γ] through secure computation of a sum of products using the secret share values [x], [y], and [φ], performs multiplication by (√2)γ and lowering of a decimal point position when φ=1 and multiplication by γ and lowering of the decimal point position when φ=0 to obtain a secret share value [func′(x)]. The secure computation unit 32 obtains and outputs a secret share value [func(x)]=[func′(x)+(ky+sx+m)] through secure computation using the secret share value [func′(x)] and the secret share values [x] and [y].
The secure computation unit executes processing of step S323′ as follows (steps S323a′ to S323c′).
The secure computation unit obtains [z′/γ]=[y(ζy+b−k/γ)+(c−s/γ)x−m/γ] through secure computation of a sum of products using the secret share values [x] and [y] (step S323a′).
The secure computation unit uses multipliers m0=1 and m1=√2 and positive integers σ0 and σ1 to obtain and output public values 2σ0/m0 and 2σ1/m1 (step S323b′).
The secure computation unit performs secure computations [w′/γ]/(2σ0/γm0) and [w′/γ]/(2σ1/γm1) of public value division using the secret share value [w′/γ] and the public values 2σ0/m0 and 2σ1/m1 obtained in step S323b′ to obtain and output a secret share value [m0w′]r of a value obtained by right-shifting m0w′ by σ0 bits and a secret share value [m1w′]r of a value obtained by right-shifting m1w′ by σ1 bits (step S323c′).
The secure computation device obtains and outputs the secret share value [func(x)]=[φ?m0w′:m1w′] of mφw′ through secure computation using the secret share values [φ], [m0w′]r, and [m1w′]r. That is, the secure computation unit obtains and outputs a secret share value [func′(x)]=[w′] when φ=0, and obtains and outputs a secret share value [func′(x)]=[(√2)w′] when φ=1 (step S323d′).
The secure computation unit obtains and outputs a secret share value [func(x)]=[func′(x)+(ky+sx+m)] through secure computation using the secret share values [func′(x)], [x], and [y] (step S323e′).
In Example 3, a secret share value of a square root √χ of a real number χ is calculated. A reciprocal function of the square root is normalized to [1, 2) in the same way as the reciprocal function described above. In Example 3, the following modification is performed on the real number χ.
That is, processing of multiplying the real number χ by 2e so that the real number χ is normalized, obtaining a square root √(2eχ) of 2eχ, and then, dividing the square root by √(2e) is performed in secure computation.
Normalization Protocol for Square Root
Square Root Protocol
Processing content of steps S23″and S32″ is illustrated hereinafter.
Case in Which Method of Second embodiment Is Used (Step S23″)
The secure computation unit executes steps S10, S11, and S22 of the second embodiment described above for the secret share value [x] of the value x normalized to [1, 2) as described above. Thereafter, the secure computation unit executes processing of step S234 below instead of step S23.
Step S234: The secure computation unit obtains and outputs a secret share value [func(x)]=[(γφ′/√2)(z(αz+d)+y(βx+f)+gx)] when φ=1 and obtains and outputs the secret share value [func(x)]=[γφ′(z(αz+d)+y(βx+f)+gx)] when φ=0, through secure computation using the secret share values [x], [y], [z], and [φ].
The secure computation unit executes, for example, processing of step S234 as follows (steps S234a to S234c).
The secure computation unit obtains and outputs public values 2σ0/m0 and 2σ1/m1 using multipliers m0=φ′ and m1=φ′/√2 and positive integers σ0 and σ1 (step S234a).
The secure computation device performs secure computations [γ(z(αz+d)+y(βx+f)+gx)]/(2σ0/m0) and [γ(z(αz+d)+y(βx+f)+gx)]/(2σ1/m1) of public value division using the secret share values [x], [y], and [z] and the public values 2σ0/m0 and 2σ1/m1 obtained in step S234a, to obtain and output a secret share value [m0γ(z(αz+d)+y(βx+f)+gx)]r of a value obtained by right-shifting m0γ(z(αz+d)+y(βx+f)+gx) by σ0 bits and a secret share value [m1γ(z(αz+d)+y(βx+f)+gx)]r of a value obtained by right-shifting m1γ(z(αz+d)+y(βx+f)+gx) by σ1 bits (step S234b).
The secure computation device obtains and outputs a secret share value [func(x)]=[φ?m0γ(z(αz+d)+y(βx+f)+gx):m1γ(z(αz+d)+y(βx+f)+gx)] of mφγ(z(αz+d)+y(βx+f)+gx) through secure computation using the secret share values [φ], [m0γ(z(αz+d)+y(βx+f)+gx)]r, and [m1γ(z(αz+d)+y(βx+f)+gx)]r. That is, the secure computation unit obtains and outputs [func(x)]=[φ′γ(z(αz+d)+y(βx+f)+gx)] when φ=0, and obtains and outputs [func(x)]=[(φ′/√2)γ(z(αz+d)+y(βx+f)+gx)] when φ=1 (step S234c).
Case in which Method of Modification Example of Second Embodiment Is Used (Step S23″)
The secure computation unit executes steps S10, S11, and S22 of the modification example of the second embodiment described above for the secret share value [x] of the value x normalized to [1, 2) as described above. Thereafter, the secure computation unit executes processing of step S234′ below instead of step S23.
Step S234′: The secure computation unit obtain a secret share value [w′/γ]=[z(αz+d−n/γ)+(βx+f−o/γ)y+(g−p)x+(H−q)/γ] through secure computation of a sum of products using the secret share values [x], [y], [z], and [φ], and performs multiplication by γφ′/√2 and lowering of a decimal point position when φ=1 and multiplication by γφ′ and lowering of the decimal point position when φ=0 to obtain the secret share value [w′]. Further, the secure computation unit obtains a secret share value [func(x)]=[w′+(nz+oy+px+q)] through secure computation using the secret share values [w′], [x], [y], and [z].
The secure computation unit executes, for example, processing of step S234′ as follows (steps S234a′ to S234e′).
The secure computation unit obtains a secret share value [w′/γ]=[z(αz+d−n/γ)+(βx+f−o/γ)y+(g−p)x+(H−q)/γ] through secure computation of a sum of products using the secret share values [x], [y], and [z] (step S234a′).
The secure computation unit obtains and outputs public values 2σ0/m0 and 2σ1/m1 using multipliers m0=φ′ and m1=φ′/√2 and positive integers σ0 and σ1 (step S234b′).
The secure computation device performs secure computations [w′/γ]/(2σ0/γm0) and [w′/γ]/(2σ1/γm1) of public value division using the secret share value [w′/γ] and the public values 2σ0/m0 and 2σ1/m1 obtained in step S234b′ to obtain and output a secret share value [m0w′]r of a value obtained by right-shifting m0w′ by σ0 bits and a secret share value [m1w′]r of a value obtained by right-shifting m1w′ by σ1 bits (step S234c′).
The secure computation device obtains and outputs the secret share value [func(x)]=[φ?m0w′:m1w′] of mφw′ through secure computation using the secret share values [φ], [m0w′]r, and [m1w′]r. That is, the secure computation unit obtains and outputs a secret share value [func′(x)]=[φ′w′] when φ=0, and obtains and outputs a secret share value [func′(x)]=[(φ′/√2)w′] when φ=1 (step S234d′).
The secure computation unit obtains a secret share value [func(x)]=[func′(x)+(nz+oy+px+q)] through secure computation using the secret share values [func′(x)], [x], [y], and [z] (step S234e′).
Case in which Method of Third Embodiment Is Used (Step S32″)
The secure computation unit executes steps S10 and S11 of the third embodiment described above for the secret share value [x] of the value x normalized to [1, 2) as described above. Thereafter, the secure computation unit executes processing of step S325 below instead of step S32.
Step S325: The secure computation unit obtains and outputs a secret share value [func(x)]=[(φ′/√2)γ(y(ζy+b)+cx)] when φ=1 and the secret share value [func(x)]=[φ′γ(y(ζy+b)+cx)] when φ=0 through secure computation using the secret share values [x], [y], and [φ].
The secure computation unit executes processing of step S325 as follows (steps S325a to S325c).
The secure computation unit obtains and outputs public values 2σ0/m0 and 2σ1/m1 using multipliers m0=φ′ and m1=φ′/√2 and positive integers σ0 and σ1 (step S325a).
The secure computation device performs secure computations [γ(y(ζy+b)+cx)]/(2σ0/m0) and [γ(y(ζy+b)+cx)]/(2σ1/m1) of public value division using the secret share values [x] and [y] and the public values 2σ0/m0 and 2σ1/m1 obtained in step S325a, to obtain and output a secret share value [m0γ(y(ζy+b)+cx)]r of a value obtained by right-shifting m0γ(y(ζy+b)+cx) by σ0 bits and a secret share value [m1γ(y(ζy+b)+cx)]r of a value obtained by right-shifting m1γ(y(ζy+b)+cx) by σ1 bits (step S325b).
The secure computation device obtains and outputs a secret share value [φ?m0γ(y(ζy+b)+cx):m1γ(y(y+b)+cx)] of mφγ(y(ζy+b)+cx) through secure computation using the secret share values [φ], [m0γ(y(y+b)+cx)]r, and [m1γ(y(ζy+b)+cx)]r. That is, the secure computation unit obtains and outputs [func(x)]=[φ′γ(y(ζy+b)+cx)] when φ=0, and [func(x)]=[φ′/(√2)γ(y(ζy+b)+cx)] when φ=1 (step S325c).
Case in which Method of Modification Example of Third Embodiment Is Used (Step S32″)
The secure computation unit executes steps S10 and S11 of the modification example of the third embodiment described above for the secret share value [x] of the value x normalized to [1, 2) as described above. Thereafter, the secure computation unit executes processing of step S325′ below instead of step S32.
Step S325′: The secure computation unit obtains [z′/γ]=[y(ζy+b−k/γ)+(c−s/γ)x−m/γ] through secure computation of a sum of products using the secret share values [x], [y], and [φ], performs multiplication by φ′/(√2)γ and lowering of a decimal point position when φ=1 and multiplication by φ′γ and lowering of the decimal point position when φ=0 to obtain a secret share value [func′(x)]. The secure computation unit 32 obtains and outputs a secret share value [func(x)]=[func′(x)+(ky+sx+m)] through secure computation using the secret share value [func′(x)] and the secret share values [x] and [y].
The secure computation unit, for example, executes processing of step S325′ as follows (steps S325a′ to S325c′).
The secure computation unit obtains [z′/γ]=[y(ζy+b−k/γ)+(c−s/γ)x−m/γ] through secure computation of a sum of products using the secret share values [x] and [y] (step S325a′).
The secure computation unit obtains and outputs public values 2σ0/m0 and 2σ1/m1 using multipliers m0=φ′ and m1=φ′/√2 and positive integers σ0 and σ1 (step S325b′).
The secure computation unit performs secure computations [w′/γ]/(2σ0/γm0) and [w′/γ]/(2σ1/γm1) of public value division using the secret share value [w′/γ] and the public values 2σ0/m0 and 2σ1/m1 obtained in step S325b′ to obtain and output a secret share value [m0w′]r of a value obtained by right-shifting m0w′ by σ0 bits and a secret share value [m1w′]r of a value obtained by right-shifting m1w′ by σ1 bits (step S325c′).
The secure computation device obtains and outputs the secret share value [func(x)]=[φ?m0w′:m1w′] of mφw′ through secure computation using the secret share values [φ], [φ′], [m0w′]r, and [m1w′]r. That is, the secure computation unit obtains and outputs a secret share value [func′(x)]=[φ′w′] when φ=0, and obtains and outputs a secret share value [func′(x)]=[(φ′/√2)w′] when φ=1 (step S325d′).
The secure computation unit obtains and outputs a secret share value [func(x)]=[func′(x)+(ky+sx+m)] through secure computation using the secret share values [func′(x)], [x], and [y] (step S325e′).
In Example 4, a secret share value of an exponential function value exp(x) of a real number x is calculated. Because the exponential function has additivity to an input, the input is decomposed into the following three parts.
in which Fi=1 when x′i′=0 and Fi=fi when x′i′=1 for i=0, . . . , u−1 through secure computation.
through secure computation. This is a number indicated by a low-order bit part of exp(x′).
Example of Calculated Parameters Regarding Each Elementary Function
Hardware Configuration
The secure computation devices 1 to 4 in the respective embodiments and the secure computation devices in the respective examples are, for example, devices configured by a general-purpose or dedicated computer including a processor (a hardware processor) such as a central processing unit (CPU), a memory such as a random access memory (RAM) and a read only memory (ROM), and the like executing a predetermined program. This computer may include one processor and memory or may include a plurality of processors and memories. This program may be installed in a computer or may be recorded in a ROM or the like in advance. Further, a part or all of processing units may be configured by using an electronic circuit that implements a processing function alone, instead of an electronic circuit (circuitry) that implements a functional configuration by a program being read, like a CPU. Further, an electronic circuit constituting one device may include a plurality of CPUs.
The above-described program can be recorded on a computer-readable recording medium. An example of the computer-readable recording medium is a non-transitory recording medium. Examples of such a recording medium are a magnetic recording device, an optical disc, a photomagnetic recording medium, and a semiconductor memory.
Distribution of this program is performed, for example, by selling, transferring, or renting a portable recording medium such as a DVD or CD-ROM on which the program has been recorded. Further, this program may be distributed by being stored in a storage device of a server computer and transferred from the server computer to another computer via a network. As described above, the computer that executes such a program first temporarily stores, for example, the program recorded on the portable recording medium or the program transferred from the server computer in a storage device of the computer. When the computer executes the processing, the computer reads the program stored in the storage device of the computer and executes processing according to the read program. Further, as another form of execution of the program, the computer may directly read the program from the portable recording medium and execute the processing according to the program, and further, the processing according to the received program may be sequentially executed each time the program is transferred from the server computer to the computer. Further, a configuration in which the above-described processing may be executed by a so-called application service provider (ASP) type service that implements a processing function only by an execution instruction and result acquisition without transferring the program from the server computer to the computer. It is assumed that the program in the present embodiment includes information provided for processing of an electronic calculator and being pursuant to the program (such as data that is not a direct command to the computer, but has properties defining processing of the computer).
In each embodiment, although the present device is configured by a predetermined program being executed on the computer, at least a part of processing content of thereof may be implemented by hardware.
The present disclosure is not limited to the above-described embodiments. For example, the present disclosure may be used in a case in which secure computation is performed on elementary functions other than those shown in the specific examples. Further, various types of processing described above may be not only executed in chronological order according to the description but may also be executed in parallel or individually according to a processing capacity of a device that executes the processing or as necessary. In addition, it is obvious that change can be made appropriately without departing from the spirit of the present disclosure.
The present disclosure can be used, for example, for calculation of an elementary function such as a reciprocal function, a square root function, an exponential function, and a logarithmic function in machine learning and data mining performed in secure computation while concealing data.
1 to 4 Secure computation device
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2020/001681 | 1/20/2020 | WO |