The Secure Outsourced Computation on Integers (SOCI) scheme employs a twin-server architecture that is based on the Paillier cryptosystem. This framework enables secure outsourced computation involving encrypted integers, as opposed to being limited to natural numbers [1]. Notably, SOCI achieves significant improvements in computational efficiency compared to fully homomorphic encryption mechanisms. Within the SOCI framework, a comprehensive set of efficient secure computation protocols has been developed, encompassing secure multiplication (
The protocols within the SOCI framework are constructed upon the foundation of the Paillier cryptosystem with threshold decryption (PaillierTD). This variant of the conventional Paillier cryptosystem divides the private key into two partially private keys. Importantly, neither of these partially private keys alone possesses the capability to effectively decrypt a ciphertext that has been encrypted using the Paillier cryptosystem. The PaillierTD scheme comprises the following algorithms.
The private key
For brevity, we will omot
PaillierTD has the additive homomorphism and scalar-multipilication homomorphism as follows.
-
Additive homomorphism:
$\textsf{Dec}(sk,[m_1+m_2\mod N])=\textsf{Dec}(sk,[m_1]\cdot[m_2])$ ; -
Scalar-multiplication homomorphism:
$\textsf{Dec}(sk,[c\cdot m\mod N])=\textsf{Dec}(sk,[m]^c)$ for$c\in\mathbb{Z}^*_N$ . Particularly, when$c=N-1$ ,$\textsf{Dec}(sk,[m]^c)=-m$ holds.
The system architecture of SOCI, depicted in the figure above, comprises a data owner (DO) and two servers: a cloud platform (CP) and a computation service provider (CSP).
- DO: The DO is responsible for securely generating and distributing keys to both CP and CSP. To achieve this, the DO initiates the
$\textsf{KeyGen}$ algorithm to create a public/private key pair, denoted as$(pk, sk)$ , for the Paillier cryptosystem. Subsequently, the DO splits the private key$sk$ into two partially private keys, labeled as$(sk_1, sk_2)$ . Following this, the DO distributes$(pk, sk_1)$ and$(pk, sk_2)$ to CP and CSP, respectively. To safeguard data privacy, the DO encrypts data using the public key$pk$ and then outsources the encrypted data to CP. Additionally, the DO outsources computation services, performed on the encrypted data, to both CP and CSP. - CP: CP is responsible for storing and managing the encrypted data transmitted by the DO. It also generates intermediate results and final results while keeping them in an encrypted form. Furthermore, CP is capable of directly executing specific calculations over encrypted data, such as homomorphic addition and homomorphic scalar multiplication. CP collaborates with CSP to execute secure operations like
$\textsf{SMUL}$ ,$\textsf{SCMP}$ ,$\textsf{SSBA}$ , and$\textsf{SDIV}$ on encrypted data. - CSP: CSP exclusively offers online computation services and does not retain any encrypted data. Specifically, CSP works in conjunction with CP to perform secure computations, such as multiplication, comparison, and division, on encrypted data.
The project in this version is written in C/C++.
Taken as input a security parameter
Taken as input the private key
The private key
Taken as input a plaintext
Note: mpz_t is a GMP data type which is a multiple precision integer.
Taken as input a ciphertext
Given a ciphertext
Given partially decrypted ciphtexts
Given two ciphertext
Given a ciphertext
Given ciphertexts
Given ciphertexts
Given a ciphertext
Given ciphertexts
- OS: Ubuntu 20.04 LTS.
- make,g++
- GMP
GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating-point numbers.
Download GMP from GMP . you can choose “gmp-6.2.0.tar.xz”.
- Unzip it
Click terminal and type
tar -xvf gmp-6.2.0.tar.xz
- Go to gmp-6.2.0
cd gmp-6.2.0
- config
./configure --prefix=/usr --enable-cxx
- make
make
make check
sudo make install
make
./bin/soci
set x = 99, y = 789
run add function, its running time is ------ 0.010000 ms
x + y = 888
---------------------------
set x = 99, y = 789
compute scl_mul function, its running time is ------ 0.018000 ms
x*y = 78111
---------------------------
Secure computation protocols
set x = 99, y = 789
compute SMUL function, its running time is ------ 13.986000 ms
x*y = 78111
---------------------------
set x = 99, y = 789
compute SCMP function, its running time is ------ 7.919000 ms
x>=y? = 1
---------------------------
set x = 99
compute SSBA function, its running time is ------ 21.188000 ms
s_x = 0 u_x = 99
---------------------------
set x = 5429496723, y = 9949672
compute SDIV function, its running time is ------ 742.709000 ms
q = 545 r = 6925483
---------------------------
We employed varying values of KEY_LEN_BIT to assess the performance of each function. The experiments were conducted on a laptop equipped with a 10th Gen Intel(R) Core(TM) i5-10210U CPU, consisting of 2 cores running at 2.70 GHz and 2 cores running at 2.69 GHz, with 16GB of RAM. The obtained experimental results are detailed below:
Length of key in bit | KEY_LEN_BIT | 256 | 384 | 512 | 640 | 768 | 896 | 1024 |
---|---|---|---|---|---|---|---|---|
PaillierTD Encryption | encrypt | 0.31015 | 0.5553 | 1.21225 | 2.1346 | 3.76635 | 5.97745 | 8.01885 |
PaillierTD Decryption | decrypt | 0.24085 | 0.54355 | 1.2006 | 2.1238 | 3.8087 | 5.73475 | 7.98915 |
Secure Addition | add | 0.0007 | 0.001 | 0.0014 | 0.00205 | 0.0029 | 0.0046 | 0.0045 |
Secure Scalar Multiplication | scl_mul | 0.0146 | 0.0245 | 0.0374 | 0.0529 | 0.0775 | 0.11135 | 0.1269 |
Secure Multiplication | SMUL | 2.0798 | 5.6713 | 12.12965 | 20.92335 | 37.91795 | 54.50355 | 82.22075 |
Secure Comparison | SCMP | 0.9691 | 2.87705 | 6.0354 | 10.9546 | 18.1335 | 28.78905 | 40.70935 |
Secure Sign Bit-Acquisition | SSBA | 2.8683 | 8.49485 | 18.34195 | 31.9929 | 54.5122 | 83.05835 | 124.2594 |
Secure Division | SDIV | 93.91275 | 281.39765 | 613.20965 | 1090.61045 | 1870.91515 | 2863.31305 | 4056.85975 |
The time unit is ms.
In the Main.cpp source code file, you have the flexibility to modify the values of two important parameters: KEY_LEN_BIT and SIGMA_LEN_BIT.
(1) KEY_LEN_BIT governs the bit-length of the large prime used in the computation.
(2) SIGMA_LEN_BIT dictates the bit-length of the variable denoted as
- Bowen Zhao, Jiaming Yuan, Ximeng Liu, Yongdong Wu, Hwee Hwa Pang, and Robert H. Deng. SOCI: A toolkit for secure outsourced computation on integers. IEEE Transactions on Information Forensics and Security, 2022, 17: 3637-3648.