1 Introduction
2 Background
3 Related work
4 Methods for computing basic mathematical functions homomorphically
4.1 Method selection for the division function
4.2 Method selection for the exponential function
Method | Multiplicative depth | Limitations |
---|---|---|
Taylor series | \(\lfloor log_{2}(n) \rfloor + 1\) | |
Padé-Approximation [42] | \(\lceil log_2(max(m,o)) \rceil + d\) | Additional coefficients required |
Newton Raphson | \((d+l)*n\) | Start value required |
4.3 Method selection for the square root function
Method | Multiplicative depth | Limitations |
---|---|---|
Heron/Raphson [56] | \((d + 1) * n\) | Start value required |
Bakshali [57] | (2d + 4) * n | Start value required |
Wilkes [58] | \(3 * n\) | Range limited to [0,1) |
Halley [59] | \( 4 * n\) | Start value required |
Newton–Raphson [18] | \( n * 3 + 2 \) | Start value required |
4.4 Method selection for the logarithm function
Method | Multiplicative depth | Limitations |
---|---|---|
Modified Taylor series | \( \lceil log_2(2*n+1)\rceil + 3 + d\) | |
Padé Approximation [42] | \(\lceil log_2(max(m,o)) \rceil + d\) | Additional coefficients required |
Newton–Raphson | \((d+e)*n\) | Start value required |
Arithmetic–geometric Mean | \(s + 2d\) | Start value required |
4.5 Method selection for the maximum and minimum function
5 Homomorphic implementation of basic mathematical functions
5.1 Implementation of the division function
5.2 Implementation of the square root function
5.3 Implementation of the exponential and logarithmic function
6 Evaluation
6.1 Evaluation of the division function
6.2 Evaluation of the exponential function
6.3 Evaluation of the square root function
6.4 Evaluation of the logarithm function
6.5 Evaluation of the maximum and minimum functions
6.6 Evaluation of combinations of the functions
6.6.1 Concept of the Box–Cox transformation
6.6.2 Evaluation of the homomorphic implementation of the Box–Cox transformation
Step | Required time in seconds |
---|---|
\(c_1\) calculation | \(1806.48 \pm 14.07\) |
\(c_2\) Calculation | \(1863.51 \pm 17.97\) |
\(c_3\) Calculation | \(1570.91 \pm 14.56\) |
\(c_4\) Calculation | \(1818.01 \pm 24.97\) |
\(\lambda \) Selection | \(6832.48 \pm 9.23\) |
Transformation Calculation | \(828.64 \pm 2.41\) |
\(\lambda \) | Non-homomorphically | Homomorphically |
---|---|---|
computed c value | computed c value | |
−1 | 0.16610 | 0.16379 |
0 | 0.14184 | 0.14068 |
1 | 0.15569 | 0.15566 |
2 | 0.19852 | 0.19841 |
7 Conclusion
rootObject = root(lower interval limit, upper interval limit, precision)
and calling rootObject.calculateRoot(x)
. The bounds for the computation should only be set initially, and for each following computation, the bounds should be set automatically. Moreover, we plan to provide guidelines to assist users in selecting appropriate initial bounds. In addition, we plan to implement the activation functions of neural networks for the CKKS cryptosystem using the basic mathematical functions realized in this paper. As soon as we are able to homomorphically calculate activation functions with high accuracy, we plan to string them together into neural networks as a next step.